v0.14.0
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
standard_poisson.cpp File Reference
#include <stdlib.h>
#include <BasicFiniteElements.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

Definition at line 16 of file standard_poisson.cpp.

◆ OpDomainSource

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

Definition at line 19 of file standard_poisson.cpp.

◆ PostProcFaceEle

Definition at line 10 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";
331
332 // Add logging channel for example problem
333 auto core_log = logging::core::get();
334 core_log->add_sink(
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 }
358
359 // Finish work: cleaning memory, getting statistics, etc.
361
362 return 0;
363}
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:389
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
static char help[]
Core (interface) class.
Definition: Core.hpp:82
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
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:298
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344

◆ 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.