v0.15.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 = 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]
 

Typedef Documentation

◆ AssemblyDomainEleOp

Definition at line 31 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

Definition at line 26 of file shallow_wave.cpp.

◆ OpBaseDivU

Definition at line 35 of file shallow_wave.cpp.

◆ OpBaseGradH

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

Definition at line 37 of file shallow_wave.cpp.

◆ OpBaseTimesDivU

Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 48 of file shallow_wave.cpp.

◆ OpBaseTimesDotH

using OpBaseTimesDotH = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesScalar<1>
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 46 of file shallow_wave.cpp.

◆ OpConvectiveH

Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 55 of file shallow_wave.cpp.

◆ OpConvectiveH_dGradH

Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 59 of file shallow_wave.cpp.

◆ OpConvectiveH_dU

Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 57 of file shallow_wave.cpp.

◆ OpMassHH

using OpMassHH = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 1>
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 43 of file shallow_wave.cpp.

◆ OpMassUU

using OpMassUU = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 3>
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 41 of file shallow_wave.cpp.

◆ OpSourceH

using OpSourceH = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpSource<1, 1>
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 52 of file shallow_wave.cpp.

◆ OpSourceU

using OpSourceU = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpSource<1, 3>
Examples
mofem/tutorials/vec-4/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";
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 }
937
939}
#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[]
[Check]
[Example]
Definition plastic.cpp:216
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:118
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
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 72 of file shallow_wave.cpp.

◆ beta_montain

constexpr double beta_montain = 1. / 15.
constexpr
Examples
mofem/tutorials/vec-4/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
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 65 of file shallow_wave.cpp.

◆ h_hat

constexpr double h_hat = 120
constexpr
Examples
mofem/tutorials/vec-4/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
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 77 of file shallow_wave.cpp.

◆ j

FTensor::Index<'j', 3> j
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 78 of file shallow_wave.cpp.

◆ l

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

Definition at line 79 of file shallow_wave.cpp.

◆ m

FTensor::Index<'m', 3> m
Examples
mofem/atom_tests/build_composite_problem.cpp, mofem/atom_tests/child_and_parent.cpp, mofem/atom_tests/dm_build_partitioned_mesh.cpp, mofem/atom_tests/dm_partitioned_no_field.cpp, mofem/atom_tests/edge_and_bubble_shape_functions_on_quad.cpp, mofem/atom_tests/hanging_node_approx.cpp, mofem/atom_tests/petsc_smart_ptr_objects.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/prism_polynomial_approximation.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/atom_tests/schur_test_diag_mat.cpp, mofem/tools/split_sideset.cpp, mofem/tutorials/adv-0/plastic.cpp, mofem/tutorials/adv-0/src/PlasticOps.hpp, mofem/tutorials/adv-0/src/PlasticOpsGeneric.hpp, mofem/tutorials/adv-0/src/PlasticOpsLargeStrains.hpp, mofem/tutorials/adv-0/src/PlasticOpsSmallStrains.hpp, mofem/tutorials/adv-2/src/ThermoElasticOps.hpp, mofem/tutorials/adv-2/thermo_elastic.cpp, mofem/tutorials/adv-4/dynamic_first_order_con_law.cpp, mofem/tutorials/adv-5/seepage.cpp, mofem/tutorials/cor-6/simple_elasticity.cpp, mofem/tutorials/cor-7/src/ElasticityMixedFormulation.hpp, mofem/tutorials/mix-1/phase.cpp, mofem/tutorials/vec-2/src/HenckyOps.hpp, mofem/tutorials/vec-3/nonlinear_dynamic_elastic.cpp, mofem/tutorials/vec-4/shallow_wave.cpp, mofem/tutorials/vec-5/free_surface.cpp, mofem/tutorials/vec-7/adjoint.cpp, mofem/users_modules/adolc-plasticity/adolc_plasticity.cpp, mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp, mofem/users_modules/basic_finite_elements/src/HookeElement.hpp, mofem/users_modules/basic_finite_elements/src/impl/HookeElement.cpp, mofem/users_modules/basic_finite_elements/src/impl/NavierStokesElement.cpp, mofem/users_modules/bone_remodelling/src/impl/Remodeling.cpp, mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp, and mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp.

Definition at line 80 of file shallow_wave.cpp.

◆ mu

constexpr double mu = 1e4
constexpr
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 64 of file shallow_wave.cpp.

◆ omega

constexpr double omega = 7.292 * 1e-5
constexpr
Examples
mofem/tutorials/vec-4/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
mofem/tutorials/vec-4/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
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 70 of file shallow_wave.cpp.

◆ phi_2

constexpr double phi_2 = M_PI / 4
constexpr
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 71 of file shallow_wave.cpp.

◆ u_max

constexpr double u_max = 80
constexpr
Examples
mofem/tutorials/vec-4/shallow_wave.cpp.

Definition at line 68 of file shallow_wave.cpp.