v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::OpSpatialPrj_dx_dw Struct Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianPlasticity.hpp"

Inheritance diagram for EshelbianPlasticity::OpSpatialPrj_dx_dw:
[legend]
Collaboration diagram for EshelbianPlasticity::OpSpatialPrj_dx_dw:
[legend]

Public Member Functions

 OpSpatialPrj_dx_dw (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
 
MoFEMErrorCode integrate (EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleVolume
MoFEMErrorCode assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;})
 
 OpAssembleBasic (const FieldSpace space)
 
virtual MoFEMErrorCode integrate (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
int getNumNodes ()
 get element number of nodes
 
const EntityHandlegetConn ()
 get element connectivity
 
double getVolume () const
 element volume (linear geometry)
 
doublegetVolume ()
 element volume (linear geometry)
 
FTensor::Tensor2< double *, 3, 3 > & getJac ()
 get element Jacobian
 
FTensor::Tensor2< double *, 3, 3 > & getInvJac ()
 get element inverse Jacobian
 
VectorDoublegetCoords ()
 nodal coordinates
 
VolumeElementForcesAndSourcesCoregetVolumeFE () const
 return pointer to Generic Volume Finite Element object
 
- Public Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
 UserDataOperator (const FieldSpace space, const char type=OPSPACE, const bool symm=true)
 
 UserDataOperator (const std::string field_name, const char type, const bool symm=true)
 
 UserDataOperator (const std::string row_field_name, const std::string col_field_name, const char type, const bool symm=true)
 
boost::shared_ptr< const NumeredEntFiniteElementgetNumeredEntFiniteElementPtr () const
 Return raw pointer to NumeredEntFiniteElement.
 
EntityHandle getFEEntityHandle () const
 Return finite element entity handle.
 
int getFEDim () const
 Get dimension of finite element.
 
EntityType getFEType () const
 Get dimension of finite element.
 
boost::weak_ptr< SideNumbergetSideNumberPtr (const int side_number, const EntityType type)
 Get the side number pointer.
 
EntityHandle getSideEntity (const int side_number, const EntityType type)
 Get the side entity.
 
int getNumberOfNodesOnElement () const
 Get the number of nodes on finite element.
 
MoFEMErrorCode getProblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get row indices.
 
MoFEMErrorCode getProblemColIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get col indices.
 
const FEMethodgetFEMethod () const
 Return raw pointer to Finite Element Method object.
 
int getOpType () const
 Get operator types.
 
void setOpType (const OpType type)
 Set operator type.
 
void addOpType (const OpType type)
 Add operator type.
 
int getNinTheLoop () const
 get number of finite element in the loop
 
int getLoopSize () const
 get size of elements in the loop
 
std::string getFEName () const
 Get name of the element.
 
ForcesAndSourcesCoregetPtrFE () const
 
ForcesAndSourcesCoregetSidePtrFE () const
 
ForcesAndSourcesCoregetRefinePtrFE () const
 
const PetscData::SwitchesgetDataCtx () const
 
const KspMethod::KSPContext getKSPCtx () const
 
const SnesMethod::SNESContext getSNESCtx () const
 
const TSMethod::TSContext getTSCtx () const
 
Vec getKSPf () const
 
Mat getKSPA () const
 
Mat getKSPB () const
 
Vec getSNESf () const
 
Vec getSNESx () const
 
Mat getSNESA () const
 
Mat getSNESB () const
 
Vec getTSu () const
 
Vec getTSu_t () const
 
Vec getTSu_tt () const
 
Vec getTSf () const
 
Mat getTSA () const
 
Mat getTSB () const
 
int getTSstep () const
 
double getTStime () const
 
double getTStimeStep () const
 
double getTSa () const
 
double getTSaa () const
 
MatrixDoublegetGaussPts ()
 matrix of integration (Gauss) points for Volume Element
 
auto getFTensor0IntegrationWeight ()
 Get integration weights.
 
MatrixDoublegetCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3)
 
auto getFTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry.
 
double getMeasure () const
 get measure of element
 
doublegetMeasure ()
 get measure of element
 
