v0.10.0
Public Member Functions | Public Attributes | List of all members
EshelbianPlasticity::EshelbianCore Struct Reference

#include <users_modules/eshelbian_plasticty/src/EshelbianPlasticity.hpp>

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

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, 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_set_name, const int nb_attributes)
 
MoFEMErrorCode getSpatialDispBc ()
 
MoFEMErrorCode getSpatialRotationBc ()
 
MoFEMErrorCode getSpatialTractionBc ()
 
MoFEMErrorCode getTractionFreeBc (const EntityHandle meshset, boost::shared_ptr< TractionFreeBc > &bc_ptr, const std::string disp_block_set_name, const std::string rot_block_set_name)
 
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 setBaseVolumeElementOps (const int tag, const bool do_rhs, const bool do_lhs, boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &fe)
 
MoFEMErrorCode setGenericVolumeElementOps (const int tag, const bool add_elastic, const bool add_material, boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &fe_rhs, boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &fe_lhs)
 
MoFEMErrorCode setGenericFaceElementOps (const bool add_elastic, const bool add_material, boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore >> &fe_rhs, boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore >> &fe_lhs)
 
MoFEMErrorCode setElasticElementOps (const int tag)
 
MoFEMErrorCode setElasticElementToTs (DM dm)
 
MoFEMErrorCode setUpTSElastic (TS ts, Mat m, Vec f)
 
MoFEMErrorCode solveElastic (TS ts, Vec x)
 
MoFEMErrorCode postProcessResults (const int tag, const std::string file)
 
- Public Member Functions inherited from MoFEM::UnknownInterface
virtual MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const =0
 
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of 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
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

Public Attributes

MoFEM::InterfacemField
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 
boost::shared_ptr< PhysicalEquationsphysicalEquations
 
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore > > elasticFeRhs
 
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore > > elasticFeLhs
 
boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore > > elasticBcLhs
 
boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore > > elasticBcRhs
 
boost::shared_ptr< EpFEMethodschurAssembly
 
SmartPetscObj< DM > dM
 Coupled problem all fields. More...
 
SmartPetscObj< DM > dmElastic
 Elastic problem. More...
 
SmartPetscObj< DM > dmElasticSchurStreach
 Sub problem of dmElastic Schur. More...
 
SmartPetscObj< DM > dmElasticSchurBubble
 Sub problem of dmElastic Schur. More...
 
SmartPetscObj< DM > dmElasticSchurSpatialDisp
 Sub problem of dmElastic Schur. More...
 
SmartPetscObj< DM > dmElasticSchurOmega
 Sub problem of dmElastic Schur. More...
 
SmartPetscObj< DM > dmMaterial
 Material problem. More...
 
const std::string piolaStress
 
const std::string eshelbyStress
 
const std::string spatialDisp
 
const std::string materialDisp
 
const std::string streachTensor
 
const std::string rotAxis
 
const std::string materialGradient
 
const std::string tauField
 
const std::string lambdaField
 
const std::string bubbleField
 
const std::string elementVolumeName
 
const std::string naturalBcElement
 
const std::string essentialBcElement
 
int spaceOrder
 
int materialOrder
 
double alphaU
 
double alphaW
 
double alphaRho
 
double precEps
 
boost::shared_ptr< BcDispVecbcSpatialDispVecPtr
 
boost::shared_ptr< BcRotVecbcSpatialRotationVecPtr
 
boost::shared_ptr< TractionBcVecbcSpatialTraction
 
boost::shared_ptr< TractionFreeBcbcSpatialFreeTraction
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Examples
ep.cpp.

Definition at line 1162 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ EshelbianCore()

EshelbianPlasticity::EshelbianCore::EshelbianCore ( MoFEM::Interface m_field)

Definition at line 45 of file EshelbianPlasticity.cpp.

46  : mField(m_field), piolaStress("P"), eshelbyStress("S"), spatialDisp("w"),
47  materialDisp("W"), streachTensor("u"), rotAxis("omega"),
48  materialGradient("G"), tauField("TAU"), lambdaField("LAMBDA"),
49  bubbleField("BUBBLE"), elementVolumeName("EP"),
50  naturalBcElement("NATURAL_BC"), essentialBcElement("ESSENTIAL_BC") {
51 
52  ierr = getOptions();
53  CHKERRABORT(PETSC_COMM_WORLD, ierr);
54 }

◆ ~EshelbianCore()

EshelbianPlasticity::EshelbianCore::~EshelbianCore ( )
virtual

Definition at line 56 of file EshelbianPlasticity.cpp.

56 {}

Member Function Documentation

◆ addBoundaryFiniteElement()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addBoundaryFiniteElement ( const EntityHandle  meshset = 0)
Examples
ep.cpp.

Definition at line 259 of file EshelbianPlasticity.cpp.

259  {
261 
262  auto bc_elements_add_to_range = [&](const std::string disp_block_set_name,
263  Range &r) {
266  if (it->getName().compare(0, disp_block_set_name.length(),
267  disp_block_set_name) == 0) {
268  Range faces;
269  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 2, faces,
270  true);
271  r.merge(faces);
272  }
273  }
275  };
276 
277  // set finite element fields
278  auto add_field_to_fe = [this](const std::string fe,
279  const std::string field_name) {
285  };
286 
287  Range natural_bc_elements;
288  CHKERR bc_elements_add_to_range("SPATIAL_DISP_BC", natural_bc_elements);
289  CHKERR bc_elements_add_to_range("SPATIAL_ROTATION_BC", natural_bc_elements);
290  Range essentail_bc_elements;
291  CHKERR bc_elements_add_to_range("SPATIAL_TRACTION_BC", essentail_bc_elements);
292 
294  CHKERR mField.add_ents_to_finite_element_by_type(natural_bc_elements, MBTRI,
296  CHKERR add_field_to_fe(naturalBcElement, piolaStress);
297  CHKERR add_field_to_fe(naturalBcElement, eshelbyStress);
299 
301  CHKERR mField.add_ents_to_finite_element_by_type(essentail_bc_elements, MBTRI,
303  CHKERR add_field_to_fe(essentialBcElement, piolaStress);
304  CHKERR add_field_to_fe(essentialBcElement, eshelbyStress);
306 
308 }

◆ addDMs()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addDMs ( const BitRefLevel  bit = BitRefLevel().set(0))
Examples
ep.cpp.

Definition at line 310 of file EshelbianPlasticity.cpp.

310  {
312 
313  // find adjacencies between finite elements and dofs
315 
316  // Create coupled problem
317  dM = createSmartDM(mField.get_comm(), "DMMOFEM");
318  CHKERR DMMoFEMCreateMoFEM(dM, &mField, "ESHELBY_PLASTICITY", bit,
319  BitRefLevel().set());
320  CHKERR DMMoFEMSetDestroyProblem(dM, PETSC_TRUE);
321  CHKERR DMMoFEMSetIsPartitioned(dM, PETSC_TRUE);
325  mField.getInterface<ProblemsManager>()->buildProblemFromFields = PETSC_TRUE;
326  CHKERR DMSetUp(dM);
327  mField.getInterface<ProblemsManager>()->buildProblemFromFields = PETSC_FALSE;
328 
329  auto remove_dofs_on_essential_spatial_stress_boundary =
330  [&](const std::string prb_name) {
332  for (int d : {0, 1, 2})
334  prb_name, piolaStress, (*bcSpatialFreeTraction)[d], d, d, NOISY,
335  true);
337  };
338  CHKERR remove_dofs_on_essential_spatial_stress_boundary("ESHELBY_PLASTICITY");
339 
340  // Create elastic sub-problem
341  dmElastic = createSmartDM(mField.get_comm(), "DMMOFEM");
342  CHKERR DMMoFEMCreateSubDM(dmElastic, dM, "ELASTIC_PROBLEM");
354  CHKERR DMSetUp(dmElastic);
355 
356  // Create elastic streach-problem
359  "ELASTIC_PROBLEM_STREACH_SCHUR");
370  CHKERR DMSetUp(dmElasticSchurStreach);
371 
372  // Create elastic bubble-problem
375  "ELASTIC_PROBLEM_BUBBLE_SCHUR");
385  CHKERR DMSetUp(dmElasticSchurBubble);
386 
387  // Create elastic omega-problem
390  "ELASTIC_PROBLEM_OMEGA_SCHUR");
399  CHKERR DMSetUp(dmElasticSchurOmega);
400 
401  // Create elastic tet_stress-problem
404  "ELASTIC_PROBLEM_SPATIAL_DISP_SCHUR");
408  elementVolumeName.c_str());
411  essentialBcElement.c_str());
415 
416  {
417  PetscSection section;
418  CHKERR mField.getInterface<ISManager>()->sectionCreate("ELASTIC_PROBLEM",
419  &section);
420  CHKERR DMSetDefaultSection(dmElastic, section);
421  CHKERR DMSetDefaultGlobalSection(dmElastic, section);
422  CHKERR PetscSectionDestroy(&section);
423  }
424 
426 }

◆ addFields()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addFields ( const EntityHandle  meshset = 0)
Examples
ep.cpp.

Definition at line 91 of file EshelbianPlasticity.cpp.

