No Matches
Classes | Typedefs | Functions | Variables
dg_projection.cpp File Reference
#include <MoFEM.hpp>

Go to the source code of this file.


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


using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 Finite elenent type. More...
using DomainEleOp = DomainEle::UserDataOperator
 Finire element operator type. More...
using EntData = EntitiesFieldData::EntData
 Data on entities. More...
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< BASE_DIM, FIELD_DIM >
 OPerator to integrate mass matrix for least square approximation. More...
using OpDomainSource = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< BASE_DIM, FIELD_DIM >
 Operator to integrate the right hand side matrix for the problem. More...


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


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

Typedef Documentation

◆ DomainEle

Finite elenent type.

Definition at line 27 of file dg_projection.cpp.

◆ DomainEleOp

Finire element operator type.

Definition at line 28 of file dg_projection.cpp.

◆ EntData

Data on entities.

Definition at line 30 of file dg_projection.cpp.

◆ OpDomainMass

OPerator to integrate mass matrix for least square approximation.

Definition at line 44 of file dg_projection.cpp.

◆ OpDomainSource

using OpDomainSource = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<BASE_DIM, FIELD_DIM>

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]



Definition at line 268 of file dg_projection.cpp.

268 {
270 // Initialisation of MoFEM/PETSc and MOAB data structures
271 MoFEM::Core::Initialize(&argc, &argv, NULL, help);
273 try {
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
280 //! [Create MoAB]
281 moab::Core mb_instance; ///< mesh database
282 moab::Interface &moab = mb_instance; ///< mesh database interface
283 //! [Create MoAB]
285 //! [Create MoFEM]
286 MoFEM::Core core(moab); ///< finite element database
287 MoFEM::Interface &m_field = core; ///< finite element database insterface
288 //! [Create MoFEM]
290 //! [AtomTest]
291 AtomTest ex(m_field);
292 CHKERR ex.runProblem();
293 //! [AtomTest]
294 }
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
static char help[]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
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


constexpr int BASE_DIM = 1


constexpr int FIELD_DIM = 1

Definition at line 16 of file dg_projection.cpp.


constexpr char FIELD_NAME[] = "U"

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.

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.

◆ help

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

Definition at line 12 of file dg_projection.cpp.

◆ order

constexpr int order = 2
EshelbianPlasticity.cpp, HookeElement.cpp, MagneticElement.hpp, Remodeling.cpp, Remodeling.hpp, SmallStrainPlasticity.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_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, nonlinear_elastic.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, 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, thermo_elastic.cpp, unsaturated_transport.cpp, and wave_equation.cpp.

Definition at line 18 of file dg_projection.cpp.


constexpr int SPACE_DIM = 2

Definition at line 17 of file dg_projection.cpp.