v0.16.3
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions | Variables
arc_length_interface.cpp File Reference
#include <MoFEM.hpp>
#include <algorithm>
#include <limits>
#include <ArcLengthTools.hpp>
#include <CohesiveInterfaceElement.hpp>
#include <HookeOps.hpp>
#include <InterfaceGapArcLengthControl.hpp>
#include <CohesiveNaturalBoundaryBC.hpp>

Go to the source code of this file.

Classes

struct  BoundaryBCs
 Boundary conditions marker. More...
 
struct  CohesiveElement::AssembleRhsVectors
 
struct  ArcLengthInterfaceExample
 

Namespaces

namespace  CohesiveElement
 

Typedefs

using DomainEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::BoundaryEle
 
using PostProcEle = PostProcBrokenMeshInMoab< VolumeElementForcesAndSourcesCore >
 

Functions

int main (int argc, char *argv[])
 [Check]
 

Variables

constexpr int SPACE_DIM = 3
 
static char help []
 

Typedef Documentation

◆ BoundaryEle

Definition at line 19 of file arc_length_interface.cpp.

◆ DomainEle

Definition at line 17 of file arc_length_interface.cpp.

◆ DomainEleOp

Definition at line 18 of file arc_length_interface.cpp.

◆ PostProcEle

Definition at line 21 of file arc_length_interface.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

[Check]

Definition at line 1119 of file arc_length_interface.cpp.

1119 {
1120
1121 const string default_options = "-ksp_type fgmres \n"
1122 "-pc_type lu \n"
1123 "-pc_factor_mat_solver_type mumps\n"
1124 "-mat_mumps_icntl_20 0\n"
1125 "-ksp_monitor \n"
1126 "-ksp_atol 1e-10 \n"
1127 "-ksp_rtol 1e-10 \n"
1128 "-snes_monitor \n"
1129 "-snes_type newtonls \n"
1130 "-snes_linesearch_type l2 \n"
1131 "-snes_linesearch_monitor \n"
1132 "-snes_max_it 16 \n"
1133 "-snes_atol 1e-8 \n"
1134 "-snes_rtol 1e-8 \n"
1135 "-snes_converged_reason \n";
1136
1137 string param_file = "param_file.petsc";
1138 if (!static_cast<bool>(ifstream(param_file))) {
1139 std::ofstream file(param_file.c_str(), std::ios::ate);
1140 if (file.is_open()) {
1141 file << default_options;
1142 file.close();
1143 }
1144 }
1145 MoFEM::Core::Initialize(&argc, &argv, param_file.c_str(), help);
1146
1147 auto core_log = logging::core::get();
1148 core_log->add_sink(
1150 LogManager::setLog("ARC_LENGTH");
1151 MOFEM_LOG_TAG("ARC_LENGTH", "ArcLength");
1152
1153 try {
1154 moab::Core mb_instance;
1155 moab::Interface &moab = mb_instance;
1156
1157 ArcLengthInterfaceExample example(moab);
1158 CHKERR example.runProblem();
1159 }
1161
1163
1164 return 0;
1165}
static char help[]
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:68
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:123
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.

Variable Documentation

◆ help

char help[]
static
Initial value:
= "\
-my_file mesh file name\n\
-my_sr reduction of step size\n\
-my_its_d desired number of steps\n\
-my_ms maximal number of steps\n\
-gamma arc-length step adaptation exponent\n\
-min_arc_length_step minimum arc-length step\n\
-max_arc_length_step maximum arc-length step\n\
-field_eval_coords x,y,z coordinates where displacement and stress are evaluated\n\n"

Definition at line 33 of file arc_length_interface.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 3
constexpr

Definition at line 16 of file arc_length_interface.cpp.