9#ifndef __NONLINEARELEMENTINTERFACE_HPP__
10#define __NONLINEARELEMENTINTERFACE_HPP__
27 PostProcBrokenMeshInMoab<VolumeElementForcesAndSourcesCore>>
35 string mesh_posi_field_name =
"MESH_NODE_POSITIONS",
36 bool is_displacement_field =
true,
53 CHKERR PetscOptionsGetInt(PETSC_NULLPTR,
"-order", &
oRder, PETSC_NULLPTR);
120 CHKERR DMMoFEMAddElement(
dM,
"ELASTIC");
130 CHKERR DMMoFEMSNESSetJacobian(
137 CHKERR DMMoFEMSNESSetFunction(
dM,
"ELASTIC",
139 PETSC_NULLPTR, PETSC_NULLPTR);
148 CHKERR DMMoFEMTSSetIJacobian(
dM,
"ELASTIC", &method, &method, &method);
151 CHKERR DMMoFEMTSSetI2Jacobian(
dM,
"ELASTIC", &method, &method, &method);
154 CHKERR DMMoFEMTSSetRHSJacobian(
dM,
"ELASTIC", &method, &method, &method);
158 "This TS is not yet implemented");
169 CHKERR DMMoFEMTSSetIFunction(
dM,
"ELASTIC", &method, &method, &method);
172 CHKERR DMMoFEMTSSetI2Function(
dM,
"ELASTIC", &method, &method, &method);
175 CHKERR DMMoFEMTSSetRHSFunction(
dM,
"ELASTIC", &method, &method, &method);
194 PostProcBrokenMeshInMoab<VolumeElementForcesAndSourcesCore>>(
mField);
198 "MESH_NODE_POSITIONS");
199 auto position_ptr = boost::make_shared<MatrixDouble>();
200 auto mesh_pos_ptr = boost::make_shared<MatrixDouble>();
201 auto position_grad_ptr = boost::make_shared<MatrixDouble>();
203 new OpCalculateVectorFieldValues<3>(
positionField, position_ptr));
205 new OpCalculateVectorFieldValues<3>(
meshNodeField, mesh_pos_ptr));
215 position_ptr, mesh_pos_ptr, position_grad_ptr,
meshNodeField,
218 using OpPPMap = OpPostProcMapInMoab<3, 3>;
222 {{positionField, position_ptr}, {meshNodeField, mesh_pos_ptr}},
229 CHKERR DMoFEMLoopFiniteElements(
dM,
"ELASTIC",
234 MOFEM_LOG_C(
"WORLD", Sev::inform,
"%d Time %3.2e Elastic energy %3.2e",
238 auto out_name =
"out_vol_" + to_string(step) +
".h5m";
#define MOFEM_LOG_C(channel, severity, format,...)
void simple(double P1[], double P2[], double P3[], double c[], const int N)
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
virtual bool check_field(const std::string &name) const =0
check if field is in database
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > OpPPMap
Set of functions declaring elements and setting operators for generic element interface.
BcMarkerPtr mBoundaryMarker
Deprecated interface functions.
Post post-proc data at points from hash maps.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Set of functions declaring elements and setting operators for generic element interface.
~NonlinearElasticElementInterface()
NonlinearElasticElementInterface(MoFEM::Interface &m_field, string postion_field, string mesh_posi_field_name="MESH_NODE_POSITIONS", bool is_displacement_field=true, PetscBool is_quasi_static=PETSC_TRUE)
MoFEMErrorCode createElements()
MoFEMErrorCode setupSolverFunctionSNES()
boost::shared_ptr< PostProcBrokenMeshInMoab< VolumeElementForcesAndSourcesCore > > postProcMeshPtr
MoFEMErrorCode setOperators()
MoFEMErrorCode setupSolverJacobianSNES()
MoFEMErrorCode updateElementVariables()
boost::shared_ptr< ElasticMaterials > elasticMaterialsPtr
BitRefLevel getBitRefLevel()
MoFEM::Interface & mField
MoFEMErrorCode setupSolverJacobianTS(const TSType type)
MoFEMErrorCode addElementFields()
MoFEMErrorCode setupSolverFunctionTS(const TSType type)
boost::shared_ptr< NonlinearElasticElement > elasticElementPtr
MoFEMErrorCode addElementsToDM(SmartPetscObj< DM > dm)
MoFEMErrorCode getCommandLineParameters()
MoFEMErrorCode postProcessElement(int step)
PetscBool is_quasi_static