//====================================================================== int EightNode_Brick_u_p::update() { int ret = 0; int where; int i,j; tensor I2("I", 2, def_dim_2); double r = 0.0; double s = 0.0; double t = 0.0; int tdisp_dim[] = {Num_Nodes,Num_Dim}; tensor total_disp(2,tdisp_dim,0.0); int dh_dim[] = {Num_Nodes, Num_Dim}; tensor dh(2, dh_dim, 0.0); straintensor strn; tensor t_disp = getNodesDisp(); for (i=1; i<=Num_Nodes; i++) { for (j=1; j<=Num_Dim; j++) { total_disp.val(i,j) = t_disp.cval(i,j); } } int GP_c_r, GP_c_s, GP_c_t; for( GP_c_r = 0 ; GP_c_r < Num_IntegrationPts; GP_c_r++ ) { r = pts[GP_c_r]; for( GP_c_s = 0 ; GP_c_s < Num_IntegrationPts; GP_c_s++ ) { s = pts[GP_c_s]; for( GP_c_t = 0 ; GP_c_t < Num_IntegrationPts; GP_c_t++ ) { t = pts[GP_c_t]; where = (GP_c_r*Num_IntegrationPts+GP_c_s)*Num_IntegrationPts+GP_c_t; dh = dh_Global(r,s,t); strn = total_disp("Ia")*dh("Ib"); strn.null_indices(); strn.symmetrize11(); if ( (theMaterial[where]->setTrialStrain(strn) ) ) opserr << "EightNode_Brick_u_p::update (tag: " << this->getTag() << "), not converged\n"; } } } return ret; }
tensor TotalLagrangianFD8NodeBrick::getNodesDisp(void) { int i, j; int dimU[] = {NumNodes, NumDof}; tensor total_disp(2, dimU, 0.0); for (i=0; i<NumNodes; i++) { const Vector &TNodesDisp = theNodes[i]->getTrialDisp(); for (j=0; j<NumDof; j++) { total_disp.val(i+1, j+1) = TNodesDisp(j); } } return total_disp; }
Matrix AC3D8HexWithSensitivity::getTotalDisp(void) { Matrix total_disp(nodes_in_elem, 1); int i; for(i = 0; i < nodes_in_elem; i++) { const Vector &TotDis = theNodes[i]->getTrialDisp(); total_disp(i,0) = TotDis(0); } // for(i = 0; i < nodes_in_elem; i++) { // printf("total_disp(%d) = %g\n", i+1, total_disp(i,0)); // } return total_disp; }
//====================================================================== tensor EightNode_Brick_u_p::getNodesDisp(void) { int i,j; int dimU[] = {Num_Nodes,Num_Dof}; tensor total_disp(2, dimU, 0.0); for (i=0; i<Num_Nodes; i++) { const Vector &TNodesDisp = theNodes[i]->getTrialDisp(); for (j=0; j<Num_Dof; j++) { total_disp.val(i+1, j+1) = TNodesDisp(j); } } return total_disp; }