v0.14.0
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 = EntitiesFieldData::EntData
 
using DomainEle = ElementsAndOps< FE_DIM >::DomainEle
 
using DomainEleOp = ElementsAndOps< FE_DIM >::DomainEleOp
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
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 >::OpBaseTimesScalar< 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 >::TriLinearForm< GAUSS >::OpConvectiveTermLhsDu< 1, 1, 3 >
 
using OpConvectiveH_dGradH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::TriLinearForm< 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 32 of file shallow_wave.cpp.

◆ DomainEle

Definition at line 27 of file shallow_wave.cpp.

◆ DomainEleOp

Definition at line 28 of file shallow_wave.cpp.

◆ EntData

Examples
shallow_wave.cpp.

Definition at line 26 of file shallow_wave.cpp.

◆ OpBaseDivU

Examples
shallow_wave.cpp.

Definition at line 36 of file shallow_wave.cpp.

◆ OpBaseGradH

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

Definition at line 38 of file shallow_wave.cpp.

◆ OpBaseTimesDivU

Examples
shallow_wave.cpp.

Definition at line 48 of file shallow_wave.cpp.

◆ OpBaseTimesDotH

using OpBaseTimesDotH = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesScalar<1>
Examples
shallow_wave.cpp.

Definition at line 47 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 56 of file shallow_wave.cpp.

◆ OpConvectiveH_dGradH

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

Definition at line 60 of file shallow_wave.cpp.

◆ OpConvectiveH_dU

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

Definition at line 58 of file shallow_wave.cpp.

◆ OpMassHH

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

Definition at line 44 of file shallow_wave.cpp.

◆ OpMassUU

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

Definition at line 42 of file shallow_wave.cpp.

◆ OpSourceH

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

Definition at line 53 of file shallow_wave.cpp.

◆ OpSourceU

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

Definition at line 51 of file shallow_wave.cpp.

◆ PostProcEle

Definition at line 29 of file shallow_wave.cpp.

Function Documentation

◆ main()

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

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

Examples
shallow_wave.cpp.

Definition at line 902 of file shallow_wave.cpp.

902  {
903 
904  // Initialisation of MoFEM/PETSc and MOAB data structures
905  const char param_file[] = "param_file.petsc";
906  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
907 
908  // Add logging channel for example
909  auto core_log = logging::core::get();
910  core_log->add_sink(LogManager::createSink(LogManager::getStrmWorld(), "SW"));
911  LogManager::setLog("SW");
912  MOFEM_LOG_TAG("SW", "example");
913 
914  try {
915 
916  //! [Register MoFEM discrete manager in PETSc]
917  DMType dm_name = "DMMOFEM";
918  CHKERR DMRegister_MoFEM(dm_name);
919  //! [Register MoFEM discrete manager in PETSc
920 
921  //! [Create MoAB]
922  moab::Core mb_instance; ///< mesh database
923  moab::Interface &moab = mb_instance; ///< mesh database interface
924  //! [Create MoAB]
925 
926  //! [Create MoFEM]
927  MoFEM::Core core(moab); ///< finite element database
928  MoFEM::Interface &m_field = core; ///< finite element database insterface
929  //! [Create MoFEM]
930 
931  //! [Example]
932  Example ex(m_field);
933  CHKERR ex.runProblem();
934  //! [Example]
935  }
936  CATCH_ERRORS;
937 
939 }

Variable Documentation

◆ alpha_montain

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

Definition at line 72 of file shallow_wave.cpp.

◆ beta_montain

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

Definition at line 73 of file shallow_wave.cpp.

◆ FE_DIM

constexpr int FE_DIM = 2
constexpr
Examples
shallow_wave.cpp.

Definition at line 24 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 65 of file shallow_wave.cpp.

◆ h_hat

constexpr double h_hat = 120
constexpr
Examples
shallow_wave.cpp.

Definition at line 67 of file shallow_wave.cpp.

◆ help

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

[Check]

Examples
shallow_wave.cpp.

Definition at line 900 of file shallow_wave.cpp.

◆ i

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

Definition at line 77 of file shallow_wave.cpp.

◆ j

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

Definition at line 78 of file shallow_wave.cpp.

◆ l

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

Definition at line 79 of file shallow_wave.cpp.

◆ m

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

◆ mu

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

Definition at line 64 of file shallow_wave.cpp.

◆ omega

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

Definition at line 62 of file shallow_wave.cpp.

◆ penalty

constexpr double penalty = 1
constexpr

◆ phi_0

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

Definition at line 69 of file shallow_wave.cpp.

◆ phi_1

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

Definition at line 70 of file shallow_wave.cpp.

◆ phi_2

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

Definition at line 71 of file shallow_wave.cpp.

◆ u_max

constexpr double u_max = 80
constexpr
Examples
shallow_wave.cpp.

Definition at line 68 of file shallow_wave.cpp.

MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
help
static char help[]
[Check]
Definition: shallow_wave.cpp:900
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
Example
[Example]
Definition: plastic.cpp:228
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::CoreTmp< 0 >::Initialize
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
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1094