91  {
93 
94  Range tets;
95  CHKERR mField.get_moab().get_entities_by_type(meshset, MBTET, tets);
96  Range tets_skin_part;
97  Skinner skin(&mField.get_moab());
98  CHKERR skin.find_skin(0, tets, false, tets_skin_part);
99  ParallelComm *pcomm =
100  ParallelComm::get_pcomm(&mField.get_moab(), MYPCOMM_INDEX);
101  Range tets_skin;
102  CHKERR pcomm->filter_pstatus(tets_skin_part,
103  PSTATUS_SHARED | PSTATUS_MULTISHARED,
104  PSTATUS_NOT, -1, &tets_skin);
105 
106  auto subtract_faces_where_displacements_are_applied =
107  [&](const std::string disp_block_set_name) {
110  if (it->getName().compare(0, disp_block_set_name.length(),
111  disp_block_set_name) == 0) {
112  Range faces;
113  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 2,
114  faces, true);
115  tets_skin = subtract(tets_skin, faces);
116  }
117  }
119  };
120  CHKERR subtract_faces_where_displacements_are_applied("SPATIAL_DISP_BC");
121  CHKERR subtract_faces_where_displacements_are_applied("SPATIAL_ROTATION_BC");
122  CHKERR subtract_faces_where_displacements_are_applied("SPATIAL_TRACTION_BC");
123 
124  Range faces;
125  CHKERR mField.get_moab().get_adjacencies(tets, 2, true, faces,
126  moab::Interface::UNION);
127  Range faces_not_on_the_skin = subtract(faces, tets_skin);
128 
129  auto add_hdiv_field = [&](const std::string field_name, const int order,
130  const int dim) {
133  MB_TAG_SPARSE, MF_ZERO);
134  CHKERR mField.add_ents_to_field_by_type(meshset, MBTET, field_name);
135  CHKERR mField.set_field_order(meshset, MBTET, field_name, order);
136  CHKERR mField.set_field_order(faces_not_on_the_skin, field_name, order);
137  CHKERR mField.set_field_order(tets_skin, field_name, 0);
139  };
140 
141  auto add_hdiv_rt_field = [&](const std::string field_name, const int order,
142  const int dim) {
145  MB_TAG_DENSE, MF_ZERO);
146  CHKERR mField.add_ents_to_field_by_type(meshset, MBTET, field_name);
147  CHKERR mField.set_field_order(meshset, MBTET, field_name, 0);
148  CHKERR mField.set_field_order(tets_skin, field_name, order);
150  };
151 
152  auto add_l2_field = [this, meshset](const std::string field_name,
153  const int order, const int dim) {
156  MB_TAG_DENSE, MF_ZERO);
157  CHKERR mField.add_ents_to_field_by_type(meshset, MBTET, field_name);
158  CHKERR mField.set_field_order(meshset, MBTET, field_name, order);
160  };
161 
162  auto add_h1_field = [this, meshset](const std::string field_name,
163  const int order, const int dim) {
166  MB_TAG_DENSE, MF_ZERO);
167  CHKERR mField.add_ents_to_field_by_type(meshset, MBTET, field_name);
168  CHKERR mField.set_field_order(meshset, MBVERTEX, field_name, 1);
169  CHKERR mField.set_field_order(meshset, MBEDGE, field_name, order);
170  CHKERR mField.set_field_order(meshset, MBTRI, field_name, order);
171  CHKERR mField.set_field_order(meshset, MBTET, field_name, order);
173  };
174 
175  auto add_bubble_field = [this, meshset](const std::string field_name,
176  const int order, const int dim) {
178  CHKERR mField.add_field(field_name, HDIV, USER_BASE, dim, MB_TAG_DENSE,
179  MF_ZERO);
180  // Modify field
181  auto field_ptr = mField.get_field_structure(field_name);
182  auto field_order_table =
183  const_cast<Field *>(field_ptr)->getFieldOrderTable();
184  auto get_cgg_bubble_order_zero = [](int p) { return 0; };
185  auto get_cgg_bubble_order_tet = [](int p) {
186  return NBVOLUMETET_CCG_BUBBLE(p);
187  };
188  field_order_table[MBVERTEX] = get_cgg_bubble_order_zero;
189  field_order_table[MBEDGE] = get_cgg_bubble_order_zero;
190  field_order_table[MBTRI] = get_cgg_bubble_order_zero;
191  field_order_table[MBTET] = get_cgg_bubble_order_tet;
192  CHKERR mField.add_ents_to_field_by_type(meshset, MBTET, field_name);
193  CHKERR mField.set_field_order(meshset, MBTRI, field_name, order);
194  CHKERR mField.set_field_order(meshset, MBTET, field_name, order);
196  };
197 
198  // spatial fields
199  CHKERR add_hdiv_field(piolaStress, spaceOrder, 3);
200  CHKERR add_bubble_field(bubbleField, spaceOrder, 1);
201  CHKERR add_l2_field(spatialDisp, spaceOrder - 1, 3);
202  CHKERR add_l2_field(rotAxis, spaceOrder - 1, 3);
203  CHKERR add_l2_field(streachTensor, spaceOrder, 6);
204 
205  // material fields
206  CHKERR add_hdiv_field(eshelbyStress, materialOrder, 3);
207  CHKERR add_l2_field(materialGradient, materialOrder - 1, 9);
208  // CHKERR add_l2_field(materialDisp, materialOrder - 1, 3);
209  // CHKERR add_l2_field(tauField, materialOrder - 1, 1);
210  // CHKERR add_l2_field(lambdaField, materialOrder - 1, 1);
211 
212  // Add history filedes
213  CHKERR add_l2_field(materialGradient + "0", materialOrder - 1, 9);
214 
216 
218 }

◆ addMaterial_HMHHStVenantKirchhoff()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addMaterial_HMHHStVenantKirchhoff ( const int  tape,
const double  lambda,
const double  mu,
const double  sigma_y 
)

Definition at line 632 of file EshelbianADOL-C.cpp.

634  {
636  physicalEquations = boost::shared_ptr<HMHStVenantKirchhoff>(
637  new HMHStVenantKirchhoff(lambda, mu, sigma_y));
638  CHKERR physicalEquations->recordTape(tape, nullptr);
640 }

◆ addMaterial_HMHMooneyRivlin()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addMaterial_HMHMooneyRivlin ( const int  tape,
const double  alpha,
const double  beta,
const double  lambda,
const double  sigma_y 
)
Examples
ep.cpp.

Definition at line 642 of file EshelbianADOL-C.cpp.

644  {
646  physicalEquations = boost::shared_ptr<HMHPMooneyRivlinWriggersEq63>(
647  new HMHPMooneyRivlinWriggersEq63(alpha, beta, lambda, sigma_y));
648  CHKERR physicalEquations->recordTape(tape, nullptr);
650 }

◆ addVolumeFiniteElement()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::addVolumeFiniteElement ( const EntityHandle  meshset = 0)
Examples
ep.cpp.

Definition at line 221 of file EshelbianPlasticity.cpp.

221  {
223 
224  // set finite element fields
225  auto add_field_to_fe = [this](const std::string fe,
226  const std::string field_name) {
232  };
233 
238 
239  CHKERR add_field_to_fe(elementVolumeName, piolaStress);
240  CHKERR add_field_to_fe(elementVolumeName, bubbleField);
241  CHKERR add_field_to_fe(elementVolumeName, eshelbyStress);
242  CHKERR add_field_to_fe(elementVolumeName, streachTensor);
243  CHKERR add_field_to_fe(elementVolumeName, rotAxis);
244  CHKERR add_field_to_fe(elementVolumeName, spatialDisp);
245  CHKERR add_field_to_fe(elementVolumeName, streachTensor);
246  CHKERR add_field_to_fe(elementVolumeName, materialGradient);
247 
249  materialGradient + "0");
250  }
251 
252  // build finite elements data structures
254 
256 }

◆ getBc()

template<typename BC >
MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getBc ( boost::shared_ptr< BC > &  bc_vec_ptr,
const std::string  block_set_name,
const int  nb_attributes 
)

Definition at line 1226 of file EshelbianPlasticity.hpp.

1228  {
1231  auto block_name = it->getName();
1232  if (block_name.compare(0, block_set_name.length(), block_set_name) == 0) {
1233  std::vector<double> block_attributes;
1234  CHKERR it->getAttributes(block_attributes);
1235  if (block_attributes.size() != nb_attributes) {
1236  SETERRQ3(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1237  "In block %s expected %d attributes, but given %d",
1238  it->getName().c_str(), nb_attributes,
1239  block_attributes.size());
1240  }
1241  Range faces;
1242  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 2, faces,
1243  true);
1244  bc_vec_ptr->emplace_back(block_name, block_attributes, faces);
1245  }
1246  }
1248  }

◆ getOptions()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getOptions ( )

Definition at line 58 of file EshelbianPlasticity.cpp.

58  {
60  CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "", "Eshelbian plasticity",
61  "none");
62 
63  spaceOrder = 1;
64  CHKERR PetscOptionsInt("-space_order", "approximation oder for space", "",
65  spaceOrder, &spaceOrder, PETSC_NULL);
66  materialOrder = 1;
67  CHKERR PetscOptionsInt("-material_order", "approximation oder for material",
68  "", materialOrder, &materialOrder, PETSC_NULL);
69 
70  alphaU = 0;
71  CHKERR PetscOptionsScalar("-viscosity_alpha_u", "viscosity", "", alphaU,
72  &alphaU, PETSC_NULL);
73 
74  alphaW = 0;
75  CHKERR PetscOptionsScalar("-viscosity_alpha_w", "viscosity", "", alphaW,
76  &alphaW, PETSC_NULL);
77 
78  alphaRho = 0;
79  CHKERR PetscOptionsScalar("-density_alpha_rho", "density", "", alphaRho,
80  &alphaRho, PETSC_NULL);
81 
82  precEps = 1e-3;
83  CHKERR PetscOptionsScalar("-preconditioner_eps", "preconditioner_eps", "",
84  precEps, &precEps, PETSC_NULL);
85 
86  ierr = PetscOptionsEnd();
87  CHKERRG(ierr);
89 }

◆ getSpatialDispBc()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialDispBc ( )
Examples
ep.cpp.

Definition at line 1250 of file EshelbianPlasticity.hpp.

1250  {
1251  bcSpatialDispVecPtr = boost::make_shared<BcDispVec>();
1252  return getBc(bcSpatialDispVecPtr, "SPATIAL_DISP_BC", 6);
1253  }

◆ getSpatialRotationBc()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialRotationBc ( )
Examples
ep.cpp.

Definition at line 1255 of file EshelbianPlasticity.hpp.

1255  {
1256  bcSpatialRotationVecPtr = boost::make_shared<BcRotVec>();
1257  return getBc(bcSpatialRotationVecPtr, "SPATIAL_ROTATION_BC", 4);
1258  }

◆ getSpatialTractionBc()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialTractionBc ( )
Examples
ep.cpp.

Definition at line 1260 of file EshelbianPlasticity.hpp.

1260  {
1261  bcSpatialTraction = boost::make_shared<TractionBcVec>();
1262  return getBc(bcSpatialTraction, "SPATIAL_TRACTION_BC", 6);
1263  }

◆ getSpatialTractionFreeBc()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getSpatialTractionFreeBc ( const EntityHandle  meshset = 0)
Examples
ep.cpp.

Definition at line 1270 of file EshelbianPlasticity.hpp.

1270  {
1272  boost::shared_ptr<TractionFreeBc>(new TractionFreeBc());
1273  return getTractionFreeBc(meshset, bcSpatialFreeTraction, "SPATIAL_DISP_BC",
1274  "SPATIAL_ROTATION_BC");
1275  }

◆ getTractionFreeBc()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::getTractionFreeBc ( const EntityHandle  meshset,
boost::shared_ptr< TractionFreeBc > &  bc_ptr,
const std::string  disp_block_set_name,
const std::string  rot_block_set_name 
)

Definition at line 459 of file EshelbianPlasticity.cpp.

462  {
464  Range tets;
465  CHKERR mField.get_moab().get_entities_by_type(meshset, MBTET, tets);
466  Range tets_skin_part;
467  Skinner skin(&mField.get_moab());
468  CHKERR skin.find_skin(0, tets, false, tets_skin_part);
469  ParallelComm *pcomm =
470  ParallelComm::get_pcomm(&mField.get_moab(), MYPCOMM_INDEX);
471  Range tets_skin;
472  CHKERR pcomm->filter_pstatus(tets_skin_part,
473  PSTATUS_SHARED | PSTATUS_MULTISHARED,
474  PSTATUS_NOT, -1, &tets_skin);
475 
476  bc_ptr->resize(3);
477  for (int dd = 0; dd != 3; ++dd)
478  (*bc_ptr)[dd] = tets_skin;
479 
481  if (it->getName().compare(0, disp_block_set_name.length(),
482  disp_block_set_name) == 0) {
483  std::vector<double> block_attributes;
484  CHKERR it->getAttributes(block_attributes);
485  if (block_attributes.size() != 6) {
486  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
487  "In block %s six attributes are required for given BC "
488  "blockset (3 values + "
489  "3 flags) != %d",
490  it->getName().c_str(), block_attributes.size());
491  }
492  Range faces;
493  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 2, faces,
494  true);
495  if (block_attributes[3] != 0)
496  (*bc_ptr)[0] = subtract((*bc_ptr)[0], faces);
497  if (block_attributes[4] != 0)
498  (*bc_ptr)[1] = subtract((*bc_ptr)[1], faces);
499  if (block_attributes[5] != 0)
500  (*bc_ptr)[2] = subtract((*bc_ptr)[2], faces);
501  }
502  if (it->getName().compare(0, rot_block_set_name.length(),
503  rot_block_set_name) == 0) {
504  Range faces;
505  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 2, faces,
506  true);
507  (*bc_ptr)[0] = subtract((*bc_ptr)[0], faces);
508  (*bc_ptr)[1] = subtract((*bc_ptr)[1], faces);
509  (*bc_ptr)[2] = subtract((*bc_ptr)[2], faces);
510  }
511  }
512 
513  // for (int dd = 0; dd != 3; ++dd) {
514  // EntityHandle meshset;
515  // CHKERR mField.get_moab().create_meshset(MESHSET_SET, meshset);
516  // CHKERR mField.get_moab().add_entities(meshset, (*bc_ptr)[dd]);
517  // std::string file_name = disp_block_set_name +
518  // "_traction_free_bc_" + boost::lexical_cast<std::string>(dd) + ".vtk";
519  // CHKERR mField.get_moab().write_file(file_name.c_str(), " VTK ", "",
520  // &meshset, 1);
521  // CHKERR mField.get_moab().delete_entities(&meshset, 1);
522  // }
523 
525 }

