v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS > Struct Template Reference

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

Inheritance diagram for EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >:
[legend]
Collaboration diagram for EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >:
[legend]

Public Types

using OP
 

Public Member Functions

 OpAnalyticalDispBcImpl (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< AnalyticalDisplacementBcVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntData &data)
 

Protected Attributes

boost::shared_ptr< AnalyticalDisplacementBcVecbcDispPtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
 

Detailed Description

template<AssemblyType A>
struct EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >

Definition at line 677 of file EshelbianPlasticity.hpp.

Member Typedef Documentation

◆ OP

template<AssemblyType A>
using EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >::OP
Initial value:
typename FormsIntegrators<FaceUserDataOperator>::Assembly<

Definition at line 680 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpAnalyticalDispBcImpl()

template<AssemblyType A>
EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >::OpAnalyticalDispBcImpl ( boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data,
boost::shared_ptr< AnalyticalDisplacementBcVec > & bc_disp_ptr,
std::map< std::string, boost::shared_ptr< ScalingMethod > > smv,
boost::shared_ptr< Range > ents_ptr = nullptr )
inline

Definition at line 683 of file EshelbianPlasticity.hpp.

717 {
718
719struct CGGUserPolynomialBase : public TetPolynomialBase {
720
721 using CachePhi = boost::tuple<int, int, MatrixDouble>;
722
723 CGGUserPolynomialBase(boost::shared_ptr<CachePhi> cache_phi = nullptr);
724 ~CGGUserPolynomialBase() = default;
725
726 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
727 BaseFunctionUnknownInterface **iface) const;
728 MoFEMErrorCode getValue(MatrixDouble &pts,
729 boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
730
731private:
732 MatrixDouble shapeFun;
733 boost::shared_ptr<CachePhi> cachePhiPtr;
734
735 MoFEMErrorCode getValueHdivForCGGBubble(MatrixDouble &pts);
736};
737
738struct ContactTree;
739
742enum StretchSelector {
743 LINEAR,
744 LOG /*linar extenion*/,
745 LOG_QUADRATIC /*quadratic extension*/,
747};
749
750using MatrixPtr = boost::shared_ptr<MatrixDouble>;
751using VectorPtr = boost::shared_ptr<VectorDouble>;
752
753using EntData = EntitiesFieldData::EntData;
754using UserDataOperator = ForcesAndSourcesCore::UserDataOperator;
755using VolUserDataOperator = VolumeElementForcesAndSourcesCore::UserDataOperator;
756using FaceUserDataOperator = FaceElementForcesAndSourcesCore::UserDataOperator;
757using EleOnSide = PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::FaceSideEle;
758using SideEleOp = EleOnSide::UserDataOperator;
759
760struct PhysicalEquations;
761
762struct AnalyticalExprPython;
763
765 : public boost::enable_shared_from_this<DataAtIntegrationPts> {
766
767 MatrixDouble approxPAtPts;
768 MatrixDouble approxSigmaAtPts;
769 MatrixDouble divPAtPts;
770 MatrixDouble divSigmaAtPts;
771 MatrixDouble wL2AtPts;
772 MatrixDouble wL2DotAtPts;
773 MatrixDouble wL2DotDotAtPts;
774 MatrixDouble logStretchTensorAtPts;
775 MatrixDouble stretchTensorAtPts;
776 VectorDouble jacobianAtPts;
777 MatrixDouble tractionAtPts;
778
779 MatrixDouble diffStretchTensorAtPts;
780 VectorDouble detStretchTensorAtPts;
781 MatrixDouble detStretchTensorAtPts_du;
782 MatrixDouble logStretchDotTensorAtPts;
783 MatrixDouble gradLogStretchDotTensorAtPts;
784 MatrixDouble rotAxisAtPts;
785 MatrixDouble rotAxisDotAtPts;
786 MatrixDouble rotAxisGradDotAtPts;
787 MatrixDouble rotAxis0AtPts;
788 MatrixDouble WAtPts;
789 MatrixDouble W0AtPts;
790 MatrixDouble GAtPts;
791 MatrixDouble G0AtPts;
792 MatrixDouble wH1AtPts;
793 MatrixDouble XH1AtPts;
794 MatrixDouble contactL2AtPts;
795 MatrixDouble wGradH1AtPts;
796 MatrixDouble logStretch2H1AtPts;
797 MatrixDouble logStretchTotalTensorAtPts;
798
799 MatrixDouble hAtPts;
800 MatrixDouble hdOmegaAtPts;
801 MatrixDouble hdLogStretchAtPts;
802 MatrixDouble leviKirchhoffAtPts;
803 MatrixDouble leviKirchhoffdOmegaAtPts;
804 MatrixDouble leviKirchhoffdLogStreatchAtPts;
805 MatrixDouble leviKirchhoffPAtPts;
806 MatrixDouble adjointPdstretchAtPts;
807 MatrixDouble adjointPdUAtPts;
808 MatrixDouble adjointPdUdOmegaAtPts;
809 MatrixDouble adjointPdUdPAtPts;
810 MatrixDouble rotMatAtPts;
811 MatrixDouble PAtPts;
812 MatrixDouble SigmaAtPts;
813 VectorDouble energyAtPts; //< this is density of energy at integration points
814 MatrixDouble flowL2AtPts;
815
816 MatrixDouble varRotAxis;
817 MatrixDouble varLogStreach;
818 MatrixDouble varPiola;
819 MatrixDouble varDivPiola;
820 MatrixDouble varWL2;
821
822 MatrixDouble P_du;
823
824 MatrixDouble eigenVals;
825 MatrixDouble eigenVecs;
826 VectorInt nbUniq;
827 MatrixDouble eigenValsC;
828 MatrixDouble eigenVecsC;
829 VectorInt nbUniqC;
830
831 MatrixDouble matD;
832 MatrixDouble matAxiatorD;
833 MatrixDouble matDeviatorD;
834 MatrixDouble matInvD;
835
836 MatrixDouble internalStressAtPts;
837
838 MatrixDouble facePiolaAtPts;
839 MatrixDouble gradHybridDispAtPts;
840 MatrixDouble faceMaterialForceAtPts;
841 VectorDouble normalPressureAtPts;
842
843 double mu;
844 double lambda;
845 double piolaScale = 1.;
846 double faceEnergy = 0.;
847
848 inline auto getPiolaScalePtr() {
849 return boost::shared_ptr<double>(shared_from_this(), &piolaScale);
850 }
851
852 inline MatrixPtr getApproxSigmaAtPts() {
853 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
854 &approxSigmaAtPts);
855 }
856 inline MatrixPtr getApproxPAtPts() {
857 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &approxPAtPts);
858 }
859
860 inline MatrixPtr getDivPAtPts() {
861 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &divPAtPts);
862 }
863
864 inline MatrixPtr getDivSigmaAtPts() {
865 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &divSigmaAtPts);
866 }
867
868 inline MatrixPtr getSmallWL2AtPts() {
869 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wL2AtPts);
870 }
871
872 inline MatrixPtr getSmallWL2DotAtPts() {
873 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wL2DotAtPts);
874 }
875
876 inline MatrixPtr getSmallWL2DotDotAtPts() {
877 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wL2DotDotAtPts);
878 }
879
880 inline MatrixPtr getLogStretchTensorAtPts() {
881 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
882 &logStretchTensorAtPts);
883 }
884
885 inline MatrixPtr getStretchTensorAtPts() {
886 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
887 &stretchTensorAtPts);
888 }
889
890 inline MatrixPtr getLogStretchDotTensorAtPts() {
891 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
892 &logStretchDotTensorAtPts);
893 }
894
895 inline MatrixPtr getGradLogStretchDotTensorAtPts() {
896 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
897 &gradLogStretchDotTensorAtPts);
898 }
899
900 inline MatrixPtr getRotAxisAtPts() {
901 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &rotAxisAtPts);
902 }
903
904 inline MatrixPtr getRotAxis0AtPts() {
905 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &rotAxis0AtPts);
906 }
907
908 inline MatrixPtr getRotAxisDotAtPts() {
909 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
910 &rotAxisDotAtPts);
911 }
912
913 inline MatrixPtr getRotAxisGradDotAtPts() {
914 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
915 &rotAxisGradDotAtPts);
916 }
917
918 inline MatrixPtr getBigGAtPts() {
919 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &GAtPts);
920 }
921
922 inline MatrixPtr getBigG0AtPts() {
923 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &GAtPts);
924 }
925
926 inline MatrixPtr getMatDPtr() {
927 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matD);
928 }
929
930 inline MatrixPtr getMatInvDPtr() {
931 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matInvD);
932 }
933
934 inline MatrixPtr getMatAxiatorDPtr() {
935 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matAxiatorD);
936 }
937
938 inline MatrixPtr getMatDeviatorDPtr() {
939 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matDeviatorD);
940 }
941
942 inline MatrixPtr getSmallWH1AtPts() {
943 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wH1AtPts);
944 }
945
946 inline MatrixPtr getLargeXH1AtPts() {
947 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &XH1AtPts);
948 }
949
950 inline MatrixPtr getContactL2AtPts() {
951 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &contactL2AtPts);
952 }
953
954 inline MatrixPtr getSmallWGradH1AtPts() {
955 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wGradH1AtPts);
956 }
957
958 inline VectorPtr getJacobianAtPts() {
959 return boost::shared_ptr<VectorDouble>(shared_from_this(), &jacobianAtPts);
960 }
961
962 inline MatrixPtr getLeviKirchhoffAtPts() {
963 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
964 &leviKirchhoffAtPts);
965 };
966
967 inline MatrixPtr getVarRotAxisPts() {
968 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varRotAxis);
969 }
970
971 inline MatrixPtr getVarLogStreachPts() {
972 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varLogStreach);
973 }
974
975 inline MatrixPtr getVarPiolaPts() {
976 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varPiola);
977 }
978
979 inline MatrixPtr getDivVarPiolaPts() {
980 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varDivPiola);
981 }
982
983 inline MatrixPtr getVarWL2Pts() {
984 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varWL2);
985 }
986
987 inline MatrixPtr getInternalStressAtPts() {
988 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
989 &internalStressAtPts);
990 }
991
992 inline MatrixPtr getFacePiolaAtPts() {
993 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &facePiolaAtPts);
994 }
995
996 inline MatrixPtr getGradHybridDispAtPts() {
997 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
998 &gradHybridDispAtPts);
999 }
1000
1001 inline MatrixPtr getEigenValsAtPts() {
1002 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &eigenVals);
1003 }
1004
1005 boost::shared_ptr<PhysicalEquations> physicsPtr;
1006};
1007
1008struct OpJacobian;
1009
1010// Forward declarations
1011struct ExternalStrain;
1012using ExternalStrainVec = std::vector<ExternalStrain>;
1013struct PhysicalEquations {
1014
1015 typedef FTensor::Tensor1<adouble, 3> ATensor1;
1016 typedef FTensor::Tensor2<adouble, 3, 3> ATensor2;
1017 typedef FTensor::Tensor3<adouble, 3, 3, 3> ATensor3;
1018 typedef FTensor::Tensor1<double, 3> DTensor1;
1019 typedef FTensor::Tensor2<double, 3, 3> DTensor2;
1020 typedef FTensor::Tensor3<double, 3, 3, 3> DTensor3;
1021
1023
1024 typedef FTensor::Tensor2<FTensor::PackPtr<double *, 1>, 3, 3> DTensor2Ptr;
1025 typedef FTensor::Tensor3<FTensor::PackPtr<double *, 1>, 3, 3, 3> DTensor3Ptr;
1026
1027 PhysicalEquations() = delete;
1028 PhysicalEquations(const int size_active, const int size_dependent)
1029 : activeVariables(size_active, 0),
1030 dependentVariablesPiola(size_dependent, 0),
1031 dependentVariablesPiolaDirevatives(size_dependent * size_active, 0) {}
1032 virtual ~PhysicalEquations() = default;
1033
1034 virtual MoFEMErrorCode recordTape(const int tag, DTensor2Ptr *t_h) = 0;
1035
1036 virtual UserDataOperator *
1037 returnOpJacobian(const int tag, const bool eval_rhs, const bool eval_lhs,
1038 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1039 boost::shared_ptr<PhysicalEquations> physics_ptr);
1040
1041 virtual VolUserDataOperator *
1042 returnOpSpatialPhysical(const std::string &field_name,
1043 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1044 const double alpha_u);
1045
1046 virtual VolUserDataOperator *
1047 returnOpSpatialPhysicalExternalStrain(
1048 const std::string &field_name,
1049 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1050 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
1051 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv);
1052
1053 virtual VolUserDataOperator *returnOpSpatialPhysical_du_du(
1054 std::string row_field, std::string col_field,
1055 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha);
1056
1057 virtual VolUserDataOperator *
1058 returnOpCalculateEnergy(boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1059 boost::shared_ptr<double> total_energy_ptr);
1060
1061 virtual VolUserDataOperator *returnOpCalculateStretchFromStress(
1062 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1063 boost::shared_ptr<PhysicalEquations> physics_ptr);
1064
1065 virtual VolUserDataOperator *returnOpCalculateVarStretchFromStress(
1066 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
1067 boost::shared_ptr<PhysicalEquations> physics_ptr);
1068
1069 virtual VolUserDataOperator *
1070 returnOpSetScale(boost::shared_ptr<double> scale_ptr,
1071 boost::shared_ptr<PhysicalEquations> physics_ptr);
1072
1073 std::vector<double> activeVariables;
1074 std::vector<double> dependentVariablesPiola;
1075 std::vector<double> dependentVariablesPiolaDirevatives;
1076
1077 /** \name Active variables */
1078
1079 /**@{*/
1080
1081 template <int S>
1082 inline static DTensor2Ptr get_VecTensor2(std::vector<double> &v) {
1083 return DTensor2Ptr(&v[S + 0], &v[S + 1], &v[S + 2], &v[S + 3], &v[S + 4],
1084 &v[S + 5], &v[S + 6], &v[S + 7], &v[S + 8]);
1085 }
1086
1087 template <int S>
1088 inline static DTensor0Ptr get_VecTensor0(std::vector<double> &v) {
1089 return DTensor0Ptr(&v[S + 0]);
1090 }
1091
1092 template <int S0>
1093 inline static DTensor3Ptr get_vecTensor3(std::vector<double> &v,
1094 const int nba) {
1095
1096 const int A00 = nba * 0 + S0;
1097 const int A01 = nba * 1 + S0;
1098 const int A02 = nba * 2 + S0;
1099 const int A10 = nba * 3 + S0;
1100 const int A11 = nba * 4 + S0;
1101 const int A12 = nba * 5 + S0;
1102 const int A20 = nba * 6 + S0;
1103 const int A21 = nba * 7 + S0;
1104 const int A22 = nba * 8 + S0;
1105
1106 return DTensor3Ptr(
1107
1108 &v[A00 + 0], &v[A00 + 1], &v[A00 + 2], &v[A01 + 0], &v[A01 + 1],
1109 &v[A01 + 2], &v[A02 + 0], &v[A02 + 1], &v[A02 + 2],
1110
1111 &v[A10 + 0], &v[A10 + 1], &v[A10 + 2], &v[A11 + 0], &v[A11 + 1],
1112 &v[A11 + 2], &v[A12 + 0], &v[A12 + 1], &v[A12 + 2],
1113
1114 &v[A20 + 0], &v[A20 + 1], &v[A20 + 2], &v[A21 + 0], &v[A21 + 1],
1115 &v[A21 + 2], &v[A22 + 0], &v[A22 + 1], &v[A22 + 2]
1116
1117 );
1118 }
1119
1120 /**@}*/
1121
1122 /** \name Active variables */
1123
1124 /**@{*/
1125
1126 inline DTensor2Ptr get_h() { return get_VecTensor2<0>(activeVariables); }
1127
1128 /**@}*/
1129
1130 /** \name Dependent variables */
1131
1132 /**@{*/
1133
1134 inline DTensor2Ptr get_P() {
1135 return get_VecTensor2<0>(dependentVariablesPiola);
1136 }
1137
1138 /**@}*/
1139
1140 /** \name Derivatives of dependent variables */
1141
1142 /**@{*/
1143
1144 inline DTensor3Ptr get_P_dh0() {
1145 return get_vecTensor3<0>(dependentVariablesPiolaDirevatives,
1146 activeVariables.size());
1147 }
1148 inline DTensor3Ptr get_P_dh1() {
1149 return get_vecTensor3<3>(dependentVariablesPiolaDirevatives,
1150 activeVariables.size());
1151 }
1152 inline DTensor3Ptr get_P_dh2() {
1153 return get_vecTensor3<6>(dependentVariablesPiolaDirevatives,
1154 activeVariables.size());
1155 }
1156
1157 /**@}*/
1158};
1159
1160struct BcDisp {
1161 BcDisp(std::string name, std::vector<double> attr, Range faces);
1162 std::string blockName;
1163 Range faces;
1164 VectorDouble3 vals;
1165 VectorInt3 flags;
1166};
1167using BcDispVec = std::vector<BcDisp>;
1168
1169struct BcRot {
1170 BcRot(std::string name, std::vector<double> attr, Range faces);
1171 std::string blockName;
1172 Range faces;
1173 VectorDouble vals;
1174 double theta;
1175};
1176using BcRotVec = std::vector<BcRot>;
1177
1178typedef std::vector<Range> TractionFreeBc;
1179
1180struct TractionBc {
1181 TractionBc(std::string name, std::vector<double> attr, Range faces);
1182 std::string blockName;
1183 Range faces;
1184 VectorDouble3 vals;
1185 VectorInt3 flags;
1186};
1187using TractionBcVec = std::vector<TractionBc>;
1188
1189struct NormalDisplacementBc {
1190 NormalDisplacementBc(std::string name, std::vector<double> attr, Range faces);
1191 std::string blockName;
1192 Range faces;
1193 double val;
1194};
1195using NormalDisplacementBcVec = std::vector<NormalDisplacementBc>;
1196
1197struct AnalyticalDisplacementBc {
1198 AnalyticalDisplacementBc(std::string name, std::vector<double> attr,
1199 Range faces);
1200 std::string blockName;
1201 Range faces;
1202 VectorInt3 flags;
1203};
1204using AnalyticalDisplacementBcVec = std::vector<AnalyticalDisplacementBc>;
1205
1206struct AnalyticalTractionBc {
1207 AnalyticalTractionBc(std::string name, std::vector<double> attr, Range faces);
1208 std::string blockName;
1209 Range faces;
1210 VectorInt3 flags;
1211};
1212using AnalyticalTractionBcVec = std::vector<AnalyticalTractionBc>;
1213
1214struct PressureBc {
1215 PressureBc(std::string name, std::vector<double> attr, Range faces);
1216 std::string blockName;
1217 Range faces;
1218 double val;
1219};
1220using PressureBcVec = std::vector<PressureBc>;
1221
1222struct ExternalStrain {
1223 ExternalStrain(std::string name, std::vector<double> attr, Range ents);
1224 std::string blockName;
1225 Range ents;
1226 double val;
1227 double bulkModulusK;
1228};
1229
1230 #ifdef ENABLE_PYTHON_BINDING
1231struct AnalyticalExprPython {
1232 AnalyticalExprPython() = default;
1233 virtual ~AnalyticalExprPython() = default;
1234
1235 MoFEMErrorCode analyticalExprInit(const std::string py_file);
1236 MoFEMErrorCode evalAnalyticalDisp(double delta_t, double t, np::ndarray x,
1237 np::ndarray y, np::ndarray z,
1238 np::ndarray nx, np::ndarray ny,
1239 np::ndarray nz,
1240 const std::string &block_name,
1241 np::ndarray &analytical_expr);
1242 MoFEMErrorCode evalAnalyticalTraction(double delta_t, double t, np::ndarray x,
1243 np::ndarray y, np::ndarray z,
1244 np::ndarray nx, np::ndarray ny,
1245 np::ndarray nz,
1246 const std::string &block_name,
1247 np::ndarray &analytical_expr);
1248
1249 template <typename T>
1250 inline std::vector<T>
1251 py_list_to_std_vector(const boost::python::object &iterable) {
1252 return std::vector<T>(boost::python::stl_input_iterator<T>(iterable),
1253 boost::python::stl_input_iterator<T>());
1254 }
1255
1256private:
1257 bp::object mainNamespace;
1258 bp::object analyticalDispFun;
1259 bp::object analyticalTractionFun;
1260};
1261
1262extern boost::weak_ptr<AnalyticalExprPython> AnalyticalExprPythonWeakPtr;
1263 #endif
1264
1265 #include "EshelbianCore.hpp"
1266 #include "EshelbianOperators.hpp"
1267
1268} // namespace EshelbianPlasticity
1269
1270#endif //__ESHELBIAN_PLASTICITY_HPP__
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()

