v0.14.0
Classes | Typedefs | Functions | Variables
wave_equation.cpp File Reference
#include <stdlib.h>
#include <cmath>
#include <BasicFiniteElements.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  Monitor
 [Push operators to pipeline] More...
 
struct  WaveEquation
 

Typedefs

using EntData = EntitiesFieldData::EntData
 [Define dimension] More...
 
using DomainEle = PipelineManager::FaceEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = PipelineManager::EdgeEle
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 
using OpDomainGradGrad = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradGrad< 1, 1, SPACE_DIM >
 
using OpDomainTimesScalarField = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalar< 1 >
 
using OpDomainGradTimesVec = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, 1, SPACE_DIM >
 
using OpBoundaryMass = FormsIntegrators< BoundaryEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 
using OpBoundaryTimeScalarField = FormsIntegrators< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalar< 1 >
 
using OpBoundarySource = FormsIntegrators< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, 1 >
 

Functions

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

Variables

static char help [] = "...\n\n"
 
constexpr int SPACE_DIM = 2
 [Define dimension] More...
 
constexpr double wave_speed2 = 1
 

Typedef Documentation

◆ BoundaryEle

Definition at line 35 of file wave_equation.cpp.

◆ BoundaryEleOp

Definition at line 36 of file wave_equation.cpp.

◆ DomainEle

Definition at line 33 of file wave_equation.cpp.

◆ DomainEleOp

Definition at line 34 of file wave_equation.cpp.

◆ EntData

[Define dimension]

Examples
wave_equation.cpp.

Definition at line 32 of file wave_equation.cpp.

◆ OpBoundaryMass

using OpBoundaryMass = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpMass<1, 1>
Examples
wave_equation.cpp.

Definition at line 49 of file wave_equation.cpp.

◆ OpBoundarySource

using OpBoundarySource = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<1, 1>
Examples
wave_equation.cpp.

Definition at line 53 of file wave_equation.cpp.

◆ OpBoundaryTimeScalarField

using OpBoundaryTimeScalarField = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesScalar<1>
Examples
wave_equation.cpp.

Definition at line 51 of file wave_equation.cpp.

◆ OpDomainGradGrad

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

Definition at line 42 of file wave_equation.cpp.

◆ OpDomainGradTimesVec

using OpDomainGradTimesVec = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpGradTimesTensor<1, 1, SPACE_DIM>
Examples
wave_equation.cpp.

Definition at line 46 of file wave_equation.cpp.

◆ OpDomainMass

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

Definition at line 40 of file wave_equation.cpp.

◆ OpDomainTimesScalarField

using OpDomainTimesScalarField = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesScalar<1>
Examples
wave_equation.cpp.

Definition at line 44 of file wave_equation.cpp.

◆ PostProcEle

Definition at line 37 of file wave_equation.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Examples
wave_equation.cpp.

Definition at line 392 of file wave_equation.cpp.

392  {
393 
394  // Initialisation of MoFEM/PETSc and MOAB data structures
395  const char param_file[] = "param_file.petsc";
396  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
397 
398  // Add logging channel for example
399  auto core_log = logging::core::get();
400  core_log->add_sink(
401  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
402  LogManager::setLog("EXAMPLE");
403  MOFEM_LOG_TAG("EXAMPLE", "example")
404 
405  // Error handling
406  try {
407  // Register MoFEM discrete manager in PETSc
408  DMType dm_name = "DMMOFEM";
409  CHKERR DMRegister_MoFEM(dm_name);
410 
411  // Create MOAB instance
412  moab::Core mb_instance; // mesh database
413  moab::Interface &moab = mb_instance; // mesh database interface
414 
415  // Create MoFEM instance
416  MoFEM::Core core(moab); // finite element database
417  MoFEM::Interface &m_field = core; // finite element interface
418 
419  // Run the main analysis
420  WaveEquation heat_problem(m_field);
421  CHKERR heat_problem.runProgram();
422  }
423  CATCH_ERRORS;
424 
425  // Finish work: cleaning memory, getting statistics, etc.
427 
428  return 0;
429 }

Variable Documentation

◆ help

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

Definition at line 24 of file wave_equation.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

[Define dimension]

Examples
wave_equation.cpp.

Definition at line 29 of file wave_equation.cpp.

◆ wave_speed2

constexpr double wave_speed2 = 1
constexpr
Examples
wave_equation.cpp.

Definition at line 55 of file wave_equation.cpp.

MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
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:2002
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
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
WaveEquation
Definition: wave_equation.cpp:88
help
static char help[]
Definition: wave_equation.cpp:24
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:1140