#include <BasicFiniteElements.hpp>
static char help[] =
"...\n\n";
static map<EntityType, std::string>
type_name;
#define HelloFunctionBegin \
MoFEMFunctionBegin; \
MOFEM_LOG_CHANNEL("SYNC"); \
MOFEM_LOG_FUNCTION(); \
MOFEM_LOG_TAG("WORLD", "HelloWorld");
OpRow(
const std::string &field_name)
MOFEM_LOG(
"SYNC", Sev::inform) <<
"**** " << getNinTheLoop() <<
" ****";
MOFEM_LOG(
"SYNC", Sev::inform) <<
"**** Operators ****";
}
<< "Hello Operator OpRow:"
<< " field name " << rowFieldName << " side " << side << " type "
<<
type_name[
type] <<
" nb dofs on entity " << data.getIndices().size();
}
};
OpRowCol(
const std::string row_field,
const std::string col_field,
const bool symm)
symm) {}
MoFEMErrorCode doWork(
int row_side,
int col_side, EntityType row_type,
EntityType col_type,
<< "Hello Operator OpRowCol:"
<< " row field name " << rowFieldName << " row side " << row_side
<<
" row type " <<
type_name[row_type] <<
" nb dofs on row entity"
<< row_data.getIndices().size() << " : "
<< " col field name " << colFieldName << " col side " << col_side
<<
" col type " <<
type_name[col_type] <<
" nb dofs on col entity"
<< col_data.getIndices().size();
}
};
field_name, OPROW) {
}
MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpVolume:"
<< " volume " << getVolume();
}
}
};
OpFace(
const std::string &field_name)
MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpFace:"
<< " normal " << getNormal();
}
}
};
boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &feSidePtr;
const std::string &field_name,
boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &fe_side_ptr)
feSidePtr(fe_side_ptr) {}
MOFEM_LOG(
"SYNC", Sev::inform) <<
"Hello Operator OpSideFace";
CHKERR loopSideVolumes(
"dFE", *feSidePtr);
}
}
};
field_name, field_name, OPROW) {}
<< "Hello Operator OpVolumeSide:"
<< " volume " << getVolume() << " normal " << getNormal();
}
}
};
int main(
int argc,
char *argv[]) {
try {
DMType dm_name = "DMMOFEM";
auto pipeline_mng = m_field.
getInterface<PipelineManager>();
pipeline_mng->getOpDomainRhsPipeline().push_back(
new OpRow(
"U"));
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.
VolumeElementForcesAndSourcesCoreOnSideSwitch< 0 > VolumeElementForcesAndSourcesCoreOnSide
Volume element used to integrate on skeleton.
VolumeElementForcesAndSourcesCoreSwitch< 0 > VolumeElementForcesAndSourcesCore
Volume finite element default.
#define MOFEM_LOG(channel, severity)
Log.
int main(int argc, char *argv[])
#define HelloFunctionBegin
static map< EntityType, std::string > type_name
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
DeprecatedCoreInterface Interface
DataForcesAndSourcesCore::EntData EntData
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.
friend class UserDataOperator
MoFEMErrorCode getInterface(const MOFEMuuid &uuid, IFACE *&iface) const
Get interface by uuid and return reference to pointer of interface.
VolumeElementForcesAndSourcesCoreOnSideBase::UserDataOperator UserDataOperator
VolumeElementForcesAndSourcesCoreBase::UserDataOperator UserDataOperator