12static char help[] =
"...\n\n";
14int main(
int argc,
char *argv[]) {
23 auto check = [&](
const int expected) {
27 "use count should be %d but is %d", expected,
35 CHKERR MatCreate(PETSC_COMM_SELF, &
m);
40 { PetscObject obj =
static_cast<PetscObject
>(m_ptr); }
50 CHKERR MatSetSizes(m_ptr, 2, 2, 2, 2);
#define CATCH_ERRORS
Catch errors.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'm', SPACE_DIM > m
implementation of Data Operators for Forces and Sources
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.
intrusive_ptr for managing petsc objects