19 STATE preStressXX, STATE preStressYY, STATE preStressZZ) :
21 TPZElasticity3D(nummat, E, poisson, force, preStressXX, preStressYY, preStressZZ)
46 std::cout <<
"\n\n" <<
"ek and ef should have same number of rows!!!\n";
47 std::cout <<
"See " << __PRETTY_FUNCTION__ <<
"\n\n";
53 std::cout <<
"\n\n" <<
"ef should have fNumLoadCases equals to its NCols()!!!\n";
54 std::cout <<
"See " << __PRETTY_FUNCTION__ <<
"\n\n";
71 std::cout <<
"\n\n" <<
"ek and ef should have same number of rows!!!\n";
72 std::cout <<
"See " << __PRETTY_FUNCTION__ <<
"\n\n";
78 std::cout <<
"\n\n" <<
"ef should have fNumLoadCases equals to its NCols()!!!\n";
79 std::cout <<
"See " << __PRETTY_FUNCTION__ <<
"\n\n";
116 int phc = phi.
Cols();
128 REAL dvxdx, dvxdy, dvxdz;
129 REAL dvydx, dvydy, dvydz;
130 REAL dvzdx, dvzdy, dvzdz;
132 REAL duxdx, duxdy, duxdz;
133 REAL duydx, duydy, duydz;
134 REAL duzdx, duzdy, duzdz;
142 for(
int in = 0; in < phc; in++ )
159 for(
int col = 0; col < efc; col++)
161 ef(in,col) += weight*(
fForce[0] * phi(0, in) +
183 REAL eq1 = duydy*dvxdx*lambda + duzdz*dvxdx*lambda + duxdy*dvydx*mu +
184 duydx*dvydx*mu + duxdz*dvzdx*mu + duzdx*dvzdx*mu +
185 duxdx*dvxdx*(lambda + 2.*mu);
187 REAL eq2 = duxdx*dvydy*lambda + duzdz*dvydy*lambda + duxdy*dvxdy*mu +
188 duydx*dvxdy*mu + duydz*dvzdy*mu + duzdy*dvzdy*mu +
189 duydy*dvydy*(lambda + 2.*mu);
191 REAL eq3 = duxdx*dvzdz*lambda + duydy*dvzdz*lambda + duxdz*dvxdz*mu +
192 duzdx*dvxdz*mu + duydz*dvydz*mu + duzdy*dvydz*mu +
193 duzdz*dvzdz*(lambda + 2.*mu);
195 ef(in,col) -= weight * (eq1 + eq2 + eq3);
197 for(
int jn = 0; jn < phc; jn++ )
214 REAL eq1 = duydy*dvxdx*lambda + duzdz*dvxdx*lambda + duxdy*dvydx*mu +
215 duydx*dvydx*mu + duxdz*dvzdx*mu + duzdx*dvzdx*mu +
216 duxdx*dvxdx*(lambda + 2.*mu);
218 REAL eq2 = duxdx*dvydy*lambda + duzdz*dvydy*lambda + duxdy*dvxdy*mu +
219 duydx*dvxdy*mu + duydz*dvzdy*mu + duzdy*dvzdy*mu +
220 duydy*dvydy*(lambda + 2.*mu);
222 REAL eq3 = duxdx*dvzdz*lambda + duydy*dvzdz*lambda + duxdz*dvxdz*mu +
223 duzdx*dvxdz*mu + duydz*dvydz*mu + duzdy*dvydz*mu +
224 duzdz*dvzdz*(lambda + 2.*mu);
226 ek(in,jn) += weight * (eq1 + eq2 + eq3);
249 int phc = phi.
Cols();
256 for(in = 0 ; in < phc; in++)
261 ef(in,il) += weight * BIGNUMBER * ( v2(0,il)*phi(0,in) + v2(1,il)*phi(1,in) + v2(2,il)*phi(2,in) );
263 ef(in,il) -= weight * BIGNUMBER * ( sol[0]*phi(0,in) + sol[1]*phi(1,in) + sol[2]*phi(2,in) );
265 for(jn = 0 ; jn < phc; jn++)
267 ek(in,jn) += weight * BIGNUMBER * ( phi(0,jn)*phi(0,in) + phi(1,jn)*phi(1,in) + phi(2,jn)*phi(2,in) );
274 for(in = 0; in < phc; in++)
279 ef(in,il) += weight * ( v2(0,il)*phi(0,in) + v2(1,il)*phi(1,in) + v2(2,il)*phi(2,in) );
288 for(in = 0 ; in < phc; in++)
293 ef(in,il) += weight * ( v2(0,il)*phi(0,in) + v2(1,il)*phi(1,in) + v2(2,il)*phi(2,in) );
295 ef(in,il) -= ( bc.
Val1()(0,0)*phi(0,in)*sol[0]*weight
297 + bc.
Val1()(1,0)*phi(1,in)*sol[0]*weight
299 + bc.
Val1()(2,0)*phi(2,in)*sol[0]*weight
302 + bc.
Val1()(0,1)*phi(0,in)*sol[1]*weight
304 + bc.
Val1()(1,1)*phi(1,in)*sol[1]*weight
306 + bc.
Val1()(2,1)*phi(2,in)*sol[1]*weight
309 + bc.
Val1()(0,2)*phi(0,in)*sol[2]*weight
311 + bc.
Val1()(1,2)*phi(1,in)*sol[2]*weight
313 + bc.
Val1()(2,2)*phi(2,in)*sol[2]*weight );
316 for(jn = 0; jn <phc; jn++)
319 ek(in,jn) += bc.
Val1()(0,0)*phi(0,in)*phi(0,jn)*weight
321 + bc.
Val1()(1,0)*phi(1,in)*phi(0,jn)*weight
323 + bc.
Val1()(2,0)*phi(2,in)*phi(0,jn)*weight
326 + bc.
Val1()(0,1)*phi(0,in)*phi(1,jn)*weight
328 + bc.
Val1()(1,1)*phi(1,in)*phi(1,jn)*weight
330 + bc.
Val1()(2,1)*phi(2,in)*phi(1,jn)*weight
333 + bc.
Val1()(0,2)*phi(0,in)*phi(2,jn)*weight
335 + bc.
Val1()(1,2)*phi(1,in)*phi(2,jn)*weight
337 + bc.
Val1()(2,2)*phi(2,in)*phi(2,jn)*weight;
344 for(in = 0 ; in < phc; in++)
349 ef(in,il) -= weight * BIGNUMBER * ( v2(0,il)*phi(0,in)*sol[0] + v2(1,il)*phi(1,in)*sol[1] + v2(2,il)*phi(2,in)*sol[2] );
350 for(jn = 0 ; jn < phc; jn++)
352 ek(in,jn) += weight * BIGNUMBER * ( v2(0,il)*phi(0,in)*phi(0,jn) + v2(1,il)*phi(1,in)*phi(1,jn) + v2(2,il)*phi(2,in)*phi(2,jn) );
364 PZError <<
"TPZElastitity3D::ContributeBC error - Wrong boundary condition type" << std::endl;
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
int fNumLoadCases
Defines the number of load cases generated by this material.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
Implements a vector class which allows to use external storage provided by the user. Utility.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
It computes a contribution to the residual vector at one integration point.
This class implements a 3D isotropic elasticity material.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
MShapeFunctionType fShapeType
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
virtual int ClassId() const override
Define the class id associated with the class.
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
void ContributeVecShapeAux(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
TPZManVector< REAL > fPreStress
virtual void FillDataRequirements(TPZMaterialData &data)
Fill material data parameter with necessary requirements for the.
#define DebugStop()
Returns a message to user put a breakpoint in.
This class defines the boundary condition for TPZMaterial objects.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Implements Dirichlet and Neumann boundary conditions.
int64_t Rows() const
Returns number of rows.
virtual void FillDataRequirements(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the Contribute method.
TPZFMatrix< STATE > & Val1()
void ContributeVecShapeBCAux(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
int32_t Hash(std::string str)
int ClassId() const override
Define the class id associated with the class.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
STATE fPoisson
Poisson's ratio.
TPZManVector< STATE, 3 > fForce
External forces.
int64_t Cols() const
Returns number of cols.
STATE fE
Young's modulus.
TPZSolVec sol
vector of the solutions at the integration point
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
#define PZError
Defines the output device to error messages and the DebugStop() function.