v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MyMat< TYPE > Struct Template Reference
Inheritance diagram for MyMat< TYPE >:
[legend]
Collaboration diagram for MyMat< TYPE >:
[legend]

Public Member Functions

virtual MoFEMErrorCode setUserActiveVariables (int &nb_active_variables)
 add additional active variables More...
 
virtual MoFEMErrorCode setUserActiveVariables (VectorDouble &active_variables)
 Add additional independent variables More complex physical models depend on gradient of defamation and some additional variables. For example can depend on temperature. This function adds additional independent variables to the model. More...
 
- Public Member Functions inherited from MyMat_double< TYPE >
 MyMat_double ()
 
virtual MoFEMErrorCode calculateP_PiolaKirchhoffI (const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 
- Public Member Functions inherited from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >
 FunctionsToCalculatePiolaKirchhoffI ()
 
virtual ~FunctionsToCalculatePiolaKirchhoffI ()=default
 
MoFEMErrorCode calculateC_CauchyDeformationTensor ()
 
MoFEMErrorCode calculateE_GreenStrain ()
 
MoFEMErrorCode calculateS_PiolaKirchhoffII ()
 
virtual MoFEMErrorCode calculateP_PiolaKirchhoffI (const BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Function overload to implement user material. More...
 
virtual MoFEMErrorCode calculateCauchyStress (const BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Function overload to implement user material. More...
 
virtual MoFEMErrorCode setUserActiveVariables (int &nb_active_variables)
 add additional active variables More...
 
virtual MoFEMErrorCode setUserActiveVariables (VectorDouble &activeVariables)
 Add additional independent variables More complex physical models depend on gradient of defamation and some additional variables. For example can depend on temperature. This function adds additional independent variables to the model. More...
 
virtual MoFEMErrorCode calculateElasticEnergy (const BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Calculate elastic energy density. More...
 
virtual MoFEMErrorCode calculatesIGma_EshelbyStress (const BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Calculate Eshelby stress. More...
 
virtual MoFEMErrorCode getDataOnPostProcessor (std::map< std::string, std::vector< VectorDouble > > &field_map, std::map< std::string, std::vector< MatrixDouble > > &grad_map)
 Do operations when pre-process. More...
 

Public Attributes

int nbActiveVariables0
 
- Public Attributes inherited from MyMat_double< TYPE >
bool doAotherwiseB
 
MatrixDouble D_lambda
 
MatrixDouble D_mu
 
MatrixDouble D
 
VectorBoundedArray< TYPE, 6 > sTrain
 
VectorBoundedArray< TYPE, 6 > sTrain0
 
VectorBoundedArray< TYPE, 6 > sTress
 
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'k', 3 > k
 
- Public Attributes inherited from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'k', 3 > k
 
double lambda
 
double mu
 
MatrixBoundedArray< TYPE, 9 > F
 
MatrixBoundedArray< TYPE, 9 > C
 
MatrixBoundedArray< TYPE, 9 > E
 
MatrixBoundedArray< TYPE, 9 > S
 
MatrixBoundedArray< TYPE, 9 > invF
 
MatrixBoundedArray< TYPE, 9 > P
 
MatrixBoundedArray< TYPE, 9 > sIGma
 
MatrixBoundedArray< TYPE, 9 > h
 
MatrixBoundedArray< TYPE, 9 > H
 
MatrixBoundedArray< TYPE, 9 > invH
 
MatrixBoundedArray< TYPE, 9 > sigmaCauchy
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_F
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_C
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_E
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_S
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invF
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_P
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_sIGma
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_h
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_H
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invH
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_sigmaCauchy
 
TYPE J
 
TYPE eNergy
 
TYPE detH
 
TYPE detF
 
int gG
 Gauss point number. More...
 
CommonDatacommonDataPtr
 
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperatoropPtr
 pointer to finite element tetrahedral operator More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >
static auto resizeAndSet (MatrixBoundedArray< TYPE, 9 > &m)
 

Detailed Description

template<typename TYPE>
struct MyMat< TYPE >

Definition at line 111 of file stability.cpp.

Member Function Documentation

◆ setUserActiveVariables() [1/2]

template<typename TYPE >
virtual MoFEMErrorCode MyMat< TYPE >::setUserActiveVariables ( int &  nb_active_variables)
inlinevirtual

add additional active variables

Note
This member function if used should be implement by template member function Specialization, different implementation needed for TYPE=double or TYPE=adouble

More complex physical models depend on gradient of defamation and some additional variables. For example can depend on temperature. This function adds additional independent variables to the model.

Parameters
nb_active_variablesnumber of active variables
Returns
error code

Reimplemented from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >.

Definition at line 115 of file stability.cpp.

115 {
117
118 try {
119
120 this->sTrain0.resize(6);
121 MatrixDouble &G0 = (this->commonDataPtr->gradAtGaussPts["D0"][this->gG]);
122 this->sTrain0[0] <<= G0(0, 0);
123 this->sTrain0[1] <<= G0(1, 1);
124 this->sTrain0[2] <<= G0(2, 2);
125 this->sTrain0[3] <<= (G0(1, 0) + G0(0, 1));
126 this->sTrain0[4] <<= (G0(2, 1) + G0(1, 2));
127 this->sTrain0[5] <<= (G0(2, 0) + G0(0, 2));
128 nbActiveVariables0 = nb_active_variables;
129 nb_active_variables += 6;
130
131 } catch (const std::exception &ex) {
132 std::ostringstream ss;
133 ss << "throw in method: " << ex.what() << std::endl;
134 SETERRQ(PETSC_COMM_SELF, 1, ss.str().c_str());
135 }
136
138 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
VectorBoundedArray< TYPE, 6 > sTrain0
Definition: stability.cpp:29
int nbActiveVariables0
Definition: stability.cpp:113
std::map< std::string, std::vector< MatrixDouble > > gradAtGaussPts

◆ setUserActiveVariables() [2/2]

template<typename TYPE >
virtual MoFEMErrorCode MyMat< TYPE >::setUserActiveVariables ( VectorDouble &  activeVariables)
inlinevirtual

Add additional independent variables More complex physical models depend on gradient of defamation and some additional variables. For example can depend on temperature. This function adds additional independent variables to the model.

/note First 9 elements are reserved for gradient of deformation.

Parameters
activeVariablesvector of deepened variables, values after index 9 should be add.
Returns
error code

Reimplemented from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >.

Definition at line 141 of file stability.cpp.

141 {
143
144 try {
145
146 int shift = nbActiveVariables0; // is a number of elements in F
147 MatrixDouble &G0 = (this->commonDataPtr->gradAtGaussPts["D0"][this->gG]);
148 active_variables[shift + 0] = G0(0, 0);
149 active_variables[shift + 1] = G0(1, 1);
150 active_variables[shift + 2] = G0(2, 2);
151 active_variables[shift + 3] = G0(0, 1) + G0(1, 0);
152 active_variables[shift + 4] = G0(1, 2) + G0(2, 1);
153 active_variables[shift + 5] = G0(0, 2) + G0(2, 0);
154
155 } catch (const std::exception &ex) {
156 std::ostringstream ss;
157 ss << "throw in method: " << ex.what() << std::endl;
158 SETERRQ(PETSC_COMM_SELF, 1, ss.str().c_str());
159 }
160
162 }

Member Data Documentation

◆ nbActiveVariables0

template<typename TYPE >
int MyMat< TYPE >::nbActiveVariables0

Definition at line 113 of file stability.cpp.


The documentation for this struct was generated from the following file: