static char help[] =
"...\n\n";
#define HelloFunctionBegin \
MoFEMFunctionBegin; \
MOFEM_LOG_CHANNEL("SYNC"); \
MOFEM_LOG_FUNCTION(); \
MOFEM_LOG_TAG("WORLD", "HelloWorld");
if (type == MBVERTEX) {
MOFEM_LOG(
"SYNC", Sev::inform) <<
"**** " << getNinTheLoop() <<
" ****";
MOFEM_LOG(
"SYNC", Sev::inform) <<
"**** Operators ****";
}
<< "Hello Operator OpRow:"
<< " field name " << rowFieldName << " side " << side << " type "
<< CN::EntityTypeName(type) << " nb dofs on entity "
}
};
OpRowCol(
const std::string row_field,
const std::string col_field,
const bool symm)
symm) {}
<< "Hello Operator OpRowCol:"
<< " row field name " << rowFieldName << " row side " << row_side
<< " row type " << CN::EntityTypeName(row_type)
<<
" nb dofs on row entity " << row_data.
getIndices().size() <<
" : "
<< " col field name " << colFieldName << " col side " << col_side
<< " col type " << CN::EntityTypeName(col_type)
<<
" nb dofs on col entity " << col_data.
getIndices().size();
}
};
}
if (type == MBVERTEX) {
MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpVolume:"
<< " volume " << getVolume();
}
}
};
if (type == MBVERTEX) {
MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpFace:"
}
}
};
boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &
feSidePtr;
boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &fe_side_ptr)
if (type == MBVERTEX) {
MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpSideFace";
}
}
};
if (type == MBVERTEX) {
<< "Hello Operator OpVolumeSide:"
<< " volume " << getVolume() << " normal " << getNormal();
}
}
};
int main(
int argc,
char *argv[]) {
try {
DMType dm_name = "DMMOFEM";
moab::Core moab_core;
moab::Interface &moab = moab_core;
pipeline_mng->getOpDomainRhsPipeline().push_back(
new OpVolume(
"U"));
pipeline_mng->getOpDomainLhsPipeline().push_back(
pipeline_mng->getOpBoundaryRhsPipeline().push_back(
new OpRow(
"L"));
pipeline_mng->getOpBoundaryRhsPipeline().push_back(
new OpFace(
"L"));
pipeline_mng->getOpBoundaryLhsPipeline().push_back(
boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe(
pipeline_mng->getOpSkeletonRhsPipeline().push_back(
new OpRow(
"S"));
pipeline_mng->getOpSkeletonRhsPipeline().push_back(
CHKERR pipeline_mng->loopFiniteElements();
}
return 0;
}
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.
implementation of Data Operators for Forces and Sources
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.
default operator for TRI element
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 refernce to pointer of interface.
Volume finite element base.
default operator for TET element
Base volume element used to integrate on skeleton.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > & feSidePtr
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
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)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)