MoFEMErrorCode loopSide (const string &fe_name, ForcesAndSourcesCore *side_fe, const size_t dim, const EntityHandle ent_for_side=0, boost::shared_ptr< Range > fe_range=nullptr, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy, AdjCache *adj_cache=nullptr)
 User calls this function to loop over elements on the side of face. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopThis (const string &fe_name, ForcesAndSourcesCore *this_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over the same element using a different set of integration points. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopParent (const string &fe_name, ForcesAndSourcesCore *parent_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopChildren (const string &fe_name, ForcesAndSourcesCore *child_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopRange (const string &fe_name, ForcesAndSourcesCore *range_fe, boost::shared_ptr< Range > fe_range, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 Iterate over range of elements.
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true)
 
virtual ~DataOperator ()=default
 
virtual MoFEMErrorCode opLhs (EntitiesFieldData &row_data, EntitiesFieldData &col_data)
 
virtual MoFEMErrorCode opRhs (EntitiesFieldData &data, const bool error_if_no_base=false)
 
bool getSymm () const
 Get if operator uses symmetry of DOFs or not.
 
void setSymm ()
 set if operator is executed taking in account symmetry
 
void unSetSymm ()
 unset if operator is executed for non symmetric problem
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::OpAssembleVolume
using OP = OpAssembleBasic<VolUserDataOperator>
 
- Public Types inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
using ScaleOff
 
- Public Types inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
enum  OpType {
  OPROW = 1 << 0 , OPCOL = 1 << 1 , OPROWCOL = 1 << 2 , OPSPACE = 1 << 3 ,
  OPLAST = 1 << 3
}
 Controls loop over entities on element. More...
 
using AdjCache
 
- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType
 
using DoWorkRhsHookFunType
 
- Public Attributes inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts
 
VectorDouble nF
 local right hand side vector
 
MatrixDouble K
 local tangent matrix
 
MatrixDouble transposeK
 
ScaleOff scaleOff
 
- Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
char opType
 
std::string rowFieldName
 
std::string colFieldName
 
FieldSpace sPace
 
- Public Attributes inherited from MoFEM::DataOperator
DoWorkLhsHookFunType doWorkLhsHook
 
DoWorkRhsHookFunType doWorkRhsHook
 
bool sYmm
 If true assume that matrix is symmetric structure.
 
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity.
 
booldoVertices
 \deprectaed If false skip vertices
 
booldoEdges
 \deprectaed If false skip edges
 
booldoQuads
 \deprectaed
 
booldoTris
 \deprectaed
 
booldoTets
 \deprectaed
 
booldoPrisms
 \deprectaed
 
- Static Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
static const char *const OpTypeNames []
 
- Protected Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
- Protected Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 
- Static Protected Attributes inherited from EshelbianPlasticity::OpAssembleVolume
static std::map< std::pair< std::string, std::string >, MatrixDouble > mapMatrix
 

Detailed Description

Definition at line 919 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpSpatialPrj_dx_dw()

EshelbianPlasticity::OpSpatialPrj_dx_dw::OpSpatialPrj_dx_dw ( std::string row_field,
std::string col_field,
boost::shared_ptr< DataAtIntegrationPts > data_ptr )
inline

Definition at line 920 of file EshelbianPlasticity.hpp.

954 {
955
956struct CGGUserPolynomialBase : public TetPolynomialBase {
957
958 using CachePhi = boost::tuple<int, int, MatrixDouble>;
959
960 CGGUserPolynomialBase(boost::shared_ptr<CachePhi> cache_phi = nullptr);
961 ~CGGUserPolynomialBase() = default;
962
963 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
964 BaseFunctionUnknownInterface **iface) const;
965 MoFEMErrorCode getValue(MatrixDouble &pts,
966 boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
967
968private:
969 MatrixDouble shapeFun;
970 boost::shared_ptr<CachePhi> cachePhiPtr;
971
972 MoFEMErrorCode getValueHdivForCGGBubble(MatrixDouble &pts);
973};
974
975struct ContactTree;
976
979enum StretchSelector {
980 LINEAR,
981 LOG /*linar extenion*/,
982 LOG_QUADRATIC /*quadratic extension*/,
984};
986
987using MatrixPtr = boost::shared_ptr<MatrixDouble>;
988using VectorPtr = boost::shared_ptr<VectorDouble>;
989
990using EntData = EntitiesFieldData::EntData;
991using UserDataOperator = ForcesAndSourcesCore::UserDataOperator;
992using VolUserDataOperator = VolumeElementForcesAndSourcesCore::UserDataOperator;
993using FaceUserDataOperator = FaceElementForcesAndSourcesCore::UserDataOperator;
994using EleOnSide = PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::FaceSideEle;
995using SideEleOp = EleOnSide::UserDataOperator;
996
997struct PhysicalEquations;
998
999struct AnalyticalExprPython;
1000
1002 : public boost::enable_shared_from_this<DataAtIntegrationPts> {
1003
1004 MatrixDouble approxPAtPts;
1005 MatrixDouble approxSigmaAtPts;
1006 MatrixDouble divPAtPts;
1007 MatrixDouble divSigmaAtPts;
1008 MatrixDouble wL2AtPts;
1009 MatrixDouble wL2DotAtPts;
1010 MatrixDouble wL2DotDotAtPts;
1011 MatrixDouble logStretchTensorAtPts;
1012 MatrixDouble stretchTensorAtPts;
1013 VectorDouble jacobianAtPts;
1014 MatrixDouble tractionAtPts;
1015
1016 MatrixDouble diffStretchTensorAtPts;
1017 VectorDouble detStretchTensorAtPts;
1018 MatrixDouble detStretchTensorAtPts_du;
1019 MatrixDouble logStretchDotTensorAtPts;
1020 MatrixDouble gradLogStretchDotTensorAtPts;
1021 MatrixDouble rotAxisAtPts;
1022 MatrixDouble rotAxisDotAtPts;
1023 MatrixDouble rotAxisGradDotAtPts;
1024 MatrixDouble rotAxis0AtPts;
1025 MatrixDouble WAtPts;
1026 MatrixDouble W0AtPts;
1027 MatrixDouble GAtPts;
1028 MatrixDouble G0AtPts;
1029 MatrixDouble wH1AtPts;
1030 MatrixDouble XH1AtPts;
1031 MatrixDouble contactL2AtPts;
1032 MatrixDouble wGradH1AtPts;
1033 MatrixDouble logStretch2H1AtPts;
1034 MatrixDouble logStretchTotalTensorAtPts;
1035
1036 MatrixDouble hAtPts;
1037 MatrixDouble hdOmegaAtPts;
1038 MatrixDouble hdLogStretchAtPts;
1039 MatrixDouble leviKirchhoffAtPts;
1040 MatrixDouble leviKirchhoffdOmegaAtPts;
1041 MatrixDouble leviKirchhoffdLogStreatchAtPts;
1042 MatrixDouble leviKirchhoffPAtPts;
1043 MatrixDouble adjointPdstretchAtPts;
1044 MatrixDouble adjointPdUAtPts;
1045 MatrixDouble adjointPdUdOmegaAtPts;
1046 MatrixDouble adjointPdUdPAtPts;
1047 MatrixDouble rotMatAtPts;
1048 MatrixDouble PAtPts;
1049 MatrixDouble SigmaAtPts;
1050 VectorDouble energyAtPts; //< this is density of energy at integration points
1051 MatrixDouble flowL2AtPts;
1052
1053 MatrixDouble varRotAxis;
1054 MatrixDouble varLogStreach;
1055 MatrixDouble varPiola;
1056 MatrixDouble varDivPiola;
1057 MatrixDouble varWL2;
1058
1059 MatrixDouble P_du;
1060
1061 MatrixDouble eigenVals;
1062 MatrixDouble eigenVecs;
1063 VectorInt nbUniq;
1064 MatrixDouble eigenValsC;
1065 MatrixDouble eigenVecsC;
1066 VectorInt nbUniqC;
1067
1068 MatrixDouble matD;
1069 MatrixDouble matAxiatorD;
1070 MatrixDouble matDeviatorD;
1071 MatrixDouble matInvD;
1072
1073 MatrixDouble internalStressAtPts;
1074
1075 MatrixDouble facePiolaAtPts;
1076 MatrixDouble gradHybridDispAtPts;
1077 MatrixDouble faceMaterialForceAtPts;
1078 VectorDouble normalPressureAtPts;
1079
1080 double mu;
1081 double lambda;
1082 double piolaScale = 1.;
1083 double faceEnergy = 0.;
1084
1085 inline auto getPiolaScalePtr() {
1086 return boost::shared_ptr<double>(shared_from_this(), &piolaScale);
1087 }
1088
1089 inline MatrixPtr getApproxSigmaAtPts() {
1090 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1091 &approxSigmaAtPts);
1092 }
1093 inline MatrixPtr getApproxPAtPts() {
1094 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &approxPAtPts);
1095 }
1096
1097 inline MatrixPtr getDivPAtPts() {
1098 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &divPAtPts);
1099 }
1100
1101 inline MatrixPtr getDivSigmaAtPts() {
1102 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &divSigmaAtPts);
1103 }
1104
1105 inline MatrixPtr getSmallWL2AtPts() {
1106 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wL2AtPts);
1107 }
1108
1109 inline MatrixPtr getSmallWL2DotAtPts() {
1110 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wL2DotAtPts);
1111 }
1112
1113 inline MatrixPtr getSmallWL2DotDotAtPts() {
1114 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wL2DotDotAtPts);
1115 }
1116
1117 inline MatrixPtr getLogStretchTensorAtPts() {
1118 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1119 &logStretchTensorAtPts);
1120 }
1121
1122 inline MatrixPtr getStretchTensorAtPts() {
1123 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1124 &stretchTensorAtPts);
1125 }
1126
1127 inline MatrixPtr getLogStretchDotTensorAtPts() {
1128 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1129 &logStretchDotTensorAtPts);
1130 }
1131
1132 inline MatrixPtr getGradLogStretchDotTensorAtPts() {
1133 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1134 &gradLogStretchDotTensorAtPts);
1135 }
1136
1137 inline MatrixPtr getRotAxisAtPts() {
1138 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &rotAxisAtPts);
1139 }
1140
1141 inline MatrixPtr getRotAxis0AtPts() {
1142 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &rotAxis0AtPts);
1143 }
1144
1145 inline MatrixPtr getRotAxisDotAtPts() {
1146 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1147 &rotAxisDotAtPts);
1148 }
1149
1150 inline MatrixPtr getRotAxisGradDotAtPts() {
1151 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1152 &rotAxisGradDotAtPts);
1153 }
1154
1155 inline MatrixPtr getBigGAtPts() {
1156 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &GAtPts);
1157 }
1158
1159 inline MatrixPtr getBigG0AtPts() {
1160 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &GAtPts);
1161 }
1162
1163 inline MatrixPtr getMatDPtr() {
1164 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matD);
1165 }
1166
1167 inline MatrixPtr getMatInvDPtr() {
1168 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matInvD);
1169 }
1170
1171 inline MatrixPtr getMatAxiatorDPtr() {
1172 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matAxiatorD);
1173 }
1174
1175 inline MatrixPtr getMatDeviatorDPtr() {
1176 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matDeviatorD);
1177 }
1178
1179 inline MatrixPtr getSmallWH1AtPts() {
1180 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wH1AtPts);
1181 }
1182
1183 inline MatrixPtr getLargeXH1AtPts() {
1184 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &XH1AtPts);
1185 }
1186
1187 inline MatrixPtr getContactL2AtPts() {
1188 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &contactL2AtPts);
1189 }
1190
1191 inline MatrixPtr getSmallWGradH1AtPts() {
1192 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wGradH1AtPts);
1193 }
1194
1195 inline VectorPtr getJacobianAtPts() {
1196 return boost::shared_ptr<VectorDouble>(shared_from_this(), &jacobianAtPts);
1197 }
1198
1199 inline MatrixPtr getLeviKirchhoffAtPts() {
1200 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1201 &leviKirchhoffAtPts);
1202 };
1203
1204 inline MatrixPtr getVarRotAxisPts() {
1205 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varRotAxis);
1206 }
1207
1208 inline MatrixPtr getVarLogStreachPts() {
1209 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varLogStreach);
1210 }
1211
1212 inline MatrixPtr getVarPiolaPts() {
1213 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varPiola);
1214 }
1215
1216 inline MatrixPtr getDivVarPiolaPts() {
1217 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varDivPiola);
1218 }
1219
1220 inline MatrixPtr getVarWL2Pts() {
1221 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varWL2);
1222 }
1223
1224 inline MatrixPtr getInternalStressAtPts() {
1225 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1226 &internalStressAtPts);
1227 }
1228
1229 inline MatrixPtr getFacePiolaAtPts() {
1230 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &facePiolaAtPts);
1231 }
1232
1233 inline MatrixPtr getGradHybridDispAtPts() {
1234 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
1235 &gradHybridDispAtPts);
1236 }
1237
1238 inline MatrixPtr getEigenValsAtPts() {
1239 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &eigenVals);
1240 }
1241
1242 boost::shared_ptr<PhysicalEquations> physicsPtr;
1243};
1244
1245struct OpJacobian;
1246
1247// Forward declarations
1248struct ExternalStrain;
1249using ExternalStrainVec = std::vector<ExternalStrain>;
1250struct PhysicalEquations {
1251
1252 typedef FTensor::Tensor1<adouble, 3> ATensor1;
1253 typedef FTensor::Tensor2<adouble, 3, 3> ATensor2;
1254 typedef FTensor::Tensor3<adouble, 3, 3, 3> ATensor3;
1255 typedef FTensor::Tensor1<double, 3> DTensor1;
1256 typedef FTensor::Tensor2<double, 3, 3> DTensor2;
1257 typedef FTensor::Tensor3<double, 3, 3, 3> DTensor3;
1258
1260
1261 typedef FTensor::Tensor2<FTensor::PackPtr<double *, 1>, 3, 3> DTensor2Ptr;
1262 typedef FTensor::Tensor3<FTensor::PackPtr<double *, 1>, 3, 3, 3> DTensor3Ptr;
1263
1264 PhysicalEquations() = delete;
1265 PhysicalEquations(const int size_active, const int size_dependent)
1266 : activeVariables(size_active, 0),
1267 dependentVariablesPiola(size_dependent, 0),
1268 dependentVariablesPiolaDirevatives(size_dependent * size_active, 0) {}
1269 virtual ~PhysicalEquations() = default;
1270
1271 virtual MoFEMErrorCode recordTape(const int tag, DTensor2Ptr *t_h) = 0;
1272
1273 virtual UserDataOperator *
1274 returnOpJacobian(const int tag, const bool eval_rhs, const bool eval_lhs,
1275 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1276 boost::shared_ptr<PhysicalEquations> physics_ptr);
1277
1278 virtual VolUserDataOperator *
1279 returnOpSpatialPhysical(const std::string &field_name,
1280 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1281 const double alpha_u);
1282
1283 virtual VolUserDataOperator *
1284 returnOpSpatialPhysicalExternalStrain(
1285 const std::string &field_name,
1286 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1287 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
1288 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv);
1289
1290 virtual VolUserDataOperator *returnOpSpatialPhysical_du_du(
1291 std::string row_field, std::string col_field,
1292 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha);
1293
1294 virtual VolUserDataOperator *
1295 returnOpCalculateEnergy(boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1296 boost::shared_ptr<double> total_energy_ptr);
1297
1298 virtual VolUserDataOperator *returnOpCalculateStretchFromStress(
1299 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1300 boost::shared_ptr<PhysicalEquations> physics_ptr);
1301
1302 virtual VolUserDataOperator *returnOpCalculateVarStretchFromStress(
1303 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1304 boost::shared_ptr<PhysicalEquations> physics_ptr);
1305
1306 virtual VolUserDataOperator *
1307 returnOpSetScale(boost::shared_ptr<double> scale_ptr,
1308 boost::shared_ptr<PhysicalEquations> physics_ptr);
1309
1310 std::vector<double> activeVariables;
1311 std::vector<double> dependentVariablesPiola;
1312 std::vector<double> dependentVariablesPiolaDirevatives;
1313
1314 /** \name Active variables */
1315
1316 /**@{*/
1317
1318 template <int S>
1319 inline static DTensor2Ptr get_VecTensor2(std::vector<double> &v) {
1320 return DTensor2Ptr(&v[S + 0], &v[S + 1], &v[S + 2], &v[S + 3], &v[S + 4],
1321 &v[S + 5], &v[S + 6], &v[S + 7], &v[S + 8]);
1322 }
1323
1324 template <int S>
1325 inline static DTensor0Ptr get_VecTensor0(std::vector<double> &v) {
1326 return DTensor0Ptr(&v[S + 0]);
1327 }
1328
1329 template <int S0>
1330 inline static DTensor3Ptr get_vecTensor3(std::vector<double> &v,
1331 const int nba) {
1332
1333 const int A00 = nba * 0 + S0;
1334 const int A01 = nba * 1 + S0;
1335 const int A02 = nba * 2 + S0;
1336 const int A10 = nba * 3 + S0;
1337 const int A11 = nba * 4 + S0;
1338 const int A12 = nba * 5 + S0;
1339 const int A20 = nba * 6 + S0;
1340 const int A21 = nba * 7 + S0;
1341 const int A22 = nba * 8 + S0;
1342
1343 return DTensor3Ptr(
1344
1345 &v[A00 + 0], &v[A00 + 1], &v[A00 + 2], &v[A01 + 0], &v[A01 + 1],
1346 &v[A01 + 2], &v[A02 + 0], &v[A02 + 1], &v[A02 + 2],
1347
1348 &v[A10 + 0], &v[A10 + 1], &v[A10 + 2], &v[A11 + 0], &v[A11 + 1],
1349 &v[A11 + 2], &v[A12 + 0], &v[A12 + 1], &v[A12 + 2],
1350
1351 &v[A20 + 0], &v[A20 + 1], &v[A20 + 2], &v[A21 + 0], &v[A21 + 1],
1352 &v[A21 + 2], &v[A22 + 0], &v[A22 + 1], &v[A22 + 2]
1353
1354 );
1355 }
1356
1357 /**@}*/
1358
1359 /** \name Active variables */
1360
1361 /**@{*/
1362
1363 inline DTensor2Ptr get_h() { return get_VecTensor2<0>(activeVariables); }
1364
1365 /**@}*/
1366
1367 /** \name Dependent variables */
1368
1369 /**@{*/
1370
1371 inline DTensor2Ptr get_P() {
1372 return get_VecTensor2<0>(dependentVariablesPiola);
1373 }
1374
1375 /**@}*/
1376
1377 /** \name Derivatives of dependent variables */
1378
1379 /**@{*/
1380
1381 inline DTensor3Ptr get_P_dh0() {
1382 return get_vecTensor3<0>(dependentVariablesPiolaDirevatives,
1383 activeVariables.size());
1384 }
1385 inline DTensor3Ptr get_P_dh1() {
1386 return get_vecTensor3<3>(dependentVariablesPiolaDirevatives,
1387 activeVariables.size());
1388 }
1389 inline DTensor3Ptr get_P_dh2() {
1390 return get_vecTensor3<6>(dependentVariablesPiolaDirevatives,
1391 activeVariables.size());
1392 }
1393
1394 /**@}*/
1395};
1396
1397struct BcDisp {
1398 BcDisp(std::string name, std::vector<double> attr, Range faces);
1399 std::string blockName;
1400 Range faces;
1401 VectorDouble3 vals;
1402 VectorInt3 flags;
1403};
1404using BcDispVec = std::vector<BcDisp>;
1405
1406struct BcRot {
1407 BcRot(std::string name, std::vector<double> attr, Range faces);
1408 std::string blockName;
1409 Range faces;
1410 VectorDouble vals;
1411 double theta;
1412};
1413using BcRotVec = std::vector<BcRot>;
1414
1415typedef std::vector<Range> TractionFreeBc;
1416
1417struct TractionBc {
1418 TractionBc(std::string name, std::vector<double> attr, Range faces);
1419 std::string blockName;
1420 Range faces;
1421 VectorDouble3 vals;
1422 VectorInt3 flags;
1423};
1424using TractionBcVec = std::vector<TractionBc>;
1425
1426struct NormalDisplacementBc {
1427 NormalDisplacementBc(std::string name, std::vector<double> attr, Range faces);
1428 std::string blockName;
1429 Range faces;
1430 double val;
1431};
1432using NormalDisplacementBcVec = std::vector<NormalDisplacementBc>;
1433
1434struct AnalyticalDisplacementBc {
1435 AnalyticalDisplacementBc(std::string name, std::vector<double> attr,
1436 Range faces);
1437 std::string blockName;
1438 Range faces;
1439 VectorInt3 flags;
1440};
1441using AnalyticalDisplacementBcVec = std::vector<AnalyticalDisplacementBc>;
1442
1443struct AnalyticalTractionBc {
1444 AnalyticalTractionBc(std::string name, std::vector<double> attr, Range faces);
1445 std::string blockName;
1446 Range faces;
1447 VectorInt3 flags;
1448};
1449using AnalyticalTractionBcVec = std::vector<AnalyticalTractionBc>;
1450
1451struct PressureBc {
1452 PressureBc(std::string name, std::vector<double> attr, Range faces);
1453 std::string blockName;
1454 Range faces;
1455 double val;
1456};
1457using PressureBcVec = std::vector<PressureBc>;
1458
1459struct ExternalStrain {
1460 ExternalStrain(std::string name, std::vector<double> attr, Range ents);
1461 std::string blockName;
1462 Range ents;
1463 double val;
1464 double bulkModulusK;
1465};
1466
1467 #ifdef ENABLE_PYTHON_BINDING
1468struct AnalyticalExprPython {
1469 AnalyticalExprPython() = default;
1470 virtual ~AnalyticalExprPython() = default;
1471
1472 MoFEMErrorCode analyticalExprInit(const std::string py_file);
1473 MoFEMErrorCode evalAnalyticalDisp(double delta_t, double t, np::ndarray x,
1474 np::ndarray y, np::ndarray z,
1475 np::ndarray nx, np::ndarray ny,
1476 np::ndarray nz,
1477 const std::string &block_name,
1478 np::ndarray &analytical_expr);
1479 MoFEMErrorCode evalAnalyticalTraction(double delta_t, double t, np::ndarray x,
1480 np::ndarray y, np::ndarray z,
1481 np::ndarray nx, np::ndarray ny,
1482 np::ndarray nz,
1483 const std::string &block_name,
1484 np::ndarray &analytical_expr);
1485
1486 template <typename T>
1487 inline std::vector<T>
1488 py_list_to_std_vector(const boost::python::object &iterable) {
1489 return std::vector<T>(boost::python::stl_input_iterator<T>(iterable),
1490 boost::python::stl_input_iterator<T>());
1491 }
1492
1493private:
1494 bp::object mainNamespace;
1495 bp::object analyticalDispFun;
1496 bp::object analyticalTractionFun;
1497};
1498
1499extern boost::weak_ptr<AnalyticalExprPython> AnalyticalExprPythonWeakPtr;
1500 #endif
1501
1502 #include "EshelbianCore.hpp"
1503 #include "EshelbianOperators.hpp"
1504
1505} // namespace EshelbianPlasticity
1506
1507#endif //__ESHELBIAN_PLASTICITY_HPP__rey" ];
1508 ␑<
1509
ForcesAndSourcesCore::UserDataOperator UserDataOperator
static double lambda
const double v
phase velocity of light in medium (cm/ns)
boost::shared_ptr< VectorDouble > VectorPtr
std::vector< AnalyticalTractionBc > AnalyticalTractionBcVec
std::vector< BcDisp > BcDispVec
std::vector< NormalDisplacementBc > NormalDisplacementBcVec
std::vector< BcRot > BcRotVec
std::vector< ExternalStrain > ExternalStrainVec
std::vector< AnalyticalDisplacementBc > AnalyticalDisplacementBcVec
std::vector< Range > TractionFreeBc
std::vector< PressureBc > PressureBcVec
std::vector< TractionBc > TractionBcVec
boost::shared_ptr< MatrixDouble > MatrixPtr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
constexpr double t
plate stiffness
Definition plate.cpp:58
constexpr auto field_name
PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::FaceSideEle EleOnSide
Data on single entity (This is passed as argument to DataOperator::doWork)

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpSpatialPrj_dx_dw::integrate ( EntData & row_data,
EntData & col_data )
virtual

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