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

Check accepted one-hex state against the 450T Abaqus workbook. More...

#include <MoFEM.hpp>
#include <array>
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Check accepted one-hex state against the 450T Abaqus workbook.

Definition in file abaqus_450t_mesh_check.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 96 of file abaqus_450t_mesh_check.cpp.

96 {
97 if (argc != 3) {
98 std::fprintf(stderr, "usage: %s {base|S1|S2} output-directory\n", argv[0]);
99 return 2;
100 }
101 int mofem_argc = 1;
102 char *mofem_argv[] = {argv[0], nullptr};
103 char **mofem_argv_ptr = mofem_argv;
104 MoFEM::Core::Initialize(&mofem_argc, &mofem_argv_ptr, nullptr, nullptr);
105 try {
106 const std::string case_name = argv[1];
107 const std::string directory = argv[2];
108 for (const auto &test_case : cases)
109 if (case_name == test_case.name) {
110 CHKERR checkCase(test_case, directory);
112 return 0;
113 }
114 SETERRQ(PETSC_COMM_SELF, MOFEM_INVALID_DATA, "Unknown case %s",
115 case_name.c_str());
116 }
119 return 1;
120}
std::string name
#define CATCH_ERRORS
Catch errors.
@ MOFEM_INVALID_DATA
Definition definitions.h:36
#define CHKERR
Inline error check.
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