21 : public ForcesAndSourcesCore::UserDataOperator {
27 if (type == MBVERTEX) {
28
29 MOFEM_LOG(
"SYNC", Sev::inform) <<
"**** " << getNinTheLoop() <<
" ****";
30 MOFEM_LOG(
"SYNC", Sev::inform) <<
"**** Operators ****";
31 }
33 << "Hello Operator OpRow:"
34 << " field name " << rowFieldName << " side " << side << " type "
35 << CN::EntityTypeName(type) << " nb dofs on entity "
38 }
39};
40
41struct OpRowCol :
public ForcesAndSourcesCore::UserDataOperator {
42 OpRowCol(
const std::string row_field,
const std::string col_field,
43 const bool symm)
45 symm) {}
47 EntityType col_type,
52 << "Hello Operator OpRowCol:"
53 << " row field name " << rowFieldName << " row side " << row_side
54 << " row type " << CN::EntityTypeName(row_type)
55 <<
" nb dofs on row entity " << row_data.
getIndices().size() <<
" : "
56 << " col field name " << colFieldName << " col side " << col_side
57 << " col type " << CN::EntityTypeName(col_type)
58 <<
" nb dofs on col entity " << col_data.
getIndices().size();
60 }
61};
62
63struct OpVolume :
public VolumeElementForcesAndSourcesCore::UserDataOperator {
67 }
71 if (type == MBVERTEX) {
72 MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpVolume:"
73 << " volume " << getVolume();
74 }
76 }
77};
78
79struct OpFace :
public FaceElementForcesAndSourcesCore::UserDataOperator {
85 if (type == MBVERTEX) {
86 MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpFace:"
88 }
90 }
91};
92
93struct OpFaceSide :
public FaceElementForcesAndSourcesCore::UserDataOperator {
94 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &
feSidePtr;
97 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &fe_side_ptr)
102
104 if (type == MBVERTEX) {
105 MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpSideFace";
107 }
109 }
110};
111
113 : public VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator {
120 if (type == MBVERTEX) {
122 << "Hello Operator OpVolumeSide:"
123 << " volume " << getVolume() << " normal " << getNormal();
124 }
126 }
127};
128
129int main(
int argc,
char *argv[]) {
130
131
133
134 try {
135
136
137 DMType dm_name = "DMMOFEM";
139
140
141 moab::Core moab_core;
142 moab::Interface &moab = moab_core;
143
144
147
148
151
152
154
156
160
164
165
167
169
170
172 pipeline_mng->getOpDomainRhsPipeline().push_back(
new OpVolume(
"U"));
173 pipeline_mng->getOpDomainLhsPipeline().push_back(
175
176
177
178 pipeline_mng->getOpBoundaryRhsPipeline().push_back(
new OpRow(
"L"));
179 pipeline_mng->getOpBoundaryRhsPipeline().push_back(
new OpFace(
"L"));
180 pipeline_mng->getOpBoundaryLhsPipeline().push_back(
182
183
184
185 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe(
187 side_fe->getOpPtrVector().push_back(
new OpVolumeSide(
"U"));
188
189
190
191 pipeline_mng->getOpSkeletonRhsPipeline().push_back(
new OpRow(
"S"));
192 pipeline_mng->getOpSkeletonRhsPipeline().push_back(
194
195
196
197 CHKERR pipeline_mng->loopFiniteElements();
198
199
201 }
203
204
206
207 return 0;
208}
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MOFEM_LOG_SYNCHRONISE(comm)
Synchronise "SYNC" channel.
void simple(double P1[], double P2[], double P3[], double c[], const int N)
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#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.
boost::ptr_deque< UserDataOperator > & getOpDomainRhsPipeline()
Get the Op Domain Rhs Pipeline object.
#define MOFEM_LOG(channel, severity)
Log.
#define HelloFunctionBegin
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
constexpr auto field_name
virtual MPI_Comm & get_comm() const =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.
Data on single entity (This is passed as argument to DataOperator::doWork)
const VectorInt & getIndices() const
Get global indices of dofs on entity.
VectorDouble & getNormal()
get triangle normal
@ OPROW
operator doWork function is executed on FE rows
structure to get information form mofem into EntitiesFieldData
PipelineManager interface.
Simple interface for fast problem set-up.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Base volume element used to integrate on skeleton.
Volume finite element base.
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > & feSidePtr
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)