v0.12.1
Classes | Typedefs | Functions | Variables
shallow_wave.cpp File Reference
#include <MoFEM.hpp>
#include <boost/math/quadrature/gauss_kronrod.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  OpURhs
 
struct  OpULhs_dU
 
struct  OpULhs_dH
 
struct  Example
 [Example] More...
 
struct  Monitor
 [Push operators to pipeline] More...
 

Typedefs

using EntData = DataForcesAndSourcesCore::EntData
 
using DomainEle = ElementsAndOps< FE_DIM >::DomainEle
 
using DomainEleOp = ElementsAndOps< FE_DIM >::DomainEleOp
 
using PostProcEle = ElementsAndOps< FE_DIM >::PostProcEle
 
using AssemblyDomainEleOp = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::OpBase
 
using OpBaseDivU = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixScalarTimesDiv< 3 >
 
using OpBaseGradH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixVectorTimesGrad< 1, 3, 3 >
 
using OpMassUU = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 3 >
 
using OpMassHH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 
using OpBaseTimesDotH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalarField< 1 >
 
using OpBaseTimesDivU = OpBaseTimesDotH
 
using OpSourceU = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, 3 >
 
using OpSourceH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, 1 >
 
using OpConvectiveH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpConvectiveTermRhs< 1, 1, 3 >
 
using OpConvectiveH_dU = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpConvectiveTermLhsDu< 1, 1, 3 >
 
using OpConvectiveH_dGradH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpConvectiveTermLhsDy< 1, 1, 3 >
 

Functions

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

Variables

constexpr int FE_DIM = 2
 
constexpr double omega = 7.292 * 1e-5
 
constexpr double g = 9.80616
 
constexpr double mu = 1e4
 
constexpr double h0 = 1e4
 
constexpr double h_hat = 120
 
constexpr double u_max = 80
 
constexpr double phi_0 = M_PI / 7
 
constexpr double phi_1 = M_PI / 2 - phi_0
 
constexpr double phi_2 = M_PI / 4
 
constexpr double alpha_montain = 1. / 3.
 
constexpr double beta_montain = 1. / 15.
 
constexpr double penalty = 1
 
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'l', 3 > l
 
FTensor::Index< 'm', 3 > m
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ AssemblyDomainEleOp

Definition at line 46 of file shallow_wave.cpp.

◆ DomainEle

Definition at line 42 of file shallow_wave.cpp.

◆ DomainEleOp

Definition at line 43 of file shallow_wave.cpp.

◆ EntData

Examples
shallow_wave.cpp.

Definition at line 41 of file shallow_wave.cpp.

◆ OpBaseDivU

Examples
shallow_wave.cpp.

Definition at line 50 of file shallow_wave.cpp.

◆ OpBaseGradH

using OpBaseGradH = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpMixVectorTimesGrad<1, 3, 3>

Definition at line 52 of file shallow_wave.cpp.

◆ OpBaseTimesDivU

Examples
shallow_wave.cpp.

Definition at line 63 of file shallow_wave.cpp.

◆ OpBaseTimesDotH

Examples
shallow_wave.cpp.

Definition at line 61 of file shallow_wave.cpp.

◆ OpConvectiveH

using OpConvectiveH = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpConvectiveTermRhs<1, 1, 3>
Examples
shallow_wave.cpp.

Definition at line 70 of file shallow_wave.cpp.

◆ OpConvectiveH_dGradH

using OpConvectiveH_dGradH = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpConvectiveTermLhsDy<1, 1, 3>
Examples
shallow_wave.cpp.

Definition at line 74 of file shallow_wave.cpp.

◆ OpConvectiveH_dU

using OpConvectiveH_dU = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpConvectiveTermLhsDu<1, 1, 3>
Examples
shallow_wave.cpp.

Definition at line 72 of file shallow_wave.cpp.

◆ OpMassHH

using OpMassHH = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 1>
Examples
shallow_wave.cpp.

Definition at line 58 of file shallow_wave.cpp.

◆ OpMassUU

using OpMassUU = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 3>
Examples
shallow_wave.cpp.

Definition at line 56 of file shallow_wave.cpp.

◆ OpSourceH

using OpSourceH = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpSource<1, 1>
Examples
shallow_wave.cpp.

Definition at line 67 of file shallow_wave.cpp.

◆ OpSourceU