◆ postProcessResults()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::postProcessResults ( const int  tag,
const std::string  file 
)

Definition at line 1466 of file EshelbianPlasticity.cpp.

1467  {
1469 
1470  if (!dataAtPts) {
1471  dataAtPts =
1472  boost::shared_ptr<DataAtIntegrationPts>(new DataAtIntegrationPts());
1473  }
1474 
1476  post_proc.getUserPolynomialBase() =
1477  boost::shared_ptr<BaseFunction>(new CGGUserPolynomialBase());
1478  post_proc.getOpPtrVector().push_back(new OpL2Transform());
1479 
1480  CHKERR post_proc.generateReferenceElementMesh();
1481  post_proc.getOpPtrVector().push_back(new OpCalculateHVecTensorField<3, 3>(
1482  piolaStress, dataAtPts->getApproxPAtPts()));
1483  post_proc.getOpPtrVector().push_back(new OpCalculateHTensorTensorField<3, 3>(
1484  bubbleField, dataAtPts->getApproxPAtPts(), MBMAXTYPE));
1485  post_proc.getOpPtrVector().push_back(
1487  streachTensor, dataAtPts->getLogStreachTensorAtPts(), MBTET));
1488  post_proc.getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
1489  rotAxis, dataAtPts->getRotAxisAtPts(), MBTET));
1490  post_proc.getOpPtrVector().push_back(new OpCalculateTensor2FieldValues<3, 3>(
1491  materialGradient, dataAtPts->getBigGAtPts(), MBTET));
1492  post_proc.getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
1493  spatialDisp, dataAtPts->getSmallWAtPts(), MBTET));
1494 
1495  // evaluate derived quantities
1496  post_proc.getOpPtrVector().push_back(
1497  new OpCalculateRotationAndSpatialGradient(rotAxis, dataAtPts));
1498 
1499  // evaluate integration points
1500  post_proc.getOpPtrVector().push_back(physicalEquations->returnOpJacobian(
1501  spatialDisp, tag, true, false, dataAtPts, physicalEquations));
1502  post_proc.getOpPtrVector().push_back(new OpPostProcDataStructure(
1503  post_proc.postProcMesh, post_proc.mapGaussPts, spatialDisp, dataAtPts));
1504 
1505  CHKERR DMoFEMLoopFiniteElements(dM, elementVolumeName.c_str(), &post_proc);
1506  CHKERR post_proc.writeFile(file.c_str());
1508 }

◆ query_interface()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::query_interface ( const MOFEMuuid uuid,
UnknownInterface **  iface 
) const

Getting interface of core database.

Parameters
uuidunique ID of interface
ifacereturned pointer to interface
Returns
error code

Definition at line 19 of file EshelbianPlasticity.cpp.

20  {
22  *iface = NULL;
24  *iface = const_cast<EshelbianCore *>(this);
26  }
27  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
29 }

◆ setBaseVolumeElementOps()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setBaseVolumeElementOps ( const int  tag,
const bool  do_rhs,
const bool  do_lhs,
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &  fe 
)

Definition at line 645 of file EshelbianPlasticity.cpp.

647  {
649  fe = boost::make_shared<EpElement<VolumeElementForcesAndSourcesCore>>(mField);
650 
651  fe->getUserPolynomialBase() =
652  boost::shared_ptr<BaseFunction>(new CGGUserPolynomialBase());
653  fe->getOpPtrVector().push_back(new OpL2Transform());
654 
655  // set integration rule
656  fe->getRuleHook = VolRule();
657 
658  if (!dataAtPts) {
659  dataAtPts =
660  boost::shared_ptr<DataAtIntegrationPts>(new DataAtIntegrationPts());
661  dataAtPts->physicsPtr = physicalEquations;
662  }
663 
664  // calculate fields values
665  fe->getOpPtrVector().push_back(new OpCalculateHVecTensorField<3, 3>(
666  piolaStress, dataAtPts->getApproxPAtPts()));
667  fe->getOpPtrVector().push_back(new OpCalculateHTensorTensorField<3, 3>(
668  bubbleField, dataAtPts->getApproxPAtPts(), MBMAXTYPE));
669  fe->getOpPtrVector().push_back(new OpCalculateHVecTensorDivergence<3, 3>(
670  piolaStress, dataAtPts->getDivPAtPts()));
671  fe->getOpPtrVector().push_back(new OpCalculateHVecTensorField<3, 3>(
672  eshelbyStress, dataAtPts->getApproxSigmaAtPts()));
673  fe->getOpPtrVector().push_back(new OpCalculateHVecTensorDivergence<3, 3>(
674  eshelbyStress, dataAtPts->getDivSigmaAtPts()));
675  fe->getOpPtrVector().push_back(new OpCalculateTensor2SymmetricFieldValues<3>(
676  streachTensor, dataAtPts->getLogStreachTensorAtPts(), MBTET));
677  fe->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
678  rotAxis, dataAtPts->getRotAxisAtPts(), MBTET));
679  fe->getOpPtrVector().push_back(new OpCalculateTensor2FieldValues<3, 3>(
680  materialGradient, dataAtPts->getBigGAtPts(), MBTET));
681  fe->getOpPtrVector().push_back(new OpCalculateTensor2FieldValues<3, 3>(
682  materialGradient + "0", dataAtPts->getBigG0AtPts(), MBTET));
683  fe->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
684  spatialDisp, dataAtPts->getSmallWAtPts(), MBTET));
685 
686  // velocities
687  fe->getOpPtrVector().push_back(new OpCalculateVectorFieldValuesDot<3>(
688  spatialDisp, dataAtPts->getSmallWDotAtPts(), MBTET));
689  fe->getOpPtrVector().push_back(
691  streachTensor, dataAtPts->getLogStreachDotTensorAtPts(), MBTET));
692  fe->getOpPtrVector().push_back(new OpCalculateVectorFieldValuesDot<3>(
693  rotAxis, dataAtPts->getRotAxisDotAtPts(), MBTET));
694 
695  // acceleration
696  if (std::abs(alphaRho) > std::numeric_limits<double>::epsilon()) {
697  fe->getOpPtrVector().push_back(new OpCalculateVectorFieldValuesDotDot<3>(
698  spatialDisp, dataAtPts->getSmallWDotDotAtPts(), MBTET));
699  }
700 
701  // calculate other derived quantities
702  fe->getOpPtrVector().push_back(
703  new OpCalculateRotationAndSpatialGradient(rotAxis, dataAtPts));
704 
705  // evaluate integration points
706  fe->getOpPtrVector().push_back(physicalEquations->returnOpJacobian(
707  spatialDisp, tag, do_rhs, do_lhs, dataAtPts, physicalEquations));
708 
710 }

◆ setElasticElementOps()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setElasticElementOps ( const int  tag)
Examples
ep.cpp.

Definition at line 821 of file EshelbianPlasticity.cpp.

821  {
824  elasticFeLhs);
827 }

◆ setElasticElementToTs()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setElasticElementToTs ( DM  dm)
Examples
ep.cpp.

Definition at line 829 of file EshelbianPlasticity.cpp.

829  {
831  boost::shared_ptr<FEMethod> null;
832  boost::shared_ptr<EpElement<FeTractionBc>> spatial_traction_bc(
833  new EpElement<FeTractionBc>(mField, piolaStress, bcSpatialTraction));
834  schurAssembly = boost::make_shared<EpFEMethod>();
835 
836  if (std::abs(alphaRho) > std::numeric_limits<double>::epsilon()) {
837  CHKERR DMMoFEMTSSetI2Function(dm, DM_NO_ELEMENT, null, spatial_traction_bc,
838  null);
840  null);
842  null);
844  spatial_traction_bc);
847  null);
849  null);
851  } else {
852  CHKERR DMMoFEMTSSetIFunction(dm, DM_NO_ELEMENT, null, spatial_traction_bc,
853  null);
855  null);
857  null);
859  spatial_traction_bc);
862  null);
864  null);
866  }
868 }

◆ setGenericFaceElementOps()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setGenericFaceElementOps ( const bool  add_elastic,
const bool  add_material,
boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore >> &  fe_rhs,
boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore >> &  fe_lhs 
)

Definition at line 796 of file EshelbianPlasticity.cpp.

799  {
801 
802  fe_rhs =
803  boost::make_shared<EpElement<FaceElementForcesAndSourcesCore>>(mField);
804  fe_lhs =
805  boost::make_shared<EpElement<FaceElementForcesAndSourcesCore>>(mField);
806 
807  // set integration rule
808  fe_rhs->getRuleHook = FaceRule();
809  fe_lhs->getRuleHook = FaceRule();
810 
811  if (add_elastic) {
812  fe_rhs->getOpPtrVector().push_back(
813  new OpDispBc(piolaStress, dataAtPts, bcSpatialDispVecPtr));
814  fe_rhs->getOpPtrVector().push_back(
815  new OpRotationBc(piolaStress, dataAtPts, bcSpatialRotationVecPtr));
816  }
817 
819 }

◆ setGenericVolumeElementOps()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setGenericVolumeElementOps ( const int  tag,
const bool  add_elastic,
const bool  add_material,
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &  fe_rhs,
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &  fe_lhs 
)

Definition at line 712 of file EshelbianPlasticity.cpp.

