static char help[] =
"...\n\n";
int main(
int argc,
char *argv[]) {
try {
PetscBool flg_file = PETSC_FALSE;
char mesh_out_file[255] = "out.h5m";
PetscOptionsBegin(PETSC_COMM_WORLD, "", "Field to vertices options",
"none");
CHKERR PetscOptionsString(
"-file_name",
"mesh file name",
"",
"mesh.h5m",
CHKERR PetscOptionsString(
"-output_file",
"output mesh file name",
"",
"out.h5m", mesh_out_file, 255, PETSC_NULLPTR);
PetscOptionsEnd();
moab::Core mb_instance;
moab::Interface &moab = mb_instance;
ParallelComm *pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
if (pcomm == NULL)
pcomm = new ParallelComm(&moab, PETSC_COMM_WORLD);
const char *option;
option = "";
auto core_log = logging::core::get();
core_log->add_sink(
LogManager::createSink(LogManager::getStrmWorld(), "REMOVER"));
LogManager::setLog("REMOVER");
std::vector<std::string> prb_list;
for(auto &it : *prb_ptr)
prb_list.push_back(it.getName());
for (auto &it : prb_list) {
MOFEM_LOG(
"REMOVER", Sev::inform) <<
"Delete problem " << it;
}
std::vector<std::string> fe_list;
for (auto &it : *fe_ptr)
fe_list.push_back(it->getName());
for (auto &it : fe_list) {
<< "Delete finite element " << it;
}
std::vector<std::string> field_list;
for (auto &it : *field_ptr)
field_list.push_back(it->getName());
for (auto &it : field_list) {
MOFEM_LOG(
"REMOVER", Sev::inform) <<
"Delete field " << it;
}
CHKERR moab.write_file(mesh_out_file);
}
return 0;
}
#define CATCH_ERRORS
Catch errors.
#define MYPCOMM_INDEX
default communicator number PCOMM
#define CHKERR
Inline error check.
virtual const FiniteElement_multiIndex * get_finite_elements() const =0
Get the finite elements object.
virtual const Problem_multiIndex * get_problems() const =0
Get the problems object.
virtual const Field_multiIndex * get_fields() const =0
Get the fields object.
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
virtual MoFEMErrorCode delete_problem(const std::string name)=0
Delete problem.
implementation of Data Operators for Forces and Sources
virtual MoFEMErrorCode delete_finite_element(const std::string name, int verb=DEFAULT_VERBOSITY)=0
Delete finite element from MoFEM database.
virtual MoFEMErrorCode delete_field(const std::string name, int verb=DEFAULT_VERBOSITY)=0
Delete 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.