using OpSourceU = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpSource<1, 3>
Examples
shallow_wave.cpp.

Definition at line 65 of file shallow_wave.cpp.

◆ PostProcEle

Definition at line 44 of file shallow_wave.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Examples
shallow_wave.cpp.

Definition at line 862 of file shallow_wave.cpp.

862  {
863 
864  // Initialisation of MoFEM/PETSc and MOAB data structures
865  const char param_file[] = "param_file.petsc";
866  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
867 
868  // Add logging channel for example
869  auto core_log = logging::core::get();
870  core_log->add_sink(LogManager::createSink(LogManager::getStrmWorld(), "SW"));
871  LogManager::setLog("SW");
872  MOFEM_LOG_TAG("SW", "example");
873 
874  try {
875 
876  //! [Register MoFEM discrete manager in PETSc]
877  DMType dm_name = "DMMOFEM";
878  CHKERR DMRegister_MoFEM(dm_name);
879  //! [Register MoFEM discrete manager in PETSc
880 
881  //! [Create MoAB]
882  moab::Core mb_instance; ///< mesh database
883  moab::Interface &moab = mb_instance; ///< mesh database interface
884  //! [Create MoAB]
885 
886  //! [Create MoFEM]
887  MoFEM::Core core(moab); ///< finite element database
888  MoFEM::Interface &m_field = core; ///< finite element database insterface
889  //! [Create MoFEM]
890 
891  //! [Example]
892  Example ex(m_field);
893  CHKERR ex.runProblem();
894  //! [Example]
895  }
896  CATCH_ERRORS;
897 
899 }
std::string param_file
#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:340
CoreTmp< 0 > Core
Definition: Core.hpp:1095
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1949
static char help[]
[Check]
[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.

Variable Documentation

◆ alpha_montain

constexpr double alpha_montain = 1. / 3.
constexpr
Examples
shallow_wave.cpp.

Definition at line 87 of file shallow_wave.cpp.

◆ beta_montain

constexpr double beta_montain = 1. / 15.
constexpr
Examples
shallow_wave.cpp.

Definition at line 88 of file shallow_wave.cpp.

◆ FE_DIM

constexpr int FE_DIM = 2
constexpr
Examples
shallow_wave.cpp.

Definition at line 39 of file shallow_wave.cpp.

◆ g

constexpr double g = 9.80616
constexpr

◆ h0

constexpr double h0 = 1e4
constexpr
Examples
shallow_wave.cpp.

Definition at line 80 of file shallow_wave.cpp.

◆ h_hat

constexpr double h_hat = 120
constexpr
Examples
shallow_wave.cpp.

Definition at line 82 of file shallow_wave.cpp.

◆ help

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

[Check]

Examples
shallow_wave.cpp.

Definition at line 860 of file shallow_wave.cpp.

◆ i

FTensor::Index<'i', 3> i
Examples
shallow_wave.cpp.

Definition at line 92 of file shallow_wave.cpp.

◆ j

FTensor::Index<'j', 3> j
Examples
shallow_wave.cpp.

Definition at line 93 of file shallow_wave.cpp.

◆ l

FTensor::Index<'l', 3> l
Examples
shallow_wave.cpp.

Definition at line 94 of file shallow_wave.cpp.

◆ m

FTensor::Index<'m', 3> m

◆ mu

constexpr double mu = 1e4
constexpr

◆ omega

constexpr double omega = 7.292 * 1e-5
constexpr
Examples
shallow_wave.cpp.

Definition at line 77 of file shallow_wave.cpp.

◆ penalty

constexpr double penalty = 1
constexpr
Examples
shallow_wave.cpp.

Definition at line 90 of file shallow_wave.cpp.

◆ phi_0

constexpr double phi_0 = M_PI / 7
constexpr
Examples
shallow_wave.cpp.

Definition at line 84 of file shallow_wave.cpp.

◆ phi_1

constexpr double phi_1 = M_PI / 2 - phi_0
constexpr
Examples
shallow_wave.cpp.

Definition at line 85 of file shallow_wave.cpp.

◆ phi_2

constexpr double phi_2 = M_PI / 4
constexpr
Examples
shallow_wave.cpp.

Definition at line 86 of file shallow_wave.cpp.

◆ u_max

constexpr double u_max = 80
constexpr
Examples
shallow_wave.cpp.

Definition at line 83 of file shallow_wave.cpp.