v0.16.0
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 1087 of file arc_length_interface.cpp.

1087 {
1088
1089 const string default_options = "-ksp_type fgmres \n"
1090 "-pc_type lu \n"
1091 "-pc_factor_mat_solver_type mumps\n"
1092 "-mat_mumps_icntl_20 0\n"
1093 "-ksp_monitor \n"
1094 "-ksp_atol 1e-10 \n"
1095 "-ksp_rtol 1e-10 \n"
1096 "-snes_monitor \n"
1097 "-snes_type newtonls \n"
1098 "-snes_linesearch_type l2 \n"
1099 "-snes_linesearch_monitor \n"
1100 "-snes_max_it 16 \n"
1101 "-snes_atol 1e-8 \n"
1102 "-snes_rtol 1e-8 \n"
1103 "-snes_converged_reason \n";
1104
1105 string param_file = "param_file.petsc";
1106 if (!static_cast<bool>(ifstream(param_file))) {
1107 std::ofstream file(param_file.c_str(), std::ios::ate);
1108 if (file.is_open()) {
1109 file << default_options;
1110 file.close();
1111 }
1112 }
1113 MoFEM::Core::Initialize(&argc, &argv, param_file.c_str(), help);
1114
1115 auto core_log = logging::core::get();
1116 core_log->add_sink(
1118 LogManager::setLog("ARC_LENGTH");
1119 MOFEM_LOG_TAG("ARC_LENGTH", "ArcLength");
1120
1121 try {
1122 moab::Core mb_instance;
1123 moab::Interface &moab = mb_instance;
1124
1125 ArcLengthInterfaceExample example(moab);
1126 CHKERR example.runProblem();
1127 }
1129
1131
1132 return 0;
1133}
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.