v0.12.1
Classes | Typedefs | Functions | Variables
cornea_z_approx.cpp File Reference
#include <MoFEM.hpp>
#include <BasicFiniteElements.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ApproxFieldFunctionGeneric
 
struct  Cornea
 
struct  Cornea::CommonData
 
struct  Cornea::OpError
 

Typedefs

using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using EntData = DataForcesAndSourcesCore::EntData
 
using ThicknessFun = boost::function< double(const double, const double)>
 
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, FIELD_DIM >
 
using OpDomainSource = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, FIELD_DIM >
 

Functions

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

Variables

static char help [] = "...\n\n"
 
constexpr int FIELD_DIM = 1
 
constexpr int SPACE_DIM = 2
 
constexpr double Rs = 7.537
 
constexpr double Rf = 7.755
 
constexpr double Qs = 0
 
constexpr double Qf = 0
 
constexpr double z0 = 2.486
 
constexpr double alpha = 80 * M_PI / 180
 
constexpr double thickness_apex = 0.561
 
constexpr double thickness_limbus = 0.669
 
constexpr double graft_thickness = 0.1
 
auto thickness_bottom
 
auto thickness_gap
 
auto thickness_graft
 

Detailed Description

\Cornea cornea_z_approx.cpp

Using PipelineManager interface calculate the divergence of base functions, and integral of flux on the boundary. Since the h-div space is used, volume integral and boundary integral should give the same result.

Definition in file cornea_z_approx.cpp.

Typedef Documentation

◆ DomainEle

Definition at line 43 of file cornea_z_approx.cpp.

◆ DomainEleOp

Definition at line 44 of file cornea_z_approx.cpp.

◆ EntData

Definition at line 45 of file cornea_z_approx.cpp.

◆ OpDomainMass

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

Definition at line 95 of file cornea_z_approx.cpp.

◆ OpDomainSource

using OpDomainSource = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<1, FIELD_DIM>

Definition at line 97 of file cornea_z_approx.cpp.

◆ ThicknessFun

using ThicknessFun = boost::function<double(const double, const double)>

Definition at line 47 of file cornea_z_approx.cpp.

Function Documentation

◆ main()

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

Definition at line 564 of file cornea_z_approx.cpp.

564  {
565 
566  // Initialisation of MoFEM/PETSc and MOAB data structures
567  const char param_file[] = "param_file.petsc";
568  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
569 
570  try {
571 
572  //! [Register MoFEM discrete manager in PETSc]
573  DMType dm_name = "DMMOFEM";
574  CHKERR DMRegister_MoFEM(dm_name);
575  //! [Register MoFEM discrete manager in PETSc
576 
577  //! [Create MoAB]
578  moab::Core mb_instance; ///< mesh database
579  moab::Interface &moab = mb_instance; ///< mesh database interface
580  //! [Create MoAB]
581 
582  //! [Create MoFEM]
583  MoFEM::Core core(moab); ///< finite element database
584  MoFEM::Interface &m_field = core; ///< finite element database insterface
585  //! [Create MoFEM]
586 
587  //! [Cornea]
588  Cornea ex(m_field);
589  CHKERR ex.runProblem();
590  //! [Cornea]
591  }
592  CATCH_ERRORS;
593 
595 }
std::string param_file
static char help[]
#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
CoreTmp< 0 > Core
Definition: Core.hpp:1095
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1949
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.

Variable Documentation

◆ alpha

constexpr double alpha = 80 * M_PI / 180
constexpr

◆ FIELD_DIM

constexpr int FIELD_DIM = 1
constexpr

Definition at line 32 of file cornea_z_approx.cpp.

◆ graft_thickness

constexpr double graft_thickness = 0.1
constexpr

Definition at line 58 of file cornea_z_approx.cpp.

◆ help

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

Definition at line 28 of file cornea_z_approx.cpp.

◆ Qf

constexpr double Qf = 0
constexpr

Definition at line 52 of file cornea_z_approx.cpp.

◆ Qs

constexpr double Qs = 0
constexpr

Definition at line 51 of file cornea_z_approx.cpp.

◆ Rf

constexpr double Rf = 7.755
constexpr

Definition at line 50 of file cornea_z_approx.cpp.

◆ Rs

constexpr double Rs = 7.537
constexpr

Definition at line 49 of file cornea_z_approx.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

Definition at line 33 of file cornea_z_approx.cpp.

◆ thickness_apex

constexpr double thickness_apex = 0.561
constexpr

Definition at line 56 of file cornea_z_approx.cpp.

◆ thickness_bottom

auto thickness_bottom
Initial value:
= [](double r, const double theta) {
constexpr double R = (Rf + Rs) / 2;
const double alpha = 1 - r / R;
return -(alpha * thickness_apex + (1 - alpha) * thickness_limbus);
}
constexpr double Rs
constexpr double thickness_apex
constexpr double Rf
constexpr double thickness_limbus
constexpr double alpha
const double r
rate factor

Definition at line 81 of file cornea_z_approx.cpp.

◆ thickness_gap

auto thickness_gap
Initial value:
= [](double r, const double theta) {
return thickness_bottom(r, theta);
}
auto thickness_bottom

Definition at line 87 of file cornea_z_approx.cpp.

◆ thickness_graft

auto thickness_graft
Initial value:
= [](double r, const double theta) {
return thickness_gap(r, theta) + graft_thickness;
}
auto thickness_gap
constexpr double graft_thickness

Definition at line 91 of file cornea_z_approx.cpp.

◆ thickness_limbus

constexpr double thickness_limbus = 0.669
constexpr

Definition at line 57 of file cornea_z_approx.cpp.

◆ z0

constexpr double z0 = 2.486
constexpr

Definition at line 53 of file cornea_z_approx.cpp.