v0.14.0
Loading...
Searching...
No Matches
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
 
using OpBaseDivU
 
using OpBaseGradH
 
using OpMassUU
 
using OpMassHH
 
using OpBaseTimesDotH
 
using OpBaseTimesDivU = OpBaseTimesDotH
 
using OpSourceU
 
using OpSourceH
 
using OpConvectiveH
 
using OpConvectiveH_dU
 
using OpConvectiveH_dGradH
 

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]
 

Typedef Documentation

◆ AssemblyDomainEleOp

◆ DomainEle

Definition at line 27 of file shallow_wave.cpp.

◆ DomainEleOp

Definition at line 28 of file shallow_wave.cpp.

◆ EntData

Definition at line 26 of file shallow_wave.cpp.

◆ OpBaseDivU

using OpBaseDivU
Initial value:
FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpMixScalarTimesDiv< SPACE_DIM, COORD_TYPE > OpMixScalarTimesDiv
Examples
shallow_wave.cpp.

Definition at line 35 of file shallow_wave.cpp.

◆ OpBaseGradH

using OpBaseGradH

◆ OpBaseTimesDivU

Examples
shallow_wave.cpp.

Definition at line 48 of file shallow_wave.cpp.

◆ OpBaseTimesDotH

◆ OpConvectiveH

◆ OpConvectiveH_dGradH

◆ OpConvectiveH_dU

◆ OpMassHH

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

Definition at line 43 of file shallow_wave.cpp.

◆ OpMassUU

using OpMassUU

◆ OpSourceH

using OpSourceH
Initial value:
Examples
shallow_wave.cpp.

Definition at line 52 of file shallow_wave.cpp.

◆ OpSourceU

using OpSourceU
Initial value:
Examples
shallow_wave.cpp.

Definition at line 50 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]

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";
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 }
937
939}
std::string param_file
#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[]
[Check]
[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.

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

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]

Definition at line 900 of file shallow_wave.cpp.

◆ i

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

◆ j

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

Definition at line 78 of file shallow_wave.cpp.

◆ l

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

Definition at line 79 of file shallow_wave.cpp.

◆ m

FTensor::Index<'m', 3> m
Examples
phase.cpp, plastic.cpp, and shallow_wave.cpp.

Definition at line 80 of file shallow_wave.cpp.

◆ mu

constexpr double mu = 1e4
constexpr
Examples
dynamic_first_order_con_law.cpp, and shallow_wave.cpp.

Definition at line 64 of file shallow_wave.cpp.

◆ omega

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

Definition at line 62 of file shallow_wave.cpp.

◆ penalty

constexpr double penalty = 1
constexpr

Definition at line 75 of file shallow_wave.cpp.

◆ 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.