47 {
48
50
51 try {
52
53
54 moab::Core mb_instance;
55 moab::Interface &moab = mb_instance;
56
59
60
61 DMType dm_name = "DMMOFEM";
63
65
66
69 {
70
72
74
77
79
81
83 CHKERR m_field.
get_moab().get_entities_by_handle(root_set, all_ents);
84 all_ents = subtract(all_ents, all_ents.subset_by_type(MBENTITYSET));
85
86 auto testingEntitiesInDatabase = [&]() {
91 };
92
93 CHKERR testingEntitiesInDatabase();
94
95 auto testingEntitiesInDatabaseSubRange = [&]() {
97 Range edges = all_ents.subset_by_type(MBEDGE);
101 };
102
103 CHKERR testingEntitiesInDatabaseSubRange();
104
105 auto dm = simple_interface->
getDM();
106
107 auto testingEntitiesInDM = [&]() {
115 };
116
117 CHKERR testingEntitiesInDM();
118
119 }
120 }
122
123
125
126 return 0;
127}
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
virtual MoFEMErrorCode loop_entities(const std::string field_name, EntityMethod &method, Range const *const ents=nullptr, int verb=DEFAULT_VERBOSITY)=0
Loop over field entities.
virtual int get_comm_size() const =0
virtual moab::Interface & get_moab()=0
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.
keeps basic data about problem
Simple interface for fast problem set-up.
MoFEMErrorCode addDomainField(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on domain.
MoFEMErrorCode getOptions()
get options
MoFEMErrorCode getDM(DM *dm)
Get DM.
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name)
Load mesh file.
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.