v0.13.0
Classes | Typedefs | Functions | Variables
radiation.cpp File Reference
#include <MoFEM.hpp>
#include <BasicFiniteElements.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 32 of file radiation.cpp.

◆ DomainEleOp

Definition at line 33 of file radiation.cpp.

◆ EdgeEle

Definition at line 34 of file radiation.cpp.

◆ EdgeEleOp

Definition at line 35 of file radiation.cpp.

◆ EntData

Definition at line 36 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 37 of file radiation.cpp.

◆ OpDomainGradTimesVec

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

Definition at line 39 of file radiation.cpp.

Function Documentation

◆ main()

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

[Check results]

Definition at line 316 of file radiation.cpp.

316  {
317 
318  // Initialisation of MoFEM/PETSc and MOAB data structures
319  const char param_file[] = "param_file.petsc";
320  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
321 
322  // Add logging channel for example
323  auto core_log = logging::core::get();
324  core_log->add_sink(
325  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
326  LogManager::setLog("EXAMPLE");
327  MOFEM_LOG_TAG("EXAMPLE", "example");
328 
329  try {
330 
331  //! [Register MoFEM discrete manager in PETSc]
332  DMType dm_name = "DMMOFEM";
333  CHKERR DMRegister_MoFEM(dm_name);
334  //! [Register MoFEM discrete manager in PETSc
335 
336  //! [Create MoAB]
337  moab::Core mb_instance; ///< mesh database
338  moab::Interface &moab = mb_instance; ///< mesh database interface
339  //! [Create MoAB]
340 
341  //! [Create MoFEM]
342  MoFEM::Core core(moab); ///< finite element database
343  MoFEM::Interface &m_field = core; ///< finite element database insterface
344  //! [Create MoFEM]
345 
346  //! [Load mesh]
347  Simple *simple = m_field.getInterface<Simple>();
348  CHKERR simple->getOptions();
349  CHKERR simple->loadFile("");
350  //! [Load mesh]
351 
352  //! [Example]
353  Example ex(m_field);
354  CHKERR ex.runProblem();
355  //! [Example]
356  }
357  CATCH_ERRORS;
358 
360 }
std::string param_file
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
#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
CoreTmp< 0 > Core
Definition: Core.hpp:1096
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1965
static char help[]
Definition: radiation.cpp:28
[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.
Simple interface for fast problem set-up.
Definition: Simple.hpp:33
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.

Variable Documentation

◆ Beta

constexpr double Beta = emissivity * boltzmann_constant
constexpr

Definition at line 52 of file radiation.cpp.

◆ boltzmann_constant

constexpr double boltzmann_constant = 5.670374419e-2
constexpr

Definition at line 51 of file radiation.cpp.

◆ emissivity

constexpr double emissivity = 1
constexpr

Definition at line 50 of file radiation.cpp.

◆ heat_conductivity

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

Definition at line 48 of file radiation.cpp.

◆ help

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

Definition at line 28 of file radiation.cpp.

◆ T_ambient

constexpr double T_ambient = 2.7
constexpr

Definition at line 54 of file radiation.cpp.