|
| v0.14.0
|
#include <users_modules/eshelbian_plasticit/src/EshelbianPlasticity.hpp>
|
MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
| Getting interface of core database. More...
|
|
| EshelbianCore (MoFEM::Interface &m_field) |
|
virtual | ~EshelbianCore () |
|
MoFEMErrorCode | getOptions () |
|
template<typename BC > |
MoFEMErrorCode | getBc (boost::shared_ptr< BC > &bc_vec_ptr, const std::string block_name, const int nb_attributes) |
|
MoFEMErrorCode | getSpatialDispBc () |
| [Getting norms] More...
|
|
MoFEMErrorCode | getSpatialRotationBc () |
|
MoFEMErrorCode | getSpatialTractionBc () |
|
MoFEMErrorCode | getTractionFreeBc (const EntityHandle meshset, boost::shared_ptr< TractionFreeBc > &bc_ptr, const std::string contact_set_name) |
| Remove all, but entities where kinematic constrains are applied. More...
|
|
MoFEMErrorCode | getSpatialTractionFreeBc (const EntityHandle meshset=0) |
|
MoFEMErrorCode | addFields (const EntityHandle meshset=0) |
|
MoFEMErrorCode | addVolumeFiniteElement (const EntityHandle meshset=0) |
|
MoFEMErrorCode | addBoundaryFiniteElement (const EntityHandle meshset=0) |
|
MoFEMErrorCode | addDMs (const BitRefLevel bit=BitRefLevel().set(0)) |
|
MoFEMErrorCode | addMaterial_HMHHStVenantKirchhoff (const int tape, const double lambda, const double mu, const double sigma_y) |
|
MoFEMErrorCode | addMaterial_HMHMooneyRivlin (const int tape, const double alpha, const double beta, const double lambda, const double sigma_y) |
|
MoFEMErrorCode | addMaterial_Hencky (double E, double nu) |
|
MoFEMErrorCode | setBaseVolumeElementOps (const int tag, const bool do_rhs, const bool do_lhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe) |
|
MoFEMErrorCode | setVolumeElementOps (const int tag, const bool add_elastic, const bool add_material, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe_lhs) |
|
MoFEMErrorCode | setFaceElementOps (const bool add_elastic, const bool add_material, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_lhs) |
|
MoFEMErrorCode | setContactElementOps (boost::shared_ptr< ContactTree > &fe_contact_tree, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_lhs) |
|
MoFEMErrorCode | setElasticElementOps (const int tag) |
|
MoFEMErrorCode | setElasticElementToTs (DM dm) |
|
MoFEMErrorCode | solveElastic (TS ts, Mat m, Vec f, Vec x) |
|
MoFEMErrorCode | postProcessResults (const int tag, const std::string file) |
|
MoFEMErrorCode | gettingNorms () |
| [Getting norms] More...
|
|
virtual MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const =0 |
|
template<class IFACE > |
MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
| Register interface. More...
|
|
template<class IFACE > |
MoFEMErrorCode | getInterface (IFACE *&iface) const |
| Get interface refernce to pointer of interface. More...
|
|
template<class IFACE > |
MoFEMErrorCode | getInterface (IFACE **const iface) const |
| Get interface pointer to pointer of interface. More...
|
|
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> |
IFACE | getInterface () const |
| Get interface pointer to pointer of interface. More...
|
|
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> |
IFACE | getInterface () const |
| Get reference to interface. More...
|
|
template<class IFACE > |
IFACE * | getInterface () const |
| Function returning pointer to interface. More...
|
|
virtual | ~UnknownInterface ()=default |
|
- Examples
- ep.cpp.
Definition at line 862 of file EshelbianPlasticity.hpp.
◆ EshelbianCore()
◆ ~EshelbianCore()
EshelbianPlasticity::EshelbianCore::~EshelbianCore |
( |
| ) |
|
|
virtualdefault |
◆ addBoundaryFiniteElement()
- Examples
- ep.cpp.
Definition at line 436 of file EshelbianPlasticity.cpp.
440 auto add_field_to_fe = [
this](
const std::string fe,
449 Range natural_bc_elements;
452 natural_bc_elements.merge(
v.faces);
457 natural_bc_elements.merge(
v.faces);
460 Range essentail_bc_elements;
463 essentail_bc_elements.merge(
v.faces);
481 auto get_skin = [&]() {
486 CHKERR skin.find_skin(0, body_ents,
false, skin_ents);
490 auto filter_true_skin = [&](
auto &&skin) {
492 ParallelComm *pcomm =
494 CHKERR pcomm->filter_pstatus(skin, PSTATUS_SHARED | PSTATUS_MULTISHARED,
495 PSTATUS_NOT, -1, &boundary_ents);
496 return boundary_ents;
499 auto skin = filter_true_skin(get_skin());
510 MOFEM_LOG(
"EP", Sev::inform) <<
"Contact elements " << contact_range.size();
◆ addDMs()
- Examples
- ep.cpp.
Definition at line 523 of file EshelbianPlasticity.cpp.
544 auto remove_dofs_on_essential_spatial_stress_boundary =
545 [&](
const std::string prb_name) {
547 for (
int d : {0, 1, 2})
553 CHKERR remove_dofs_on_essential_spatial_stress_boundary(
"ESHELBY_PLASTICITY");
597 PetscSection section;
602 CHKERR PetscSectionDestroy(§ion);
615 ->pushMarkDOFsOnEntities<DisplacementCubitBcData>(
◆ addFields()
- Examples
- ep.cpp.
Definition at line 256 of file EshelbianPlasticity.cpp.
261 Range tets_skin_part;
263 CHKERR skin.find_skin(0, tets,
false, tets_skin_part);
264 ParallelComm *pcomm =
267 CHKERR pcomm->filter_pstatus(tets_skin_part,
268 PSTATUS_SHARED | PSTATUS_MULTISHARED,
269 PSTATUS_NOT, -1, &tets_skin);
273 tets_skin = subtract(tets_skin,
v.faces);
277 tets_skin = subtract(tets_skin,
v.faces);
281 tets_skin = subtract(tets_skin,
v.faces);
284 auto subtract_faces_where_displacements_are_applied =
285 [&](
const std::string block_name) {
288 tets_skin = subtract(tets_skin, contact_range);
291 CHKERR subtract_faces_where_displacements_are_applied(
"CONTACT");
295 moab::Interface::UNION);
296 Range faces_not_on_the_skin = subtract(faces, tets_skin);
298 auto add_hdiv_field = [&](
const std::string
field_name,
const int order,
310 auto add_l2_field = [
this, meshset](
const std::string
field_name,
311 const int order,
const int dim) {
320 auto add_h1_field = [
this, meshset](
const std::string
field_name,
321 const int order,
const int dim) {
333 auto add_l2_field_by_range = [
this](
const std::string
field_name,
334 const int order,
const int dim,
335 const int field_dim,
Range &&
r) {
345 auto add_bubble_field = [
this, meshset](
const std::string
field_name,
346 const int order,
const int dim) {
352 auto field_order_table =
353 const_cast<Field *
>(field_ptr)->getFieldOrderTable();
354 auto get_cgg_bubble_order_zero = [](
int p) {
return 0; };
355 auto get_cgg_bubble_order_tet = [](
int p) {
358 field_order_table[MBVERTEX] = get_cgg_bubble_order_zero;
359 field_order_table[MBEDGE] = get_cgg_bubble_order_zero;
360 field_order_table[MBTRI] = get_cgg_bubble_order_zero;
361 field_order_table[MBTET] = get_cgg_bubble_order_tet;
◆ addMaterial_Hencky()
◆ addMaterial_HMHHStVenantKirchhoff()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addMaterial_HMHHStVenantKirchhoff |
( |
const int |
tape, |
|
|
const double |
lambda, |
|
|
const double |
mu, |
|
|
const double |
sigma_y |
|
) |
| |
◆ addMaterial_HMHMooneyRivlin()
◆ addVolumeFiniteElement()
◆ d_f_linear()
static double EshelbianPlasticity::EshelbianCore::d_f_linear |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ d_f_log()
static double EshelbianPlasticity::EshelbianCore::d_f_log |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ dd_f_linear()
static double EshelbianPlasticity::EshelbianCore::dd_f_linear |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ dd_f_log()
static double EshelbianPlasticity::EshelbianCore::dd_f_log |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ f_linear()
static double EshelbianPlasticity::EshelbianCore::f_linear |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ f_log()
static double EshelbianPlasticity::EshelbianCore::f_log |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ getBc()
template<typename BC >
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getBc |
( |
boost::shared_ptr< BC > & |
bc_vec_ptr, |
|
|
const std::string |
block_name, |
|
|
const int |
nb_attributes |
|
) |
| |
|
inline |
Definition at line 971 of file EshelbianPlasticity.hpp.
977 (boost::format(
"%s(.*)") % block_name).str()
982 std::vector<double> block_attributes;
983 CHKERR it->getAttributes(block_attributes);
984 if (block_attributes.size() != nb_attributes) {
986 "In block %s expected %d attributes, but given %d",
987 it->getName().c_str(), nb_attributes, block_attributes.size());
992 bc_vec_ptr->emplace_back(it->getName(), block_attributes, faces);
◆ getOptions()
Definition at line 135 of file EshelbianPlasticity.cpp.
137 const char *list_rots[] = {
"small",
"moderate",
"large"};
141 const char *list_stretches[] = {
"linear",
"log"};
144 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Eshelbian plasticity",
148 CHKERR PetscOptionsInt(
"-space_order",
"approximation oder for space",
"",
151 CHKERR PetscOptionsInt(
"-space_h1_order",
"approximation oder for space",
"",
155 CHKERR PetscOptionsInt(
"-material_order",
"approximation oder for material",
159 CHKERR PetscOptionsScalar(
"-viscosity_alpha_u",
"viscosity",
"",
alphaU,
163 CHKERR PetscOptionsScalar(
"-viscosity_alpha_w",
"viscosity",
"",
alphaW,
167 CHKERR PetscOptionsScalar(
"-density_alpha_rho",
"density",
"",
alphaRho,
171 CHKERR PetscOptionsScalar(
"-preconditioner_eps",
"preconditioner_eps",
"",
175 CHKERR PetscOptionsScalar(
"-preconditioner_eps_omega",
"preconditioner_eps",
178 CHKERR PetscOptionsScalar(
"-preconditioner_eps_w",
"preconditioner_eps",
"",
181 CHKERR PetscOptionsScalar(
"-preconditioner_eps_contact_disp",
185 CHKERR PetscOptionsEList(
"-rotations",
"rotations",
"", list_rots,
186 LARGE_ROT + 1, list_rots[choice_rot], &choice_rot,
188 CHKERR PetscOptionsEList(
"-grad",
"gradient of defamation approximate",
"",
189 list_rots,
LARGE_ROT + 1, list_rots[choice_grad],
190 &choice_grad, PETSC_NULL);
196 list_stretches[choice_stretch], &choice_stretch, PETSC_NULL);
198 ierr = PetscOptionsEnd();
241 MOFEM_LOG(
"EP", Sev::inform) <<
"Gradient of deformation "
247 MOFEM_LOG(
"EP", Sev::inform) <<
"Base exponent e";
248 MOFEM_LOG(
"EP", Sev::inform) <<
"Stretch " << list_stretches[choice_stretch];
◆ getSpatialDispBc()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialDispBc |
( |
| ) |
|
[Getting norms]
- Examples
- ep.cpp.
Definition at line 1610 of file EshelbianPlasticity.cpp.
1619 for (
auto bc : bc_mng->getBcMapByBlockName()) {
1620 if (
auto disp_bc = bc.second->dispBcPtr) {
1622 MOFEM_LOG(
"EP", Sev::noisy) << *disp_bc;
1624 std::vector<double> block_attributes(6, 0.);
1625 if (disp_bc->data.flag1 == 1) {
1626 block_attributes[0] = disp_bc->data.value1;
1627 block_attributes[3] = 1;
1629 if (disp_bc->data.flag2 == 1) {
1630 block_attributes[1] = disp_bc->data.value2;
1631 block_attributes[4] = 1;
1633 if (disp_bc->data.flag3 == 1) {
1634 block_attributes[2] = disp_bc->data.value3;
1635 block_attributes[5] = 1;
1637 auto faces = bc.second->bcEnts.subset_by_dimension(2);
◆ getSpatialRotationBc()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialRotationBc |
( |
| ) |
|
|
inline |
◆ getSpatialTractionBc()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialTractionBc |
( |
| ) |
|
- Examples
- ep.cpp.
Definition at line 1648 of file EshelbianPlasticity.cpp.
1657 for (
auto bc : bc_mng->getBcMapByBlockName()) {
1658 if (
auto force_bc = bc.second->forceBcPtr) {
1659 std::vector<double> block_attributes(6, 0.);
1660 block_attributes[0] = -force_bc->data.value3 * force_bc->data.value1;
1661 block_attributes[3] = 1;
1662 block_attributes[1] = -force_bc->data.value4 * force_bc->data.value1;
1663 block_attributes[4] = 1;
1664 block_attributes[2] = -force_bc->data.value5 * force_bc->data.value1;
1665 block_attributes[5] = 1;
1666 auto faces = bc.second->bcEnts.subset_by_dimension(2);
◆ getSpatialTractionFreeBc()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialTractionFreeBc |
( |
const EntityHandle |
meshset = 0 | ) |
|
|
inline |
◆ gettingNorms()
[Getting norms]
Definition at line 1549 of file EshelbianPlasticity.cpp.
1552 auto post_proc_norm_fe =
1553 boost::make_shared<VolumeElementForcesAndSourcesCore>(
mField);
1555 auto post_proc_norm_rule_hook = [](
int,
int,
int p) ->
int {
1558 post_proc_norm_fe->getRuleHook = post_proc_norm_rule_hook;
1560 post_proc_norm_fe->getUserPolynomialBase() =
1561 boost::shared_ptr<BaseFunction>(
new CGGUserPolynomialBase());
1564 post_proc_norm_fe->getOpPtrVector(), {L2, H1, HDIV});
1566 enum NORMS { U_NORM_L2 = 0, U_NORM_H1, PIOLA_NORM, U_ERROR_L2, LAST_NORM };
1569 CHKERR VecZeroEntries(norms_vec);
1571 auto u_l2_ptr = boost::make_shared<MatrixDouble>();
1572 auto u_h1_ptr = boost::make_shared<MatrixDouble>();
1573 post_proc_norm_fe->getOpPtrVector().push_back(
1575 post_proc_norm_fe->getOpPtrVector().push_back(
1577 post_proc_norm_fe->getOpPtrVector().push_back(
1579 post_proc_norm_fe->getOpPtrVector().push_back(
1581 post_proc_norm_fe->getOpPtrVector().push_back(
1585 auto piola_ptr = boost::make_shared<MatrixDouble>();
1586 post_proc_norm_fe->getOpPtrVector().push_back(
1588 post_proc_norm_fe->getOpPtrVector().push_back(
1592 *post_proc_norm_fe);
1594 CHKERR VecAssemblyBegin(norms_vec);
1595 CHKERR VecAssemblyEnd(norms_vec);
1596 const double *norms;
1597 CHKERR VecGetArrayRead(norms_vec, &norms);
1598 MOFEM_LOG(
"EP", Sev::inform) <<
"norm_u: " << std::sqrt(norms[U_NORM_L2]);
1599 MOFEM_LOG(
"EP", Sev::inform) <<
"norm_u_h1: " << std::sqrt(norms[U_NORM_H1]);
1601 <<
"norm_error_u_l2: " << std::sqrt(norms[U_ERROR_L2]);
1603 <<
"norm_piola: " << std::sqrt(norms[PIOLA_NORM]);
1604 CHKERR VecRestoreArrayRead(norms_vec, &norms);
◆ getTractionFreeBc()
Remove all, but entities where kinematic constrains are applied.
- Parameters
-
meshset | |
bc_ptr | |
disp_block_set_name | |
rot_block_set_name | |
contact_set_name | |
- Returns
- MoFEMErrorCode
Definition at line 666 of file EshelbianPlasticity.cpp.
674 Range tets_skin_part;
676 CHKERR skin.find_skin(0, tets,
false, tets_skin_part);
677 ParallelComm *pcomm =
680 CHKERR pcomm->filter_pstatus(tets_skin_part,
681 PSTATUS_SHARED | PSTATUS_MULTISHARED,
682 PSTATUS_NOT, -1, &tets_skin);
685 for (
int dd = 0;
dd != 3; ++
dd)
686 (*bc_ptr)[
dd] = tets_skin;
691 (*bc_ptr)[0] = subtract((*bc_ptr)[0],
v.faces);
693 (*bc_ptr)[1] = subtract((*bc_ptr)[1],
v.faces);
695 (*bc_ptr)[2] = subtract((*bc_ptr)[2],
v.faces);
700 (*bc_ptr)[0] = subtract((*bc_ptr)[0],
v.faces);
701 (*bc_ptr)[1] = subtract((*bc_ptr)[1],
v.faces);
702 (*bc_ptr)[2] = subtract((*bc_ptr)[2],
v.faces);
707 std::regex((boost::format(
"%s(.*)") % contact_set_name).str()))) {
711 (*bc_ptr)[0] = subtract((*bc_ptr)[0], faces);
712 (*bc_ptr)[1] = subtract((*bc_ptr)[1], faces);
713 (*bc_ptr)[2] = subtract((*bc_ptr)[2], faces);
◆ inv_d_f_linear()
static double EshelbianPlasticity::EshelbianCore::inv_d_f_linear |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ inv_d_f_log()
static double EshelbianPlasticity::EshelbianCore::inv_d_f_log |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ inv_dd_f_linear()
static double EshelbianPlasticity::EshelbianCore::inv_dd_f_linear |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ inv_dd_f_log()
static double EshelbianPlasticity::EshelbianCore::inv_dd_f_log |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ inv_f_linear()
static double EshelbianPlasticity::EshelbianCore::inv_f_linear |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ inv_f_log()
static double EshelbianPlasticity::EshelbianCore::inv_f_log |
( |
const double |
v | ) |
|
|
inlinestatic |
◆ postProcessResults()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::postProcessResults |
( |
const int |
tag, |
|
|
const std::string |
file |
|
) |
| |
Definition at line 1465 of file EshelbianPlasticity.cpp.
1471 boost::shared_ptr<DataAtIntegrationPts>(
new DataAtIntegrationPts());
1478 auto contact_common_data_ptr = boost::make_shared<ContactOps::CommonData>();
1480 auto domain_ops = [&](
auto &fe) {
1482 fe.getUserPolynomialBase() =
1483 boost::shared_ptr<BaseFunction>(
new CGGUserPolynomialBase());
1501 fe.getOpPtrVector().push_back(
1502 new OpCalculateRotationAndSpatialGradient(
dataAtPts));
1517 CHKERR domain_ops(*(op_loop_side->getSideFEPtr()));
1518 post_proc.getOpPtrVector().push_back(op_loop_side);
1521 post_proc.getOpPtrVector().push_back(
new OpPostProcDataStructure(
1522 post_proc.getPostProcMesh(), post_proc.getMapGaussPts(),
dataAtPts));
1525 auto u_h1_ptr = boost::make_shared<MatrixDouble>();
1526 auto lambda_h1_ptr = boost::make_shared<MatrixDouble>();
1527 post_proc.getOpPtrVector().push_back(
1533 post_proc.getOpPtrVector().push_back(
1535 piolaStress, contact_common_data_ptr->contactTractionPtr()));
1537 post_proc.getOpPtrVector().push_back(
new OpTreeSearch(
1540 &post_proc.getMapGaussPts()));
1544 CHKERR post_proc.writeFile(file.c_str());
◆ query_interface()
Getting interface of core database.
- Parameters
-
uuid | unique ID of interface |
iface | returned pointer to interface |
- Returns
- error code
Definition at line 102 of file EshelbianPlasticity.cpp.
◆ setBaseVolumeElementOps()
Definition at line 852 of file EshelbianPlasticity.cpp.
856 fe = boost::make_shared<VolumeElementForcesAndSourcesCore>(
mField);
858 fe->getUserPolynomialBase() =
859 boost::shared_ptr<BaseFunction>(
new CGGUserPolynomialBase());
868 boost::shared_ptr<DataAtIntegrationPts>(
new DataAtIntegrationPts());
889 fe->getOpPtrVector().push_back(
896 if (std::abs(
alphaRho) > std::numeric_limits<double>::epsilon()) {
908 fe->getOpPtrVector().push_back(
909 new OpCalculateRotationAndSpatialGradient(
dataAtPts));
◆ setContactElementOps()
Contact requires that body is marked
Definition at line 1057 of file EshelbianPlasticity.cpp.
1067 auto get_body_range = [
this](
auto name,
int dim) {
1068 std::map<int, Range> map;
1073 (boost::format(
"%s(.*)") % name).str()
1082 map[m_ptr->getMeshsetId()] = ents;
1088 auto get_map_skin = [
this](
auto &&map) {
1089 ParallelComm *pcomm =
1093 for(
auto &
m : map) {
1095 CHKERR skin.find_skin(0,
m.second,
false, skin_faces);
1097 PSTATUS_SHARED | PSTATUS_MULTISHARED,
1098 PSTATUS_NOT, -1,
nullptr),
1100 m.second.swap(skin_faces);
1110 fe_face_rhs = boost::make_shared<BoundaryEle>(
mField);
1111 fe_face_lhs = boost::make_shared<BoundaryEle>(
mField);
1112 auto rule = [](
int,
int,
int o) {
return -1; };
1116 &levels, PETSC_NULL);
1118 auto refine = Tools::refineTriangle(levels);
1120 auto set_rule = [levels, refine](
1123 int order_col,
int order_data
1127 auto rule = 2 * order_data;
1128 fe_raw_ptr->gaussPts = Tools::refineTriangleIntegrationPts(rule, refine);
1132 fe_face_rhs->getRuleHook = rule;
1133 fe_face_lhs->getRuleHook = rule;
1134 fe_face_rhs->setRuleHook = set_rule;
1135 fe_face_lhs->setRuleHook = set_rule;
1138 fe_face_rhs->getOpPtrVector(), {HDIV});
1140 fe_face_lhs->getOpPtrVector(), {HDIV});
1142 auto add_contact_three = [&]() {
1144 auto tree_moab_ptr = boost::make_shared<moab::Core>();
1145 fe_contact_tree = boost::make_shared<ContactTree>(
1147 get_map_skin(get_body_range(
"BODY", 3)));
1148 auto contact_common_data_ptr = boost::make_shared<ContactOps::CommonData>();
1150 fe_contact_tree->getOpPtrVector(), {HDIV});
1151 fe_contact_tree->getOpPtrVector().push_back(
1153 contactDisp, contact_common_data_ptr->contactDispPtr()));
1154 fe_contact_tree->getOpPtrVector().push_back(
1156 piolaStress, contact_common_data_ptr->contactTractionPtr()));
1158 auto u_h1_ptr = boost::make_shared<MatrixDouble>();
1159 fe_contact_tree->getOpPtrVector().push_back(
1161 fe_contact_tree->getOpPtrVector().push_back(
1162 new OpMoveNode(fe_contact_tree, contact_common_data_ptr, u_h1_ptr));
1166 auto add_ops_face_lhs = [&](
auto &pip) {
1168 auto contact_common_data_ptr = boost::make_shared<ContactOps::CommonData>();
1170 contactDisp, contact_common_data_ptr->contactDispPtr()));
1172 piolaStress, contact_common_data_ptr->contactTractionPtr()));
1173 auto u_h1_ptr = boost::make_shared<MatrixDouble>();
1175 pip.push_back(
new OpTreeSearch(
1176 fe_contact_tree, contact_common_data_ptr, u_h1_ptr,
1179 auto contact_sfd_map_range_ptr = boost::make_shared<std::map<int, Range>>(
1180 get_body_range(
"CONTACT_SDF", 2));
1184 contact_sfd_map_range_ptr));
1187 contact_sfd_map_range_ptr));
1199 pip.push_back(
new OpMassStab(
1208 auto add_ops_face_rhs = [&](
auto &pip) {
1210 auto contact_common_data_ptr = boost::make_shared<ContactOps::CommonData>();
1212 piolaStress, contact_common_data_ptr->contactTractionPtr()));
1214 contactDisp, contact_common_data_ptr->contactDispPtr()));
1215 auto u_h1_ptr = boost::make_shared<MatrixDouble>();
1217 pip.push_back(
new OpTreeSearch(
1218 fe_contact_tree, contact_common_data_ptr, u_h1_ptr,
1220 auto contact_sfd_map_range_ptr = boost::make_shared<std::map<int, Range>>(
1221 get_body_range(
"CONTACT_SDF", 2));
1223 contactDisp, contact_common_data_ptr, fe_contact_tree,
1224 contact_sfd_map_range_ptr));
1226 piolaStress, contact_common_data_ptr, fe_contact_tree));
1232 CHKERR add_contact_three();
1233 CHKERR add_ops_face_lhs(fe_face_lhs->getOpPtrVector());
1234 CHKERR add_ops_face_rhs(fe_face_rhs->getOpPtrVector());
◆ setElasticElementOps()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setElasticElementOps |
( |
const int |
tag | ) |
|
- Examples
- ep.cpp.
Definition at line 1239 of file EshelbianPlasticity.cpp.
1245 boost::make_shared<ForcesAndSourcesCore::UserDataOperator::AdjCache>();
1247 auto get_op_contact_bc = [&]() {
1251 return op_loop_side;
1254 auto op_contact_bc = get_op_contact_bc();
1255 elasticFeLhs->getOpPtrVector().push_back(op_contact_bc);
◆ setElasticElementToTs()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setElasticElementToTs |
( |
DM |
dm | ) |
|
- Examples
- ep.cpp.
Definition at line 1265 of file EshelbianPlasticity.cpp.
1267 boost::shared_ptr<FEMethod>
null;
1268 boost::shared_ptr<FeTractionBc> spatial_traction_bc(
1271 if (std::abs(
alphaRho) > std::numeric_limits<double>::epsilon()) {
1281 spatial_traction_bc);
1296 spatial_traction_bc);
◆ setFaceElementOps()
Definition at line 1023 of file EshelbianPlasticity.cpp.
1029 fe_rhs = boost::make_shared<FaceElementForcesAndSourcesCore>(
mField);
1030 fe_lhs = boost::make_shared<FaceElementForcesAndSourcesCore>(
mField);
1043 fe_rhs->getOpPtrVector().push_back(
1047 boost::make_shared<TimeScale>(
"disp_history.txt")
1050 fe_rhs->getOpPtrVector().push_back(
◆ setVolumeElementOps()
Definition at line 918 of file EshelbianPlasticity.cpp.
924 auto time_scale = boost::make_shared<TimeScale>();
931 fe_rhs->getOpPtrVector().push_back(
933 fe_rhs->getOpPtrVector().push_back(
935 fe_rhs->getOpPtrVector().push_back(
937 fe_rhs->getOpPtrVector().push_back(
939 fe_rhs->getOpPtrVector().push_back(
941 fe_rhs->getOpPtrVector().push_back(
945 using BodyNaturalBC =
947 Assembly<PETSC>::LinearForm<
GAUSS>;
949 BodyNaturalBC::OpFlux<NaturalMeshsetType<BLOCKSET>, 1, 3>;
950 CHKERR BodyNaturalBC::AddFluxToPipeline<OpBodyForce>::add(
951 fe_rhs->getOpPtrVector(),
mField,
"w", {time_scale},
"BODY_FORCE",
961 const bool symmetric_system =
964 fe_lhs->getOpPtrVector().push_back(
new OpSpatialPhysical_du_du(
966 fe_lhs->getOpPtrVector().push_back(
new OpSpatialPhysical_du_dP(
968 fe_lhs->getOpPtrVector().push_back(
new OpSpatialPhysical_du_dBubble(
970 if (!symmetric_system) {
971 fe_lhs->getOpPtrVector().push_back(
new OpSpatialPhysical_du_domega(
975 fe_lhs->getOpPtrVector().push_back(
new OpSpatialEquilibrium_dw_dP(
977 fe_lhs->getOpPtrVector().push_back(
new OpSpatialEquilibrium_dw_dw(
980 fe_lhs->getOpPtrVector().push_back(
new OpSpatialConsistency_dP_domega(
982 fe_lhs->getOpPtrVector().push_back(
new OpSpatialConsistency_dBubble_domega(
985 if (!symmetric_system) {
986 fe_lhs->getOpPtrVector().push_back(
new OpSpatialRotation_domega_dP(
988 fe_lhs->getOpPtrVector().push_back(
new OpSpatialRotation_domega_dBubble(
990 fe_lhs->getOpPtrVector().push_back(
1001 if (
precEpsOmega > std::numeric_limits<double>::epsilon()) {
1002 fe_lhs->getOpPtrVector().push_back(
1003 new OpMassStab(
rotAxis,
rotAxis, [
this](
double,
double,
double) {
1008 std::numeric_limits<double>::epsilon()) {
1010 fe_lhs->getOpPtrVector().push_back(
new OpMassStab(
1012 [
this](
double,
double,
double) {
return precEpsW; }));
◆ solveElastic()
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::solveElastic |
( |
TS |
ts, |
|
|
Mat |
m, |
|
|
Vec |
f, |
|
|
Vec |
x |
|
) |
| |
- Examples
- ep.cpp.
Definition at line 1309 of file EshelbianPlasticity.cpp.
1314 boost::shared_ptr<ContactOps::SDFPython> sdf_python_ptr;
1316 auto file_exists = [](std::string myfile) {
1317 std::ifstream file(myfile.c_str());
1324 if (file_exists(
"sdf.py")) {
1325 MOFEM_LOG(
"EP", Sev::inform) <<
"sdf.py file found";
1326 sdf_python_ptr = boost::make_shared<ContactOps::SDFPython>();
1327 CHKERR sdf_python_ptr->sdfInit(
"sdf.py");
1328 ContactOps::sdfPythonWeakPtr = sdf_python_ptr;
1330 MOFEM_LOG(
"EP", Sev::warning) <<
"sdf.py file NOT found";
1335 boost::shared_ptr<TsCtx>
ts_ctx;
1344 CHKERR TSAppendOptionsPrefix(ts,
"elastic_");
1345 CHKERR TSSetFromOptions(ts);
1350 CHKERR TSGetSNES(ts, &snes);
1352 PetscViewerAndFormat *vf;
1353 CHKERR PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,
1354 PETSC_VIEWER_DEFAULT, &vf);
1357 (
MoFEMErrorCode(*)(SNES, PetscInt, PetscReal,
void *))SNESMonitorFields,
1360 PetscSection section;
1363 CHKERR PetscSectionGetNumFields(section, &num_fields);
1364 for (
int ff = 0; ff != num_fields; ff++) {
1372 CHKERR VecGhostUpdateBegin(x, INSERT_VALUES, SCATTER_FORWARD);
1373 CHKERR VecGhostUpdateEnd(x, INSERT_VALUES, SCATTER_FORWARD);
1376 boost::shared_ptr<SetUpSchur> schur_ptr;
1383 ts_ctx_ptr->zeroMatrix =
false;
1386 if (std::abs(
alphaRho) > std::numeric_limits<double>::epsilon()) {
1387 CHKERR TSSetI2Function(ts,
f, PETSC_NULL, PETSC_NULL);
1388 CHKERR TSSetI2Jacobian(ts,
m, p, PETSC_NULL, PETSC_NULL);
1390 CHKERR TSSetIFunction(ts,
f, PETSC_NULL, PETSC_NULL);
1391 CHKERR TSSetIJacobian(ts,
m, p, PETSC_NULL, PETSC_NULL);
1395 CHKERR SNESGetKSP(snes, &ksp);
1397 CHKERR KSPGetPC(ksp, &pc);
1400 CHKERR schur_ptr->setUp(ksp);
1405 CHKERR schur_ptr->preProc();
1419 CHKERR schur_ptr->postProc();
1424 if (std::abs(
alphaRho) > std::numeric_limits<double>::epsilon()) {
1426 CHKERR VecDuplicate(x, &xx);
1427 CHKERR VecZeroEntries(xx);
1428 CHKERR TS2SetSolution(ts, x, xx);
1431 CHKERR TSSetSolution(ts, x);
1438 CHKERR TSSolve(ts, PETSC_NULL);
1442 int lin_solver_iterations;
1443 CHKERR SNESGetLinearSolveIterations(snes, &lin_solver_iterations);
1445 <<
"Number of linear solver iterations " << lin_solver_iterations;
1447 PetscBool test_cook_flg = PETSC_FALSE;
1450 if (test_cook_flg) {
1451 constexpr
int expected_lin_solver_iterations = 11;
◆ alphaRho
double EshelbianPlasticity::EshelbianCore::alphaRho |
◆ alphaU
double EshelbianPlasticity::EshelbianCore::alphaU |
◆ alphaW
double EshelbianPlasticity::EshelbianCore::alphaW |
◆ bcSpatialDispVecPtr
boost::shared_ptr<BcDispVec> EshelbianPlasticity::EshelbianCore::bcSpatialDispVecPtr |
◆ bcSpatialFreeTraction
boost::shared_ptr<TractionFreeBc> EshelbianPlasticity::EshelbianCore::bcSpatialFreeTraction |
◆ bcSpatialRotationVecPtr
boost::shared_ptr<BcRotVec> EshelbianPlasticity::EshelbianCore::bcSpatialRotationVecPtr |
◆ bcSpatialTraction
boost::shared_ptr<TractionBcVec> EshelbianPlasticity::EshelbianCore::bcSpatialTraction |
◆ bubbleField
const std::string EshelbianPlasticity::EshelbianCore::bubbleField |
◆ contactDisp
const std::string EshelbianPlasticity::EshelbianCore::contactDisp |
◆ contactElement
const std::string EshelbianPlasticity::EshelbianCore::contactElement |
◆ contactRhs
◆ contactTreeRhs
boost::shared_ptr<ContactTree> EshelbianPlasticity::EshelbianCore::contactTreeRhs |
◆ d_f
boost::function< double(const double)> EshelbianPlasticity::EshelbianCore::d_f |
|
static |
◆ dataAtPts
◆ dd_f
boost::function< double(const double)> EshelbianPlasticity::EshelbianCore::dd_f |
|
static |
◆ dM
SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dM |
◆ dmElastic
SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmElastic |
◆ dmPrjSpatial
SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmPrjSpatial |
◆ elasticBcLhs
◆ elasticBcRhs
◆ elasticFeLhs
◆ elasticFeRhs
◆ elementVolumeName
const std::string EshelbianPlasticity::EshelbianCore::elementVolumeName |
◆ eshelbyStress
const std::string EshelbianPlasticity::EshelbianCore::eshelbyStress |
◆ essentialBcElement
const std::string EshelbianPlasticity::EshelbianCore::essentialBcElement |
◆ exponentBase
double EshelbianPlasticity::EshelbianCore::exponentBase = exp(1) |
|
static |
◆ gradApperoximator
enum RotSelector EshelbianPlasticity::EshelbianCore::gradApperoximator |
|
static |
◆ inv_d_f
boost::function< double(const double)> EshelbianPlasticity::EshelbianCore::inv_d_f |
|
static |
◆ inv_dd_f
boost::function< double(const double)> EshelbianPlasticity::EshelbianCore::inv_dd_f |
|
static |
◆ inv_f
boost::function< double(const double)> EshelbianPlasticity::EshelbianCore::inv_f |
|
static |
◆ lambdaField
const std::string EshelbianPlasticity::EshelbianCore::lambdaField |
◆ materialGradient
const std::string EshelbianPlasticity::EshelbianCore::materialGradient |
◆ materialL2Disp
const std::string EshelbianPlasticity::EshelbianCore::materialL2Disp |
◆ materialOrder
int EshelbianPlasticity::EshelbianCore::materialOrder |
◆ mField
◆ naturalBcElement
const std::string EshelbianPlasticity::EshelbianCore::naturalBcElement |
◆ physicalEquations
boost::shared_ptr<PhysicalEquations> EshelbianPlasticity::EshelbianCore::physicalEquations |
◆ piolaStress
const std::string EshelbianPlasticity::EshelbianCore::piolaStress |
◆ precEps
double EshelbianPlasticity::EshelbianCore::precEps |
◆ precEpsContactDisp
double EshelbianPlasticity::EshelbianCore::precEpsContactDisp |
◆ precEpsOmega
double EshelbianPlasticity::EshelbianCore::precEpsOmega |
◆ precEpsW
double EshelbianPlasticity::EshelbianCore::precEpsW |
◆ rotAxis
const std::string EshelbianPlasticity::EshelbianCore::rotAxis |
◆ rotSelector
enum RotSelector EshelbianPlasticity::EshelbianCore::rotSelector |
|
static |
◆ skinElement
const std::string EshelbianPlasticity::EshelbianCore::skinElement |
◆ spaceH1Order
int EshelbianPlasticity::EshelbianCore::spaceH1Order |
◆ spaceOrder
int EshelbianPlasticity::EshelbianCore::spaceOrder |
◆ spatialH1Disp
const std::string EshelbianPlasticity::EshelbianCore::spatialH1Disp |
◆ spatialL2Disp
const std::string EshelbianPlasticity::EshelbianCore::spatialL2Disp |
◆ stretchSelector
◆ stretchTensor
const std::string EshelbianPlasticity::EshelbianCore::stretchTensor |
◆ tauField
const std::string EshelbianPlasticity::EshelbianCore::tauField |
The documentation for this struct was generated from the following files:
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
static double f_linear(const double v)
boost::shared_ptr< FaceElementForcesAndSourcesCore > contactRhs
ElementsAndOps< SPACE_DIM >::BoundaryEle BoundaryEle
const std::string essentialBcElement
virtual MoFEMErrorCode loop_finite_elements(const std::string problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
#define MYPCOMM_INDEX
default communicator number PCOMM
boost::shared_ptr< BcRotVec > bcSpatialRotationVecPtr
static boost::function< double(const double)> dd_f
static double inv_f_log(const double v)
MoFEMErrorCode getTractionFreeBc(const EntityHandle meshset, boost::shared_ptr< TractionFreeBc > &bc_ptr, const std::string contact_set_name)
Remove all, but entities where kinematic constrains are applied.
const std::string piolaStress
Problem manager is used to build and partition problems.
const std::string spatialH1Disp
MoFEMErrorCode setBaseVolumeElementOps(const int tag, const bool do_rhs, const bool do_lhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe)
static double exponentBase
static double inv_dd_f_linear(const double v)
Calculate symmetric tensor field rates ant integratio pts.
virtual MPI_Comm & get_comm() const =0
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
PetscErrorCode DMMoFEMSetSquareProblem(DM dm, PetscBool square_problem)
set squared problem
FEMethodsSequence & getLoopsMonitor()
Get the loops to do Monitor object.
@ L2
field with C-1 continuity
static MoFEMErrorCode postStepFun(TS ts)
Calculate tenor field using tensor base, i.e. Hdiv/Hcurl.
virtual const Field * get_field_structure(const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
get field structure
Natural boundary conditions.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Get values at integration pts for tensor filed rank 1, i.e. vector field.
static double dd_f_linear(const double v)
const std::string stretchTensor
static double d_f_linear(const double v)
static auto get_range_from_block(MoFEM::Interface &m_field, const std::string block_name)
Definition of the force bc data structure.
static double dd_f_log(const double v)
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
Definition of the displacement bc data structure.
PostProcEleByDim< SPACE_DIM >::SideEle SideEle
static double inv_f_linear(const double v)
static boost::function< double(const double)> d_f
SmartPetscObj< DM > dmPrjSpatial
Projection spatial displacement.
boost::shared_ptr< VolumeElementForcesAndSourcesCore > elasticFeRhs
boost::shared_ptr< FaceElementForcesAndSourcesCore > elasticBcRhs
boost::shared_ptr< VolumeElementForcesAndSourcesCore > elasticFeLhs
virtual MoFEMErrorCode add_ents_to_field_by_dim(const Range &ents, const int dim, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
virtual MoFEMErrorCode add_ents_to_field_by_type(const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
Provide data structure for (tensor) field approximation.
@ USER_BASE
user implemented approximation base
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
static enum RotSelector gradApperoximator
static double f_log(const double v)
PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
Approximate field values for given petsc vector.
PetscErrorCode DMMoFEMSetDestroyProblem(DM dm, PetscBool destroy_problem)
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
Get norm of input MatrixDouble for Tensor2.
#define CHKERR
Inline error check.
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual moab::Interface & get_moab()=0
PetscErrorCode DMMoFEMTSSetIJacobian(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS Jacobian evaluation function
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string name_row)=0
set field col which finite element use
static MoFEMErrorCode preStepFun(TS ts)
const std::string skinElement
static double d_f_log(const double v)
Section manager is used to create indexes and sections.
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
Simple interface for fast problem set-up.
PetscErrorCode DMMoFEMTSSetI2Jacobian(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS Jacobian evaluation function
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
default operator for TRI element
#define MOFEM_LOG_C(channel, severity, format,...)
std::vector< Range > TractionFreeBc
PetscErrorCode DMMoFEMTSSetI2Function(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS implicit function evaluation function
static enum StretchSelector stretchSelector
SmartPetscObj< DM > dmElastic
Elastic problem.
const std::string materialGradient
boost::shared_ptr< FaceElementForcesAndSourcesCore > elasticBcLhs
virtual MoFEMErrorCode add_field(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
boost::shared_ptr< ContactTree > contactTreeRhs
Make a contact tree.
PetscErrorCode DMMoFEMCreateSubDM(DM subdm, DM dm, const char problem_name[])
Must be called by user to set Sub DM MoFEM data structures.
MoFEMErrorCode removeDofsOnEntities(const std::string problem_name, const std::string field_name, const Range ents, const int lo_coeff=0, const int hi_coeff=MAX_DOFS_ON_ENTITY, const int lo_order=0, const int hi_order=100, int verb=VERBOSE, const bool debug=false)
Remove DOFs from problem.
double precEpsContactDisp
static enum RotSelector rotSelector
static boost::function< double(const double)> f
boost::shared_ptr< BcDispVec > bcSpatialDispVecPtr
static boost::function< double(const double)> inv_d_f
Calculate tenor field using vectorial base, i.e. Hdiv/Hcurl.
boost::shared_ptr< TractionBcVec > bcSpatialTraction
EshelbianCore(MoFEM::Interface &m_field)
MoFEM::Interface & mField
Get norm of input MatrixDouble for Tensor1.
const std::string contactElement
MoFEMErrorCode setFaceElementOps(const bool add_elastic, const bool add_material, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_lhs)
SmartPetscObj< DM > dM
Coupled problem all fields.
Set integration rule to boundary elements.
SmartPetscObj< Mat > matDuplicate(Mat mat, MatDuplicateOption op)
const std::string rotAxis
PetscErrorCode DMMoFEMCreateMoFEM(DM dm, MoFEM::Interface *m_field_ptr, const char problem_name[], const MoFEM::BitRefLevel bit_level, const MoFEM::BitRefLevel bit_mask=MoFEM::BitRefLevel().set())
Must be called by user to set MoFEM data structures.
const std::string spatialL2Disp
constexpr auto field_name
boost::shared_ptr< TractionFreeBc > bcSpatialFreeTraction
Calculate trace of vector (Hdiv/Hcurl) space.
Add operators pushing bases from local to physical configuration.
static MoFEMErrorCode postStepDestroy()
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
const std::string bubbleField
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
structure to get information form mofem into EntitiesFieldData
Calculate divergence of tonsorial field using vectorial base.
static boost::function< double(const double)> inv_f
const double v
phase velocity of light in medium (cm/ns)
static boost::shared_ptr< SetUpSchur > createSetUpSchur(MoFEM::Interface &m_field, SmartPetscObj< Mat > m, SmartPetscObj< Mat > p, EshelbianCore *ep_core_ptr)
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
#define MOFEM_LOG(channel, severity)
Log.
boost::shared_ptr< PhysicalEquations > physicalEquations
const std::string elementVolumeName
#define NBVOLUMETET_CCG_BUBBLE(P)
Bubble function for CGG H div space.
ForcesAndSourcesCore::UserDataOperator UserDataOperator
static double inv_d_f_linear(const double v)
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
PetscErrorCode DMMoFEMTSSetIFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set TS implicit function evaluation function
Calculate symmetric tensor field values at integration pts.
const FTensor::Tensor2< T, Dim, Dim > Vec
@ MOFEM_DATA_INCONSISTENCY
Interface for managing meshsets containing materials and boundary conditions.
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_filed)=0
set finite element field data
static double inv_d_f_log(const double v)
PetscErrorCode DMMoFEMGetTsCtx(DM dm, MoFEM::TsCtx **ts_ctx)
get MoFEM::TsCtx data structure
static MoFEMErrorCode postStepInitialise(EshelbianCore *ep_ptr)
static boost::function< double(const double)> inv_dd_f
static double inv_dd_f_log(const double v)
FTensor::Index< 'm', 3 > m
MoFEMErrorCode getOptions()
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
MoFEMErrorCode setContactElementOps(boost::shared_ptr< ContactTree > &fe_contact_tree, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_lhs)
MoFEMErrorCode getBc(boost::shared_ptr< BC > &bc_vec_ptr, const std::string block_name, const int nb_attributes)
virtual bool check_finite_element(const std::string &name) const =0
Check if finite element is in database.
PetscErrorCode DMMoFEMAddSubFieldRow(DM dm, const char field_name[])
virtual MoFEMErrorCode set_field_order(const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
MoFEMErrorCode setVolumeElementOps(const int tag, const bool add_elastic, const bool add_material, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe_lhs)
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
const std::string materialL2Disp
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ HDIV
field with continuous normal traction
const std::string eshelbyStress
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
const std::string tauField
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
const std::string lambdaField
const std::string contactDisp
Element used to execute operators on side of the element.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
const std::string naturalBcElement
MoFEMErrorCode gettingNorms()
[Getting norms]
PetscErrorCode DMMoFEMSetIsPartitioned(DM dm, PetscBool is_partitioned)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)