35 {
36
37
39
40 try {
41
42
43 moab::Core moab_core;
44 moab::Interface &moab = moab_core;
45
46
49
50
51 DMType dm_name = "DMMOFEM";
53
54
57 {
58
59
61
63
66
69
70
72
74
75 int count_fe;
76 int count_side_fe;
77
79
80
82 op_side_fe->doWorkRhsHook = [&](
DataOperator *op_ptr,
int side,
85 auto domain_op =
static_cast<DomainEleOp *
>(op_ptr);
87
89 << "Side element name [ " << count_side_fe << " ] "
90 << domain_op->getFEName();
91
92 ++count_side_fe;
93
95 };
96
97
98 auto side_fe = boost::make_shared<DomainEle>(m_field);
99 side_fe->getOpPtrVector().push_back(op_side_fe);
100
101
102
107
108 MOFEM_LOG(
"SELF", Sev::verbose) <<
"Element name [ " << count_fe
109 << " ] " << bdy_op->getFEName();
110
113
114 ++count_fe;
115
117 };
118
120 op_bdy_fe->doWorkRhsHook = do_work_rhs;
121
123 op_skeleton_fe->doWorkRhsHook = do_work_rhs;
124
125
126 count_fe = 0;
127 count_side_fe = 0;
128
132
133 MOFEM_LOG(
"SELF", Sev::inform) <<
"Number of elements " << count_fe;
135 << "Number of side elements " << count_side_fe;
136
137 if (count_fe != 16)
139 "Wrong numbers of FEs");
140 if (count_side_fe != 24)
142 "Wrong numbers of side FEs");
143 }
144 }
146
147
149
150 return 0;
151}
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ L2
field with C-1 continuity
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
boost::ptr_deque< UserDataOperator > & getOpBoundaryRhsPipeline()
Get the Op Boundary Rhs Pipeline object.
boost::ptr_deque< UserDataOperator > & getOpSkeletonRhsPipeline()
Get the Op Skeleton Rhs Pipeline object.
#define MOFEM_LOG(channel, severity)
Log.
DomainEle::UserDataOperator DomainEleOp
BoundaryEle::UserDataOperator BoundaryEleOp
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.
base operator to do operations at Gauss Pt. level
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
default operator for TRI element
@ OPSPACE
operator do Work is execute on space data
PipelineManager interface.
Simple interface for fast problem set-up.
bool & getAddBoundaryFE()
Get the addSkeletonFE.
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 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.
bool & getAddSkeletonFE()
Get the addSkeletonFE.
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
const std::string getDomainFEName() const
Get the Domain FE Name.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.