715  {
717 
718  // Right hand side
719  CHKERR setBaseVolumeElementOps(tag, true, false, fe_rhs);
720 
721  // elastic
722  if (add_elastic) {
723  fe_rhs->getOpPtrVector().push_back(
724  new OpSpatialEquilibrium(spatialDisp, dataAtPts, alphaW, alphaRho));
725  fe_rhs->getOpPtrVector().push_back(
726  new OpSpatialRotation(rotAxis, dataAtPts));
727  fe_rhs->getOpPtrVector().push_back(
728  new OpSpatialPhysical(streachTensor, dataAtPts, alphaU));
729  fe_rhs->getOpPtrVector().push_back(
730  new OpSpatialConsistencyP(piolaStress, dataAtPts));
731  fe_rhs->getOpPtrVector().push_back(
732  new OpSpatialConsistencyBubble(bubbleField, dataAtPts));
733  fe_rhs->getOpPtrVector().push_back(
734  new OpSpatialConsistencyDivTerm(piolaStress, dataAtPts));
735  }
736 
737  // Left hand side
738  CHKERR setBaseVolumeElementOps(tag, true, true, fe_lhs);
739 
740  // elastic
741  if (add_elastic) {
742 
743  // Schur
744  fe_lhs->getOpPtrVector().push_back(
745  new OpSpatialSchurBegin(spatialDisp, dataAtPts));
746 
747  fe_lhs->getOpPtrVector().push_back(new OpSpatialPhysical_du_du(
749  fe_lhs->getOpPtrVector().push_back(new OpSpatialPhysical_du_dBubble(
751 
752  fe_lhs->getOpPtrVector().push_back(new OpSpatialEquilibrium_dw_dP(
754  fe_lhs->getOpPtrVector().push_back(new OpSpatialEquilibrium_dw_dw(
756 
757  fe_lhs->getOpPtrVector().push_back(
758  new OpSpatialConsistency_dP_domega(piolaStress, rotAxis, dataAtPts));
759  fe_lhs->getOpPtrVector().push_back(new OpSpatialConsistency_dBubble_domega(
761 
762  fe_lhs->getOpPtrVector().push_back(new OpSpatialPhysical_du_dP(
764  fe_lhs->getOpPtrVector().push_back(new OpSpatialPhysical_du_domega(
765  streachTensor, rotAxis, dataAtPts, false));
766 
767  fe_lhs->getOpPtrVector().push_back(new OpSpatialRotation_domega_dP(
768  rotAxis, piolaStress, dataAtPts, false));
769  fe_lhs->getOpPtrVector().push_back(new OpSpatialRotation_domega_dBubble(
770  rotAxis, bubbleField, dataAtPts, false));
771  fe_lhs->getOpPtrVector().push_back(
772  new OpSpatialRotation_domega_domega(rotAxis, rotAxis, dataAtPts));
773 
774  // Schur
775  dataAtPts->ooMatPtr = boost::make_shared<MatrixDouble>();
776  fe_lhs->getOpPtrVector().push_back(
777  new OpSpatialPreconditionMass(rotAxis, dataAtPts->ooMatPtr));
778  if (alphaW < std::numeric_limits<double>::epsilon() &&
779  alphaRho < std::numeric_limits<double>::epsilon()) {
780  dataAtPts->wwMatPtr = boost::make_shared<MatrixDouble>();
781  fe_lhs->getOpPtrVector().push_back(
782  new OpSpatialPreconditionMass(spatialDisp, dataAtPts->wwMatPtr));
783  } else {
784  dataAtPts->wwMatPtr.reset();
785  }
786  fe_lhs->getOpPtrVector().push_back(
787  new OpSpatialSchurEnd(spatialDisp, dataAtPts, precEps));
788 
789  if (add_material) {
790  }
791  }
792 
794 }

◆ setUpTSElastic()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::setUpTSElastic ( TS  ts,
Mat  m,
Vec  f 
)
Examples
ep.cpp.

Definition at line 870 of file EshelbianPlasticity.cpp.

870  {
872  boost::shared_ptr<TsCtx> ts_ctx;
874 
875  if (std::abs(alphaRho) > std::numeric_limits<double>::epsilon()) {
876  CHKERR TSSetI2Function(ts, f, PETSC_NULL, PETSC_NULL);
877  CHKERR TSSetI2Jacobian(ts, m, m, PETSC_NULL, PETSC_NULL);
878  } else {
879  CHKERR TSSetIFunction(ts, f, PETSC_NULL, PETSC_NULL);
880  CHKERR TSSetIJacobian(ts, m, m, PETSC_NULL, PETSC_NULL);
881  }
882 
883  CHKERR TSMonitorSet(ts, TsMonitorSet, ts_ctx.get(), PETSC_NULL);
884 
885  auto add_schur_streach_op = [this](auto &list, SmartPetscObj<Mat> S,
886  SmartPetscObj<AO> aoS) {
888  for (auto &fe : list)
889  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.second))
890  fe_cast->addStreachSchurMatrix(S, aoS);
891  else
892  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
894  };
895 
896  auto add_schur_streach_pre = [this](auto &list, SmartPetscObj<Mat> S,
897  SmartPetscObj<AO> aoS) {
899  for (auto &fe : list)
900  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.getSharedPtr().get()))
901  fe_cast->addStreachSchurMatrix(S, aoS);
902  else
903  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
905  };
906 
907  auto add_schur_bubble_op = [this](auto &list, SmartPetscObj<Mat> S,
908  SmartPetscObj<AO> aoS) {
910  for (auto &fe : list)
911  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.second))
912  fe_cast->addBubbleSchurMatrix(S, aoS);
913  else
914  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
916  };
917 
918  auto add_schur_bubble_pre = [this](auto &list, SmartPetscObj<Mat> S,
919  SmartPetscObj<AO> aoS) {
921  for (auto &fe : list)
922  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.getSharedPtr().get()))
923  fe_cast->addBubbleSchurMatrix(S, aoS);
924  else
925  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
927  };
928 
929  auto add_schur_spatial_disp_op = [this](auto &list, SmartPetscObj<Mat> S,
930  SmartPetscObj<AO> aoS) {
932  for (auto &fe : list)
933  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.second))
934  fe_cast->addSpatialDispStressSchurMatrix(S, aoS);
935  else
936  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
938  };
939 
940  auto add_schur_spatial_disp_pre = [this](auto &list, SmartPetscObj<Mat> S,
941  SmartPetscObj<AO> aoS) {
943  for (auto &fe : list)
944  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.getSharedPtr().get()))
945  fe_cast->addSpatialDispStressSchurMatrix(S, aoS);
946  else
947  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
949  };
950 
951  auto add_schur_omega_op = [this](auto &list, SmartPetscObj<Mat> S,
952  SmartPetscObj<AO> aoS) {
954  for (auto &fe : list)
955  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.second))
956  fe_cast->addOmegaSchurMatrix(S, aoS);
957  else
958  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
960  };
961 
962  auto add_schur_omega_pre = [this](auto &list, SmartPetscObj<Mat> S,
963  SmartPetscObj<AO> ao) {
965  for (auto &fe : list)
966  if (auto fe_cast = dynamic_cast<EpElementBase *>(fe.getSharedPtr().get()))
967  fe_cast->addOmegaSchurMatrix(S, ao);
968  else
969  SETERRQ(mField.get_comm(), MOFEM_DATA_INCONSISTENCY, "No EpElement");
971  };
972 
973  const MoFEM::Problem *schur_streach_prb_ptr;
974  CHKERR DMMoFEMGetProblemPtr(dmElasticSchurStreach, &schur_streach_prb_ptr);
975  if (auto sub_data = schur_streach_prb_ptr->subProblemData) {
976  SmartPetscObj<Mat> Suu;
978  SmartPetscObj<AO> aoSuu = sub_data->getSmartRowMap();
979 
980  CHKERR add_schur_streach_op(ts_ctx->loops_to_do_IJacobian, Suu, aoSuu);
981  CHKERR add_schur_streach_pre(ts_ctx->preProcess_IJacobian, Suu, aoSuu);
982  CHKERR add_schur_streach_pre(ts_ctx->postProcess_IJacobian, Suu, aoSuu);
983 
984  const MoFEM::Problem *schur_bubble_prb_ptr;
985  CHKERR DMMoFEMGetProblemPtr(dmElasticSchurBubble, &schur_bubble_prb_ptr);
986  if (auto bubble_data = schur_bubble_prb_ptr->subProblemData) {
987  SmartPetscObj<Mat> SBubble;
989  SmartPetscObj<AO> aoSBubble = bubble_data->getSmartRowMap();
990  CHKERR add_schur_bubble_op(ts_ctx->loops_to_do_IJacobian, SBubble,
991  aoSBubble);
992  CHKERR add_schur_bubble_pre(ts_ctx->preProcess_IJacobian, SBubble,
993  aoSBubble);
994  CHKERR add_schur_bubble_pre(ts_ctx->postProcess_IJacobian, SBubble,
995  aoSBubble);
996 
997  const MoFEM::Problem *schur_omega_prb_ptr;
998  CHKERR DMMoFEMGetProblemPtr(dmElasticSchurOmega, &schur_omega_prb_ptr);
999  if (auto tet_stress_data = schur_omega_prb_ptr->subProblemData) {
1000  SmartPetscObj<Mat> SOmega;
1002  SmartPetscObj<AO> aoSOmega = tet_stress_data->getSmartRowMap();
1003  CHKERR add_schur_omega_op(ts_ctx->loops_to_do_IJacobian, SOmega,
1004  aoSOmega);
1005  CHKERR add_schur_omega_pre(ts_ctx->preProcess_IJacobian, SOmega,
1006  aoSOmega);
1007  CHKERR add_schur_omega_pre(ts_ctx->postProcess_IJacobian, SOmega,
1008  aoSOmega);
1009 
1010  const MoFEM::Problem *schur_spatial_disp_prb_ptr;
1012  &schur_spatial_disp_prb_ptr);
1013  if (auto spatial_disp_data =
1014  schur_spatial_disp_prb_ptr->subProblemData) {
1015  SmartPetscObj<Mat> Sw;
1017  SmartPetscObj<AO> aoSw = spatial_disp_data->getSmartRowMap();
1018  CHKERR add_schur_spatial_disp_op(ts_ctx->loops_to_do_IJacobian, Sw,
1019  aoSw);
1020  CHKERR add_schur_spatial_disp_pre(ts_ctx->preProcess_IJacobian, Sw,
1021  aoSw);
1022  CHKERR add_schur_spatial_disp_pre(ts_ctx->postProcess_IJacobian, Sw,
1023  aoSw);
1024  } else
1026  "Problem does not have sub-problem data");
1027 
1028  } else
1030  "Problem does not have sub-problem data");
1031 
1032  } else
1034  "Problem does not have sub-problem data");
1035 
1036  } else
1038  "Problem does not have sub-problem data");
1039 
1040  struct Monitor : public FEMethod {
1041 
1042  using Ele = ForcesAndSourcesCore;
1045  using SetPtsData = FieldEvaluatorInterface::SetPtsData;
1046 
1047  EshelbianCore &eP;
1048  boost::shared_ptr<SetPtsData> dataFieldEval;
1049  boost::shared_ptr<VolEle> volPostProcEnergy;
1050  boost::shared_ptr<double> gEnergy;
1051 
1052  Monitor(EshelbianCore &ep)
1053  : eP(ep),
1054  dataFieldEval(ep.mField.getInterface<FieldEvaluatorInterface>()
1055  ->getData<VolEle>()),
1056  volPostProcEnergy(new VolEle(ep.mField)), gEnergy(new double) {
1057  ierr = ep.mField.getInterface<FieldEvaluatorInterface>()->buildTree3D(
1058  dataFieldEval, "EP");
1059  CHKERRABORT(PETSC_COMM_WORLD, ierr);
1060 
1061  auto no_rule = [](int, int, int) { return -1; };
1062 
1063  auto set_element_for_field_eval = [&]() {
1064  boost::shared_ptr<Ele> vol_ele(dataFieldEval->feMethodPtr.lock());
1065  vol_ele->getRuleHook = no_rule;
1066  vol_ele->getUserPolynomialBase() =
1067  boost::shared_ptr<BaseFunction>(new CGGUserPolynomialBase());
1068  vol_ele->getOpPtrVector().push_back(new OpL2Transform());
1069 
1070  vol_ele->getOpPtrVector().push_back(
1072  eP.piolaStress, eP.dataAtPts->getApproxPAtPts()));
1073  vol_ele->getOpPtrVector().push_back(
1075  eP.bubbleField, eP.dataAtPts->getApproxPAtPts(), MBMAXTYPE));
1076  vol_ele->getOpPtrVector().push_back(
1078  eP.streachTensor, eP.dataAtPts->getLogStreachTensorAtPts(),
1079  MBTET));
1080  vol_ele->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
1081  eP.rotAxis, eP.dataAtPts->getRotAxisAtPts(), MBTET));
1082  vol_ele->getOpPtrVector().push_back(
1084  eP.materialGradient, eP.dataAtPts->getBigGAtPts(), MBTET));
1085  vol_ele->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
1086  eP.spatialDisp, eP.dataAtPts->getSmallWAtPts(), MBTET));
1087  vol_ele->getOpPtrVector().push_back(
1088  new OpCalculateRotationAndSpatialGradient(eP.rotAxis,
1089  eP.dataAtPts));
1090  };
1091 
1092  auto set_element_for_post_process = [&]() {
1093  volPostProcEnergy->getRuleHook = VolRule();
1094  volPostProcEnergy->getUserPolynomialBase() =
1095  boost::shared_ptr<BaseFunction>(new CGGUserPolynomialBase());
1096  volPostProcEnergy->getOpPtrVector().push_back(new OpL2Transform());
1097 
1098  volPostProcEnergy->getOpPtrVector().push_back(
1100  eP.piolaStress, eP.dataAtPts->getApproxPAtPts()));
1101  volPostProcEnergy->getOpPtrVector().push_back(
1103  eP.bubbleField, eP.dataAtPts->getApproxPAtPts(), MBMAXTYPE));
1104  volPostProcEnergy->getOpPtrVector().push_back(
1106  eP.streachTensor, eP.dataAtPts->getLogStreachTensorAtPts(),
1107  MBTET));
1108  volPostProcEnergy->getOpPtrVector().push_back(
1110  eP.rotAxis, eP.dataAtPts->getRotAxisAtPts(), MBTET));
1111  volPostProcEnergy->getOpPtrVector().push_back(
1113  eP.materialGradient, eP.dataAtPts->getBigGAtPts(), MBTET));
1114  volPostProcEnergy->getOpPtrVector().push_back(
1116  eP.spatialDisp, eP.dataAtPts->getSmallWAtPts(), MBTET));
1117  volPostProcEnergy->getOpPtrVector().push_back(
1118  new OpCalculateRotationAndSpatialGradient(eP.rotAxis,
1119  eP.dataAtPts));
1120  volPostProcEnergy->getOpPtrVector().push_back(
1121  new OpCalculateStrainEnergy(eP.spatialDisp, eP.dataAtPts, gEnergy));
1122  };
1123 
1124  set_element_for_field_eval();
1125  set_element_for_post_process();
1126  }
1127 
1128  MoFEMErrorCode preProcess() { return 0; }
1129 
1130  MoFEMErrorCode operator()() { return 0; }
1131 
1132  MoFEMErrorCode postProcess() {
1134 
1135  // auto get_str_time = [](auto ts_t) {
1136  // std::ostringstream ss;
1137  // ss << boost::str(boost::format("%d") %
1138  // static_cast<int>(std::ceil(ts_t * 1e6)));
1139  // std::string s = ss.str();
1140  // return s;
1141  // };
1142 
1143  auto get_step = [](auto ts_step) {
1144  std::ostringstream ss;
1145  ss << boost::str(boost::format("%d") % static_cast<int>(ts_step));
1146  std::string s = ss.str();
1147  return s;
1148  };
1149 
1150  PetscViewer viewer;
1151  CHKERR PetscViewerBinaryOpen(
1152  PETSC_COMM_WORLD, ("restart_" + get_step(ts_step) + ".dat").c_str(),
1153  FILE_MODE_WRITE, &viewer);
1154  CHKERR VecView(ts_u, viewer);
1155  CHKERR PetscViewerDestroy(&viewer);
1156 
1157  CHKERR eP.postProcessResults(1, "out_sol_elastic_" + get_step(ts_step) +
1158  ".h5m");
1159 
1160  // Loop boundary elements with traction boundary conditions
1161  *gEnergy = 0;
1162  CHKERR eP.mField.loop_finite_elements(problemPtr->getName(), "EP",
1163  *volPostProcEnergy);
1164 
1165  double body_energy;
1166  MPI_Allreduce(gEnergy.get(), &body_energy, 1, MPI_DOUBLE, MPI_SUM,
1167  eP.mField.get_comm());
1168  MOFEM_LOG_C("EP", Sev::inform, "Step %d time %3.4g strain energy %3.6e",
1169  ts_step, ts_t, body_energy);
1170 
1171  auto post_proc_at_points = [&](std::array<double, 3> point,
1172  std::string str) {
1174 
1175  dataFieldEval->setEvalPoints(point.data(), point.size() / 3);
1176 
1177  struct OpPrint : public VolOp {
1178 
1179  EshelbianCore &eP;
1180  std::array<double, 3> point;
1181  std::string str;
1182 
1183  OpPrint(EshelbianCore &ep, std::array<double, 3> &point,
1184  std::string &str)
1185  : VolOp(ep.spatialDisp, VolOp::OPROW), eP(ep), point(point),
1186  str(str) {}
1187 
1188  MoFEMErrorCode doWork(int side, EntityType type,
1191  if (type == MBTET) {
1192  if (getGaussPts().size2()) {
1193 
1194  auto t_h = getFTensor2FromMat<3, 3>(eP.dataAtPts->hAtPts);
1195  auto t_approx_P =
1196  getFTensor2FromMat<3, 3>(eP.dataAtPts->approxPAtPts);
1197 
1201  const double jac = dEterminant(t_h);
1203  t_cauchy(i, j) = (1. / jac) * (t_approx_P(i, k) * t_h(j, k));
1204 
1205  auto add = [&]() {
1206  std::ostringstream s;
1207  s << str << " elem " << getFEEntityHandle() << " ";
1208  return s.str();
1209  };
1210 
1211  auto print_tensor = [](auto &t) {
1212  std::ostringstream s;
1213  s << t;
1214  return s.str();
1215  };
1216 
1217  std::ostringstream print;
1218  MOFEM_LOG("EPSYNC", Sev::inform)
1219  << add() << "comm rank " << eP.mField.get_comm_rank();
1220  MOFEM_LOG("EPSYNC", Sev::inform)
1221  << add() << "point " << getVectorAdaptor(point.data(), 3);
1222  MOFEM_LOG("EPSYNC", Sev::inform)
1223  << add() << "coords at gauss pts " << getCoordsAtGaussPts();
1224  MOFEM_LOG("EPSYNC", Sev::inform)
1225  << add() << "w " << eP.dataAtPts->wAtPts;
1226  MOFEM_LOG("EPSYNC", Sev::inform)
1227  << add() << "Piola " << eP.dataAtPts->approxPAtPts;
1228  MOFEM_LOG("EPSYNC", Sev::inform)
1229  << add() << "Cauchy " << print_tensor(t_cauchy);
1230  }
1231  }
1233  }
1234  };
1235 
1236  if (auto fe_ptr = dataFieldEval->feMethodPtr.lock()) {
1237 
1238  fe_ptr->getOpPtrVector().push_back(new OpPrint(eP, point, str));
1239  CHKERR eP.mField.getInterface<FieldEvaluatorInterface>()
1240  ->evalFEAtThePoint3D(point.data(), 1e-12, problemPtr->getName(),
1241  "EP", dataFieldEval,
1242  eP.mField.get_comm_rank(),
1243  eP.mField.get_comm_rank(), MF_EXIST, QUIET);
1244  fe_ptr->getOpPtrVector().pop_back();
1245  }
1246 
1248  };
1249 
1250  // Points for Cook beam
1251  std::array<double, 3> pointA = {48., 60., 5.};
1252  CHKERR post_proc_at_points(pointA, "Point A");
1253  MOFEM_LOG_SYNCHRONISE(eP.mField.get_comm());
1254 
1255  std::array<double, 3> pointB = {48. / 2., 44. + (60. - 44.) / 2., 0.};
1256  CHKERR post_proc_at_points(pointB, "Point B");
1257  MOFEM_LOG_SYNCHRONISE(eP.mField.get_comm());
1258 
1259  std::array<double, 3> pointC = {48. / 2., (44. - 0.) / 2., 0.};
1260  CHKERR post_proc_at_points(pointC, "Point C");
1261  MOFEM_LOG_SYNCHRONISE(eP.mField.get_comm());
1262 
1264  }
1265  };
1266 
1267  boost::shared_ptr<FEMethod> monitor_ptr(new Monitor(*this));
1268  ts_ctx->get_loops_to_do_Monitor().push_back(
1270 
1271  CHKERR TSAppendOptionsPrefix(ts, "elastic_");
1272  CHKERR TSSetFromOptions(ts);
1274 }

