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

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 
struct  Example::OpRadiationLhs
 
struct  Example::OpRadiationRhs
 
struct  Example::OpFluxRhs
 
struct  Example::OpCalcSurfaceAverageTemperature
 

Typedefs

using DomainEle = PipelineManager::FaceEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using EdgeEle = PipelineManager::EdgeEle
 
using EdgeEleOp = EdgeEle::UserDataOperator
 
using EntData = EntitiesFieldData::EntData
 
using OpDomainGradGrad = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradGrad< 1, 1, 2 >
 
using OpDomainGradTimesVec = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, 1, 2 >
 
using OpBase = OpBaseImpl< PETSC, EdgeEleOp >
 

Functions

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

Variables

static char help [] = "...\n\n"
 
constexpr double heat_conductivity = ((0.4 + 0.7) / 2) * 1e3
 
constexpr double emissivity = 1
 
constexpr double boltzmann_constant = 5.670374419e-2
 
constexpr double Beta = emissivity * boltzmann_constant
 
constexpr double T_ambient = 2.7
 

Typedef Documentation

◆ DomainEle

Definition at line 20 of file radiation.cpp.

◆ DomainEleOp

Definition at line 21 of file radiation.cpp.

◆ EdgeEle

Definition at line 22 of file radiation.cpp.

◆ EdgeEleOp

Definition at line 23 of file radiation.cpp.

◆ EntData

Definition at line 24 of file radiation.cpp.

◆ OpBase

using OpBase = OpBaseImpl<PETSC, EdgeEleOp>

◆ OpDomainGradGrad

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

Definition at line 26 of file radiation.cpp.

◆ OpDomainGradTimesVec

using OpDomainGradTimesVec = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpGradTimesTensor<1, 1, 2>

Definition at line 28 of file radiation.cpp.

Function Documentation

◆ main()

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

[Check results]

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database insterface

[Create MoFEM]

[Load mesh]

[Load mesh]

[Example]

[Example]

Definition at line 322 of file radiation.cpp.

322  {
323 
324  // Initialisation of MoFEM/PETSc and MOAB data structures
325  const char param_file[] = "param_file.petsc";
326  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
327 
328  // Add logging channel for example
329  auto core_log = logging::core::get();
330  core_log->add_sink(
331  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
332  LogManager::setLog("EXAMPLE");
333  MOFEM_LOG_TAG("EXAMPLE", "example");
334 
335  try {
336 
337  //! [Register MoFEM discrete manager in PETSc]
338  DMType dm_name = "DMMOFEM";
339  CHKERR DMRegister_MoFEM(dm_name);
340  //! [Register MoFEM discrete manager in PETSc
341 
342  //! [Create MoAB]
343  moab::Core mb_instance; ///< mesh database
344  moab::Interface &moab = mb_instance; ///< mesh database interface
345  //! [Create MoAB]
346 
347  //! [Create MoFEM]
348  MoFEM::Core core(moab); ///< finite element database
349  MoFEM::Interface &m_field = core; ///< finite element database insterface
350  //! [Create MoFEM]
351 
352  //! [Load mesh]
353  Simple *simple = m_field.getInterface<Simple>();
354  CHKERR simple->getOptions();
355  CHKERR simple->loadFile("");
356  //! [Load mesh]
357 
358  //! [Example]
359  Example ex(m_field);
360  CHKERR ex.runProblem();
361  //! [Example]
362  }
363  CATCH_ERRORS;
364 
366 }

Variable Documentation

◆ Beta

constexpr double Beta = emissivity * boltzmann_constant
constexpr

Definition at line 40 of file radiation.cpp.

◆ boltzmann_constant

constexpr double boltzmann_constant = 5.670374419e-2
constexpr

Definition at line 39 of file radiation.cpp.

◆ emissivity

constexpr double emissivity = 1
constexpr

Definition at line 38 of file radiation.cpp.

◆ heat_conductivity

constexpr double heat_conductivity = ((0.4 + 0.7) / 2) * 1e3
constexpr

Definition at line 36 of file radiation.cpp.

◆ help

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

Definition at line 16 of file radiation.cpp.

◆ T_ambient

constexpr double T_ambient = 2.7
constexpr

Definition at line 42 of file radiation.cpp.

MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
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
help
static char help[]
Definition: radiation.cpp:16
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
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
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
Example
[Example]
Definition: plastic.cpp:177
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