15 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
16 boost::shared_ptr<PhysicalEquations> physics_ptr)
34 boost::shared_ptr<DataAtIntegrationPts>
36 boost::shared_ptr<PhysicalEquations>
45 boost::shared_ptr<DataAtIntegrationPts>
49 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
54 std::string row_field, std::string col_field,
55 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const char type,
56 const bool assemble_symmetry,
ScaleOff scale_off = []() {
return 1; })
57 : T(row_field, col_field,
type, false),
76 virtual MoFEMErrorCode
integrate(
int row_side, EntityType row_type,
85 double *vec_ptr =
nF.data().data();
87 int *ind_ptr = data.
getIndices().data().data();
88 CHKERR VecSetValues(this->getTSf(), nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
92 virtual MoFEMErrorCode
assemble(
int row_side, EntityType row_type,
105 virtual MoFEMErrorCode
assemble(
int row_side,
int col_side,
106 EntityType row_type, EntityType col_type,
111 const auto row_nb_dofs = row_data.
getIndices().size();
112 const auto col_nb_dofs = col_data.
getIndices().size();
113 transposeK.resize(col_nb_dofs, row_nb_dofs,
false);
118 CHKERR MatSetValues<AssemblyTypeSelector<A>>(this->getTSB(), row_data,
119 col_data,
K, ADD_VALUES);
121 CHKERR MatSetValues<AssemblyTypeSelector<A>>(
122 this->getTSB(), col_data, row_data,
transposeK, ADD_VALUES);
139 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
140 EntityType col_type,
EntData &row_data,
150 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
161 MoFEMErrorCode
assemble(
int row_side,
int col_side, EntityType row_type,
162 EntityType col_type,
EntData &row_data,
167 constexpr bool store_matrices =
false;
168 if constexpr (store_matrices) {
170 m.resize(
K.size1(),
K.size2(),
false);
174 m.resize(
K.size2(),
K.size1(),
false);
182 static inline std::map<std::pair<std::string, std::string>, MatrixDouble>
191 using OpAssembleVolume::OpAssembleVolume;
195 "OpAssembleVolumePositiveDefine not implemented");
199 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
200 EntityType col_type,
EntData &row_data,
211 constexpr bool run_psd =
true;
215 auto higham_method_one_pass = [&](MatrixDouble &mat) {
218 const int size = (
n + 2) *
n;
220 double *work =
new double[size];
222 VectorDouble eig(
n, 0.0);
223 MatrixDouble eigen_vec = prod(trans(mat), mat);
225 eig.data().data(), work, lwork) > 0)
227 "The algorithm failed to compute eigenvalues.");
230 for (
auto &e : eig) {
231 constexpr double eps = std::numeric_limits<double>::epsilon();
232 e = std::max(std::sqrt(std::abs(e)),
eps);
235 auto diagonal_matrix =
236 ublas::diagonal_matrix<
double, ublas::row_major,
237 VecAllocator<double>>(
n, eig.data());
238 MatrixDouble symm_mat;
239 symm_mat = prod(trans(eigen_vec), diagonal_matrix);
240 symm_mat = prod(symm_mat, eigen_vec);
242 MatrixDouble hat_m = (mat + symm_mat) / 2.0;
247 auto hat_k = higham_method_one_pass(
K);
251 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
261 :
public ForcesAndSourcesCore::UserDataOperator {
268 boost::shared_ptr<DataAtIntegrationPts>
275 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
double alpha_omega = 0)
281 boost::shared_ptr<DataAtIntegrationPts>
288 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
290 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE],
false);
291 for (
auto t = moab::CN::TypeDimensionMap[
SPACE_DIM].first;
292 t <= moab::CN::TypeDimensionMap[
SPACE_DIM].second; ++
t)
293 doEntities[
t] =
true;
299 boost::shared_ptr<DataAtIntegrationPts>
305 std::string block_name,
Range block_entities,
306 std::array<double, 6> &reaction_vec)
313 boost::shared_ptr<DataAtIntegrationPts>
322 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
323 const double alpha,
const double rho)
335 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
347 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
356 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
365 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
370template <
int INTERP_ORDER>
373 std::string tag_name =
"")
375 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE],
false);
376 doEntities[MBVERTEX] =
true;
389 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
390 boost::shared_ptr<ScalingMethod> scaling_method_ptr)
401template <AssemblyType A>
403 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
405 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
409 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
410 boost::shared_ptr<BcDispVec> &bc_disp_ptr,
411 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
412 boost::shared_ptr<Range> ents_ptr =
nullptr)
413 :
OP(broken_base_side_data, ents_ptr), bcDispPtr(bc_disp_ptr),
414 scalingMethodsMap(smv) {}
424 using OP::OpDispBcImpl;
432template <AssemblyType A>
434 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
436 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
440 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
441 boost::shared_ptr<BcRotVec> &bc_rot_ptr,
442 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
443 boost::shared_ptr<Range> ents_ptr =
nullptr)
444 :
OP(broken_base_side_data, ents_ptr), bcRotPtr(bc_rot_ptr),
445 scalingMethodsMap(smv) {}
465 using OP::OpRotationBcImpl;
472 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
474 const std::string row_field, boost::shared_ptr<TractionBcVec> bc_data,
475 boost::shared_ptr<double> piola_scale_ptr,
476 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
477 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
478 row_field, row_field, FaceUserDataOperator::OPROW),
490 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
492 const std::string row_field, boost::shared_ptr<PressureBcVec> bc_data,
493 boost::shared_ptr<double> piola_scale_ptr,
494 boost::shared_ptr<MatrixDouble> hybrid_grad_disp,
495 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
496 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
497 row_field, row_field, FaceUserDataOperator::OPROW),
510template <AssemblyType A, IntegrationType I>
513template <AssemblyType A>
515 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBase {
518 typename FormsIntegrators<FaceUserDataOperator>::Assembly<
A>
::OpBase;
521 std::string row_field, boost::shared_ptr<PressureBcVec> bc_data,
522 boost::shared_ptr<MatrixDouble> hybrid_grad_disp,
523 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
524 :
OP(row_field, row_field,
OP::OPROWCOL), bcData(bc_data),
525 hybridGradDispPtr(hybrid_grad_disp), scalingMethodsMap(smv) {}
544 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
546 const std::string row_field,
547 boost::shared_ptr<AnalyticalTractionBcVec> bc_data,
548 boost::shared_ptr<double> piola_scale_ptr,
549 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
550 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
551 row_field, row_field, FaceUserDataOperator::OPROW),
558 boost::shared_ptr<AnalyticalTractionBcVec>
bcData;
567template <AssemblyType A>
569 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
572 typename FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase;
575 std::string row_field, boost::shared_ptr<MatrixDouble> hybrid_disp_ptr,
576 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_side_data_ptr,
578 boost::shared_ptr<NormalDisplacementBcVec> &bc_disp_ptr,
579 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
580 boost::shared_ptr<Range> ents_ptr =
nullptr)
581 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
582 row_field, row_field,
OP::OPROW),
583 hybridDispPtr(hybrid_disp_ptr),
584 brokenBaseSideDataPtr(
585 broken_side_data_ptr),
586 bcDispPtr(bc_disp_ptr), scalingMethodsMap(smv) {}
597template <AssemblyType A>
599 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBase {
602 typename FormsIntegrators<FaceUserDataOperator>::Assembly<
A>
::OpBase;
605 std::string row_field,
606 boost::shared_ptr<NormalDisplacementBcVec> &bc_disp_ptr,
607 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
608 boost::shared_ptr<Range> ents_ptr =
nullptr)
609 :
OP(row_field, row_field,
OP::OPROWCOL), bcDispPtr(bc_disp_ptr),
610 scalingMethodsMap(smv) {}
618template <AssemblyType A>
620 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
622 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
626 std::string row_field,
627 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
628 boost::shared_ptr<NormalDisplacementBcVec> &bc_disp_ptr,
629 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
630 boost::shared_ptr<Range> ents_ptr =
nullptr)
631 :
OP(row_field, broken_base_side_data, false, false, ents_ptr),
632 bcDispPtr(bc_disp_ptr), scalingMethodsMap(smv) {}
642 using OP::OpNormalDispBcRhsImpl;
666template <AssemblyType A>
668 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
670 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
674 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
675 boost::shared_ptr<AnalyticalDisplacementBcVec> &bc_disp_ptr,
676 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
677 boost::shared_ptr<Range> ents_ptr =
nullptr)
678 :
OP(broken_base_side_data, ents_ptr), bcDispPtr(bc_disp_ptr),
679 scalingMethodsMap(smv) {}
683 boost::shared_ptr<AnalyticalDisplacementBcVec>
bcDispPtr;
689 using OP::OpAnalyticalDispBcImpl;
697 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
698 const bool assemble_off =
false)
710 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
711 const double alpha,
const double rho)
721 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
722 const bool assemble_off =
false)
733 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
734 const bool assemble_off =
false)
744 using OpAssembleVolume::OpAssembleVolume;
746 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
747 const bool assemble_off)
757 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
769 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
770 const bool assemble_off)
780 std::string row_field, std::string col_field,
781 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const bool assemble_off)
791 std::string row_field, std::string col_field,
792 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
double alpha_omega)
805 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
806 const bool has_nonhomogeneous_mat_block)
821 std::string row_field, std::string col_field,
822 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
823 const bool has_nonhomogeneous_mat_block)
838 std::string row_field, std::string col_field,
839 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
840 const bool has_nonhomogeneous_mat_block)
863 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
872 std::string row_field, std::string col_field,
873 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const bool assemble_off)
885 std::string row_field, std::string col_field,
886 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const bool assemble_off)
897 :
public VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator {
899 using OP = VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator;
906 std::vector<EntityHandle> &map_gauss_pts,
907 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
920 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
927 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
937 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
945 :
public VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator {
948 using OP = VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator;
956 boost::shared_ptr<DataAtIntegrationPts>
961 :
public FaceElementForcesAndSourcesCore::UserDataOperator {
964 using OP = FaceElementForcesAndSourcesCore::UserDataOperator;
972 boost::shared_ptr<DataAtIntegrationPts>
976template <
int FE_DIM,
int PROBLEM_DIM,
int SPACE_DIM>
struct AddHOOps;
980 static MoFEMErrorCode
981 add(boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
982 std::vector<FieldSpace> space, std::string geom_field_name,
983 boost::shared_ptr<Range> crack_front_edges_ptr);
988 static MoFEMErrorCode
989 add(boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
990 std::vector<FieldSpace> space, std::string geom_field_name,
991 boost::shared_ptr<Range> crack_front_edges_ptr);
996 static MoFEMErrorCode
997 add(boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
998 std::vector<FieldSpace> space, std::string geom_field_name,
999 boost::shared_ptr<Range> crack_front_edges_ptr,
1000 boost::shared_ptr<MatrixDouble> jac =
nullptr,
1001 boost::shared_ptr<VectorDouble> det =
nullptr,
1002 boost::shared_ptr<MatrixDouble> inv_jac =
nullptr);
1006 FormsIntegrators<FaceElementForcesAndSourcesCore::UserDataOperator>::
1007 Assembly<A>::LinearForm<GAUSS>::OpBaseTimesVector<1,
SPACE_DIM,
1010template <
typename OP>
1016 MoFEMErrorCode
doWork(
int row_side, EntityType row_type,
1017 EntitiesFieldData::EntData &row_data) {
1021 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1026 if (!BASE::brokenBaseSideData) {
1031 auto do_work_rhs = [
this](
int row_side, EntityType row_type,
1032 EntitiesFieldData::EntData &row_data) {
1035 OP::nbRows = row_data.getIndices().size();
1039 OP::nbIntegrationPts = OP::getGaussPts().size2();
1041 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1043 OP::locF.resize(OP::nbRows,
false);
1046 CHKERR this->iNtegrate(row_data);
1048 CHKERR this->aSsemble(row_data);
1052 auto do_work_lhs = [
this](
int row_side,
int col_side, EntityType row_type,
1053 EntityType col_type,
1054 EntitiesFieldData::EntData &row_data,
1055 EntitiesFieldData::EntData &col_data) {
1058 auto check_if_assemble_transpose = [&] {
1060 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1064 }
else if (OP::assembleTranspose) {
1070 OP::rowSide = row_side;
1071 OP::rowType = row_type;
1072 OP::colSide = col_side;
1073 OP::colType = col_type;
1074 OP::nbCols = col_data.getIndices().size();
1075 OP::locMat.resize(OP::nbRows, OP::nbCols,
false);
1077 CHKERR this->iNtegrate(row_data, col_data);
1078 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1082 switch (OP::opType) {
1085 OP::nbRows = row_data.getIndices().size();
1088 OP::nbIntegrationPts = OP::getGaussPts().size2();
1089 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1094 for (
auto &bd : *BASE::brokenBaseSideData) {
1097 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1099 "base functions not set");
1106 row_side, bd.getSide(),
1109 row_type, bd.getType(),
1112 row_data, bd.getData()
1119 for (
auto &bd : *BASE::brokenBaseSideData) {
1120 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1122 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1127 (std::string(
"wrong op type ") +
1128 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1144 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1145 boost::shared_ptr<MatrixDouble> vec,
1146 ScalarFun beta_coeff = [](
double,
double,
double)
constexpr {
return 1; },
1147 boost::shared_ptr<Range> ents_ptr =
nullptr);
1155 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1156 ScalarFun beta_coeff = [](
double,
double,
double)
constexpr {
return 1; },
1157 boost::shared_ptr<Range> ents_ptr =
nullptr);
1160 MoFEMErrorCode
doWork(
int row_side, EntityType row_type,
1161 EntitiesFieldData::EntData &row_data);
1168 const std::string row_field,
1169 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1170 ScalarFun beta_coeff, boost::shared_ptr<Range> ents_ptr =
nullptr);
1173 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data);
1178 FormsIntegrators<FaceElementForcesAndSourcesCore::UserDataOperator>::
1185 std::string row_field,
1186 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1187 ScalarFun beta,
const bool assmb_transpose,
const bool only_transpose,
1188 boost::shared_ptr<Range> ents_ptr =
nullptr);
1195 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1196 ScalarFun beta, boost::shared_ptr<Range> ents_ptr =
nullptr);
1198 MoFEMErrorCode
doWork(
int row_side, EntityType row_type,
1199 EntitiesFieldData::EntData &row_data);
1207 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1208 boost::shared_ptr<BcDispVec> &bc_disp_ptr,
1209 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
1210 ScalarFun tau_coeff, boost::shared_ptr<Range> ents_ptr =
nullptr)
1225 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1226 boost::shared_ptr<BcDispVec> &bc_disp_ptr, ScalarFun tau_coeff,
1227 boost::shared_ptr<Range> ents_ptr =
nullptr)
1228 :
OP(broken_base_side_data, tau_coeff, ents_ptr),
bcDispPtr(bc_disp_ptr) {
1242 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1243 boost::shared_ptr<AnalyticalDisplacementBcVec> &bc_disp_ptr,
1244 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
1245 ScalarFun tau_coeff, boost::shared_ptr<Range> ents_ptr =
nullptr)
1260 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1261 boost::shared_ptr<AnalyticalDisplacementBcVec> &bc_disp_ptr,
1262 ScalarFun tau_coeff, boost::shared_ptr<Range> ents_ptr =
nullptr)
1263 :
OP(broken_base_side_data, tau_coeff, ents_ptr),
bcDispPtr(bc_disp_ptr) {
1276 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1277 boost::shared_ptr<BcRotVec> &bc_ptr,
1278 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
1279 ScalarFun tau_coeff, boost::shared_ptr<Range> ents_ptr =
nullptr)
1294 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1295 boost::shared_ptr<BcRotVec> &bc_ptr, ScalarFun tau_coeff,
1296 boost::shared_ptr<Range> ents_ptr =
nullptr)
1297 :
OP(broken_base_side_data, tau_coeff, ents_ptr),
bcRotPtr(bc_ptr) {
FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMassVectorFace
FormsIntegrators< VolUserDataOperator >::Assembly< A >::BiLinearForm< GAUSS >::OpMass< 9, 9 > OpStressGram_dBubble_dBubble
FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, SPACE_DIM > OpBaseTimesVectorFace
FormsIntegrators< VolUserDataOperator >::Assembly< A >::BiLinearForm< GAUSS >::OpMass< 3, 9 > OpStressGram_dP_dP
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FieldSpace
approximation spaces
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
const double n
refractive index of diffusive medium
static __CLPK_integer lapack_dsyev(char jobz, char uplo, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *w, __CLPK_doublereal *work, __CLPK_integer lwork)
constexpr double t
plate stiffness
constexpr auto field_name
OpBaseImpl< PETSC, EdgeEleOp > OpBase
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMass
[Only used with Hooke equation (linear material model)]
FTensor::Index< 'm', 3 > m
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::vector< FieldSpace > space, std::string geom_field_name, boost::shared_ptr< Range > crack_front_edges_ptr)
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::vector< FieldSpace > space, std::string geom_field_name, boost::shared_ptr< Range > crack_front_edges_ptr)
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::vector< FieldSpace > space, std::string geom_field_name, boost::shared_ptr< Range > crack_front_edges_ptr, boost::shared_ptr< MatrixDouble > jac=nullptr, boost::shared_ptr< VectorDouble > det=nullptr, boost::shared_ptr< MatrixDouble > inv_jac=nullptr)
bool sYmm
If true assume that matrix is symmetric structure.
Data on single entity (This is passed as argument to DataOperator::doWork)
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
@ OPROW
operator doWork function is executed on FE rows
@ OPROWCOL
operator doWork is executed on FE rows &columns
@ OPSPACE
operator do Work is execute on space data
boost::shared_ptr< AnalyticalDisplacementBcVec > bcDispPtr
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
MoFEMErrorCode iNtegrate(EntData &data)
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)
MoFEMErrorCode iNtegrate(EntData &data)
MatrixDouble K
local tangent matrix
virtual MoFEMErrorCode integrate(int row_side, EntityType row_type, EntData &data)
VectorDouble nF
local right hand side vector
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode assemble(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
virtual MoFEMErrorCode assemble(EntData &data)
OpAssembleBasic(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
virtual MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
const bool assembleSymmetry
boost::function< double()> ScaleOff
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
OpAssembleBasic(const FieldSpace space)
virtual MoFEMErrorCode assemble(int row_side, EntityType row_type, EntData &data)
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;})
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
typename OP::ScaleOff ScaleOff
static std::map< std::pair< std::string, std::string >, MatrixDouble > mapMatrix
MoFEMErrorCode assemble(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
boost::shared_ptr< AnalyticalTractionBcVec > bcData
OpBrokenAnalyticalTractionBc(const std::string row_field, boost::shared_ptr< AnalyticalTractionBcVec > bc_data, boost::shared_ptr< double > piola_scale_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
boost::shared_ptr< double > piolaScalePtr
MoFEMErrorCode iNtegrate(EntData &data)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< MatrixDouble > hybridGradDispPtr
OpBrokenPressureBcLhsImpl_dU(std::string row_field, boost::shared_ptr< PressureBcVec > bc_data, boost::shared_ptr< MatrixDouble > hybrid_grad_disp, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< PressureBcVec > bcData
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< MatrixDouble > hybridGradDispPtr
boost::shared_ptr< double > piolaScalePtr
MoFEMErrorCode iNtegrate(EntData &data)
OpBrokenPressureBc(const std::string row_field, boost::shared_ptr< PressureBcVec > bc_data, boost::shared_ptr< double > piola_scale_ptr, boost::shared_ptr< MatrixDouble > hybrid_grad_disp, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< PressureBcVec > bcData
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
OpBrokenTractionBc(const std::string row_field, boost::shared_ptr< TractionBcVec > bc_data, boost::shared_ptr< double > piola_scale_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
boost::shared_ptr< double > piolaScalePtr
boost::shared_ptr< TractionBcVec > bcData
MoFEMErrorCode iNtegrate(EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
OpCalculateEshelbyStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
std::array< double, 6 > & reactionVec
OpCalculateReactionForces(boost::shared_ptr< DataAtIntegrationPts > data_ptr, std::string block_name, Range block_entities, std::array< double, 6 > &reaction_vec)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
OpCalculateRotationAndSpatialGradient(boost::shared_ptr< DataAtIntegrationPts > data_ptr, double alpha_omega=0)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
OpCalculateTractionFromSideEl(boost::shared_ptr< DataAtIntegrationPts > data_ptr)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
OpDispBcImpl(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcDispVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
MoFEMErrorCode iNtegrate(EntData &data)
boost::shared_ptr< BcDispVec > bcDispPtr
MoFEMErrorCode iNtegrate(EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
FaceElementForcesAndSourcesCore::UserDataOperator OP
OpFaceMaterialForce(boost::shared_ptr< DataAtIntegrationPts > data_ptr)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Caluclate face material force and normal pressure at gauss points.
OpFaceSideMaterialForce(boost::shared_ptr< DataAtIntegrationPts > data_ptr)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
OpGetInternalStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, std::string tag_name="")
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideDataPtr
virtual MoFEMErrorCode evaluateLhs(EntData &data)=0
boost::shared_ptr< PhysicalEquations > physicsPtr
material physical equations
virtual MoFEMErrorCode evaluateRhs(EntData &data)=0
OpJacobian(FieldSpace space, UserDataOperator::OpType op_type)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
OpJacobian(const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< NormalDisplacementBcVec > bcDispPtr
OpNormalDispBcLhsImpl_dP(std::string row_field, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< NormalDisplacementBcVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
OpNormalDispBcLhsImpl_dU(std::string row_field, boost::shared_ptr< NormalDisplacementBcVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
boost::shared_ptr< NormalDisplacementBcVec > bcDispPtr
boost::shared_ptr< MatrixDouble > hybridDispPtr
OpNormalDispBcRhsImpl(std::string row_field, boost::shared_ptr< MatrixDouble > hybrid_disp_ptr, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_side_data_ptr, boost::shared_ptr< NormalDisplacementBcVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
MoFEMErrorCode iNtegrate(EntData &data)
boost::shared_ptr< NormalDisplacementBcVec > bcDispPtr
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideDataPtr
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode iNtegrate(EntData &data)
std::vector< EntityHandle > & mapGaussPts
OpPostProcDataStructure(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, boost::shared_ptr< DataAtIntegrationPts > data_ptr, int sense)
moab::Interface & postProcMesh
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator OP
OpRotationBcImpl(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcRotVec > &bc_rot_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
MoFEMErrorCode iNtegrate(EntData &data)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< BcRotVec > bcRotPtr
Apply rotation boundary condition.
MoFEMErrorCode iNtegrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
OpSpatialConsistencyBubble(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
MoFEMErrorCode integrate(EntData &data)
OpSpatialConsistencyDivTerm(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
MoFEMErrorCode integrate(EntData &data)
OpSpatialConsistencyP(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
OpSpatialConsistency_dBubble_dBubble(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool has_nonhomogeneous_mat_block)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrateImpl(EntData &row_data, EntData &col_data)
const bool hasNonhomogeneousMatBlock
MoFEMErrorCode integrateImpl(EntData &row_data, EntData &col_data)
OpSpatialConsistency_dBubble_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool has_nonhomogeneous_mat_block)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
const bool hasNonhomogeneousMatBlock
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialConsistency_dBubble_domega(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off)
OpSpatialConsistency_dP_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool has_nonhomogeneous_mat_block)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrateImpl(EntData &row_data, EntData &col_data)
const bool hasNonhomogeneousMatBlock
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialConsistency_dP_domega(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off)
OpSpatialEquilibrium_dw_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off=false)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialEquilibrium_dw_dw(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha, const double rho)
MoFEMErrorCode integrate(EntData &data)
OpSpatialEquilibrium(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha, const double rho)
MoFEMErrorCode integrate(EntData &row_data)
OpSpatialPhysicalInternalStress(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< ScalingMethod > scaling_method_ptr)
boost::shared_ptr< ScalingMethod > scalingMethodPtr
OpSpatialPhysical_du_dBubble(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off=false)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialPhysical_du_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off=false)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialPhysical_du_domega(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off)
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)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialPrj_dx_dx(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
OpSpatialPrj(std::string row_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
MoFEMErrorCode integrate(EntData &row_data)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialRotation_domega_dBubble(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off)
OpSpatialRotation_domega_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const bool assemble_off)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialRotation_domega_domega(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, double alpha_omega)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialRotation_domega_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, double alpha_omega)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialRotation(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, double alpha_omega)
MoFEMErrorCode integrate(EntData &data)
boost::weak_ptr< MatrixDouble > fluxMatPtr
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
OpBrokenBaseImpl< OP > BASE
OpStressGram_dBubble_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< BcDispVec > bcDispPtr
OpTauStabilizationDispLhsBc(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcDispVec > &bc_disp_ptr, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
OpTauStabilizationDispRhsBc(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcDispVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
MoFEMErrorCode iNtegrate(EntData &data)
boost::shared_ptr< BcDispVec > bcDispPtr
boost::shared_ptr< AnalyticalDisplacementBcVec > bcDispPtr
MoFEMErrorCode iNtegrate(EntData &data)
OpTauStabilizationOpAnalyticalDispBc(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, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< AnalyticalDisplacementBcVec > bcDispPtr
OpTauStabilizationOpAnalyticalDispLhsBc(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< AnalyticalDisplacementBcVec > &bc_disp_ptr, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
boost::shared_ptr< BcRotVec > bcRotPtr
OpTauStabilizationRotationLhsBc(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcRotVec > &bc_ptr, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
OpTauStabilizationRotationRhsBc(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcRotVec > &bc_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
MoFEMErrorCode iNtegrate(EntData &data)
boost::shared_ptr< BcRotVec > bcRotPtr