static char help[] =
"...\n\n";
int main(
int argc,
char *argv[]) {
try {
DMType dm_name = "DMMOFEM";
Simple *simple_interface;
CHKERR simple_interface->getOptions();
CHKERR simple_interface->loadFile(
"");
1);
CHKERR simple_interface->setFieldOrder(
"u", 1);
CHKERR simple_interface->buildFields();
FieldBlas *field_blas;
auto set_distance = [&](
VectorAdaptor &&field_data,
double *xcoord,
double *ycoord, double *zcoord) {
zcoord);
field_data[0] = sqrt(t_coord(
i) * t_coord(
i));
};
CHKERR field_blas->setVertexDofs(set_distance,
"u");
if (entPtr->getEntType() == MBVERTEX) {
CHKERR moab.get_coords(&
v, 1, &coords[0]);
if (std::abs(entPtr->getEntFieldData()[0] - norm_2(coords)) >
std::numeric_limits<double>::epsilon())
"Wrong vals %3.4e != %3.4e", entPtr->getEntFieldData()[0],
norm_2(coords));
}
}
private:
};
TestMethod method(moab);
}
}
#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 ...
@ 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.
int main(int argc, char *argv[])
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.
FTensor::Index< 'i', SPACE_DIM > i
double v
phase velocity of light in medium (cm/ns)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
VectorBoundedArray< double, 3 > VectorDouble3
VectorShallowArrayAdaptor< double > VectorAdaptor
implementation of Data Operators for Forces and Sources
DeprecatedCoreInterface Interface
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.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.