v0.16.3
Loading...
Searching...
No Matches
Functions
crack_extension_check.cpp File Reference

Fixture and checks for the tangent crack growth tool. More...

#include <MoFEM.hpp>
#include <CgalCrackGrowth.hpp>
#include <filesystem>
#include <iomanip>

Go to the source code of this file.

Functions

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

Detailed Description

Fixture and checks for the tangent crack growth tool.

-fixture_stage prepare writes crack_input.h5m: a 6 x 4 x 4 block of unit prisms split into tetrahedra, with a planar crack at z = 0 for x < 3 in BLOCKSET 1 and all tetrahedra in BLOCKSET 2. -fixture_stage check verifies the step files written by crack_extension. -fixture_stage compare compares the crack and mesh of two step files. -fixture_stage bridge extends one edge in a kinked direction through CGALInterface::CrackExtension::extendCrack and checks levels, parents and retirement. -fixture_stage validate checks any step file independently.

Definition in file crack_extension_check.cpp.

Function Documentation

◆ main()

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

Definition at line 923 of file crack_extension_check.cpp.

923 {
924 MoFEM::Core::Initialize(&argc, &argv, nullptr,
925 "Crack extension tool checks\n");
926 try {
927 moab::Core mb;
928 MoFEM::Core core(mb);
929 MoFEM::Interface &m_field = core;
931 char stage[PETSC_MAX_PATH_LEN] = "";
932 CHKERR PetscOptionsGetString(nullptr, nullptr, "-fixture_stage", stage,
933 sizeof(stage), nullptr);
934 const std::string name = stage;
935 if (name == "prepare")
936 CHKERR prepare(m_field);
937 else if (name == "check")
938 CHKERR check(m_field);
939 else if (name == "compare")
940 CHKERR compare(m_field);
941 else if (name == "bridge")
942 CHKERR bridgeStage(m_field);
943 else if (name == "validate")
944 CHKERR validateStage(m_field);
945 else if (name == "ordered")
946 CHKERR orderedStage(m_field);
947 else
948 SETERRQ(PETSC_COMM_SELF, MOFEM_INVALID_DATA,
949 "Use -fixture_stage prepare, check, compare, bridge, validate or "
950 "ordered");
951 }
954 return 0;
955}
moab::Interface & mb
std::string name
#define CATCH_ERRORS
Catch errors.
@ MOFEM_INVALID_DATA
Definition definitions.h:36
#define CHKERR
Inline error check.
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
Core (interface) class.
Definition Core.hpp:83
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
Deprecated interface functions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.