v0.16.3
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
schrod_eig.cpp File Reference
#include <MoFEM.hpp>
#include <schrod_eig.hpp>
#include <slepceps.h>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 [Operators_definition] More...
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  Example
 [Example] More...
 

Macros

#define EXECUTABLE_DIMENSION   2
 

Typedefs

using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpDomainGradGrad = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradGrad< 1, 1, SPACE_DIM >
 
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 

Functions

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

Variables

constexpr int SPACE_DIM
 
double hbar = 1.054571817e-34
 [Physical constants and parameters]
 
double m0 = 9.1093837015e-31
 
double scale = 1e-9
 
double effMass = 1
 
double q = 1.602176634e-19
 
double potential = 0 * q
 
int order = 2
 [Physical constants and parameters]
 
static char help [] = "...\n\n"
 

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   2

Definition at line 9 of file schrod_eig.cpp.

Typedef Documentation

◆ DomainEle

Definition at line 33 of file schrod_eig.cpp.

◆ DomainEleOp

Definition at line 34 of file schrod_eig.cpp.

◆ OpDomainGradGrad

Definition at line 37 of file schrod_eig.cpp.

◆ OpDomainMass

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

Definition at line 39 of file schrod_eig.cpp.

◆ PostProcEle

Definition at line 35 of file schrod_eig.cpp.

Function Documentation

◆ main()

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

[Check]

[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]

[Example]

[Example]

Definition at line 363 of file schrod_eig.cpp.

363 {
364
365 // Initialisation of MoFEM/PETSc and MOAB data structures
366 const char param_file[] = "param_file.petsc";
367 SlepcInitialize(&argc, &argv, param_file, help);
368 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
369
370 // Add logging channel for example
371 auto core_log = logging::core::get();
372 core_log->add_sink(
374 LogManager::setLog("EXAMPLE");
375 MOFEM_LOG_TAG("EXAMPLE", "example");
376
377 try {
378
379 //! [Register MoFEM discrete manager in PETSc]
380 DMType dm_name = "DMMOFEM";
381 CHKERR DMRegister_MoFEM(dm_name);
382 //! [Register MoFEM discrete manager in PETSc
383
384 //! [Create MoAB]
385 moab::Core mb_instance; ///< mesh database
386 moab::Interface &moab = mb_instance; ///< mesh database interface
387 //! [Create MoAB]
388
389 //! [Create MoFEM]
390 MoFEM::Core core(moab); ///< finite element database
391 MoFEM::Interface &m_field = core; ///< finite element database insterface
392 //! [Create MoFEM]
393
394 //! [Example]
395 Example ex(m_field);
396 CHKERR ex.runProblem();
397 //! [Example]
398 }
400
401 SlepcFinalize();
403}
#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.
static char help[]
[Example]
Definition plastic.cpp:216
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.

Variable Documentation

◆ effMass

double effMass = 1

Definition at line 46 of file schrod_eig.cpp.

◆ hbar

double hbar = 1.054571817e-34

[Physical constants and parameters]

Definition at line 43 of file schrod_eig.cpp.

◆ help

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

Definition at line 53 of file schrod_eig.cpp.

◆ m0

double m0 = 9.1093837015e-31

Definition at line 44 of file schrod_eig.cpp.

◆ order

int order = 2

[Physical constants and parameters]

Definition at line 51 of file schrod_eig.cpp.

◆ potential

double potential = 0 * q

Definition at line 48 of file schrod_eig.cpp.

◆ q

double q = 1.602176634e-19

◆ scale

double scale = 1e-9

Definition at line 45 of file schrod_eig.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
2

Definition at line 30 of file schrod_eig.cpp.