template<AssemblyType A>
MoFEMErrorCode OpAnalyticalDispBcImpl< A, GAUSS >::iNtegrate ( EntData & data)
protected

Definition at line 1848 of file EshelbianOperators.cpp.

1848 {
1850
1851 double time = OP::getFEMethod()->ts_t;
1854 }
1855
1856 // get entity of face
1857 EntityHandle fe_ent = OP::getFEEntityHandle();
1858 // iterate over all boundary data
1859 for (auto &bc : (*bcDispPtr)) {
1860 // check if finite element entity is part of boundary condition
1861 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1862
1863 MatrixDouble analytical_expr;
1864 // placeholder to pass boundary block id to python
1865
1866 auto [block_name, v_analytical_expr] =
1867 getAnalyticalExpr(this, analytical_expr, bc.blockName);
1868
1869 int nb_dofs = data.getIndices().size();
1870
1871 int nb_integration_pts = OP::getGaussPts().size2();
1872 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
1873 auto t_w = OP::getFTensor0IntegrationWeight();
1874 int nb_base_functions = data.getN().size2() / 3;
1875 auto t_row_base_fun = data.getFTensor1N<3>();
1876 auto t_coord = OP::getFTensor1CoordsAtGaussPts();
1877
1880
1881 // get bc data
1882 auto t_bc_disp = getFTensor1FromMat<3>(v_analytical_expr);
1883
1884 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1885 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
1886
1887 int bb = 0;
1888 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
1889 t_nf(i) +=
1890 t_w * (t_row_base_fun(j) * t_normal(j)) * t_bc_disp(i) * 0.5;
1891 ++t_nf;
1892 ++t_row_base_fun;
1893 }
1894 for (; bb != nb_base_functions; ++bb)
1895 ++t_row_base_fun;
1896
1897 ++t_bc_disp;
1898 ++t_coord;
1899 ++t_w;
1900 ++t_normal;
1901 }
1902 }
1903 }
1905}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
auto getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr, const std::string block_name)
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
boost::shared_ptr< AnalyticalDisplacementBcVec > bcDispPtr
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
const VectorInt & getIndices() const
Get global indices of dofs on entity.

Member Data Documentation

◆ bcDispPtr

template<AssemblyType A>
boost::shared_ptr<AnalyticalDisplacementBcVec> EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >::bcDispPtr
protected

Definition at line 693 of file EshelbianPlasticity.hpp.

◆ scalingMethodsMap

template<AssemblyType A>
std::map<std::string, boost::shared_ptr<ScalingMethod> > EshelbianPlasticity::OpAnalyticalDispBcImpl< A, GAUSS >::scalingMethodsMap
protected

Definition at line 694 of file EshelbianPlasticity.hpp.


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