v0.13.0
Classes | Typedefs | Functions | Variables
heat_method.cpp File Reference
#include <MoFEM.hpp>
#include <BasicFiniteElements.hpp>

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 
struct  Example::OpRhs
 

Typedefs

using DomainEle = PipelineManager::FaceEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using EntData = EntitiesFieldData::EntData
 
using OpGradGrad = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradGrad< 1, 1, 3 >
 
using OpMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 

Functions

int main (int argc, char *argv[])
 [Check results] More...
 

Variables

static char help [] = "...\n\n"
 
double dt = 2
 

Typedef Documentation

◆ DomainEle

Definition at line 44 of file heat_method.cpp.

◆ DomainEleOp

Definition at line 45 of file heat_method.cpp.

◆ EntData

Examples
heat_method.cpp.

Definition at line 46 of file heat_method.cpp.

◆ OpGradGrad

using OpGradGrad = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradGrad<1, 1, 3>
Examples
heat_method.cpp.

Definition at line 49 of file heat_method.cpp.

◆ OpMass

using OpMass = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 1>
Examples
heat_method.cpp.

Definition at line 53 of file heat_method.cpp.

Function Documentation

◆ main()

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

[Check results]

Examples
heat_method.cpp.

Definition at line 376 of file heat_method.cpp.

376  {
377 
378  // Initialisation of MoFEM/PETSc and MOAB data structures
379  const char param_file[] = "param_file.petsc";
380  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
381 
382  // Add logging channel for example
383  auto core_log = logging::core::get();
384  core_log->add_sink(
385  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
386  LogManager::setLog("EXAMPLE");
387  MOFEM_LOG_TAG("EXAMPLE", "example");
388 
389  try {
390 
391  //! [Register MoFEM discrete manager in PETSc]
392  DMType dm_name = "DMMOFEM";
393  CHKERR DMRegister_MoFEM(dm_name);
394  //! [Register MoFEM discrete manager in PETSc
395 
396  //! [Create MoAB]
397  moab::Core mb_instance; ///< mesh database
398  moab::Interface &moab = mb_instance; ///< mesh database interface
399  //! [Create MoAB]
400 
401  //! [Create MoFEM]
402  MoFEM::Core core(moab); ///< finite element database
403  MoFEM::Interface &m_field = core; ///< finite element database insterface
404  //! [Create MoFEM]
405 
406  //! [Example]
407  Example ex(m_field);
408  CHKERR ex.runProblem();
409  //! [Example]
410  }
411  CATCH_ERRORS;
412 
414 }
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
#define CHKERR
Inline error check.
Definition: definitions.h:548
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:59
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:342
static char help[]
Definition: heat_method.cpp:38
CoreTmp< 0 > Core
Definition: Core.hpp:1096
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1965
[Example]
Core (interface) class.
Definition: Core.hpp:92
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:85
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:125
Deprecated interface functions.

Variable Documentation

◆ dt

double dt = 2
Examples
heat_method.cpp, and lorentz_force.cpp.

Definition at line 40 of file heat_method.cpp.

◆ help

char help[] = "...\n\n"
static
Examples
heat_method.cpp.

Definition at line 38 of file heat_method.cpp.