20 #ifndef __SMALLSTRAINTRANVERSLYISOTROPIC_HPP__
21 #define __SMALLSTRAINTRANVERSLYISOTROPIC_HPP__
24 #error "MoFEM need to be compiled with ADOL-C"
30 template<
typename TYPE>
45 for(
int dd = 0;
dd<3;
dd++) {
234 ublas::matrix<TYPE>
dR;
240 dR.resize(6,6,
false);
264 boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr
279 this->
P.resize(3,3,
false);
280 this->
P(0,0) = voigtStress[0];
281 this->
P(1,1) = voigtStress[1];
282 this->
P(2,2) = voigtStress[2];
283 this->
P(0,1) = voigtStress[3];
284 this->
P(1,2) = voigtStress[4];
285 this->
P(0,2) = voigtStress[5];
286 this->
P(1,0) = this->
P(0,1);
287 this->
P(2,1) = this->
P(1,2);
288 this->
P(2,0) = this->
P(0,2);
298 boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr
330 double nrm2_phi = sqrt(pow(
phi(0,0),2)+pow(
phi(0,1),2)+pow(
phi(0,2),2));
331 for(
int ii = 0;ii<3;ii++) {
336 const double zVec[3]={ 0.0,0.0,1.0 };
341 const double eps = 1e-12;
342 if(nrm2_ax_vector<
eps) {
350 }
catch (
const std::exception& ex) {
351 std::ostringstream ss;
352 ss <<
"throw in method: " << ex.what() << std::endl;
353 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
378 }
catch (
const std::exception& ex) {
379 std::ostringstream ss;
380 ss <<
"throw in method: " << ex.what() << std::endl;
381 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
387 std::map<std::string,std::vector<VectorDouble > > &field_map,
388 std::map<std::string,std::vector<MatrixDouble > > &grad_map
391 int nb_gauss_pts = grad_map[
"POTENTIAL_FIELD"].size();
393 for(
int gg = 0;gg<nb_gauss_pts;gg++) {
395 for(
int ii = 0;ii<3;ii++) {
397 ((grad_map[
"POTENTIAL_FIELD"])[gg])(0,ii);
412 int &nb_active_variables
425 nb_active_variables += 4;
427 }
catch (
const std::exception& ex) {
428 std::ostringstream ss;
429 ss <<
"throw in method: " << ex.what() << std::endl;
430 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
449 }
catch (
const std::exception& ex) {
450 std::ostringstream ss;
451 ss <<
"throw in method: " << ex.what() << std::endl;
452 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
UBlasVector< double > VectorDouble
static constexpr double delta
data for calculation heat conductivity and heat capacity elements
std::map< std::string, std::vector< MatrixDouble > > gradAtGaussPts
Implementation of elastic (non-linear) St. Kirchhoff equation.
FunctionsToCalculatePiolaKirchhoffI()
int gG
Gauss point number.
CommonData * commonDataPtr
MatrixBoundedArray< TYPE, 9 > F
MatrixBoundedArray< TYPE, 9 > P
structure grouping operators and data used for calculation of nonlinear elastic element
SmallStrainTranverslyIsotropicADouble()
virtual MoFEMErrorCode setUserActiveVariables(VectorDouble &active_variables)
Add additional independent variables More complex physical models depend on gradient of defamation an...
virtual MoFEMErrorCode setUserActiveVariables(int &nb_active_variables)
add additional active variables
SmallStrainTranverslyIsotropicDouble()
virtual MoFEMErrorCode calculateAngles()
virtual MoFEMErrorCode getDataOnPostProcessor(std::map< std::string, std::vector< VectorDouble > > &field_map, std::map< std::string, std::vector< MatrixDouble > > &grad_map)
virtual MoFEMErrorCode calculateElasticEnergy(const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
calculate density of strain energy
virtual MoFEMErrorCode calculateP_PiolaKirchhoffI(const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
Calculate global stress.
ublas::matrix< TYPE > aARotMat
MoFEMErrorCode stressTransformation()
Function to Calculate Stress Transformation Matrix This function computes the stress transformation M...
ublas::matrix< TYPE > stressRotMat
SmallStrainTranverslyIsotropic()
ublas::matrix< TYPE > sTrain
virtual MoFEMErrorCode calculateAngles()
ublas::matrix< TYPE > globalStiffnessMatrix
MoFEMErrorCode calculateGlobalStiffnesMatrix()
ublas::symmetric_matrix< TYPE, ublas::upper > localStiffnessMatrix
MoFEMErrorCode strainTransformation()
Function to Calculate Strain Transformation Matrix This function computes the strain transformation ...
ublas::matrix< TYPE > strainRotMat
MoFEMErrorCode calculateAxisAngleRotationalMatrix()
Function to Calculate the Rotation Matrix at a given axis and angle of rotation.
ublas::vector< TYPE > voightStrain
MoFEMErrorCode calculateFibreAngles()
VectorDouble normalizedPhi
MoFEMErrorCode calculateLocalStiffnesMatrix()
ublas::vector< TYPE > axVector
VectorDouble axVectorDouble
MoFEMErrorCode calculateStrain()
ublas::vector< TYPE > voigtStress