v0.14.0
Loading...
Searching...
No Matches
dg_projection.cpp File Reference
#include <MoFEM.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  AtomTest
 
struct  AtomTest::CommonData
 Collected data use d by operator to evaluate errors for the test. More...
 
struct  AtomTest::OpError< FIELD_DIM >
 Operator to evaluate errors. More...
 

Typedefs

using DomainEle = ElementsAndOps<SPACE_DIM>::DomainEle
 Finite elenent type.
 
using OpDomainMass
 OPerator to integrate mass matrix for least square approximation.
 
using OpDomainSource
 Operator to integrate the right hand side matrix for the problem.
 

Functions

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

Variables

static char help [] = "...\n\n"
 
constexpr char FIELD_NAME [] = "U"
 
constexpr int BASE_DIM = 1
 
constexpr int FIELD_DIM = 1
 
constexpr int SPACE_DIM = 2
 
constexpr int order = 2
 
auto fun
 Function to approximate.
 

Typedef Documentation

◆ DomainEle

Finite elenent type.

Definition at line 27 of file dg_projection.cpp.

◆ OpDomainMass

using OpDomainMass
Initial value:

OPerator to integrate mass matrix for least square approximation.

Definition at line 44 of file dg_projection.cpp.

◆ OpDomainSource

Initial value:

Operator to integrate the right hand side matrix for the problem.

Definition at line 51 of file dg_projection.cpp.

Function Documentation

◆ main()

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

[Check results]

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

[AtomTest]

[AtomTest]

Definition at line 268 of file dg_projection.cpp.

268 {
269
270 // Initialisation of MoFEM/PETSc and MOAB data structures
271 MoFEM::Core::Initialize(&argc, &argv, NULL, help);
272
273 try {
274
275 //! [Register MoFEM discrete manager in PETSc]
276 DMType dm_name = "DMMOFEM";
277 CHKERR DMRegister_MoFEM(dm_name);
278 //! [Register MoFEM discrete manager in PETSc
279
280 //! [Create MoAB]
281 moab::Core mb_instance; ///< mesh database
282 moab::Interface &moab = mb_instance; ///< mesh database interface
283 //! [Create MoAB]
284
285 //! [Create MoFEM]
286 MoFEM::Core core(moab); ///< finite element database
287 MoFEM::Interface &m_field = core; ///< finite element database insterface
288 //! [Create MoFEM]
289
290 //! [AtomTest]
291 AtomTest ex(m_field);
292 CHKERR ex.runProblem();
293 //! [AtomTest]
294 }
296
298}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static char help[]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
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.

Variable Documentation

◆ BASE_DIM

◆ FIELD_DIM

int FIELD_DIM = 1
constexpr

Definition at line 16 of file dg_projection.cpp.

◆ FIELD_NAME

char FIELD_NAME[] = "U"
constexpr

Definition at line 14 of file dg_projection.cpp.

◆ fun

auto fun
Initial value:
= [](const double x, const double y, const double z) {
return x + y + x * x + y * y;
}

Function to approximate.

Examples
PoissonDiscontinousGalerkin.hpp, dg_projection.cpp, higher_derivatives.cpp, prism_polynomial_approximation.cpp, and quad_polynomial_approximation.cpp.

Definition at line 36 of file dg_projection.cpp.

36 {
37 return x + y + x * x + y * y;
38};

◆ help

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

Definition at line 12 of file dg_projection.cpp.

◆ order

int order = 2
constexpr
Examples
EshelbianPlasticity.cpp, HookeElement.cpp, MagneticElement.hpp, Remodeling.cpp, Remodeling.hpp, UnsaturatedFlow.hpp, analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, analytical_poisson_field_split.cpp, approx_sphere.cpp, boundary_marker.cpp, build_large_problem.cpp, build_problems.cpp, cell_forces.cpp, child_and_parent.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, dg_projection.cpp, dm_build_partitioned_mesh.cpp, dynamic_first_order_con_law.cpp, eigen_elastic.cpp, elasticity.cpp, field_blas.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, forces_and_sources_testing_users_base.cpp, free_surface.cpp, hanging_node_approx.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_check_approx_in_3d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, heat_method.cpp, helmholtz.cpp, higher_derivatives.cpp, magnetostatic.cpp, minimal_surface_area.cpp, mixed_poisson.cpp, mortar_contact.cpp, mortar_contact_thermal.cpp, phase.cpp, photon_diffusion.cpp, plastic.cpp, plate.cpp, plot_base.cpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, reaction_diffusion.cpp, remove_entities_from_problem.cpp, remove_entities_from_problem_not_partitioned.cpp, schur_test_diag_mat.cpp, seepage.cpp, shallow_wave.cpp, simple_contact.cpp, simple_contact_thermal.cpp, simple_elasticity.cpp, tensor_divergence_operator.cpp, test_jacobian_of_simple_contact_element.cpp, testing_jacobian_of_hook_element.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, unsaturated_transport.cpp, and wave_equation.cpp.

Definition at line 18 of file dg_projection.cpp.

◆ SPACE_DIM

int SPACE_DIM = 2
constexpr

Definition at line 17 of file dg_projection.cpp.