v0.16.3
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
wave_equation.cpp File Reference
#include <stdlib.h>
#include <cmath>
#include <MoFEM.hpp>

Go to the source code of this file.

Classes

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

Typedefs

using EntData = EntitiesFieldData::EntData
 [Define dimension]
 
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]
 
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]

Definition at line 32 of file wave_equation.cpp.

◆ OpBoundaryMass

using OpBoundaryMass = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpMass<1, 1>

◆ OpBoundarySource

using OpBoundarySource = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<1, 1>

◆ OpBoundaryTimeScalarField

using OpBoundaryTimeScalarField = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesScalar<1>

◆ OpDomainGradGrad

◆ OpDomainGradTimesVec

◆ OpDomainMass

using OpDomainMass = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpMass<1, 1>

◆ OpDomainTimesScalarField

using OpDomainTimesScalarField = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesScalar<1>

◆ PostProcEle

Definition at line 37 of file wave_equation.cpp.

Function Documentation

◆ main()

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

Definition at line 400 of file wave_equation.cpp.

400 {
401
402 // Initialisation of MoFEM/PETSc and MOAB data structures
403 const char param_file[] = "param_file.petsc";
404 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
405
406 // Add logging channel for example
407 auto core_log = logging::core::get();
408 core_log->add_sink(
410 LogManager::setLog("EXAMPLE");
411 MOFEM_LOG_TAG("EXAMPLE", "example")
412
413 // Error handling
414 try {
415 // Register MoFEM discrete manager in PETSc
416 DMType dm_name = "DMMOFEM";
417 CHKERR DMRegister_MoFEM(dm_name);
418
419 // Create MOAB instance
420 moab::Core mb_instance; // mesh database
421 moab::Interface &moab = mb_instance; // mesh database interface
422
423 // Create MoFEM instance
424 MoFEM::Core core(moab); // finite element database
425 MoFEM::Interface &m_field = core; // finite element interface
426
427 // Run the main analysis
428 WaveEquation heat_problem(m_field);
429 CHKERR heat_problem.runProgram();
430 }
432
433 // Finish work: cleaning memory, getting statistics, etc.
435
436 return 0;
437}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Core (interface) class.
Definition Core.hpp:83
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:68
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:123
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
static char help[]

Variable Documentation

◆ help

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

Definition at line 24 of file wave_equation.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

[Define dimension]

Definition at line 29 of file wave_equation.cpp.

◆ wave_speed2

constexpr double wave_speed2 = 1
constexpr