Non-linear elastic dynamics.
Non-linear elastic dynamics.
static char help[] =
"...\n\n";
std::map<int, NonlinearElasticElement::BlockData> &
setOfBlocks;
std::map<int, NonlinearElasticElement::BlockData> &set_of_blocks,
double def_t_val = 0;
Tag th_step;
rval = m_field.
get_moab().tag_get_handle(
"_TsStep_", 1, MB_TYPE_INTEGER, th_step,
MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_MESH, &def_t_val);
if (rval == MB_ALREADY_ALLOCATED) {
} else {
&def_t_val));
}
PetscBool flg = PETSC_TRUE;
"-my_output_prt", &
pRT, &flg),
"Can not get option");
if (flg != PETSC_TRUE) {
}
}
CHKERR addHOOpsVol(
"MESH_NODE_POSITIONS",
postProc,
true,
false,
false,
false);
std::map<int, NonlinearElasticElement::BlockData>::iterator sit =
}
}
std::ostringstream sss;
sss << "out_values_" << (*step) << ".h5m";
}
"DYNAMIC", Sev::inform,
"%d Time %3.2e Elastic energy %3.2e Kinetic Energy %3.2e Total %3.2e\n",
}
}
}
};
double def_t_val = 0;
Tag th_time;
rval = m_field.
get_moab().tag_get_handle(
"_TsTime_", 1, MB_TYPE_DOUBLE, th_time,
MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_MESH, &def_t_val);
if (rval == MB_ALREADY_ALLOCATED) {
rval = m_field.
get_moab().tag_get_by_ptr(th_time, &root_meshset, 1,
CHKERRABORT(PETSC_COMM_WORLD,
ierr);
} else {
rval = m_field.
get_moab().tag_set_data(th_time, &root_meshset, 1,
&def_t_val);
rval = m_field.
get_moab().tag_get_by_ptr(th_time, &root_meshset, 1,
}
Tag th_step;
rval = m_field.
get_moab().tag_get_handle(
"_TsStep_", 1, MB_TYPE_INTEGER, th_step,
MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_MESH, &def_t_val);
if (rval == MB_ALREADY_ALLOCATED) {
rval = m_field.
get_moab().tag_get_by_ptr(th_step, &root_meshset, 1,
} else {
rval = m_field.
get_moab().tag_set_data(th_step, &root_meshset, 1,
&def_t_val);
rval = m_field.
get_moab().tag_get_by_ptr(th_step, &root_meshset, 1,
}
PetscBool flg = PETSC_TRUE;
&flg);
CHKERRABORT(PETSC_COMM_WORLD,
ierr);
if (flg != PETSC_TRUE) {
}
}
(*step)++;
}
}
}
};
int main(
int argc,
char *argv[]) {
"-pc_type lu \n"
"-pc_factor_mat_solver_type mumps \n"
"-mat_mumps_icntl_20 0 \n"
"-ksp_atol 1e-10 \n"
"-ksp_rtol 1e-10 \n"
"-snes_monitor \n"
"-snes_type newtonls \n"
"-snes_linesearch_type basic \n"
"-snes_max_it 100 \n"
"-snes_atol 1e-7 \n"
"-snes_rtol 1e-7 \n"
"-ts_monitor \n"
"-ts_type alpha \n";
std::ofstream file(
param_file.c_str(), std::ios::ate);
if (file.is_open()) {
file.close();
}
}
auto core_log = logging::core::get();
core_log->add_sink(
LogManager::createSink(LogManager::getStrmWorld(), "DYNAMIC"));
LogManager::setLog("DYNAMIC");
try {
moab::Core mb_instance;
moab::Interface &moab = mb_instance;
ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
auto moab_comm_wrap =
boost::make_shared<WrapMPIComm>(PETSC_COMM_WORLD, false);
if (pcomm == NULL)
pcomm = new ParallelComm(&moab, moab_comm_wrap->get_comm());
PetscBool is_partitioned = PETSC_FALSE;
PetscBool linear = PETSC_TRUE;
PetscInt disp_order = 1;
PetscInt vel_order = 1;
PetscBool is_solve_at_time_zero = PETSC_FALSE;
auto read_command_line_parameters = [&]() {
PetscBool flg = PETSC_TRUE;
if (flg != PETSC_TRUE)
SETERRQ(PETSC_COMM_SELF, 1, "Error -my_file (mesh file needed)");
&is_partitioned, &flg);
PETSC_NULL);
enum bases { LEGENDRE, LOBATTO, BERNSTEIN_BEZIER, LASBASETOP };
const char *list_bases[] = {"legendre", "lobatto", "bernstein_bezier"};
PetscInt choice_base_value = BERNSTEIN_BEZIER;
LASBASETOP, &choice_base_value, PETSC_NULL);
if (choice_base_value == LEGENDRE)
else if (choice_base_value == LOBATTO)
else if (choice_base_value == BERNSTEIN_BEZIER)
&disp_order, &flg);
if (flg != PETSC_TRUE)
disp_order = 1;
&vel_order, &flg);
if (flg != PETSC_TRUE)
vel_order = disp_order;
"-my_solve_at_time_zero",
&is_solve_at_time_zero, &flg);
};
auto read_mesh = [&]() {
if (is_partitioned == PETSC_TRUE) {
const char *option;
option = "PARALLEL=BCAST_DELETE;"
"PARALLEL_RESOLVE_SHARED_ENTS;"
"PARTITION=PARALLEL_PARTITION;";
} else {
const char *option;
option = "";
}
};
CHKERR read_command_line_parameters();
bit_level0.set(0);
CHKERR moab.create_meshset(MESHSET_SET, meshset_level0);
0, 3, bit_level0);
bool check_if_spatial_field_exist = m_field.
check_field(
"DISPLACEMENT");
else
fluid_pressure_fe.addNeumannFluidPressureBCElements("DISPLACEMENT");
false, false);
fluid_pressure_fe.setNeumannFluidPressureFiniteElementOperators(
"DISPLACEMENT", PETSC_NULL, false, true);
else
disp_order);
else
else
CHKERR elastic_materials.setBlocks(elastic.setOfBlocks);
CHKERR elastic.addElement(
"ELASTIC",
"DISPLACEMENT");
false, false);
false, false);
false, false, false);
CHKERR elastic.setOperators(
"DISPLACEMENT",
"MESH_NODE_POSITIONS",
false,
true);
CHKERR elastic_materials.setBlocks(inertia.setOfBlocks);
CHKERR inertia.addConvectiveMassElement(
"MASS_ELEMENT",
"VELOCITY",
"DISPLACEMENT");
CHKERR inertia.addVelocityElement(
"VELOCITY_ELEMENT",
"VELOCITY",
"DISPLACEMENT");
{
string name = "-my_accelerogram";
char time_file_name[255];
PetscBool flg;
time_file_name, 255, &flg);
if (flg == PETSC_TRUE) {
}
}
CHKERR elastic_materials.setBlocks(damper.blockMaterialDataMap);
{
"DISPLACEMENT");
"DISPLACEMENT");
"DISPLACEMENT");
"DAMPER", "MESH_NODE_POSITIONS");
}
std::map<int, KelvinVoigtDamper::BlockMaterialData>::iterator
bit =
damper.blockMaterialDataMap.begin();
for (;
bit != damper.blockMaterialDataMap.end();
bit++) {
bit->second.lInear = linear;
damper.constitutiveEquationMap.insert(
material_data));
MBTET, "DAMPER");
}
CHKERR damper.setOperators(3);
}
elastic.getLoopFeEnergy(),
inertia.getLoopFeEnergy());
"DOT_DISPLACEMENT");
"DOT_VELOCITY");
if (!check_if_spatial_field_exist) {
"MESH_NODE_POSITIONS");
}
{
"FLUID_PRESSURE_FE");
if (is_partitioned) {
pcomm->size());
} else {
}
}
"FLUID_PRESSURE_FE");
"MASS_ELEMENT");
"VELOCITY_ELEMENT");
if (is_partitioned) {
pcomm->size());
} else {
}
TS ts;
CHKERR TSCreate(PETSC_COMM_WORLD, &ts);
CHKERR TSSetType(ts, TSBEULER);
->createMPIAIJWithArrays<PetscGlobalIdx_mi_tag>("Kuu",
CHKERR MatDuplicate(shellAij_ctx->
K, MAT_DO_NOT_COPY_VALUES,
D,
"DYNAMICS",
COL, shellAij_ctx->
u,
"Kuu",
COL,
D,
"DYNAMICS",
"VELOCITY",
COL, shellAij_ctx->
v,
"Kuu",
"DISPLACEMENT",
Mat shell_Aij;
problem_ptr->
getNbDofsRow(), (
void *)shellAij_ctx, &shell_Aij);
CHKERR MatShellSetOperation(shell_Aij, MATOP_MULT,
shell_Aij, MATOP_ZERO_ENTRIES,
ConvectiveMassElement::ShellMatrixElement shell_matrix_element(m_field);
m_field,
"DISPLACEMENT", shellAij_ctx->
barK, PETSC_NULL, PETSC_NULL);
shell_matrix_element.problemName = "Kuu";
shell_matrix_element.shellMatCtx = shellAij_ctx;
shell_matrix_element.DirichletBcPtr = &shell_dirichlet_bc;
shell_matrix_element.loopK.push_back(
ConvectiveMassElement::ShellMatrixElement::PairNameFEMethodPtr(
"ELASTIC", &elastic.getLoopFeLhs()));
shell_matrix_element.loopK.push_back(
ConvectiveMassElement::ShellMatrixElement::PairNameFEMethodPtr(
"ELASTIC", &damper.feLhs));
CHKERR inertia.setShellMatrixMassOperators(
"VELOCITY",
"DISPLACEMENT",
"MESH_NODE_POSITIONS", linear);
shell_matrix_element.loopM.push_back(
ConvectiveMassElement::ShellMatrixElement::PairNameFEMethodPtr(
"ELASTIC", &inertia.getLoopFeMassLhs()));
shell_matrix_element.loopAuxM.push_back(
ConvectiveMassElement::ShellMatrixElement::PairNameFEMethodPtr(
"ELASTIC", &inertia.getLoopFeMassAuxLhs()));
shell_matrix_residual.shellMatCtx = shellAij_ctx;
boost::ptr_map<std::string, NeumannForcesSurface> surface_forces;
{
string fe_name_str = "FORCE_FE";
surface_forces.at(fe_name_str).getLoopFe(), false,
false);
CHKERR surface_forces.at(fe_name_str)
.addForce("DISPLACEMENT", PETSC_NULL, it->getMeshsetId(), true);
surface_forces.at(fe_name_str)
}
}
boost::ptr_map<std::string, NeumannForcesSurface> surface_pressure;
{
string fe_name_str = "PRESSURE_FE";
surface_pressure.at(fe_name_str).getLoopFe(), false,
false);
CHKERR surface_pressure.at(fe_name_str)
.addPressure("DISPLACEMENT", PETSC_NULL, it->getMeshsetId(), true);
surface_pressure.at(fe_name_str)
}
}
boost::ptr_map<std::string, EdgeForce> edge_forces;
{
string fe_name_str = "FORCE_FE";
edge_forces.insert(fe_name_str,
new EdgeForce(m_field));
CHKERR edge_forces.at(fe_name_str)
.addForce("DISPLACEMENT", PETSC_NULL, it->getMeshsetId(), true);
edge_forces.at(fe_name_str).methodsOp.push_back(
new TimeForceScale());
}
}
boost::ptr_map<std::string, NodalForce> nodal_forces;
{
string fe_name_str = "FORCE_FE";
nodal_forces.insert(fe_name_str,
new NodalForce(m_field));
CHKERR nodal_forces.at(fe_name_str)
.addForce(
"DISPLACEMENT",
F, it->getMeshsetId(),
true);
nodal_forces.at(fe_name_str).methodsOp.push_back(
new TimeForceScale());
}
}
m_field, ts, "VELOCITY", "DISPLACEMENT");
auto add_static_rhs = [&](auto &loops_to_do_Rhs) {
loops_to_do_Rhs.push_back(
for (auto fit = surface_forces.begin(); fit != surface_forces.end();
fit++) {
loops_to_do_Rhs.push_back(
}
for (auto fit = surface_pressure.begin(); fit != surface_pressure.end();
fit++) {
loops_to_do_Rhs.push_back(
}
for (auto fit = edge_forces.begin(); fit != edge_forces.end(); fit++) {
loops_to_do_Rhs.push_back(
}
for (auto fit = nodal_forces.begin(); fit != nodal_forces.end(); fit++) {
loops_to_do_Rhs.push_back(
}
"FLUID_PRESSURE_FE", &fluid_pressure_fe.getLoopFe()));
};
CHKERR add_static_rhs(loops_to_do_Rhs);
loops_to_do_Rhs.push_back(
loopsMonitor.push_back(
loopsMonitor.push_back(
CHKERR TSSetIJacobian(ts, shell_Aij, shell_Aij, TsSetIJacobian, &
ts_ctx);
double ftime = 1;
CHKERR TSSetDuration(ts, PETSC_DEFAULT, ftime);
SNES snes;
KSP ksp;
CHKERR SNESGetKSP(snes, &ksp);
CHKERR KSPSetFromOptions(ksp);
PC pc;
CHKERR PCSetType(pc, PCSHELL);
CHKERR PCShellSetContext(pc, (
void *)&pc_shell_ctx);
CHKERR VecGhostUpdateBegin(
D, INSERT_VALUES, SCATTER_FORWARD);
CHKERR VecGhostUpdateEnd(
D, INSERT_VALUES, SCATTER_FORWARD);
"DYNAMICS",
COL,
D, INSERT_VALUES, SCATTER_REVERSE);
if (is_solve_at_time_zero) {
Mat Aij = shellAij_ctx->
K;
"Kuu",
COL,
D, INSERT_VALUES, SCATTER_FORWARD);
CHKERR VecGhostUpdateBegin(
D, INSERT_VALUES, SCATTER_FORWARD);
CHKERR VecGhostUpdateEnd(
D, INSERT_VALUES, SCATTER_FORWARD);
SNES snes;
CHKERR SNESCreate(PETSC_COMM_WORLD, &snes);
CHKERR SNESSetApplicationContext(snes, &snes_ctx);
CHKERR SNESSetFunction(snes,
F, SnesRhs, &snes_ctx);
CHKERR SNESSetJacobian(snes, Aij, Aij, SnesMat, &snes_ctx);
CHKERR SNESSetFromOptions(snes);
snes_ctx.getComputeRhs();
snes_ctx.getPreProcComputeRhs().push_back(&my_dirichlet_bc);
fluid_pressure_fe.getLoopFe().ts_t = 0;
CHKERR add_static_rhs(loops_to_do_Rhs);
snes_ctx.getPostProcComputeRhs().push_back(&my_dirichlet_bc);
snes_ctx.getSetOperators();
snes_ctx.getPreProcSetOperators().push_back(&my_dirichlet_bc);
loops_to_do_Mat.push_back(
snes_ctx.getPostProcSetOperators().push_back(&my_dirichlet_bc);
"DOT_DISPLACEMENT");
"Kuu",
COL,
D, INSERT_VALUES, SCATTER_FORWARD);
CHKERR SNESSolve(snes, PETSC_NULL,
D);
int its;
CHKERR SNESGetIterationNumber(snes, &its);
MOFEM_LOG_C(
"DYNAMIC", Sev::inform,
"number of Newton iterations = %d\n",
its);
"Kuu",
COL,
D, INSERT_VALUES, SCATTER_REVERSE);
}
if (is_solve_at_time_zero) {
"DYNAMICS",
COL,
D, INSERT_VALUES, SCATTER_FORWARD);
CHKERR VecGhostUpdateBegin(
D, INSERT_VALUES, SCATTER_FORWARD);
CHKERR VecGhostUpdateEnd(
D, INSERT_VALUES, SCATTER_FORWARD);
}
#if PETSC_VERSION_GE(3, 7, 0)
CHKERR TSSetExactFinalTime(ts, TS_EXACTFINALTIME_STEPOVER);
#endif
PetscInt steps, snesfails, rejects, nonlinits, linits;
CHKERR TSGetTimeStepNumber(ts, &steps);
CHKERR TSGetSNESFailures(ts, &snesfails);
CHKERR TSGetStepRejections(ts, &rejects);
CHKERR TSGetSNESIterations(ts, &nonlinits);
CHKERR TSGetKSPIterations(ts, &linits);
"steps %d (%d rejected, %D SNES fails), ftime %g, nonlinits "
"%d, linits %D\n",
steps, rejects, snesfails, ftime, nonlinits, linits);
CHKERR MatDestroy(&shellAij_ctx->
K);
CHKERR MatDestroy(&shellAij_ctx->
M);
CHKERR MatDestroy(&shell_Aij);
delete shellAij_ctx;
}
return 0;
}
const std::string default_options
#define MOFEM_LOG_C(channel, severity, format,...)
static PetscErrorCode ierr
#define CATCH_ERRORS
Catch errors.
FieldApproximationBase
approximation base
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MYPCOMM_INDEX
default communicator number PCOMM
#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 const Problem * get_problem(const std::string problem_name) const =0
Get the problem object.
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
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
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
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_filed)=0
set finite element field data
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
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
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.
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.
virtual bool check_field(const std::string &name) const =0
check if field is in database
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, Vec v=PETSC_NULL)
Add operator to post-process L2 or H1 field gradient.
MoFEMErrorCode addFieldValuesPostProc(const std::string field_name, Vec v=PETSC_NULL)
Add operator to post-process L2, H1, Hdiv, Hcurl field value.
MoFEMErrorCode writeFile(const std::string file_name, const char *file_type="MOAB", const char *file_options="PARALLEL=WRITE_PART")
wrote results in (MOAB) format, use "file_name.h5m"
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
virtual MoFEMErrorCode loop_finite_elements(const std::string problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
MoFEMErrorCode buildProblemOnDistributedMesh(const std::string name, const bool square_matrix, int verb=VERBOSE)
build problem data structures, assuming that mesh is distributed (collective)
MoFEMErrorCode partitionGhostDofs(const std::string name, int verb=VERBOSE)
determine ghost nodes
MoFEMErrorCode buildProblem(const std::string name, const bool square_matrix, int verb=VERBOSE)
build problem data structures
MoFEMErrorCode partitionProblem(const std::string name, int verb=VERBOSE)
partition problem dofs (collective)
MoFEMErrorCode partitionFiniteElements(const std::string name, bool part_from_moab=false, int low_proc=-1, int hi_proc=-1, int verb=VERBOSE)
partition finite elements
virtual MoFEMErrorCode add_problem(const std::string &name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add problem.
virtual MoFEMErrorCode modify_problem_ref_level_add_bit(const std::string &name_problem, const BitRefLevel &bit)=0
add ref level to problem
virtual MoFEMErrorCode modify_problem_add_finite_element(const std::string name_problem, const std::string &fe_name)=0
add finite element to problem, this add entities assigned to finite element to a particular problem
const FTensor::Tensor2< T, Dim, Dim > Vec
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
MoFEMErrorCode addHOOpsFace3D(const std::string field, E &e, bool hcurl, bool hdiv)
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
MoFEMErrorCode addHOOpsVol(const std::string field, E &e, bool h1, bool hcurl, bool hdiv, bool l2)
definition of volume element
structure grouping operators and data used for calculation of mass (convective) element \ nonlinear_e...
static MoFEMErrorCode MultOpA(Mat A, Vec x, Vec f)
Mult operator for shell matrix.
static MoFEMErrorCode ZeroEntriesOp(Mat A)
static MoFEMErrorCode PCShellDestroy(PC pc)
static MoFEMErrorCode PCShellApplyOp(PC pc, Vec f, Vec x)
apply pre-conditioner for shell matrix
static MoFEMErrorCode PCShellSetUpOp(PC pc)
Set Dirichlet boundary conditions on displacements.
Force on edges and lines.
Manage setting parameters and constitutive equations for nonlinear/linear elastic materials.
Dumper material parameters.
Common data for nonlinear_elastic_elem model.
string spatialPositionNameDot
string spatialPositionName
Constitutive model functions.
Implementation of Kelvin Voigt Damper.
virtual moab::Interface & get_moab()=0
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
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.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.
Matrix manager is used to build and partition problems.
keeps basic data about problem
DofIdx getNbLocalDofsRow() const
DofIdx getNbDofsRow() const
DofIdx getNbLocalDofsCol() const
Problem manager is used to build and partition problems.
Projection of edge entities with one mid-node on hierarchical basis.
MoFEM::FEMethodsSequence FEMethodsSequence
PetscInt ts_step
time step number
Interface for Time Stepping (TS) solver.
BasicMethodsSequence & getPostProcessIJacobian()
Get the postProcess to do IJacobian object.
MoFEM::FEMethodsSequence FEMethodsSequence
FEMethodsSequence & getLoopsMonitor()
Get the loops to do Monitor object.
BasicMethodsSequence & getPostProcessIFunction()
Get the postProcess to do IFunction object.
FEMethodsSequence & getLoopsIFunction()
Get the loops to do IFunction object.
BasicMethodsSequence & getPreProcessIFunction()
Get the preProcess to do IFunction object.
BasicMethodsSequence & getPreProcessIJacobian()
Get the preProcess to do IJacobian object.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Vector manager is used to create vectors \mofem_vectors.
NonlinearElasticElement::MyVolumeFE & feElasticEnergy
calculate elastic energy
MoFEMErrorCode postProcess()
function is run at the end of loop
MoFEMErrorCode operator()()
function is run for every finite element
MoFEMErrorCode preProcess()
function is run at the beginning of loop
MoFEM::Interface & mField
std::map< int, NonlinearElasticElement::BlockData > & setOfBlocks
ConvectiveMassElement::MyVolumeFE & feKineticEnergy
calculate elastic energy
PostProcVolumeOnRefinedMesh postProc
MoFEMErrorCode preProcess()
function is run at the beginning of loop
MoFEMErrorCode postProcess()
function is run at the end of loop
MoFEMErrorCode operator()()
function is run for every finite element
MoFEM::Interface & mField
Finite element and operators to apply force/pressures applied to surfaces.
definition of volume element
structure grouping operators and data used for calculation of nonlinear elastic element
std::vector< EntityHandle > mapGaussPts
moab::Interface & postProcMesh
MoFEMErrorCode generateReferenceElementMesh()
Generate reference mesh on single element.
Force scale operator for reading two columns.