v0.14.0
Classes | Typedefs | Functions | Variables
standard_poisson.cpp File Reference
#include <stdlib.h>
#include <MoFEM.hpp>

Go to the source code of this file.

Classes

struct  StandardPoisson
 
struct  StandardPoisson::CommonData
 [Source function] More...
 
struct  StandardPoisson::OpError
 

Typedefs

using PostProcFaceEle = PostProcBrokenMeshInMoab< FaceElementForcesAndSourcesCore >
 
using DomainEle = PipelineManager::FaceEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using OpDomainGradGrad = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradGrad< 1, 1, SPACE_DIM >
 
using OpDomainSource = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, 1 >
 

Functions

double sqr (double x)
 
int main (int argc, char *argv[])
 

Variables

constexpr int SPACE_DIM = 2
 
static char help [] = "...\n\n"
 

Typedef Documentation

◆ DomainEle

Definition at line 13 of file standard_poisson.cpp.

◆ DomainEleOp

Definition at line 14 of file standard_poisson.cpp.

◆ OpDomainGradGrad

using OpDomainGradGrad = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpGradGrad<1, 1, SPACE_DIM>

Definition at line 17 of file standard_poisson.cpp.

◆ OpDomainSource

using OpDomainSource = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<1, 1>

Definition at line 20 of file standard_poisson.cpp.

◆ PostProcFaceEle

Definition at line 11 of file standard_poisson.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 326 of file standard_poisson.cpp.

326  {
327 
328  // Initialisation of MoFEM/PETSc and MOAB data structures
329  const char param_file[] = "param_file.petsc";
330  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
331 
332  // Add logging channel for example problem
333  auto core_log = logging::core::get();
334  core_log->add_sink(
335  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
336  LogManager::setLog("EXAMPLE");
337  MOFEM_LOG_TAG("EXAMPLE", "StandardPoisson");
338 
339  // Error handling
340  try {
341  // Register MoFEM discrete manager in PETSc
342  DMType dm_name = "DMMOFEM";
343  CHKERR DMRegister_MoFEM(dm_name);
344 
345  // Create MOAB instance
346  moab::Core mb_instance; // mesh database
347  moab::Interface &moab = mb_instance; // mesh database interface
348 
349  // Create MoFEM instance
350  MoFEM::Core core(moab); // finite element database
351  MoFEM::Interface &m_field = core; // finite element interface
352 
353  // Run the main analysis
354  StandardPoisson poisson_problem(m_field);
355  CHKERR poisson_problem.runProgram();
356  }
357  CATCH_ERRORS;
358 
359  // Finish work: cleaning memory, getting statistics, etc.
361 
362  return 0;
363 }

◆ sqr()

double sqr ( double  x)
inline

Definition at line 7 of file standard_poisson.cpp.

7 { return x * x; }

Variable Documentation

◆ help

char help[] = "...\n\n"
static

Definition at line 22 of file standard_poisson.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

Definition at line 9 of file standard_poisson.cpp.

MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
StandardPoisson
Definition: standard_poisson.cpp:24
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
help
static char help[]
Definition: standard_poisson.cpp:22
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:43
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::CoreTmp< 0 >::Initialize
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:72
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1148