v0.14.0
Loading...
Searching...
No Matches
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
 
using OpDomainGradTimesVec
 
using OpBase = OpBaseImpl<PETSC, EdgeEleOp>
 

Functions

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

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

◆ OpDomainGradTimesVec

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";
327
328 // Add logging channel for example
329 auto core_log = logging::core::get();
330 core_log->add_sink(
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 }
364
366}
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.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
static char help[]
Definition radiation.cpp:16
[Example]
Definition plastic.cpp:228
Core (interface) class.
Definition Core.hpp:82
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
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:112
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.
Simple interface for fast problem set-up.
Definition Simple.hpp:27
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 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.