◆ solveElastic()

MoFEMErrorCode EshelbianPlasticity::EshelbianCore::solveElastic ( TS  ts,
Vec  x 
)
Examples
ep.cpp.

Definition at line 1276 of file EshelbianPlasticity.cpp.

1276  {
1278 
1279  CHKERR TSSetDM(ts, dmElastic);
1280 
1281  SNES snes;
1282  CHKERR TSGetSNES(ts, &snes);
1283 
1284  PetscViewerAndFormat *vf;
1285  CHKERR PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,
1286  PETSC_VIEWER_DEFAULT, &vf);
1287  CHKERR SNESMonitorSet(
1288  snes,
1289  (MoFEMErrorCode(*)(SNES, PetscInt, PetscReal, void *))SNESMonitorFields,
1290  vf, (MoFEMErrorCode(*)(void **))PetscViewerAndFormatDestroy);
1291 
1292  PetscSection section;
1293  CHKERR DMGetDefaultSection(dmElastic, &section);
1294  int num_fields;
1295  CHKERR PetscSectionGetNumFields(section, &num_fields);
1296  for (int ff = 0; ff != num_fields; ff++) {
1297  const char *field_name;
1298  CHKERR PetscSectionGetFieldName(section, ff, &field_name);
1299  MOFEM_LOG_C("EP", Sev::inform, "Field %d name %s", ff, field_name);
1300  }
1301 
1302  CHKERR DMoFEMMeshToLocalVector(dmElastic, x, INSERT_VALUES, SCATTER_FORWARD);
1303 
1304  CHKERR VecGhostUpdateBegin(x, INSERT_VALUES, SCATTER_FORWARD);
1305  CHKERR VecGhostUpdateEnd(x, INSERT_VALUES, SCATTER_FORWARD);
1306 
1307 
1308 
1309  // Adding field split solver
1310 
1311  KSP ksp;
1312  CHKERR SNESGetKSP(snes, &ksp);
1313  PC pc;
1314  CHKERR KSPGetPC(ksp, &pc);
1315  PetscBool is_uu_field_split;
1316  PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_uu_field_split);
1317  if (is_uu_field_split) {
1318 
1319  const MoFEM::Problem *schur_uu_ptr;
1321  if (auto uu_data = schur_uu_ptr->subProblemData) {
1322 
1323  const MoFEM::Problem *prb_ptr;
1325  map<std::string, IS> is_map;
1326  for (int ff = 0; ff != num_fields; ff++) {
1327  const char *field_name;
1328  CHKERR PetscSectionGetFieldName(section, ff, &field_name);
1329  CHKERR mField.getInterface<ISManager>()->isCreateProblemFieldAndRank(
1330  prb_ptr->getName(), ROW, field_name, 0, MAX_DOFS_ON_ENTITY,
1331  &is_map[field_name]);
1332  }
1333  // CHKERR mField.getInterface<ISManager>()
1334  // ->isCreateProblemFieldAndEntityType(
1335  // prb_ptr->getName(), ROW, piolaStress, MBTET, MBTET, 0,
1336  // MAX_DOFS_ON_ENTITY, &is_map["T_STRESS_ON_TETS"]);
1337  // CHKERR mField.getInterface<ISManager>()
1338  // ->isCreateProblemFieldAndEntityType(
1339  // prb_ptr->getName(), ROW, piolaStress, MBTRI, MBTRI, 0,
1340  // MAX_DOFS_ON_ENTITY, &is_map["T_STRESS_ON_TRIS"]);
1341 
1342  CHKERR uu_data->getRowIs(&is_map["E_IS_SUU"]);
1343 
1344  CHKERR PCFieldSplitSetIS(pc, NULL, is_map[streachTensor]);
1345  CHKERR PCFieldSplitSetIS(pc, NULL, is_map["E_IS_SUU"]);
1346 
1347  CHKERR PCFieldSplitSetSchurPre(pc, PC_FIELDSPLIT_SCHUR_PRE_USER,
1348  schurAssembly->Suu);
1349 
1350  CHKERR PCSetUp(pc);
1351  PetscInt n;
1352  KSP *uu_ksp;
1353  CHKERR PCFieldSplitGetSubKSP(pc, &n, &uu_ksp);
1354  PC bubble_pc;
1355  CHKERR KSPGetPC(uu_ksp[1], &bubble_pc);
1356  PetscBool is_bubble_field_split;
1357  PetscObjectTypeCompare((PetscObject)bubble_pc, PCFIELDSPLIT,
1358  &is_bubble_field_split);
1359  if (is_bubble_field_split) {
1360 
1361  const MoFEM::Problem *schur_bubble_ptr;
1362  CHKERR DMMoFEMGetProblemPtr(dmElasticSchurBubble, &schur_bubble_ptr);
1363  if (auto bubble_data = schur_bubble_ptr->subProblemData) {
1364 
1365  CHKERR bubble_data->getRowIs(&is_map["E_IS_BUBBLE"]);
1366 
1367  AO uu_ao;
1368  CHKERR uu_data->getRowMap(&uu_ao);
1369 
1370  CHKERR AOApplicationToPetscIS(uu_ao, is_map[bubbleField]);
1371  CHKERR PCFieldSplitSetIS(bubble_pc, NULL, is_map[bubbleField]);
1372  CHKERR PCFieldSplitSetIS(bubble_pc, NULL, is_map["E_IS_BUBBLE"]);
1373  CHKERR PCFieldSplitSetSchurPre(
1374  bubble_pc, PC_FIELDSPLIT_SCHUR_PRE_USER, schurAssembly->SBubble);
1375 
1376  CHKERR PCSetUp(bubble_pc);
1377  PetscInt bubble_n;
1378  KSP *bubble_ksp;
1379  CHKERR PCFieldSplitGetSubKSP(bubble_pc, &bubble_n, &bubble_ksp);
1380  PC omega_pc;
1381  CHKERR KSPGetPC(bubble_ksp[1], &omega_pc);
1382  PetscBool is_omega_field_split;
1383  PetscObjectTypeCompare((PetscObject)omega_pc, PCFIELDSPLIT,
1384  &is_omega_field_split);
1385 
1386  if (is_omega_field_split) {
1387 
1388  const MoFEM::Problem *schur_omega_ptr;
1389  CHKERR DMMoFEMGetProblemPtr(dmElasticSchurOmega, &schur_omega_ptr);
1390  if (auto omega_data = schur_omega_ptr->subProblemData) {
1391 
1392  AO bubble_ao;
1393  CHKERR bubble_data->getRowMap(&bubble_ao);
1394 
1395  CHKERR AOApplicationToPetscIS(uu_ao, is_map[rotAxis]);
1396  CHKERR AOApplicationToPetscIS(bubble_ao, is_map[rotAxis]);
1397  CHKERR omega_data->getRowIs(&is_map["E_IS_OMEGA"]);
1398 
1399  CHKERR PCFieldSplitSetIS(omega_pc, NULL, is_map[rotAxis]);
1400  CHKERR PCFieldSplitSetIS(omega_pc, NULL, is_map["E_IS_OMEGA"]);
1401  CHKERR PCFieldSplitSetSchurPre(omega_pc,
1402  PC_FIELDSPLIT_SCHUR_PRE_USER,
1403  schurAssembly->SOmega);
1404 
1405  CHKERR PCSetUp(omega_pc);
1406  PetscInt omega_n;
1407  KSP *omega_ksp;
1408  CHKERR PCFieldSplitGetSubKSP(omega_pc, &omega_n, &omega_ksp);
1409  PC w_pc;
1410  CHKERR KSPGetPC(omega_ksp[1], &w_pc);
1411  PetscBool is_w_field_split;
1412  PetscObjectTypeCompare((PetscObject)w_pc, PCFIELDSPLIT,
1413  &is_w_field_split);
1414  if (is_w_field_split) {
1415 
1416  const MoFEM::Problem *schur_w_ptr;
1418  &schur_w_ptr);
1419  if (auto w_data = schur_w_ptr->subProblemData) {
1420 
1421  AO omega_ao;
1422  CHKERR omega_data->getRowMap(&omega_ao);
1423 
1424  CHKERR AOApplicationToPetscIS(uu_ao, is_map[spatialDisp]);
1425  CHKERR AOApplicationToPetscIS(bubble_ao, is_map[spatialDisp]);
1426  CHKERR AOApplicationToPetscIS(omega_ao, is_map[spatialDisp]);
1427  CHKERR w_data->getRowIs(&is_map["E_IS_W"]);
1428 
1429  CHKERR PCFieldSplitSetIS(w_pc, NULL, is_map[spatialDisp]);
1430  CHKERR PCFieldSplitSetIS(w_pc, NULL, is_map["E_IS_W"]);
1431  CHKERR PCFieldSplitSetSchurPre(
1432  w_pc, PC_FIELDSPLIT_SCHUR_PRE_USER, schurAssembly->Sw);
1433 
1434  CHKERR AODestroy(&omega_ao);
1435  }
1436  }
1437 
1438  CHKERR PetscFree(omega_ksp);
1439  }
1440  }
1441  CHKERR PetscFree(bubble_ksp);
1442  CHKERR AODestroy(&uu_ao);
1443  }
1444  }
1445  CHKERR PetscFree(uu_ksp);
1446 
1447  for (auto &m : is_map)
1448  CHKERR ISDestroy(&m.second);
1449  }
1450  }
1451 
1452  if (std::abs(alphaRho) > std::numeric_limits<double>::epsilon()) {
1453  Vec xx;
1454  CHKERR VecDuplicate(x, &xx);
1455  CHKERR VecZeroEntries(xx);
1456  CHKERR TS2SetSolution(ts, x, xx);
1457  CHKERR VecDestroy(&xx);
1458  } else {
1459  CHKERR TSSetSolution(ts, x);
1460  }
1461 
1462  CHKERR TSSolve(ts, PETSC_NULL);
1464 }

Member Data Documentation

◆ alphaRho

double EshelbianPlasticity::EshelbianCore::alphaRho

Definition at line 1215 of file EshelbianPlasticity.hpp.

◆ alphaU

double EshelbianPlasticity::EshelbianCore::alphaU

Definition at line 1213 of file EshelbianPlasticity.hpp.

◆ alphaW

double EshelbianPlasticity::EshelbianCore::alphaW

Definition at line 1214 of file EshelbianPlasticity.hpp.

◆ bcSpatialDispVecPtr

boost::shared_ptr<BcDispVec> EshelbianPlasticity::EshelbianCore::bcSpatialDispVecPtr

Definition at line 1220 of file EshelbianPlasticity.hpp.

◆ bcSpatialFreeTraction

boost::shared_ptr<TractionFreeBc> EshelbianPlasticity::EshelbianCore::bcSpatialFreeTraction

Definition at line 1223 of file EshelbianPlasticity.hpp.

◆ bcSpatialRotationVecPtr

boost::shared_ptr<BcRotVec> EshelbianPlasticity::EshelbianCore::bcSpatialRotationVecPtr

Definition at line 1221 of file EshelbianPlasticity.hpp.

◆ bcSpatialTraction

boost::shared_ptr<TractionBcVec> EshelbianPlasticity::EshelbianCore::bcSpatialTraction

Definition at line 1222 of file EshelbianPlasticity.hpp.

◆ bubbleField

const std::string EshelbianPlasticity::EshelbianCore::bubbleField

Definition at line 1202 of file EshelbianPlasticity.hpp.

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::EshelbianCore::dataAtPts

Definition at line 1175 of file EshelbianPlasticity.hpp.

◆ dM

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dM

Coupled problem all fields.

Definition at line 1184 of file EshelbianPlasticity.hpp.

◆ dmElastic

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmElastic

Elastic problem.

Examples
ep.cpp.

Definition at line 1185 of file EshelbianPlasticity.hpp.

◆ dmElasticSchurBubble

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmElasticSchurBubble

Sub problem of dmElastic Schur.

Definition at line 1187 of file EshelbianPlasticity.hpp.

◆ dmElasticSchurOmega

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmElasticSchurOmega

Sub problem of dmElastic Schur.

Definition at line 1190 of file EshelbianPlasticity.hpp.

◆ dmElasticSchurSpatialDisp

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmElasticSchurSpatialDisp

Sub problem of dmElastic Schur.

Definition at line 1189 of file EshelbianPlasticity.hpp.

◆ dmElasticSchurStreach

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmElasticSchurStreach

Sub problem of dmElastic Schur.

Definition at line 1186 of file EshelbianPlasticity.hpp.

◆ dmMaterial

SmartPetscObj<DM> EshelbianPlasticity::EshelbianCore::dmMaterial

Material problem.

Definition at line 1191 of file EshelbianPlasticity.hpp.

◆ elasticBcLhs

boost::shared_ptr<EpElement<FaceElementForcesAndSourcesCore> > EshelbianPlasticity::EshelbianCore::elasticBcLhs

Definition at line 1180 of file EshelbianPlasticity.hpp.

◆ elasticBcRhs

boost::shared_ptr<EpElement<FaceElementForcesAndSourcesCore> > EshelbianPlasticity::EshelbianCore::elasticBcRhs

Definition at line 1181 of file EshelbianPlasticity.hpp.

◆ elasticFeLhs

boost::shared_ptr<EpElement<VolumeElementForcesAndSourcesCore> > EshelbianPlasticity::EshelbianCore::elasticFeLhs

Definition at line 1179 of file EshelbianPlasticity.hpp.

◆ elasticFeRhs

boost::shared_ptr<EpElement<VolumeElementForcesAndSourcesCore> > EshelbianPlasticity::EshelbianCore::elasticFeRhs

Definition at line 1178 of file EshelbianPlasticity.hpp.

◆ elementVolumeName

const std::string EshelbianPlasticity::EshelbianCore::elementVolumeName

Definition at line 1204 of file EshelbianPlasticity.hpp.

◆ eshelbyStress

const std::string EshelbianPlasticity::EshelbianCore::eshelbyStress

Definition at line 1194 of file EshelbianPlasticity.hpp.

◆ essentialBcElement

const std::string EshelbianPlasticity::EshelbianCore::essentialBcElement

Definition at line 1206 of file EshelbianPlasticity.hpp.

◆ lambdaField

const std::string EshelbianPlasticity::EshelbianCore::lambdaField

Definition at line 1201 of file EshelbianPlasticity.hpp.

◆ materialDisp

const std::string EshelbianPlasticity::EshelbianCore::materialDisp

Definition at line 1196 of file EshelbianPlasticity.hpp.

◆ materialGradient

const std::string EshelbianPlasticity::EshelbianCore::materialGradient

Definition at line 1199 of file EshelbianPlasticity.hpp.

◆ materialOrder

int EshelbianPlasticity::EshelbianCore::materialOrder

Definition at line 1212 of file EshelbianPlasticity.hpp.

◆ mField

MoFEM::Interface& EshelbianPlasticity::EshelbianCore::mField

Definition at line 1173 of file EshelbianPlasticity.hpp.

◆ naturalBcElement

const std::string EshelbianPlasticity::EshelbianCore::naturalBcElement

Definition at line 1205 of file EshelbianPlasticity.hpp.

◆ physicalEquations

boost::shared_ptr<PhysicalEquations> EshelbianPlasticity::EshelbianCore::physicalEquations

Definition at line 1176 of file EshelbianPlasticity.hpp.

◆ piolaStress

const std::string EshelbianPlasticity::EshelbianCore::piolaStress

Definition at line 1193 of file EshelbianPlasticity.hpp.

◆ precEps

double EshelbianPlasticity::EshelbianCore::precEps

Definition at line 1216 of file EshelbianPlasticity.hpp.

◆ rotAxis

const std::string EshelbianPlasticity::EshelbianCore::rotAxis

Definition at line 1198 of file EshelbianPlasticity.hpp.

◆ schurAssembly

boost::shared_ptr<EpFEMethod> EshelbianPlasticity::EshelbianCore::schurAssembly

Definition at line 1182 of file EshelbianPlasticity.hpp.

◆ spaceOrder

int EshelbianPlasticity::EshelbianCore::spaceOrder

Definition at line 1211 of file EshelbianPlasticity.hpp.

◆ spatialDisp

const std::string EshelbianPlasticity::EshelbianCore::spatialDisp

Definition at line 1195 of file EshelbianPlasticity.hpp.

◆ streachTensor

const std::string EshelbianPlasticity::EshelbianCore::streachTensor

Definition at line 1197 of file EshelbianPlasticity.hpp.

◆ tauField

const std::string EshelbianPlasticity::EshelbianCore::tauField

Definition at line 1200 of file EshelbianPlasticity.hpp.


The documentation for this struct was generated from the following files:
MoFEM::OpCalculateVectorFieldValuesFromPetscVecImpl
Approximate field valuse for given petsc vector.
Definition: UserDataOperators.hpp:358
MoFEM::FieldEvaluatorInterface
Field evaluator interface.
Definition: FieldEvaluator.hpp:34
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
EshelbianPlasticity::f
double f(const double v)
Definition: EshelbianOperators.cpp:22
FTensor::Tensor2< double, 3, 3 >
EshelbianPlasticity::EshelbianCore::naturalBcElement
const std::string naturalBcElement
Definition: EshelbianPlasticity.hpp:1205
EshelbianPlasticity::EshelbianCore::elasticFeRhs
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore > > elasticFeRhs
Definition: EshelbianPlasticity.hpp:1178
MoFEM::CoreInterface::build_adjacencies
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
MoFEM::CoreInterface::check_finite_element
virtual bool check_finite_element(const std::string &name) const =0
Check if finite element is in database.
MYPCOMM_INDEX
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:292
H1
@ H1
continuous field
Definition: definitions.h:177
EshelbianPlasticity::EshelbianCore::lambdaField
const std::string lambdaField
Definition: EshelbianPlasticity.hpp:1201
EshelbianPlasticity::EshelbianCore::dmElastic
SmartPetscObj< DM > dmElastic
Elastic problem.
Definition: EshelbianPlasticity.hpp:1185
MoFEM::ForcesAndSourcesCore
structure to get information form mofem into DataForcesAndSourcesCore
Definition: ForcesAndSourcesCore.hpp:34
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
NOISY
@ NOISY
Definition: definitions.h:280
n
static Index< 'n', 3 > n
Definition: BasicFeTools.hpp:78
FTensor::d
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: dTensor0.hpp:27
MoFEM::DMMoFEMSetSquareProblem
PetscErrorCode DMMoFEMSetSquareProblem(DM dm, PetscBool square_problem)
set squared problem
Definition: DMMMoFEM.cpp:378
EshelbianPlasticity::EshelbianCore::setBaseVolumeElementOps
MoFEMErrorCode setBaseVolumeElementOps(const int tag, const bool do_rhs, const bool do_lhs, boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &fe)
Definition: EshelbianPlasticity.cpp:645
L2
@ L2
field with C-1 continuity
Definition: definitions.h:180
MoFEM::VolumeElementForcesAndSourcesCore
VolumeElementForcesAndSourcesCoreSwitch< 0 > VolumeElementForcesAndSourcesCore
Volume finite element default.
Definition: VolumeElementForcesAndSourcesCore.hpp:354
MoFEM::DMMoFEMAddElement
PetscErrorCode DMMoFEMAddElement(DM dm, const char fe_name[])
add element to dm
Definition: DMMMoFEM.cpp:425
EshelbianPlasticity::IDD_MOFEMEshelbianCrackInterface
static const MOFEMuuid IDD_MOFEMEshelbianCrackInterface
Definition: EshelbianPlasticity.hpp:17
EshelbianPlasticity::EshelbianCore::alphaU
double alphaU
Definition: EshelbianPlasticity.hpp:1213
MoFEM::FEMethod
structure for User Loop Methods on finite elements
Definition: LoopMethods.hpp:369
MoFEM::OpCalculateTensor2FieldValues
Get values at integration pts for tensor filed rank 2, i.e. matrix field.
Definition: UserDataOperators.hpp:607
EshelbianPlasticity::EshelbianCore::bubbleField
const std::string bubbleField
Definition: EshelbianPlasticity.hpp:1202
DM_NO_ELEMENT
#define DM_NO_ELEMENT
Definition: DMMoFEM.hpp:22
MoFEM::VolumeElementForcesAndSourcesCoreSwitch
Volume finite element with switches.
Definition: VolumeElementForcesAndSourcesCore.hpp:339
EshelbianPlasticity::EshelbianCore::precEps
double precEps
Definition: EshelbianPlasticity.hpp:1216
MoFEM::Problem::getName
std::string getName() const
Definition: ProblemsMultiIndices.hpp:527
MoFEM::OpCalculateHVecTensorField
Calculate tenor field using vectorial base, i.e. Hdiv/Hcurl.
Definition: UserDataOperators.hpp:1605
MoFEM::DMoFEMMeshToLocalVector
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
Definition: DMMMoFEM.cpp:445
dim
const int dim
Definition: elec_phys_2D.cpp:12
EshelbianPlasticity::EshelbianCore::bcSpatialRotationVecPtr
boost::shared_ptr< BcRotVec > bcSpatialRotationVecPtr
Definition: EshelbianPlasticity.hpp:1221
MoFEM::CoreInterface::modify_finite_element_add_field_col
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
EshelbianPlasticity::EshelbianCore::getOptions
MoFEMErrorCode getOptions()
Definition: EshelbianPlasticity.cpp:58
MoFEM::CoreInterface::add_field
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.
EshelbianPlasticity::EshelbianCore::rotAxis
const std::string rotAxis
Definition: EshelbianPlasticity.hpp:1198
EshelbianPlasticity::EshelbianCore::streachTensor
const std::string streachTensor
Definition: EshelbianPlasticity.hpp:1197
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:70
EshelbianPlasticity::EshelbianCore::schurAssembly
boost::shared_ptr< EpFEMethod > schurAssembly
Definition: EshelbianPlasticity.hpp:1182
EshelbianPlasticity::EshelbianCore::essentialBcElement
const std::string essentialBcElement
Definition: EshelbianPlasticity.hpp:1206
EshelbianPlasticity::EshelbianCore::materialGradient
const std::string materialGradient
Definition: EshelbianPlasticity.hpp:1199
EshelbianPlasticity::EshelbianCore::dmElasticSchurOmega
SmartPetscObj< DM > dmElasticSchurOmega
Sub problem of dmElastic Schur.
Definition: EshelbianPlasticity.hpp:1190
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::CoreInterface::add_ents_to_field_by_type
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.
USER_BASE
@ USER_BASE
user implemented approximation base
Definition: definitions.h:160
ROW
@ ROW
Definition: definitions.h:192
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:315
EshelbianPlasticity::EshelbianCore::spaceOrder
int spaceOrder
Definition: EshelbianPlasticity.hpp:1211
EshelbianPlasticity::EshelbianCore::elementVolumeName
const std::string elementVolumeName
Definition: EshelbianPlasticity.hpp:1204
MoFEM::CoreInterface::add_ents_to_finite_element_by_type
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
EshelbianPlasticity::EshelbianCore::spatialDisp
const std::string spatialDisp
Definition: EshelbianPlasticity.hpp:1195
m
static Index< 'm', 3 > m
Definition: BasicFeTools.hpp:77
MoFEM::CoreInterface::get_field_structure
virtual const Field * get_field_structure(const std::string &name)=0
get field structure
MoFEM::DMCreateMatrix_MoFEM
PetscErrorCode DMCreateMatrix_MoFEM(DM dm, Mat *M)
Definition: DMMMoFEM.cpp:1053
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:604
MoFEM::DMMoFEMAddSubFieldRow
PetscErrorCode DMMoFEMAddSubFieldRow(DM dm, const char field_name[], EntityType lo_type=MBVERTEX, EntityType hi_type=MBMAXTYPE)
Definition: DMMMoFEM.cpp:198
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:88
NBVOLUMETET_CCG_BUBBLE
#define NBVOLUMETET_CCG_BUBBLE(P)
Bubble function for CGG H div space.
Definition: CGGTonsorialBubbleBase.hpp:19
MoFEM::CoreInterface::add_finite_element
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
EshelbianPlasticity::EshelbianCore::materialOrder
int materialOrder
Definition: EshelbianPlasticity.hpp:1212
MoFEM::DMMoFEMTSSetIJacobian
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
Definition: DMMMoFEM.cpp:772
EshelbianPlasticity::EshelbianCore::dmElasticSchurStreach
SmartPetscObj< DM > dmElasticSchurStreach
Sub problem of dmElastic Schur.
Definition: EshelbianPlasticity.hpp:1186
MoFEM::DMoFEMLoopFiniteElements
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method)
Executes FEMethod for finite elements in DM.
Definition: DMMMoFEM.cpp:507
MoFEM::OpCalculateTensor2SymmetricFieldValuesDot
Calculate symmetric tensor field rates ant integratio pts.
Definition: UserDataOperators.hpp:776
EshelbianPlasticity::EshelbianCore::eshelbyStress
const std::string eshelbyStress
Definition: EshelbianPlasticity.hpp:1194
ElectroPhysiology::alpha
const double alpha
Definition: ElecPhysOperators.hpp:28
Monitor
[Push operators to pipeline]
Definition: dynamic_elastic.cpp:295
EshelbianPlasticity::EshelbianCore::setGenericVolumeElementOps
MoFEMErrorCode setGenericVolumeElementOps(const int tag, const bool add_elastic, const bool add_material, boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &fe_rhs, boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore >> &fe_lhs)
Definition: EshelbianPlasticity.cpp:712
MoFEM::DMMoFEMTSSetI2Jacobian
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
Definition: DMMMoFEM.cpp:866
MoFEM::CoreInterface::build_finite_elements
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
MoFEM::createSmartDM
auto createSmartDM
Creates smart DM object.
Definition: PetscSmartObj.hpp:129
MoFEM::DMMoFEMTSSetI2Function
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
Definition: DMMMoFEM.cpp:844
EshelbianPlasticity::EshelbianCore::tauField
const std::string tauField
Definition: EshelbianPlasticity.hpp:1200
MoFEM::CoreInterface::modify_finite_element_add_field_row
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
MoFEM::DMMoFEMCreateSubDM
PetscErrorCode DMMoFEMCreateSubDM(DM subdm, DM dm, const char problem_name[])
Must be called by user to set Sub DM MoFEM data structures.
Definition: DMMMoFEM.cpp:177
double
convert.type
type
Definition: convert.py:66
MoFEM::DMMoFEMSetDestroyProblem
PetscErrorCode DMMoFEMSetDestroyProblem(DM dm, PetscBool destroy_problem)
Definition: DMMMoFEM.cpp:360
EshelbianPlasticity::EshelbianCore::EshelbianCore
EshelbianCore(MoFEM::Interface &m_field)
Definition: EshelbianPlasticity.cpp:45
EshelbianPlasticity::EshelbianCore::alphaW
double alphaW
Definition: EshelbianPlasticity.hpp:1214
FTensor::Index< 'i', 3 >
MoFEM::OpCalculateTensor2SymmetricFieldValues
Calculate symmetric tensor field values at integration pts.
Definition: UserDataOperators.hpp:714
MoFEM::CoreInterface::modify_finite_element_add_field_data
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
StdRDOperators::order
const int order
Definition: rd_stdOperators.hpp:28
EshelbianPlasticity::EshelbianCore::getTractionFreeBc
MoFEMErrorCode getTractionFreeBc(const EntityHandle meshset, boost::shared_ptr< TractionFreeBc > &bc_ptr, const std::string disp_block_set_name, const std::string rot_block_set_name)
Definition: EshelbianPlasticity.cpp:459
MoFEM::FieldEvaluatorInterface::SetPtsData
Definition: FieldEvaluator.hpp:43
EshelbianPlasticity::EshelbianCore::getBc
MoFEMErrorCode getBc(boost::shared_ptr< BC > &bc_vec_ptr, const std::string block_set_name, const int nb_attributes)
Definition: EshelbianPlasticity.hpp:1226
MoFEM::OpCalculateHTensorTensorField
Calculate tenor field using vectorial base, i.e. Hdiv/Hcurl.
Definition: UserDataOperators.hpp:1664
MoFEM::SmartPetscObj< Mat >
VolRule
Set integration rule.
Definition: simple_interface.cpp:103
MoFEM::ProblemsManager
Problem manager is used to build and partition problems.
Definition: ProblemsManager.hpp:34
FaceElementForcesAndSourcesCore
EshelbianPlasticity::EshelbianCore::physicalEquations
boost::shared_ptr< PhysicalEquations > physicalEquations
Definition: EshelbianPlasticity.hpp:1176
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:51
FaceRule
Set integration rule to boundary elements.
Definition: simple_interface.cpp:106
PostProcVolumeOnRefinedMesh
Post processing.
Definition: PostProcOnRefMesh.hpp:642
MoFEM::DMMoFEMCreateMoFEM
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.
Definition: DMMMoFEM.cpp:105
MoFEM::ISManager
Section manager is used to create indexes and sections.
Definition: ISManager.hpp:36
EshelbianPlasticity::EshelbianCore::bcSpatialFreeTraction
boost::shared_ptr< TractionFreeBc > bcSpatialFreeTraction
Definition: EshelbianPlasticity.hpp:1223
EshelbianPlasticity::EshelbianCore::bcSpatialDispVecPtr
boost::shared_ptr< BcDispVec > bcSpatialDispVecPtr
Definition: EshelbianPlasticity.hpp:1220
EshelbianPlasticity::EshelbianCore::dM
SmartPetscObj< DM > dM
Coupled problem all fields.
Definition: EshelbianPlasticity.hpp:1184
EshelbianPlasticity::EshelbianCore::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: EshelbianPlasticity.hpp:1175
EshelbianPlasticity::EshelbianCore::dmElasticSchurSpatialDisp
SmartPetscObj< DM > dmElasticSchurSpatialDisp
Sub problem of dmElastic Schur.
Definition: EshelbianPlasticity.hpp:1189
MAX_DOFS_ON_ENTITY
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
Definition: definitions.h:305
EshelbianPlasticity::EshelbianCore::elasticFeLhs
boost::shared_ptr< EpElement< VolumeElementForcesAndSourcesCore > > elasticFeLhs
Definition: EshelbianPlasticity.hpp:1179
EshelbianPlasticity::EshelbianCore::alphaRho
double alphaRho
Definition: EshelbianPlasticity.hpp:1215
MoFEM::Field
Provide data structure for (tensor) field approximation.
Definition: FieldMultiIndices.hpp:64
MOFEM_LOG_SYNCHRONISE
#define MOFEM_LOG_SYNCHRONISE(comm)
Synchronise "SYNC" channel.
Definition: LogManager.hpp:349
MF_ZERO
@ MF_ZERO
Definition: definitions.h:189
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:312
DEMKOWICZ_JACOBI_BASE
@ DEMKOWICZ_JACOBI_BASE
Definition: definitions.h:158
_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
Definition: MeshsetsManager.hpp:91
p
static Index< 'p', 3 > p
Definition: BasicFeTools.hpp:80
EshelbianPlasticity::EshelbianCore::elasticBcRhs
boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore > > elasticBcRhs
Definition: EshelbianPlasticity.hpp:1181
BLOCKSET
@ BLOCKSET
Definition: definitions.h:217
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
EshelbianPlasticity::EshelbianCore::mField
MoFEM::Interface & mField
Definition: EshelbianPlasticity.hpp:1173
MoFEM::OpCalculateHVecTensorDivergence
Calculate divergence of tonsorial field using vectorial base.
Definition: UserDataOperators.hpp:1724
AINSWORTH_LEGENDRE_BASE
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:152
MoFEM::DMMoFEMTSSetIFunction
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
Definition: DMMMoFEM.cpp:719
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:123
MoFEM::DMMoFEMGetProblemPtr
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
Definition: DMMMoFEM.cpp:348
EshelbianPlasticity::EshelbianCore::materialDisp
const std::string materialDisp
Definition: EshelbianPlasticity.hpp:1196
MoFEM::CoreInterface::build_fields
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
MoFEM::DMMoFEMGetTsCtx
PetscErrorCode DMMoFEMGetTsCtx(DM dm, MoFEM::TsCtx **ts_ctx)
get MoFEM::TsCtx data structure
Definition: DMMMoFEM.cpp:1001
point
bg::model::point< double, 4, bg::cs::cartesian > point
Definition: r_tree_testing.hpp:13
MoFEM::TsMonitorSet
PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
Definition: TsCtx.cpp:209
EshelbianPlasticity::EshelbianCore::dmElasticSchurBubble
SmartPetscObj< DM > dmElasticSchurBubble
Sub problem of dmElastic Schur.
Definition: EshelbianPlasticity.hpp:1187
MoFEM::OpCalculateVectorFieldValues
Get values at integration pts for tensor filed rank 1, i.e. vector field.
Definition: UserDataOperators.hpp:342
MoFEM::PairNameFEMethodPtr
Definition: AuxPETSc.hpp:24
MoFEM::getVectorAdaptor
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition: Templates.hpp:44
MoFEM::DataForcesAndSourcesCore::EntData
Data on single entity (This is passed as argument to DataOperator::doWork)
Definition: DataStructures.hpp:60
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:509
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
MoFEM::UnknownInterface::getInterface
IFACE getInterface() const
Get interface pointer to pointer of interface.
Definition: UnknownInterface.hpp:237
QUIET
@ QUIET
Definition: definitions.h:277
MoFEM::Problem
keeps basic data about problem
Definition: ProblemsMultiIndices.hpp:79
MoFEM::VolumeElementForcesAndSourcesCoreBase::UserDataOperator
default operator for TET element
Definition: VolumeElementForcesAndSourcesCore.hpp:45
MoFEM::CoreInterface::set_field_order
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.
MoFEM::dEterminant
static double dEterminant(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:875
i
FTensor::Index< 'i', 3 > i
Definition: matrix_function.cpp:18
EshelbianPlasticity::TractionFreeBc
std::vector< Range > TractionFreeBc
Definition: EshelbianPlasticity.hpp:565
EshelbianPlasticity::EshelbianCore::elasticBcLhs
boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore > > elasticBcLhs
Definition: EshelbianPlasticity.hpp:1180
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
EshelbianPlasticity::EshelbianCore::bcSpatialTraction
boost::shared_ptr< TractionBcVec > bcSpatialTraction
Definition: EshelbianPlasticity.hpp:1222
MF_EXIST
@ MF_EXIST
Definition: definitions.h:189
convert.int
int
Definition: convert.py:66
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
HDIV
@ HDIV
field with continuous normal traction
Definition: definitions.h:179
EshelbianPlasticity::EshelbianCore::setGenericFaceElementOps
MoFEMErrorCode setGenericFaceElementOps(const bool add_elastic, const bool add_material, boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore >> &fe_rhs, boost::shared_ptr< EpElement< FaceElementForcesAndSourcesCore >> &fe_lhs)
Definition: EshelbianPlasticity.cpp:796
MoFEM::Problem::subProblemData
boost::shared_ptr< SubProblemData > subProblemData
Definition: ProblemsMultiIndices.hpp:228
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:87
EshelbianPlasticity::EshelbianCore::piolaStress
const std::string piolaStress
Definition: EshelbianPlasticity.hpp:1193
CHKERRG
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:552
MoFEM::ProblemsManager::removeDofsOnEntities
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, int verb=VERBOSE, const bool debug=false)
Remove DOFs from problem.
Definition: ProblemsManager.cpp:2856
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(const MOFEMuuid &uuid, IFACE *&iface) const
Get interface by uuid and return reference to pointer of interface.
Definition: UnknownInterface.hpp:130
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
ReactionDiffusionEquation::r
const double r
rate factor
Definition: reaction_diffusion.cpp:33
FTensor::dd
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)
Definition: ddTensor0.hpp:33
MoFEM::DMMoFEMSetIsPartitioned
PetscErrorCode DMMoFEMSetIsPartitioned(DM dm, PetscBool is_partitioned)
Definition: DMMMoFEM.cpp:982
DataAtIntegrationPts
Definition: HookeElement.hpp:92