14 OpJacobian(
const int tag,
const bool eval_rhs,
const bool eval_lhs,
15 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
16 boost::shared_ptr<PhysicalEquations> physics_ptr)
23 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
32 boost::shared_ptr<DataAtIntegrationPts>
34 boost::shared_ptr<PhysicalEquations>
43 boost::shared_ptr<DataAtIntegrationPts>
47 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
52 std::string row_field, std::string col_field,
53 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const char type,
54 const bool assemble_symmetry,
ScaleOff scale_off = []() {
return 1; })
55 : T(row_field, col_field, type, false),
dataAtPts(data_ptr),
73 virtual MoFEMErrorCode
integrate(
int row_side, EntityType row_type,
82 double *vec_ptr = &*
nF.begin();
85 CHKERR VecSetValues(this->getTSf(), nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
89 virtual MoFEMErrorCode
assemble(
int row_side, EntityType row_type,
102 virtual MoFEMErrorCode
assemble(
int row_side,
int col_side,
103 EntityType row_type, EntityType col_type,
108 const auto row_nb_dofs = row_data.
getIndices().size();
109 const auto col_nb_dofs = col_data.
getIndices().size();
110 transposeK.resize(col_nb_dofs, row_nb_dofs,
false);
115 CHKERR MatSetValues<AssemblyTypeSelector<A>>(this->getTSB(), row_data,
116 col_data,
K, ADD_VALUES);
118 CHKERR MatSetValues<AssemblyTypeSelector<A>>(
119 this->getTSB(), col_data, row_data,
transposeK, ADD_VALUES);
136 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
137 EntityType col_type,
EntData &row_data,
147 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
155 MoFEMErrorCode
assemble(
int row_side,
int col_side, EntityType row_type,
156 EntityType col_type,
EntData &row_data,
161 constexpr bool store_matrices =
false;
162 if constexpr (store_matrices) {
164 m.resize(
K.size1(),
K.size2(),
false);
168 m.resize(
K.size2(),
K.size1(),
false);
176 static inline std::map<std::pair<std::string, std::string>, MatrixDouble>
185 using OpAssembleVolume::OpAssembleVolume;
189 "OpAssembleVolumePositiveDefine not implemented");
193 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
194 EntityType col_type,
EntData &row_data,
205 constexpr bool run_psd =
true;
209 auto symmetrize = [](MatrixDouble &mat) {
210 MatrixDouble r = (mat + trans(mat)) / 2.0;
213 auto check_positive_definite = [](MatrixDouble &mat) {
217 auto frobenius_norm = [](MatrixDouble &mat) {
219 for (std::size_t
i = 0;
i < mat.size1(); ++
i)
220 for (std::size_t
j = 0;
j < mat.size2(); ++
j)
221 sum += mat(
i,
j) * mat(
i,
j);
222 return std::sqrt(sum);
225 auto higham_method_one_pass = [&](MatrixDouble &mat) {
228 const int size = (
n + 2) *
n;
230 double *work =
new double[size];
232 VectorDouble eig(
n, 0.0);
233 MatrixDouble eigen_vec = prod(trans(mat), mat);
235 eig.data().data(), work, lwork) > 0)
237 "The algorithm failed to compute eigenvalues.");
240 for (
auto &e : eig) {
241 constexpr double eps = std::numeric_limits<double>::epsilon();
242 e = std::max(std::sqrt(std::abs(e)),
eps);
245 auto diagonal_matrix =
246 ublas::diagonal_matrix<
double, ublas::row_major,
247 VecAllocator<double>>(
n, eig.data());
248 MatrixDouble symm_mat;
249 symm_mat = prod(trans(eigen_vec), diagonal_matrix);
250 symm_mat = prod(symm_mat, eigen_vec);
252 MatrixDouble hat_m = (mat + symm_mat) / 2.0;
257 auto hat_k = higham_method_one_pass(
K);
261 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
271 :
public ForcesAndSourcesCore::UserDataOperator {
278 boost::shared_ptr<DataAtIntegrationPts>
285 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
double alpha_omega = 0)
288 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
291 boost::shared_ptr<DataAtIntegrationPts>
298 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
300 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE],
false);
301 for (
auto t = moab::CN::TypeDimensionMap[
SPACE_DIM].first;
302 t <= moab::CN::TypeDimensionMap[
SPACE_DIM].second; ++
t)
303 doEntities[
t] =
true;
306 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
309 boost::shared_ptr<DataAtIntegrationPts>
315 std::string block_name,
Range block_entities,
316 std::array<double, 6> &reaction_vec)
320 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
323 boost::shared_ptr<DataAtIntegrationPts>
332 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
333 const double alpha,
const double rho)
345 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
357 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
366 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
375 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
380template <
int INTERP_ORDER>
383 std::string tag_name =
"")
399 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
406template <AssemblyType A>
408 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
410 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
414 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
415 boost::shared_ptr<BcDispVec> &bc_disp_ptr,
416 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
417 boost::shared_ptr<Range> ents_ptr =
nullptr)
418 :
OP(broken_base_side_data, ents_ptr), bcDispPtr(bc_disp_ptr),
419 scalingMethodsMap(smv) {}
429 using OP::OpDispBcImpl;
437template <AssemblyType A>
439 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
441 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
445 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
446 boost::shared_ptr<BcRotVec> &bc_rot_ptr,
447 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
448 boost::shared_ptr<Range> ents_ptr =
nullptr)
449 :
OP(broken_base_side_data, ents_ptr), bcRotPtr(bc_rot_ptr),
450 scalingMethodsMap(smv) {}
470 using OP::OpRotationBcImpl;
477 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
479 const std::string row_field, boost::shared_ptr<TractionBcVec> bc_data,
480 boost::shared_ptr<double> piola_scale_ptr,
481 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
482 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
483 row_field, row_field, FaceUserDataOperator::OPROW),
495 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
497 const std::string row_field, boost::shared_ptr<PressureBcVec> bc_data,
498 boost::shared_ptr<double> piola_scale_ptr,
499 boost::shared_ptr<MatrixDouble> hybrid_grad_disp,
500 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
501 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
502 row_field, row_field, FaceUserDataOperator::OPROW),
515template <AssemblyType A, IntegrationType I>
518template <AssemblyType A>
520 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBase {
523 typename FormsIntegrators<FaceUserDataOperator>::Assembly<
A>
::OpBase;
526 std::string row_field, boost::shared_ptr<PressureBcVec> bc_data,
527 boost::shared_ptr<MatrixDouble> hybrid_grad_disp,
528 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
529 :
OP(row_field, row_field,
OP::OPROWCOL), bcData(bc_data),
530 hybridGradDispPtr(hybrid_grad_disp), scalingMethodsMap(smv) {}
549 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
551 const std::string row_field,
552 boost::shared_ptr<AnalyticalTractionBcVec> bc_data,
553 boost::shared_ptr<double> piola_scale_ptr,
554 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv)
555 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
556 row_field, row_field, FaceUserDataOperator::OPROW),
562 boost::shared_ptr<AnalyticalTractionBcVec>
bcData;
571template <AssemblyType A>
573 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase {
576 typename FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>
::OpBase;
579 std::string row_field, boost::shared_ptr<MatrixDouble> hybrid_disp_ptr,
580 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_side_data_ptr,
582 boost::shared_ptr<NormalDisplacementBcVec> &bc_disp_ptr,
583 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
584 boost::shared_ptr<Range> ents_ptr =
nullptr)
585 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::
OpBase(
586 row_field, row_field,
OP::OPROW),
587 hybridDispPtr(hybrid_disp_ptr),
588 brokenBaseSideDataPtr(
589 broken_side_data_ptr),
590 bcDispPtr(bc_disp_ptr), scalingMethodsMap(smv) {}
601template <AssemblyType A>
603 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBase {
606 typename FormsIntegrators<FaceUserDataOperator>::Assembly<
A>
::OpBase;
609 std::string row_field,
610 boost::shared_ptr<NormalDisplacementBcVec> &bc_disp_ptr,
611 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
612 boost::shared_ptr<Range> ents_ptr =
nullptr)
613 :
OP(row_field, row_field,
OP::OPROWCOL), bcDispPtr(bc_disp_ptr),
614 scalingMethodsMap(smv) {}
622template <AssemblyType A>
624 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
626 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
630 std::string row_field,
631 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
632 boost::shared_ptr<NormalDisplacementBcVec> &bc_disp_ptr,
633 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
634 boost::shared_ptr<Range> ents_ptr =
nullptr)
635 :
OP(row_field, broken_base_side_data, false, false, ents_ptr),
636 bcDispPtr(bc_disp_ptr), scalingMethodsMap(smv) {}
646 using OP::OpNormalDispBcRhsImpl;
670template <AssemblyType A>
672 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
674 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
678 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
679 boost::shared_ptr<AnalyticalDisplacementBcVec> &bc_disp_ptr,
680 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv,
681 boost::shared_ptr<Range> ents_ptr =
nullptr)
682 :
OP(broken_base_side_data, ents_ptr), bcDispPtr(bc_disp_ptr),
683 scalingMethodsMap(smv) {}
687 boost::shared_ptr<AnalyticalDisplacementBcVec>
bcDispPtr;
693 using OP::OpAnalyticalDispBcImpl;
701 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
702 const bool assemble_off =
false)
714 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
715 const double alpha,
const double rho)
725 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
726 const bool assemble_off =
false)
737 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
738 const bool assemble_off =
false)
748 using OpAssembleVolume::OpAssembleVolume;
750 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
751 const bool assemble_off)
761 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
773 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
774 const bool assemble_off)
784 std::string row_field, std::string col_field,
785 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const bool assemble_off)
795 std::string row_field, std::string col_field,
796 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
double alpha_omega)
809 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
822 std::string row_field, std::string col_field,
823 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
836 std::string row_field, std::string col_field,
837 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
850 std::string row_field, std::string col_field,
851 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const bool assemble_off)
863 std::string row_field, std::string col_field,
864 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const bool assemble_off)
875 :
public VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator {
877 using OP = VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator;
884 std::vector<EntityHandle> &map_gauss_pts,
885 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
890 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
898 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
905 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
915 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
923 :
public VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator {
926 using OP = VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator;
931 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
934 boost::shared_ptr<DataAtIntegrationPts>
939 :
public FaceElementForcesAndSourcesCore::UserDataOperator {
942 using OP = FaceElementForcesAndSourcesCore::UserDataOperator;
947 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
950 boost::shared_ptr<DataAtIntegrationPts>
954template <
int FE_DIM,
int PROBLEM_DIM,
int SPACE_DIM>
struct AddHOOps;
958 static MoFEMErrorCode
959 add(boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
960 std::vector<FieldSpace> space, std::string geom_field_name,
961 boost::shared_ptr<Range> crack_front_edges_ptr);
966 static MoFEMErrorCode
967 add(boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
968 std::vector<FieldSpace> space, std::string geom_field_name,
969 boost::shared_ptr<Range> crack_front_edges_ptr);
974 static MoFEMErrorCode
975 add(boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
976 std::vector<FieldSpace> space, std::string geom_field_name,
977 boost::shared_ptr<Range> crack_front_edges_ptr,
978 boost::shared_ptr<MatrixDouble> jac =
nullptr,
979 boost::shared_ptr<VectorDouble> det =
nullptr,
980 boost::shared_ptr<MatrixDouble> inv_jac =
nullptr);
984 FormsIntegrators<FaceElementForcesAndSourcesCore::UserDataOperator>::
985 Assembly<A>::LinearForm<GAUSS>::OpBaseTimesVector<1, SPACE_DIM, 1>;
987template <
typename OP>
990 using BASE = OpBrokenBaseImpl<OP>;
993 MoFEMErrorCode
doWork(
int row_side, EntityType row_type,
994 EntitiesFieldData::EntData &row_data) {
998 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1003 if (!BASE::brokenBaseSideData) {
1008 auto do_work_rhs = [
this](
int row_side, EntityType row_type,
1009 EntitiesFieldData::EntData &row_data) {
1012 OP::nbRows = row_data.getIndices().size();
1016 OP::nbIntegrationPts = OP::getGaussPts().size2();
1018 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1020 OP::locF.resize(OP::nbRows,
false);
1023 CHKERR this->iNtegrate(row_data);
1025 CHKERR this->aSsemble(row_data);
1029 auto do_work_lhs = [
this](
int row_side,
int col_side, EntityType row_type,
1030 EntityType col_type,
1031 EntitiesFieldData::EntData &row_data,
1032 EntitiesFieldData::EntData &col_data) {
1035 auto check_if_assemble_transpose = [&] {
1037 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1041 }
else if (OP::assembleTranspose) {
1047 OP::rowSide = row_side;
1048 OP::rowType = row_type;
1049 OP::colSide = col_side;
1050 OP::colType = col_type;
1051 OP::nbCols = col_data.getIndices().size();
1052 OP::locMat.resize(OP::nbRows, OP::nbCols,
false);
1054 CHKERR this->iNtegrate(row_data, col_data);
1055 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1059 switch (OP::opType) {
1062 OP::nbRows = row_data.getIndices().size();
1065 OP::nbIntegrationPts = OP::getGaussPts().size2();
1066 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1071 for (
auto &bd : *BASE::brokenBaseSideData) {
1074 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1076 "base functions not set");
1083 row_side, bd.getSide(),
1086 row_type, bd.getType(),
1089 row_data, bd.getData()
1096 for (
auto &bd : *BASE::brokenBaseSideData) {
1097 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1102 (std::string(
"wrong op type ") +
1103 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1116 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1117 boost::shared_ptr<MatrixDouble> vec,
1118 ScalarFun beta_coeff = [](
double,
double,
double)
constexpr {
return 1; },
1119 boost::shared_ptr<Range> ents_ptr =
nullptr)
1120 :
OP(broken_base_side_data, ents_ptr) {
1121 this->sourceVec = vec;
1122 this->betaCoeff = beta_coeff;
1130 const std::string row_field,
1131 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1132 ScalarFun beta_coeff, boost::shared_ptr<Range> ents_ptr =
nullptr)
1133 :
OP(row_field, boost::shared_ptr<MatrixDouble>(), beta_coeff, ents_ptr),
1135 this->betaCoeff = beta_coeff;
1139 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data) {
1141 for (
auto &bd : (*brokenBaseSideDataPtr)) {
1146 if (this->sourceVec->size1() !=
SPACE_DIM) {
1148 "Inconsistent size of the source vector");
1150 if (this->sourceVec->size2() != OP::getGaussPts().size2()) {
1152 "Inconsistent size of the source vector");
1156 CHKERR OP::iNtegrate(data);
1158 this->sourceVec.reset();
1166 FormsIntegrators<FaceElementForcesAndSourcesCore::UserDataOperator>::
1174 std::string row_field,
1175 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
1176 ScalarFun beta,
const bool assmb_transpose,
const bool only_transpose,
1177 boost::shared_ptr<Range> ents_ptr =
nullptr)
1178 :
OP(row_field, broken_base_side_data, assmb_transpose, only_transpose,
1180 this->betaCoeff = beta;
FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMassVectorFace
FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 1 > OpBaseTimesVectorFace
constexpr int SPACE_DIM
[Define dimension]
#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.
FTensor::Index< 'i', SPACE_DIM > i
const double n
refractive index of diffusive medium
static __CLPK_integer lapack_dpotrf(char uplo, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda)
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)
FTensor::Index< 'j', 3 > j
constexpr AssemblyType A
[Define dimension]
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)
std::array< bool, MBMAXTYPE > doEntities
If true operator is executed for entity.
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.
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 iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideDataPtr
OpBrokenBaseTimesVectorDisp(const std::string row_field, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, ScalarFun beta_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
OpBrokenBaseTimesVectorHybridDisp(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< MatrixDouble > vec, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpBrokenMassVectorHybrid(std::string row_field, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, ScalarFun beta, const bool assmb_transpose, const bool only_transpose, boost::shared_ptr< Range > ents_ptr=nullptr)
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)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
OpGetInternalStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, std::string tag_name="")
virtual MoFEMErrorCode evaluateLhs(EntData &data)=0
boost::shared_ptr< PhysicalEquations > physicsPtr
material physical equations
virtual MoFEMErrorCode evaluateRhs(EntData &data)=0
OpJacobian(const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
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)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialConsistency_dBubble_dBubble(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
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)
MoFEMErrorCode integrateImpl(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
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)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrateImpl(EntData &row_data, EntData &col_data)
OpSpatialConsistency_dP_dP(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
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)
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)
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
OpBrokenBaseImpl< OP > BASE