v0.10.0
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Example Struct Reference

[Example] More...

Collaboration diagram for Example:
[legend]

Classes

struct  CommonData
 [Example] More...
 
struct  OpCalcSurfaceAverageTemperature
 
struct  OpError
 
struct  OpFirst
 
struct  OpFluxRhs
 
struct  OpRadiationLhs
 
struct  OpRadiationRhs
 
struct  OpSecond
 [Operator] More...
 
struct  OpZero
 [Common data] More...
 

Public Member Functions

 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 [Run problem] More...
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 
 Example (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 

Private Member Functions

MoFEMErrorCode setupProblem ()
 [Run problem] More...
 
MoFEMErrorCode createCommonData ()
 [Set up problem] More...
 
MoFEMErrorCode bC ()
 [Create common data] More...
 
MoFEMErrorCode OPs ()
 [Boundary condition] More...
 
MoFEMErrorCode tsSolve ()
 [Push operators to pipeline] More...
 
MoFEMErrorCode postProcess ()
 [Solve] More...
 
MoFEMErrorCode checkResults ()
 [Postprocess results] More...
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode bC ()
 
MoFEMErrorCode OPs ()
 
MoFEMErrorCode tsSolve ()
 
MoFEMErrorCode postProcess ()
 
MoFEMErrorCode checkResults ()
 
template<int DIM>
Range getEntsOnMeshSkin ()
 [Check] More...
 
MoFEMErrorCode readMesh ()
 [Read mesh] More...
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode boundaryCondition ()
 [Set up problem] More...
 
MoFEMErrorCode assembleSystem ()
 [Applying essential BC] More...
 
MoFEMErrorCode solveSystem ()
 [Push operators to pipeline] More...
 
MoFEMErrorCode outputResults ()
 [Solve] More...
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode setUp ()
 [Run all] More...
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode setFieldValues ()
 [Create common data] More...
 
MoFEMErrorCode pushOperators ()
 [Set density distribution] More...
 
MoFEMErrorCode integrateElements ()
 [Push operators to pipeline] More...
 
MoFEMErrorCode postProcess ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 [Approximated function] More...
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode setIntegrationRules ()
 [Set up problem] More...
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 [Approximated function] More...
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode setIntegrationRules ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 [Approximated function] More...
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode setIntegrationRules ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode bC ()
 
MoFEMErrorCode OPs ()
 
MoFEMErrorCode kspSolve ()
 [Push operators to pipeline] More...
 
MoFEMErrorCode postProcess ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 
MoFEMErrorCode readMesh ()
 
MoFEMErrorCode setupProblem ()
 
MoFEMErrorCode createCommonData ()
 
MoFEMErrorCode boundaryCondition ()
 
MoFEMErrorCode assembleSystem ()
 
MoFEMErrorCode solveSystem ()
 
MoFEMErrorCode outputResults ()
 
MoFEMErrorCode checkResults ()
 

Static Private Member Functions

static double approxFunction (const double x, const double y, const double z)
 [Approximated function] More...
 
static double approxFunction (const double x, const double y, const double z)
 [Approximated function] More...
 
static double approxFunction (const double x, const double y, const double z)
 [Approximated function] More...
 
static int integrationRule (int, int, int p_data)
 

Private Attributes

MoFEM::InterfacemField
 
MatrixDouble invJac
 
boost::shared_ptr< PlasticOps::CommonDatacommonDataPtr
 
boost::shared_ptr< PostProcFaceOnRefinedMeshpostProcFe
 
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uXScatter
 
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uYScatter
 
MatrixDouble jAc
 
boost::shared_ptr< ContactOps::CommonDatacommonDataPtr
 
boost::shared_ptr< PostProcElepostProcFe
 
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uZScatter
 
SimplesimpleInterface
 
boost::shared_ptr< std::vector< bool > > boundaryMarker
 
boost::shared_ptr< CommonDatacommonDataPtr
 
MatrixDouble jAC
 
boost::shared_ptr< VectorDoubleapproxVals
 
boost::shared_ptr< MatrixDoubleapproxGradVals
 
boost::shared_ptr< MatrixDoublematGradPtr
 
boost::shared_ptr< MatrixDoublematStrainPtr
 
boost::shared_ptr< MatrixDoublematStressPtr
 
boost::shared_ptr< MatrixDoublematDPtr
 
boost::shared_ptr< MatrixDoublebodyForceMatPtr
 
SmartPetscObj< Mat > M
 
SmartPetscObj< Mat > K
 
SmartPetscObj< EPS > ePS
 
std::array< SmartPetscObj< Vec >, 6 > rigidBodyMotion
 
boost::shared_ptr< MatrixDoublematAccelerationPtr
 
boost::shared_ptr< MatrixDoublematInertiaPtr
 
boost::shared_ptr< MatrixDouble > matTangentPtr
 

Detailed Description

[Example]

Examples
contact.cpp, dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 113 of file plastic.cpp.

Constructor & Destructor Documentation

◆ Example() [1/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 115 of file plastic.cpp.

115 : mField(m_field) {}

◆ Example() [2/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 125 of file contact.cpp.

125 : mField(m_field) {}

◆ Example() [3/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 47 of file helmholtz.cpp.

47 : mField(m_field) {}

◆ Example() [4/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 39 of file integration.cpp.

39 : mField(m_field) {}

◆ Example() [5/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 49 of file mix_poisson.cpp.

49 : mField(m_field) {}

◆ Example() [6/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 53 of file heat_method.cpp.

53 : mField(m_field) {}

◆ Example() [7/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 42 of file approximaton.cpp.

42 : mField(m_field) {}

◆ Example() [8/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 57 of file radiation.cpp.

57 : mField(m_field) {}

◆ Example() [9/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 51 of file elastic.cpp.

51 : mField(m_field) {}

◆ Example() [10/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 70 of file eigen_elastic.cpp.

70 : mField(m_field) {}

◆ Example() [11/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 74 of file dynamic_elastic.cpp.

74 : mField(m_field) {}

◆ Example() [12/12]

Example::Example ( MoFEM::Interface m_field)

Definition at line 78 of file nonlinear_dynamic_elastic.cpp.

78 : mField(m_field) {}

Member Function Documentation

◆ approxFunction() [1/3]

static double Example::approxFunction ( const double  x,
const double  y,
const double  z 
)
staticprivate

[Approximated function]

Definition at line 61 of file mix_poisson.cpp.

61  {
62  return sin(x * 10.) * cos(y * 10.);
63  }

◆ approxFunction() [2/3]

static double Example::approxFunction ( const double  x,
const double  y,
const double  z 
)
staticprivate

[Approximated function]

Definition at line 65 of file heat_method.cpp.

65  {
66  return sin(x * 10.) * cos(y * 10.);
67  }

◆ approxFunction() [3/3]

static double Example::approxFunction ( const double  x,
const double  y,
const double  z 
)
staticprivate

[Approximated function]

Definition at line 51 of file approximaton.cpp.

51  {
52  return sin(x * 10.) * cos(y * 10.);
53  }

◆ assembleSystem() [1/8]

MoFEMErrorCode Example::assembleSystem ( )
private

[Applying essential BC]

[Boundary condition]

[Push operators to pipeline]

Examples
dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 161 of file helmholtz.cpp.

161  {
164 
165  double k = 90;
166  CHKERR PetscOptionsGetScalar(PETSC_NULL, "", "-k", &k, PETSC_NULL);
167 
168  auto beta = [](const double, const double, const double) { return -1; };
169  auto k2 = [k](const double, const double, const double) { return pow(k, 2); };
170  auto kp = [k](const double, const double, const double) { return k; };
171  auto km = [k](const double, const double, const double) { return -k; };
172  auto integration_rule = [](int, int, int p_data) { return 2 * p_data; };
173 
174  auto set_domain = [&]() {
176  pipeline_mng->getOpDomainLhsPipeline().push_back(
178  pipeline_mng->getOpDomainLhsPipeline().push_back(
180 
181  pipeline_mng->getOpDomainLhsPipeline().push_back(
182  new OpSetBc("U_REAL", true, boundaryMarker));
183 
184  pipeline_mng->getOpDomainLhsPipeline().push_back(
185  new OpDomainGradGrad("U_REAL", "U_REAL", beta));
186  pipeline_mng->getOpDomainLhsPipeline().push_back(
187  new OpDomainGradGrad("U_IMAG", "U_IMAG", beta));
188 
189  pipeline_mng->getOpDomainLhsPipeline().push_back(
190  new OpDomainMass("U_REAL", "U_REAL", k2));
191  pipeline_mng->getOpDomainLhsPipeline().push_back(
192  new OpDomainMass("U_IMAG", "U_IMAG", k2));
193 
194  pipeline_mng->getOpDomainLhsPipeline().push_back(new OpUnSetBc("U_REAL"));
195 
196  CHKERR pipeline_mng->setDomainRhsIntegrationRule(integration_rule);
197  CHKERR pipeline_mng->setDomainLhsIntegrationRule(integration_rule);
199  };
200 
201  auto set_boundary = [&]() {
203  pipeline_mng->getOpBoundaryLhsPipeline().push_back(
204  new OpSetBc("U_REAL", true, boundaryMarker));
205  pipeline_mng->getOpBoundaryLhsPipeline().push_back(
206  new OpBoundaryMass("U_IMAG", "U_REAL", kp));
207  pipeline_mng->getOpBoundaryLhsPipeline().push_back(
208  new OpBoundaryMass("U_REAL", "U_IMAG", km));
209  pipeline_mng->getOpBoundaryLhsPipeline().push_back(new OpUnSetBc("U_REAL"));
210 
211  pipeline_mng->getOpBoundaryLhsPipeline().push_back(
212  new OpSetBc("U_REAL", false, boundaryMarker));
213  pipeline_mng->getOpBoundaryLhsPipeline().push_back(
214  new OpBoundaryMass("U_REAL", "U_REAL", beta));
215  pipeline_mng->getOpBoundaryLhsPipeline().push_back(new OpUnSetBc("U_REAL"));
216 
217  pipeline_mng->getOpBoundaryRhsPipeline().push_back(
218  new OpSetBc("U_REAL", false, boundaryMarker));
219  pipeline_mng->getOpBoundaryRhsPipeline().push_back(
220  new OpBoundarySource("U_REAL", beta));
221  pipeline_mng->getOpBoundaryRhsPipeline().push_back(new OpUnSetBc("U_REAL"));
222 
223  CHKERR pipeline_mng->setDomainRhsIntegrationRule(integration_rule);
224  CHKERR pipeline_mng->setBoundaryLhsIntegrationRule(integration_rule);
226  };
227 
228  CHKERR set_domain();
229  CHKERR set_boundary();
230 
232 }

◆ assembleSystem() [2/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ assembleSystem() [3/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ assembleSystem() [4/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ assembleSystem() [5/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ assembleSystem() [6/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ assembleSystem() [7/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ assembleSystem() [8/8]

MoFEMErrorCode Example::assembleSystem ( )
private

◆ bC() [1/3]

MoFEMErrorCode Example::bC ( )
private

[Create common data]

[Boundary condition]

Examples
contact.cpp.

Definition at line 220 of file plastic.cpp.

220  {
222 
223  auto fix_disp = [&](const std::string blockset_name) {
224  Range fix_ents;
226  if (it->getName().compare(0, blockset_name.length(), blockset_name) ==
227  0) {
228  CHKERR mField.get_moab().get_entities_by_handle(it->meshset, fix_ents,
229  true);
230  }
231  }
232  return fix_ents;
233  };
234 
235  auto remove_ents = [&](const Range &&ents, const bool fix_x,
236  const bool fix_y) {
237  auto prb_mng = mField.getInterface<ProblemsManager>();
238  auto simple = mField.getInterface<Simple>();
240  Range verts;
241  CHKERR mField.get_moab().get_connectivity(ents, verts, true);
242  verts.merge(ents);
243  const int lo_coeff = fix_x ? 0 : 1;
244  const int hi_coeff = fix_y ? 1 : 0;
245  CHKERR prb_mng->removeDofsOnEntities(simple->getProblemName(), "U", verts,
246  lo_coeff, hi_coeff);
248  };
249 
250  CHKERR remove_ents(fix_disp("FIX_X"), true, false);
251  CHKERR remove_ents(fix_disp("FIX_Y"), false, true);
252  CHKERR remove_ents(fix_disp("FIX_ALL"), true, true);
253 
255 }

◆ bC() [2/3]

MoFEMErrorCode Example::bC ( )
private

◆ bC() [3/3]

MoFEMErrorCode Example::bC ( )
private

◆ boundaryCondition() [1/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

[Set up problem]

[Create common data]

[Applying essential BC]

[Boundary condition]

Examples
dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 113 of file helmholtz.cpp.

113  {
115 
116  auto get_ents_on_mesh_skin = [&]() {
117  Range boundary_entities;
119  std::string entity_name = it->getName();
120  if (entity_name.compare(0, 2, "BC") == 0) {
121  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 1,
122  boundary_entities, true);
123  }
124  }
125  // Add vertices to boundary entities
126  Range boundary_vertices;
127  CHKERR mField.get_moab().get_connectivity(boundary_entities,
128  boundary_vertices, true);
129  boundary_entities.merge(boundary_vertices);
130 
131  return boundary_entities;
132  };
133 
134  auto mark_boundary_dofs = [&](Range &&skin_edges) {
135  auto problem_manager = mField.getInterface<ProblemsManager>();
136  auto marker_ptr = boost::make_shared<std::vector<bool>>();
137  problem_manager->markDofs(simpleInterface->getProblemName(), ROW,
138  skin_edges, *marker_ptr);
139  return marker_ptr;
140  };
141 
142  auto remove_dofs_from_problem = [&](Range &&skin_edges) {
144  auto problem_manager = mField.getInterface<ProblemsManager>();
145  CHKERR problem_manager->removeDofsOnEntities(
146  simpleInterface->getProblemName(), "U_IMAG", skin_edges, 0, 1);
148  };
149 
150  // Get global local vector of marked DOFs. Is global, since is set for all
151  // DOFs on processor. Is local since only DOFs on processor are in the
152  // vector. To access DOFs use local indices.
153  boundaryMarker = mark_boundary_dofs(get_ents_on_mesh_skin());
154  CHKERR remove_dofs_from_problem(get_ents_on_mesh_skin());
155 
157 }

◆ boundaryCondition() [2/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ boundaryCondition() [3/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ boundaryCondition() [4/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ boundaryCondition() [5/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ boundaryCondition() [6/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ boundaryCondition() [7/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ boundaryCondition() [8/8]

MoFEMErrorCode Example::boundaryCondition ( )
private

◆ checkResults() [1/12]

MoFEMErrorCode Example::checkResults ( )
private

[Postprocess results]

[Print results]

[Check]

[Check results]

[Test example]

Examples
contact.cpp, dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 480 of file plastic.cpp.

480  {
483 }

◆ checkResults() [2/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [3/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [4/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [5/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [6/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [7/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [8/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [9/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [10/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [11/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ checkResults() [12/12]

MoFEMErrorCode Example::checkResults ( )
private

◆ createCommonData() [1/11]

MoFEMErrorCode Example::createCommonData ( )
private

[Set up problem]

[Set integration rule]

[Create common data]

Examples
contact.cpp, dynamic_elastic.cpp, and eigen_elastic.cpp.

Definition at line 169 of file plastic.cpp.

169  {
171 
172  auto set_matrial_stiffness = [&]() {
178  constexpr auto t_kd = FTensor::Kronecker_Delta_symmetric<int>();
179  constexpr double bulk_modulus_K =
180  young_modulus / (3 * (1 - 2 * poisson_ratio));
181  constexpr double shear_modulus_G =
182  young_modulus / (2 * (1 + poisson_ratio));
183 
184  // Plane stress or when 1, plane strain or 3d
185  constexpr double A =
186  (SPACE_DIM == 2) ? 2 * shear_modulus_G /
187  (bulk_modulus_K + (4. / 3.) * shear_modulus_G)
188  : 1;
189  auto t_D =
190  getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*commonDataPtr->mDPtr);
191  t_D(i, j, k, l) = 2 * shear_modulus_G * ((t_kd(i, k) ^ t_kd(j, l)) / 4.) +
192  A * (bulk_modulus_K - (2. / 3.) * shear_modulus_G) *
193  t_kd(i, j) * t_kd(k, l);
195  };
196 
197  commonDataPtr = boost::make_shared<PlasticOps::CommonData>();
198 
199  commonDataPtr->mDPtr = boost::make_shared<MatrixDouble>();
200  commonDataPtr->mDPtr->resize(9, 1);
201 
202  commonDataPtr->mGradPtr = boost::make_shared<MatrixDouble>();
203  commonDataPtr->mStrainPtr = boost::make_shared<MatrixDouble>();
204  commonDataPtr->mStressPtr = boost::make_shared<MatrixDouble>();
205 
206  commonDataPtr->plasticSurfacePtr = boost::make_shared<VectorDouble>();
207  commonDataPtr->plasticFlowPtr = boost::make_shared<MatrixDouble>();
208  commonDataPtr->plasticTauPtr = boost::make_shared<VectorDouble>();
209  commonDataPtr->plasticTauDotPtr = boost::make_shared<VectorDouble>();
210  commonDataPtr->plasticStrainPtr = boost::make_shared<MatrixDouble>();
211  commonDataPtr->plasticStrainDotPtr = boost::make_shared<MatrixDouble>();
212 
213  CHKERR set_matrial_stiffness();
214 
216 }

◆ createCommonData() [2/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [3/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [4/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [5/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [6/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [7/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [8/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [9/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [10/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ createCommonData() [11/11]

MoFEMErrorCode Example::createCommonData ( )
private

◆ getEntsOnMeshSkin()

template<int DIM>
Range Example::getEntsOnMeshSkin
private

[Check]

Examples
contact.cpp.

Definition at line 566 of file contact.cpp.

566  {
567  Range faces;
568  EntityType type = MBTRI;
569  if (DIM == 3)
570  type = MBTET;
571  CHKERR mField.get_moab().get_entities_by_type(0, type, faces);
572  Skinner skin(&mField.get_moab());
573  Range skin_ents;
574  CHKERR skin.find_skin(0, faces, false, skin_ents);
575  return skin_ents;
576 };

◆ integrateElements()

MoFEMErrorCode Example::integrateElements ( )
private

[Push operators to pipeline]

[Integrate]

Definition at line 232 of file integration.cpp.

232  {
234  // Zero global vector
235  CHKERR VecZeroEntries(commonDataPtr->petscVec);
236 
237  // Integrate elements by executing operators in the pipeline
239  CHKERR pipeline_mng->loopFiniteElements();
240 
241  // Assemble MPI vector
242  CHKERR VecAssemblyBegin(commonDataPtr->petscVec);
243  CHKERR VecAssemblyEnd(commonDataPtr->petscVec);
245 }

◆ integrationRule()

static int Example::integrationRule ( int  ,
int  ,
int  p_data 
)
staticprivate

Definition at line 64 of file radiation.cpp.

64 { return 2 * p_data; };

◆ kspSolve()

MoFEMErrorCode Example::kspSolve ( )
private

[Push operators to pipeline]

[Solve]

Definition at line 234 of file radiation.cpp.

234  {
238  auto ts = pipeline_mng->createTS();
239 
240  double ftime = 1;
241  CHKERR TSSetDuration(ts, PETSC_DEFAULT, ftime);
242  CHKERR TSSetFromOptions(ts);
243  CHKERR TSSetExactFinalTime(ts, TS_EXACTFINALTIME_MATCHSTEP);
244 
245  auto T = smartCreateDMVector(simple->getDM());
246  CHKERR DMoFEMMeshToLocalVector(simple->getDM(), T, INSERT_VALUES,
247  SCATTER_FORWARD);
248 
249  CHKERR TSSolve(ts, T);
250  CHKERR TSGetTime(ts, &ftime);
251 
252  PetscInt steps, snesfails, rejects, nonlinits, linits;
253  CHKERR TSGetTimeStepNumber(ts, &steps);
254  CHKERR TSGetSNESFailures(ts, &snesfails);
255  CHKERR TSGetStepRejections(ts, &rejects);
256  CHKERR TSGetSNESIterations(ts, &nonlinits);
257  CHKERR TSGetKSPIterations(ts, &linits);
258  MOFEM_LOG_C("EXAMPLE", Sev::inform,
259  "steps %d (%d rejected, %d SNES fails), ftime %g, nonlinits "
260  "%d, linits %d",
261  steps, rejects, snesfails, ftime, nonlinits, linits);
262 
264 }

◆ OPs() [1/3]

MoFEMErrorCode Example::OPs ( )
private

[Boundary condition]

[Push operators to pipeline]

Examples
contact.cpp.

Definition at line 259 of file plastic.cpp.

259  {
262 
263  auto add_domain_base_ops = [&](auto &pipeline) {
264  pipeline.push_back(new OpCalculateInvJacForFace(invJac));
265  pipeline.push_back(new OpSetInvJacH1ForFace(invJac));
266 
268  "U", commonDataPtr->mGradPtr));
269  pipeline.push_back(new OpSymmetrizeTensor<SPACE_DIM>(
270  "U", commonDataPtr->mGradPtr, commonDataPtr->mStrainPtr));
271 
272  pipeline.push_back(new OpCalculateScalarFieldValues(
273  "TAU", commonDataPtr->plasticTauPtr, MBTRI));
274  pipeline.push_back(new OpCalculateScalarFieldValuesDot(
275  "TAU", commonDataPtr->plasticTauDotPtr, MBTRI));
276 
277  pipeline.push_back(new OpCalculateTensor2SymmetricFieldValues<2>(
278  "EP", commonDataPtr->plasticStrainPtr, MBTRI));
279  pipeline.push_back(new OpCalculateTensor2SymmetricFieldValuesDot<2>(
280  "EP", commonDataPtr->plasticStrainDotPtr, MBTRI));
281 
282  pipeline.push_back(new OpPlasticStress("U", commonDataPtr));
283  pipeline.push_back(new OpCalculatePlasticSurface("U", commonDataPtr));
284  };
285 
286  auto add_domain_ops_lhs = [&](auto &pipeline) {
287  pipeline.push_back(new OpKCauchy("U", "U", commonDataPtr->mDPtr));
288 
289  pipeline.push_back(
291 
292  pipeline.push_back(
294  pipeline.push_back(
296  pipeline.push_back(
298 
299  pipeline.push_back(
300  new OpCalculateContrainsLhs_dU("TAU", "U", commonDataPtr));
301  pipeline.push_back(
302  new OpCalculateContrainsLhs_dEP("TAU", "EP", commonDataPtr));
303  pipeline.push_back(
304  new OpCalculateContrainsLhs_dTAU("TAU", "TAU", commonDataPtr));
305  };
306 
307  auto add_domain_ops_rhs = [&](auto &pipeline) {
308  // auto get_body_force = [this](const double, const double, const double) {
309  // auto *pipeline_mng = mField.getInterface<PipelineManager>();
310  // FTensor::Index<'i', SPACE_DIM> i;
311  // FTensor::Tensor1<double, SPACE_DIM> t_source;
312  // auto fe_domain_rhs = pipeline_mng->getDomainRhsFE();
313  // const auto time = fe_domain_rhs->ts_t;
314 
315  // // hardcoded gravity load
316  // t_source(i) = 0;
317  // t_source(1) = 1.0 * time;
318  // return t_source;
319  // };
320 
321  // pipeline.push_back(new OpBodyForce("U", get_body_force));
322 
323  // Calculate internal forece
324  pipeline.push_back(
325  new OpInternalForceCauchy("U", commonDataPtr->mStressPtr));
326 
327  pipeline.push_back(new OpCalculatePlasticFlowRhs("EP", commonDataPtr));
328  pipeline.push_back(new OpCalculateContrainsRhs("TAU", commonDataPtr));
329  };
330 
331  auto add_boundary_ops_rhs = [&](auto &pipeline) {
333 
335  if (it->getName().compare(0, 5, "FORCE") == 0) {
336  Range my_edges;
337  std::vector<double> force_vec;
338  CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 1,
339  my_edges, true);
340  it->getAttributes(force_vec);
341  pipeline.push_back(new OpEdgeForceRhs("U", my_edges, force_vec));
342  }
343  }
344 
346  };
347 
348  add_domain_base_ops(pipeline_mng->getOpDomainLhsPipeline());
349  add_domain_ops_lhs(pipeline_mng->getOpDomainLhsPipeline());
350 
351  add_domain_base_ops(pipeline_mng->getOpDomainRhsPipeline());
352  add_domain_ops_rhs(pipeline_mng->getOpDomainRhsPipeline());
353  add_boundary_ops_rhs(pipeline_mng->getOpBoundaryRhsPipeline());
354 
355  auto integration_rule = [](int, int, int approx_order) {
356  return 2 * approx_order;
357  };
358  CHKERR pipeline_mng->setDomainRhsIntegrationRule(integration_rule);
359  CHKERR pipeline_mng->setDomainLhsIntegrationRule(integration_rule);
360  CHKERR pipeline_mng->setBoundaryRhsIntegrationRule(integration_rule);
361 
363 }

◆ OPs() [2/3]

MoFEMErrorCode Example::OPs ( )
private

◆ OPs() [3/3]

MoFEMErrorCode Example::OPs ( )
private

◆ outputResults() [1/8]

MoFEMErrorCode Example::outputResults ( )
private

[Solve]

[Postprocess results]

Examples
dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 256 of file helmholtz.cpp.

256  {
259  pipeline_mng->getDomainLhsFE().reset();
260  pipeline_mng->getDomainRhsFE().reset();
261  pipeline_mng->getBoundaryLhsFE().reset();
262  pipeline_mng->getBoundaryRhsFE().reset();
263  auto post_proc_fe = boost::make_shared<PostProcFaceOnRefinedMesh>(mField);
264  post_proc_fe->generateReferenceElementMesh();
265  post_proc_fe->addFieldValuesPostProc("U_REAL");
266  post_proc_fe->addFieldValuesPostProc("U_IMAG");
267  pipeline_mng->getDomainRhsFE() = post_proc_fe;
268  CHKERR pipeline_mng->loopFiniteElements();
269  CHKERR post_proc_fe->writeFile("out_helmholtz.h5m");
271 }

◆ outputResults() [2/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ outputResults() [3/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ outputResults() [4/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ outputResults() [5/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ outputResults() [6/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ outputResults() [7/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ outputResults() [8/8]

MoFEMErrorCode Example::outputResults ( )
private

◆ postProcess() [1/4]

MoFEMErrorCode Example::postProcess ( )
private

[Solve]

[Integrate]

[Postprocess results]

[Print results]

Examples
contact.cpp.

Definition at line 472 of file plastic.cpp.

472  {
474 
476 }

◆ postProcess() [2/4]

MoFEMErrorCode Example::postProcess ( )
private

◆ postProcess() [3/4]

MoFEMErrorCode Example::postProcess ( )
private

◆ postProcess() [4/4]

MoFEMErrorCode Example::postProcess ( )
private

◆ pushOperators()

MoFEMErrorCode Example::pushOperators ( )
private

[Set density distribution]

[Push operators to pipeline]

Definition at line 202 of file integration.cpp.

202  {
205 
206  // Push an operator which calculates values of density at integration points
207  pipeline_mng->getOpDomainRhsPipeline().push_back(
209  "rho", commonDataPtr->getRhoAtIntegrationPtsPtr()));
210 
211  // Push an operator to pipeline to calculate zero moment of inertia (mass)
212  pipeline_mng->getOpDomainRhsPipeline().push_back(new OpZero(commonDataPtr));
213 
214  // Push an operator to the pipeline to calculate first moment of inertaia
215  pipeline_mng->getOpDomainRhsPipeline().push_back(new OpFirst(commonDataPtr));
216 
217  // Push an operator to the pipeline to calculate second moment of inertaia
218  pipeline_mng->getOpDomainRhsPipeline().push_back(new OpSecond(commonDataPtr));
219 
220  // Set integration rule. Integration rule is equal to the polynomial order of
221  // the density field plus 2, since under the integral of the second moment of
222  // inertia term x*x is present
223  auto integration_rule = [](int, int, int p_data) { return p_data + 2; };
224 
225  // Add integration rule to the element
226  CHKERR pipeline_mng->setDomainRhsIntegrationRule(integration_rule);
228 }

◆ readMesh() [1/8]

MoFEMErrorCode Example::readMesh ( )
private

[Read mesh]

[Run problem]

[Run programme]

[Read mesh]

Examples
dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 80 of file helmholtz.cpp.

◆ readMesh() [2/8]

MoFEMErrorCode Example::readMesh ( )
private

[Approximated function]

◆ readMesh() [3/8]

MoFEMErrorCode Example::readMesh ( )
private

[Approximated function]

◆ readMesh() [4/8]

MoFEMErrorCode Example::readMesh ( )
private

[Approximated function]

◆ readMesh() [5/8]

MoFEMErrorCode Example::readMesh ( )
private

◆ readMesh() [6/8]

MoFEMErrorCode Example::readMesh ( )
private

◆ readMesh() [7/8]

MoFEMErrorCode Example::readMesh ( )
private

◆ readMesh() [8/8]

MoFEMErrorCode Example::readMesh ( )
private

◆ runProblem() [1/12]

MoFEMErrorCode Example::runProblem ( )

[Run problem]

[Create common data]

[Run programme]

[Operator]

[Run all]

[Run problem]

Examples
contact.cpp, dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 138 of file plastic.cpp.

138  {
142  CHKERR bC();
143  CHKERR OPs();
144  CHKERR tsSolve();
148 }

◆ runProblem() [2/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [3/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [4/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [5/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [6/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [7/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [8/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [9/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [10/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [11/12]

MoFEMErrorCode Example::runProblem ( )

◆ runProblem() [12/12]

MoFEMErrorCode Example::runProblem ( )

◆ setFieldValues()

MoFEMErrorCode Example::setFieldValues ( )
private

[Create common data]

[Set density distribution]

Definition at line 186 of file integration.cpp.

186  {
188  auto set_density = [&](VectorAdaptor &&field_data, double *xcoord,
189  double *ycoord, double *zcoord) {
191  field_data[0] = 1;
193  };
194  FieldBlas *field_blas;
195  CHKERR mField.getInterface(field_blas);
196  CHKERR field_blas->setVertexDofs(set_density, "rho");
198 }

◆ setIntegrationRules() [1/3]

MoFEMErrorCode Example::setIntegrationRules ( )
private

[Set up problem]

[Set integration rule]

Definition at line 125 of file mix_poisson.cpp.

125  {
127 
128  auto rule = [](int, int, int p) -> int { return 2 * p + 1; };
129 
131  CHKERR pipeline_mng->setDomainLhsIntegrationRule(rule);
132  CHKERR pipeline_mng->setDomainRhsIntegrationRule(rule);
133 
135 }

◆ setIntegrationRules() [2/3]

MoFEMErrorCode Example::setIntegrationRules ( )
private

◆ setIntegrationRules() [3/3]

MoFEMErrorCode Example::setIntegrationRules ( )
private

◆ setUp()

MoFEMErrorCode Example::setUp ( )
private

[Run all]

[Set up problem]

Definition at line 151 of file integration.cpp.

151  {
154  CHKERR simple->getOptions();
155  CHKERR simple->loadFile();
156  // Add field
157  CHKERR simple->addDomainField("rho", H1, AINSWORTH_LEGENDRE_BASE, 1);
158  constexpr int order = 1;
159  CHKERR simple->setFieldOrder("rho", order);
160  CHKERR simple->setUp();
162 }

◆ setupProblem() [1/11]

MoFEMErrorCode Example::setupProblem ( )
private

[Run problem]

[Read mesh]

[Set up problem]

Examples
contact.cpp, dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 152 of file plastic.cpp.

152  {
155  // Add field
156  CHKERR simple->addDomainField("U", H1, AINSWORTH_LEGENDRE_BASE, 2);
157  CHKERR simple->addDomainField("TAU", L2, AINSWORTH_LEGENDRE_BASE, 1);
158  CHKERR simple->addDomainField("EP", L2, AINSWORTH_LEGENDRE_BASE, 3);
159  CHKERR simple->addBoundaryField("U", H1, AINSWORTH_LEGENDRE_BASE, 2);
160  CHKERR simple->setFieldOrder("U", order);
161  CHKERR simple->setFieldOrder("TAU", order - 1);
162  CHKERR simple->setFieldOrder("EP", order - 1);
163  CHKERR simple->setUp();
165 }

◆ setupProblem() [2/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [3/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [4/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [5/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [6/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [7/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [8/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [9/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [10/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ setupProblem() [11/11]

MoFEMErrorCode Example::setupProblem ( )
private

◆ solveSystem() [1/8]

MoFEMErrorCode Example::solveSystem ( )
private

[Push operators to pipeline]

[Solve]

Examples
dynamic_elastic.cpp, eigen_elastic.cpp, and helmholtz.cpp.

Definition at line 236 of file helmholtz.cpp.

236  {
239  auto solver = pipeline_mng->createKSP();
240  CHKERR KSPSetFromOptions(solver);
241  CHKERR KSPSetUp(solver);
242 
243  auto dm = simpleInterface->getDM();
244  auto D = smartCreateDMVector(dm);
245  auto F = smartVectorDuplicate(D);
246 
247  CHKERR KSPSolve(solver, F, D);
248  CHKERR VecGhostUpdateBegin(D, INSERT_VALUES, SCATTER_FORWARD);
249  CHKERR VecGhostUpdateEnd(D, INSERT_VALUES, SCATTER_FORWARD);
250  CHKERR DMoFEMMeshToLocalVector(dm, D, INSERT_VALUES, SCATTER_REVERSE);
252 }

◆ solveSystem() [2/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ solveSystem() [3/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ solveSystem() [4/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ solveSystem() [5/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ solveSystem() [6/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ solveSystem() [7/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ solveSystem() [8/8]

MoFEMErrorCode Example::solveSystem ( )
private

◆ tsSolve() [1/2]

MoFEMErrorCode Example::tsSolve ( )
private

[Push operators to pipeline]

[Solve]

Examples
contact.cpp.

Definition at line 367 of file plastic.cpp.

367  {
369 
372  ISManager *is_manager = mField.getInterface<ISManager>();
373 
374  auto solver = pipeline_mng->createTS();
375 
376  auto dm = simple->getDM();
377  auto D = smartCreateDMVector(dm);
378 
379  CHKERR TSSetSolution(solver, D);
380  CHKERR TSSetFromOptions(solver);
381  CHKERR TSSetUp(solver);
382 
383  auto set_section_monitor = [&]() {
385  SNES snes;
386  CHKERR TSGetSNES(solver, &snes);
387  PetscViewerAndFormat *vf;
388  CHKERR PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,
389  PETSC_VIEWER_DEFAULT, &vf);
390  CHKERR SNESMonitorSet(
391  snes,
392  (MoFEMErrorCode(*)(SNES, PetscInt, PetscReal, void *))SNESMonitorFields,
393  vf, (MoFEMErrorCode(*)(void **))PetscViewerAndFormatDestroy);
395  };
396 
397  auto create_post_process_element = [&]() {
399  postProcFe = boost::make_shared<PostProcFaceOnRefinedMesh>(mField);
400  postProcFe->generateReferenceElementMesh();
401 
402  postProcFe->getOpPtrVector().push_back(
404  postProcFe->getOpPtrVector().push_back(new OpSetInvJacH1ForFace(invJac));
405  postProcFe->getOpPtrVector().push_back(
407  postProcFe->getOpPtrVector().push_back(new OpSymmetrizeTensor<SPACE_DIM>(
408  "U", commonDataPtr->mGradPtr, commonDataPtr->mStrainPtr));
409 
410  postProcFe->getOpPtrVector().push_back(new OpCalculateScalarFieldValues(
411  "TAU", commonDataPtr->plasticTauPtr, MBTRI));
412  postProcFe->getOpPtrVector().push_back(
414  "EP", commonDataPtr->plasticStrainPtr, MBTRI));
415  postProcFe->getOpPtrVector().push_back(
416  new OpPlasticStress("U", commonDataPtr));
417  postProcFe->getOpPtrVector().push_back(
419 
420  postProcFe->getOpPtrVector().push_back(
422  "U", postProcFe->postProcMesh, postProcFe->mapGaussPts,
423  commonDataPtr->mStrainPtr, commonDataPtr->mStressPtr));
424 
425  postProcFe->getOpPtrVector().push_back(new OpPostProcPlastic(
426  "U", postProcFe->postProcMesh, postProcFe->mapGaussPts, commonDataPtr));
427  postProcFe->addFieldValuesPostProc("U");
429  };
430 
431  auto scatter_create = [&](auto coeff) {
433  CHKERR is_manager->isCreateProblemFieldAndRank(simple->getProblemName(),
434  ROW, "U", coeff, coeff, is);
435  int loc_size;
436  CHKERR ISGetLocalSize(is, &loc_size);
437  Vec v;
438  CHKERR VecCreateMPI(mField.get_comm(), loc_size, PETSC_DETERMINE, &v);
439  VecScatter scatter;
440  CHKERR VecScatterCreate(D, is, v, PETSC_NULL, &scatter);
441  return std::make_tuple(SmartPetscObj<Vec>(v),
442  SmartPetscObj<VecScatter>(scatter));
443  };
444 
445  auto set_time_monitor = [&]() {
447  boost::shared_ptr<Monitor> monitor_ptr(
449  boost::shared_ptr<ForcesAndSourcesCore> null;
450  CHKERR DMMoFEMTSSetMonitor(dm, solver, simple->getDomainFEName(),
451  monitor_ptr, null, null);
453  };
454 
455  CHKERR set_section_monitor();
456  CHKERR create_post_process_element();
457  uXScatter = scatter_create(0);
458  uYScatter = scatter_create(1);
459  CHKERR set_time_monitor();
460 
461  CHKERR TSSolve(solver, D);
462 
463  CHKERR VecGhostUpdateBegin(D, INSERT_VALUES, SCATTER_FORWARD);
464  CHKERR VecGhostUpdateEnd(D, INSERT_VALUES, SCATTER_FORWARD);
465  CHKERR DMoFEMMeshToLocalVector(dm, D, INSERT_VALUES, SCATTER_REVERSE);
466 
468 }

◆ tsSolve() [2/2]

MoFEMErrorCode Example::tsSolve ( )
private

Member Data Documentation

◆ approxGradVals

boost::shared_ptr<MatrixDouble> Example::approxGradVals
private

Definition at line 76 of file radiation.cpp.

◆ approxVals

boost::shared_ptr<VectorDouble> Example::approxVals
private

Definition at line 75 of file radiation.cpp.

◆ bodyForceMatPtr

boost::shared_ptr<MatrixDouble> Example::bodyForceMatPtr
private

Definition at line 72 of file elastic.cpp.

◆ boundaryMarker

boost::shared_ptr<std::vector<bool> > Example::boundaryMarker
private

Definition at line 54 of file helmholtz.cpp.

◆ commonDataPtr [1/3]

boost::shared_ptr< CommonData > Example::commonDataPtr
private

Definition at line 131 of file plastic.cpp.

◆ commonDataPtr [2/3]

boost::shared_ptr<ContactOps::CommonData> Example::commonDataPtr
private

Definition at line 141 of file contact.cpp.

◆ commonDataPtr [3/3]

boost::shared_ptr<CommonData> Example::commonDataPtr
private

Definition at line 56 of file integration.cpp.

◆ ePS

SmartPetscObj<EPS> Example::ePS
private

Definition at line 94 of file eigen_elastic.cpp.

◆ invJac

MatrixDouble Example::invJac
private

Definition at line 130 of file plastic.cpp.

◆ jAc

MatrixDouble Example::jAc
private

Definition at line 140 of file contact.cpp.

◆ jAC

MatrixDouble Example::jAC
private

Definition at line 58 of file mix_poisson.cpp.

◆ K

SmartPetscObj<Mat> Example::K
private

Definition at line 93 of file eigen_elastic.cpp.

◆ M

SmartPetscObj<Mat> Example::M
private

Definition at line 92 of file eigen_elastic.cpp.

◆ matAccelerationPtr

boost::shared_ptr< MatrixDouble > Example::matAccelerationPtr
private

Definition at line 94 of file dynamic_elastic.cpp.

◆ matDPtr

boost::shared_ptr< MatrixDouble > Example::matDPtr
private

Definition at line 71 of file elastic.cpp.

◆ matGradPtr

boost::shared_ptr< MatrixDouble > Example::matGradPtr
private

Definition at line 68 of file elastic.cpp.

◆ matInertiaPtr

boost::shared_ptr< MatrixDouble > Example::matInertiaPtr
private

Definition at line 95 of file dynamic_elastic.cpp.

◆ matStrainPtr

boost::shared_ptr< MatrixDouble > Example::matStrainPtr
private

Definition at line 69 of file elastic.cpp.

◆ matStressPtr

boost::shared_ptr< MatrixDouble > Example::matStressPtr
private

Definition at line 70 of file elastic.cpp.

◆ matTangentPtr

boost::shared_ptr<MatrixDouble> Example::matTangentPtr
private

Definition at line 102 of file nonlinear_dynamic_elastic.cpp.

◆ mField

MoFEM::Interface & Example::mField
private

Definition at line 120 of file plastic.cpp.

◆ postProcFe [1/2]

boost::shared_ptr<PostProcFaceOnRefinedMesh> Example::postProcFe
private

Definition at line 132 of file plastic.cpp.

◆ postProcFe [2/2]

boost::shared_ptr<PostProcEle> Example::postProcFe
private

Definition at line 142 of file contact.cpp.

◆ rigidBodyMotion

std::array<SmartPetscObj<Vec>, 6> Example::rigidBodyMotion
private

Definition at line 96 of file eigen_elastic.cpp.

◆ simpleInterface

Simple * Example::simpleInterface
private

Definition at line 53 of file helmholtz.cpp.

◆ uXScatter

std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > Example::uXScatter
private

Definition at line 133 of file plastic.cpp.

◆ uYScatter

std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > Example::uYScatter
private

Definition at line 134 of file plastic.cpp.

◆ uZScatter

std::tuple<SmartPetscObj<Vec>, SmartPetscObj<VecScatter> > Example::uZScatter
private

Definition at line 145 of file contact.cpp.


The documentation for this struct was generated from the following files:
MoFEM::PipelineManager::getBoundaryRhsFE
boost::shared_ptr< FEMethod > & getBoundaryRhsFE()
Definition: PipelineManager.hpp:287
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
PlasticOps::OpCalculatePlasticFlowLhs_dEP
Definition: PlasticOps.hpp:143
MoFEM::FieldBlas::setVertexDofs
MoFEMErrorCode setVertexDofs(VertexCoordsFunction lambda, const std::string field_name, Range *verts=nullptr)
Set DOFs on vertices using user function.
Definition: FieldBlas.cpp:175
MoFEM::OpCalculateScalarFieldValues
Get value at integration points for scalar field.
Definition: UserDataOperators.hpp:85
shear_modulus_G
constexpr double shear_modulus_G
Definition: elastic.cpp:44
MoFEM::PipelineManager::setBoundaryLhsIntegrationRule
MoFEMErrorCode setBoundaryLhsIntegrationRule(RuleHookFun rule)
Definition: PipelineManager.hpp:346
H1
@ H1
continuous field
Definition: definitions.h:177
PlasticOps::Monitor
Definition: PlasticOps.hpp:1230
poisson_ratio
constexpr double poisson_ratio
Definition: plastic.cpp:101
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
MoFEM::Simple::loadFile
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name)
Load mesh file.
Definition: Simple.cpp:212
OpEdgeForceRhs
Definition: plastic.cpp:61
MoFEM::PipelineManager::getOpBoundaryRhsPipeline
boost::ptr_vector< UserDataOperator > & getOpBoundaryRhsPipeline()
Get the Op Boundary Rhs Pipeline object.
Definition: PipelineManager.hpp:523
MoFEM::OpCalculateInvJacForFace
Calculate inverse of jacobian for face element.
Definition: UserDataOperators.hpp:1889
L2
@ L2
field with C-1 continuity
Definition: definitions.h:180
bulk_modulus_K
constexpr double bulk_modulus_K
Definition: elastic.cpp:43
MoFEM::PipelineManager::loopFiniteElements
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
Definition: PipelineManager.cpp:38
Example::uYScatter
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uYScatter
Definition: plastic.cpp:134
Example::invJac
MatrixDouble invJac
Definition: plastic.cpp:130
FTensor::Kronecker_Delta_symmetric
Kronecker Delta class symmetric.
Definition: Kronecker_Delta.hpp:49
OpKCauchy
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 > OpKCauchy
[Body force]
Definition: plastic.cpp:80
OpDomainGradGrad
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradGrad< 1, 1, 2 > OpDomainGradGrad
Definition: helmholtz.cpp:37
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
PlasticOps::OpCalculatePlasticFlowLhs_dTAU
Definition: PlasticOps.hpp:156
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:36
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:70
PlasticOps::OpPostProcPlastic
Definition: PlasticOps.hpp:208
MoFEM::PipelineManager::getOpBoundaryLhsPipeline
boost::ptr_vector< UserDataOperator > & getOpBoundaryLhsPipeline()
Get the Op Boundary Lhs Pipeline object.
Definition: PipelineManager.hpp:499
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::OpSymmetrizeTensor
Definition: UserDataOperators.hpp:1264
ROW
@ ROW
Definition: definitions.h:192
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:315
approx_order
static constexpr int approx_order
Definition: prism_polynomial_approximation.cpp:26
MoFEM::PipelineManager
PipelineManager interface.
Definition: PipelineManager.hpp:36
MoFEM::PipelineManager::getDomainRhsFE
boost::shared_ptr< FEMethod > & getDomainRhsFE()
Definition: PipelineManager.hpp:283
MoFEM::PipelineManager::getDomainLhsFE
boost::shared_ptr< FEMethod > & getDomainLhsFE()
Definition: PipelineManager.hpp:281
Example::setupProblem
MoFEMErrorCode setupProblem()
[Run problem]
Definition: plastic.cpp:152
MoFEM::Simple::getDM
MoFEMErrorCode getDM(DM *dm)
Get DM.
Definition: Simple.cpp:706
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:604
MoFEM::PetscOptionsGetScalar
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
Definition: DeprecatedPetsc.hpp:173
Example::mField
MoFEM::Interface & mField
Definition: plastic.cpp:120
MoFEM::OpCalculateTensor2SymmetricFieldValuesDot
Calculate symmetric tensor field rates ant integratio pts.
Definition: UserDataOperators.hpp:776
PlasticOps::OpPlasticStress
Definition: PlasticOps.hpp:90
T
SPACE_DIM
constexpr int SPACE_DIM
Definition: plastic.cpp:50
MoFEM::Simple::getOptions
MoFEMErrorCode getOptions()
get options
Definition: Simple.cpp:198
Example::checkResults
MoFEMErrorCode checkResults()
[Postprocess results]
Definition: plastic.cpp:480
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
double
MoFEM::Types::VectorAdaptor
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition: Types.hpp:109
convert.type
type
Definition: convert.py:66
OpBoundarySource
FormsIntegrators< EdgeEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, 1 > OpBoundarySource
Definition: helmholtz.cpp:43
MoFEM::smartCreateDMVector
auto smartCreateDMVector
Get smart vector from DM.
Definition: DMMoFEM.hpp:939
MoFEM::OpUnSetBc
Definition: FormsIntegrators.hpp:51
Example::uXScatter
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uXScatter
Definition: plastic.cpp:133
PlasticOps::OpCalculatePlasticFlowLhs_dU
Definition: PlasticOps.hpp:130
MoFEM::smartVectorDuplicate
SmartPetscObj< Vec > smartVectorDuplicate(SmartPetscObj< Vec > &vec)
Create duplicate vector of smart vector.
Definition: PetscSmartObj.hpp:193
FTensor::Index< 'i', SPACE_DIM >
MoFEM::PipelineManager::createKSP
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
Definition: PipelineManager.cpp:70
MoFEM::OpCalculateTensor2SymmetricFieldValues
Calculate symmetric tensor field values at integration pts.
Definition: UserDataOperators.hpp:714
StdRDOperators::order
const int order
Definition: rd_stdOperators.hpp:28
MoFEM::SmartPetscObj< IS >
MoFEM::ProblemsManager
Problem manager is used to build and partition problems.
Definition: ProblemsManager.hpp:34
PlasticOps::OpCalculatePlasticFlowRhs
Definition: PlasticOps.hpp:99
MoFEM::OpSetInvJacH1ForFace
Definition: UserDataOperators.hpp:1922
young_modulus
constexpr double young_modulus
Definition: plastic.cpp:100
MoFEM::Simple::getProblemName
const std::string getProblemName() const
Get the Problem Name.
Definition: Simple.hpp:302
MoFEM::PipelineManager::getOpDomainLhsPipeline
boost::ptr_vector< UserDataOperator > & getOpDomainLhsPipeline()
Get the Op Domain Lhs Pipeline object.
Definition: PipelineManager.hpp:451
Example::createCommonData
MoFEMErrorCode createCommonData()
[Set up problem]
Definition: plastic.cpp:169
MoFEM::ISManager
Section manager is used to create indexes and sections.
Definition: ISManager.hpp:36
Example::postProcess
MoFEMErrorCode postProcess()
[Solve]
Definition: plastic.cpp:472
MoFEM::PipelineManager::setDomainLhsIntegrationRule
MoFEMErrorCode setDomainLhsIntegrationRule(RuleHookFun rule)
Definition: PipelineManager.hpp:294
PlasticOps::OpCalculateContrainsLhs_dU
Definition: PlasticOps.hpp:169
MoFEM::OpSetBc
Set indices on entities on finite element.
Definition: FormsIntegrators.hpp:40
MoFEM::PipelineManager::getBoundaryLhsFE
boost::shared_ptr< FEMethod > & getBoundaryLhsFE()
Definition: PipelineManager.hpp:285
PlasticOps::OpCalculateContrainsRhs
Definition: PlasticOps.hpp:108
_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
MoFEM::PipelineManager::setDomainRhsIntegrationRule
MoFEMErrorCode setDomainRhsIntegrationRule(RuleHookFun rule)
Definition: PipelineManager.hpp:320
Example::boundaryMarker
boost::shared_ptr< std::vector< bool > > boundaryMarker
Definition: helmholtz.cpp:54
PlasticOps::OpCalculatePlasticSurface
[Operators definitions]
Definition: PlasticOps.hpp:81
BLOCKSET
@ BLOCKSET
Definition: definitions.h:217
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
Example::tsSolve
MoFEMErrorCode tsSolve()
[Push operators to pipeline]
Definition: plastic.cpp:367
MoFEM::PipelineManager::createTS
SmartPetscObj< TS > createTS(SmartPetscObj< DM > dm=nullptr)
Create TS (time) solver.
Definition: PipelineManager.cpp:190
AINSWORTH_LEGENDRE_BASE
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:152
Example::bC
MoFEMErrorCode bC()
[Create common data]
Definition: plastic.cpp:220
Tutorial::OpPostProcElastic
[Class definition]
Definition: OpPostProcElastic.hpp:26
MoFEM::ProblemsManager::markDofs
MoFEMErrorCode markDofs(const std::string problem_name, RowColData rc, const Range ents, std::vector< bool > &marker)
Create vector with marked indices.
Definition: ProblemsManager.cpp:3078
Example::OPs
MoFEMErrorCode OPs()
[Boundary condition]
Definition: plastic.cpp:259
Example::commonDataPtr
boost::shared_ptr< PlasticOps::CommonData > commonDataPtr
Definition: plastic.cpp:131
OpInternalForceCauchy
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesSymTensor< 1, SPACE_DIM, SPACE_DIM > OpInternalForceCauchy
Definition: plastic.cpp:82
order
constexpr int order
Definition: plastic.cpp:105
MoFEM::PipelineManager::getOpDomainRhsPipeline
boost::ptr_vector< UserDataOperator > & getOpDomainRhsPipeline()
Get the Op Domain Rhs Pipeline object.
Definition: PipelineManager.hpp:475
Example::postProcFe
boost::shared_ptr< PostProcFaceOnRefinedMesh > postProcFe
Definition: plastic.cpp:132
MoFEM::DMMoFEMTSSetMonitor
PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, 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 Monitor To TS solver.
Definition: DMMMoFEM.cpp:915
MoFEM::FieldBlas
Basic algebra on fields.
Definition: FieldBlas.hpp:34
Example::simpleInterface
Simple * simpleInterface
Definition: helmholtz.cpp:53
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
i
FTensor::Index< 'i', 3 > i
Definition: matrix_function.cpp:18
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
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
PlasticOps::OpCalculatePlasticInternalForceLhs_dEP
Definition: PlasticOps.hpp:117
PlasticOps::OpCalculateContrainsLhs_dTAU
Definition: PlasticOps.hpp:195
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
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
MoFEM::OpCalculateScalarFieldValuesDot
Get rate of scalar field at integration points.
Definition: UserDataOperators.hpp:135
OpDomainMass
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 > OpDomainMass
Definition: helmholtz.cpp:39
MoFEM::OpCalculateVectorFieldGradient
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
Definition: UserDataOperators.hpp:1091
OpBoundaryMass
FormsIntegrators< EdgeEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 > OpBoundaryMass
Definition: helmholtz.cpp:41
MoFEM::PipelineManager::setBoundaryRhsIntegrationRule
MoFEMErrorCode setBoundaryRhsIntegrationRule(RuleHookFun rule)
Definition: PipelineManager.hpp:372
PlasticOps::OpCalculateContrainsLhs_dEP
Definition: PlasticOps.hpp:182
ReactionDiffusionEquation::D
const double D
diffusivity
Definition: reaction_diffusion.cpp:32