hp2D.pypp.hh

Go to the documentation of this file.
1 #ifndef hp2D_pypp_hh
2 #define hp2D_pypp_hh
3 
6 #include "hp2D/linearForm.hh"
7 #include "hp2D/bf_laplace.hh"
8 #include "hp2D/bf_identity.hh"
9 #include "hp2D/bf_divdiv.hh"
10 #include "hp2D/bf_iddiv.hh"
11 #include "hp2D/bf_advection.hh"
12 #include "hp2D/element.hh"
13 #include "hp2D/quad.hh"
14 #include "hp2D/function.hh"
15 #include "hp2D/spacePreBuilder.hh"
16 #include "hp2D/edgeMinMax.hh"
17 #include "hp2D/refinePreBuilder.hh"
18 #include "hp2D/functionBase.hh" //ElementFunction
20 #include "vectorial/linearForm.hh"
21 #include "formula/parsedFormula.hh"
25 
26 inline void export_hp2D_templates(){
27 
28 #ifdef GEN_PYTHON
29 
30  concepts::Import2DMeshGmsh mesh("bla.msh");
31  hp2D::hpFull space(mesh);
32 
33  std::cout << sizeof(hp2D::hpAdaptiveSpace<concepts::Real>) << std::endl;
34  std::cout << sizeof(hp2D::Riesz<concepts::Real>) << std::endl;
35  std::cout << sizeof(hp2D::Riesz<concepts::Cmplx>) << std::endl;
36 
37  std::cout << sizeof(hp2D::LaplaceBase<concepts::Real,concepts::Real>) << std::endl;
38  std::cout << sizeof(hp2D::Laplace<concepts::Real>) << std::endl;
39  std::cout << sizeof(hp2D::Identity<concepts::Real>) << std::endl;
40 
42  hp2D::setupIdentity(videntity_bf);
43  hp2D::setupDivDiv(videntity_bf);
44  hp2D::setupLaplace(videntity_bf);
45  hp2D::setupIdDiv(videntity_bf);
46 
48  concepts::ParsedFormula<concepts::Real2d> frm("(-pi/2*sin(pi*x)*sin(pi/2*y))","(-pi/2*sin(pi*x)*sin(pi/2*y))");
50  hp2D::setupRiesz(videntity_lf, EfC_r);
51 
52  std::cout << sizeof(hp2D::LinearFormHelper_1<concepts::Real>) << std::endl;
53  std::cout << sizeof(hp2D::GradLinearForm<concepts::Real>) << std::endl;
54  std::cout << sizeof(hp2D::Value<concepts::Real,concepts::Real>) << std::endl;
55  std::cout << sizeof(hp2D::Value<concepts::Cmplx,concepts::Real>) << std::endl;
56  std::cout << sizeof(hp2D::Trace<concepts::Real,concepts::Real>) << std::endl;
57  std::cout << sizeof(hp2D::Trace<concepts::Cmplx,concepts::Real>) << std::endl;
58 
59  std::cout << sizeof(hp2D::ElementFunction<2,concepts::Real>) << std::endl;
60  std::cout << sizeof(hp2D::ElementFunction<2,concepts::Cmplx>) << std::endl;
61  std::cout << sizeof(hp2D::Grad<concepts::Real>) << std::endl;
62  std::cout << sizeof(hp2D::Grad<concepts::Cmplx>) << std::endl;
63 
64  std::cout << sizeof(hp2D::Element<concepts::Real>) << std::endl;
65  std::cout << sizeof(hp2D::BaseQuad<concepts::Real>) << std::endl;
66  std::cout << sizeof(hp2D::hpAdaptiveSpaceDG<hp2D::hpAdaptiveSpaceH1>) << std::endl;
67  std::cout << sizeof(hp2D::hpAdaptiveSpaceHCurl) << std::endl;
68 
69  std::cout << sizeof(hp2D::Laplacian<concepts::Real, concepts::Real>) << std::endl;
70  std::cout << sizeof(hp2D::Laplacian<concepts::Cmplx, concepts::Real>) << std::endl;
71 
72  std::cout << sizeof(hp2D::ExplicitResidual2D<concepts::Real>) << std::endl;
73  std::cout << sizeof(hp2D::NeumannTrace<concepts::Real,concepts::Real>) << std::endl;
74  std::cout << sizeof(hp2D::Advection<concepts::Real>) << std::endl;
75 #endif
76 }
77 
78 
79 
80 
81 #endif
void export_hp2D_templates()
Definition: hp2D.pypp.hh:26
The approximated function in a FE space.
Definition: function.hh:33
A function class to calculate element matrices for the bilinear form.
Definition: bf_advection.hh:74
Imports a 2D quadrilateral mesh from mesh generator gmsh.
void setupLaplace(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< F, typename concepts::Realtype< F >::type > frm=concepts::ElementFormulaContainer< F, typename concepts::Realtype< F >::type >())
Function to setup a bilinear form related to the vector Laplace, namely.
Vector valued bilinear form.
Definition: bf_advection.hh:38
void setupRiesz(vectorial::LinearForm< F, typename concepts::Realtype< F >::type > &lf, const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm)
Function to setup a linear form related to the vector Riesz, namely.
The Neumann trace of the approximated function in a FE space.
Definition: function.hh:355
Base class for element functions for hp elements in 2D.
Definition: functionBase.hh:38
The Laplacian of the approximated function in a FE space.
Definition: function.hh:137
Helper class for building 2D hp-FEM spaces (space pre builder).
hp-adaptive space with 2D elements.
A function class to calculate element matrices for the mass matrix.
Definition: bf_identity.hh:58
void setupIdentity(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Function to setup a bilinear form related to the vector Identity, namely.
void setupIdDiv(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Function to setup a bilinear form related to the vector Identity, namely.
Linear form in 2D.
Definition: linearForm.hh:138
Abstract class for a 2D FEM element.
Definition: element.hh:28
Vector valued linear form.
Definition: linearForm.hh:38
Base class to calculate element matrices for the Laplacian, for both scalar and matrix formulas.
Definition: bf_laplace.hh:62
Linear form in 2D.
Definition: linearForm.hh:62
A function class to calculate element matrices for the Laplacian.
Definition: bf_laplace.hh:91
A base of a 2D quad FEM element for different basis functions.
hp-adaptive FEM space in 2D composed of separate spaces hpAdapativeSpace and may be discontinuous.
Given a elliptic equation:
The gradient of the approximated function in a FE space.
Definition: function.hh:108
The Dirichlet trace of the approximated function in a FE space.
Definition: function.hh:271
void setupDivDiv(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< F, typename concepts::Realtype< F >::type > frm=concepts::ElementFormulaContainer< F, typename concepts::Realtype< F >::type >())
Function to setup a bilinear form.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich