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

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

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

Public Member Functions

 OpSpatialPrj_dx_dx (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 909 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpSpatialPrj_dx_dx()

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

Definition at line 910 of file EshelbianPlasticity.hpp.

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

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