concepts.pypp.hh

Go to the documentation of this file.
1 #ifndef concepts_pypp_hh
2 #define concepts_pypp_hh
3 
4 #include "basics/typedefs.hh"
5 #include "basics/defines.hh"
8 #include "basics/cloneable.hh"
9 #include "basics/level.hh"
10 #include "basics/parallel.hh" // isParallelRunning()
11 #include "basics/Zm.hh"
12 
13 #include "toolbox/array.hh"
14 #include "toolbox/set.hh"
15 #include "toolbox/inputOutput.hh"
16 #include "toolbox/sequence.hh"
17 #include "toolbox/elementGraphics.hh" //ElementGraphicsBase, ElementGraphics
18 #include "toolbox/stringFunc.hh"
19 #include "toolbox/resultsTable.hh"
20 
21 #include "integration/quadRule.hh"
23 
25 #include "formula/formula.hh"
27 #include "formula/parsedFormula.hh"
28 #include "formula/boundary.hh"
30 #include "formula/frmE_sum.hh"
31 #include "formula/frmE_product.hh"
33 #include "formula/bessel.hh"
35 
36 #include "geometry/connector.hh"
37 #include "geometry/connectorSet.hh"
38 #include "geometry/mesh.hh"
39 #include "geometry/meshImport2D.hh"
43 #include "geometry/square.hh"
44 #include "geometry/semantics.hh"
45 #include "geometry/cell.hh"
46 #include "geometry/cell2D.hh"
47 #include "geometry/topology.hh" //Quad
48 #include "geometry/subdivision.hh" //::Subdivision
49 #include "geometry/normalVector.hh"
50 #include "geometry/elementMaps.hh" //concepts::Map2d
51 #include "geometry/mutableMesh.hh" //mutableMesh, buildEdgeMesh
52 #include "geometry/meshRelations.hh" // CellToCellMapping
53 #include "geometry/normalVector.hh"
54 #include "geometry/formula.hh"
56 #include "geometry/diameter.hh"
57 
58 #include "space/space.hh"
59 #include "space/element.hh"
60 #include "space/elementPairs.hh"
61 #include "space/function.hh"
62 #include "space/tmatrix.hh"
63 #include "space/spacePreBuilder.hh"
64 #include "space/spaceSet.hh" //concepts::Set< concepts:: IndexRange >
65 #include "space/postProcess.hh" //concepts::CellPostprocess<>
66 #include "space/dirichlet.hh" //Dirichlet<>
67 #include "space/hpMethod.hh"
68 #include "space/integral.hh" //l2 norms
69 #include "space/spaceGraph.hh" //SpaceGraph
70 
71 #include "function/vector.hh"
72 #include "function/basis.hh"
74 #include "function/linearForm.hh"
75 
76 #include "operator/matrix.hh"
78 #include "operator/sparseMatrix.hh"
79 #include "operator/bilinearForm.hh"
80 #include "operator/cg.hh"
81 #include "operator/compositions.hh"
82 #include "operator/solverFabric.hh"
83 #ifdef HAS_MUMPS
84 #include "operator/mumps.hh"
85 #endif
86 #ifdef HAS_SuperLU
87 #include "operator/superLU.hh"
89 #endif
90 #include "operator/cgFabric.hh"
92 #include "operator/gmresFabric.hh"
93 #include "operator/denseMatrix.hh"
94 
95 #include "hp1D/element.hh"
97 
98 #include "matfile/matfileIO.hh"
99 
100 #include "estimator/estimator.hh"
102 
104 
105 #ifdef GEN_PYTHON
106 
107  //basics
108 
109  std::cout << sizeof(concepts::Point<concepts::Real,1>);
110  std::cout << sizeof(concepts::Point<concepts::Cmplx,1>);
111  std::cout << sizeof(concepts::UnitNd<1>);
112  std::cout << sizeof(concepts::Point<concepts::Real,2>);
113  std::cout << sizeof(concepts::Point<concepts::Cmplx,2>);
114  std::cout << sizeof(concepts::UnitNd<2>);
115  std::cout << sizeof(concepts::Point<concepts::Real,3>);
116  std::cout << sizeof(concepts::UnitNd<3>);
117  std::cout << sizeof(concepts::Level<1>);
118  std::cout << sizeof(concepts::Level<2>);
119  std::cout << sizeof(concepts::Level<3>);
120  std::cout << sizeof(concepts::Mapping<concepts::Real,2>);
123  std::cout << p2_copy;
124 
125  concepts::Mapping<concepts::Real,2> map2(1.,2.,3.,4.);
126  std::cout << map2;
127 
128  std::cout << concepts::isParallelRunning();
129 
130  //toolbox
131  std::cout << sizeof(concepts::Array<unsigned int>);
132  std::cout << sizeof(concepts::Array<int>);
134  std::cout <<arr<<std::endl;
135 
136  std::cout << sizeof(concepts::Array<concepts::IndexRange>);
137  std::cout << sizeof(concepts::Array<concepts::Attribute>);
138  std::cout << sizeof(concepts::Array<concepts::Real>);
139 
140  std::cout << sizeof(concepts::BaseSet<unsigned int>);
141  std::cout << sizeof(concepts::Set<unsigned int>);
142 
143  std::cout << sizeof(concepts::BaseSet< concepts::IndexRange > );
144  std::cout << sizeof(concepts::Set< concepts::IndexRange > );
145 
146  std::cout << sizeof(concepts::BaseSet< concepts::Attribute > );
147  std::cout << sizeof(concepts::Set<concepts::Attribute>);
148 
149  std::cout << sizeof(concepts::Set<concepts::Real>);
150 
151  std::cout << sizeof(concepts::Scan< concepts::Cell> );
152  std::cout << sizeof(concepts::Scan< concepts::Cell1> );
153  std::cout << sizeof(concepts::Scan< concepts::Cell2> );
154  std::cout << sizeof(concepts::Scan< concepts::Cell3> );
158 
159 
160  std::cout << sizeof(concepts::Sequence<concepts::Edge2d*>);
162  std::cout << sizeof(concepts::Sequence<concepts::Cell1*>);
163  std::cout << sizeof(concepts::Sequence<concepts::Set<unsigned int> >);
165  std::cout << sizeof(concepts::Sequence<concepts::Attribute>);
166 
167 
168  std::cout << sizeof(concepts::ElementGraphics<concepts::Real>);
169  std::cout << sizeof(concepts::ElementGraphics<concepts::Cmplx>);
170 
171  //integration
172  std::cout << sizeof(concepts::ShapeFunction1D<concepts::Real>);
173 
174  //formula
175  std::cout << sizeof(concepts::Formula<concepts::Real>);
176  std::cout << sizeof(concepts::Formula<concepts::Cmplx>);
177  std::cout << sizeof(concepts::Formula<concepts::Real2d>);
178  std::cout << sizeof(concepts::Formula<concepts::Cmplx2d>);
184 
190  //concepts::ElementFormulaContainer<concepts::Mapping<concepts::Real,2>,concepts::Real> f();
191 
192  // concepts::ElementFormulaContainer<concepts::Real,concepts::Real> fr1_r_r;
193  // concepts::ElementFormulaContainer<cfoncepts::Cmplx,concepts::Real> fr1_c_r;
194  // concepts::ElementFormulaContainer<concepts::Real,concepts::Real> fr2_r_r;
195  // concepts::ElementFormulaContainer<concepts::Cmplx,concepts::Real> fr2_c_r;
196 
198 
203 
210  std::cout << sizeof(concepts::ParsedFormulaBase< 1u >);
211  std::cout << sizeof(concepts::ParsedFormulaBase< 2u >);
212 
221 
222  //geometry
223  std::cout << sizeof(concepts::Semantics<concepts::Boundary>);
225  std::cout << sizeof(concepts::PointInCell<2>);
226  std::cout << sizeof(concepts::CellToCellMapping<2,2>);
227  std::cout << sizeof(concepts::CellDiameter);
228 
229  //space
230  std::cout << sizeof(concepts::Space<concepts::Real>);
231  std::cout << sizeof(concepts::Subspace);
232  std::cout << sizeof(concepts::DummySpace<concepts::Real>);
233  std::cout << sizeof(concepts::SpaceOnCells<concepts::Real>);
235  std::cout << sizeof(concepts::Element<concepts::Real>);
236  std::cout << sizeof(concepts::Element<concepts::Cmplx>);
237  std::cout << sizeof(concepts::ElementWithCell<concepts::Real>);
238  std::cout << sizeof(concepts::ElementWithCell<concepts::Real> *);
239  std::cout << sizeof(concepts::ElementMatrix<concepts::Real>);
240  std::cout << sizeof(concepts::ElementMatrix<concepts::Cmplx>);
241  std::cout << sizeof(concepts::ElementPair<concepts::Real>);
246  std::cout << sizeof(concepts::CellPostprocess<concepts::Real>);
247  std::cout << sizeof(concepts::CellPostprocess<concepts::Cmplx>);
248  std::cout << sizeof(concepts::TColumn<concepts::Real>);
249  std::cout << sizeof(concepts::TColumn<bool>);
250  std::cout << sizeof(concepts::TMatrixBase<concepts::Real>);
251  std::cout << sizeof(concepts::TMatrixBase<concepts::Cmplx>);
252  std::cout << sizeof(concepts::TMatrix<concepts::Real>);
253  std::cout << sizeof(concepts::Dirichlet<concepts::Real>);
254  std::cout << sizeof(concepts::Dirichlet<concepts::Cmplx>);
255  std::cout << sizeof(concepts::AdaptiveAdjust<2>);
256  std::cout << sizeof(concepts::AdaptiveAdjustP<2>);
259  // free functions
260  concepts::Square square_mesh(1,1,1);
262  hp2D::hpAdaptiveSpaceH1 hpSpace(square_mesh, (uint)0, (uint)1, &bc);
263 
264  // concepts::SpaceGraph<hp2D::hpAdaptiveSpaceH1> sgraph(hpSpace);
265  // sgraph.FillGraph(2);
266  // sgraph.SplitGraph(1);
267 
268  concepts::ConstFormula<concepts::Real> const_formula(1.0);
269  concepts::ConstFormula<concepts::Real2d > const_formula_point(1.0);
270 
271  //concepts::Formula<concepts::Real>* formula_ref = dynamic_cast<concepts::Formula<concepts::Real>* >(&const_formula);
272 
274 
276 
277  //concepts::L2product(hpSpace, *(formula_ref));
278  concepts::L2product(hpSpace, *(element_formula));
279  concepts::L2product(hpSpace, *(element_formula_point));
280 
281 
282 
283  // concepts::L2product(sgraph.getSubDomain(0), *(element_formula));
284  // concepts::L2product(sgraph.getSubDomain(0), *(element_formula_point));
285 
286  // free operators
288  el_form_cont + el_form_cont;
289  el_form_cont - el_form_cont;
290  concepts::operator+(el_form_cont, el_form_cont);
291  concepts::operator-(el_form_cont, el_form_cont);
292  //function
293  std::cout << sizeof(concepts::Function<concepts::Real>);
297  std::cout << sizeof(concepts::Vector<concepts::Real>);
298  std::cout << sizeof(concepts::Vector<std::complex<concepts::Real> >);
299  std::cout << sizeof(concepts::Neumann<concepts::Real>);
300 
301  std::cout << sizeof(concepts::Space<concepts::Real>);
302  std::cout << sizeof(concepts::Space<concepts::Cmplx>);
309  concepts::Real>);
310  //operator
311 
312  std::cout << sizeof(concepts::Matrix<concepts::Real>);
313  std::cout << sizeof(concepts::Matrix<std::complex<concepts::Real> >);
314 
315  std::cout << sizeof(concepts::SparseMatrix<concepts::Real>);
316  std::cout << sizeof(concepts::SparseMatrix<concepts::Cmplx>);
317 
321  std::cout << sizeof(SM_Real_cit) << sizeof(SM_Real_it) ;
322 
326  std::cout << sizeof(SM_Cmplx_cit) << sizeof(SM_Cmplx_it) ;
327 
329  std::cout << sizeof(concepts::Operator<concepts::Real>);
330  std::cout << sizeof(concepts::VecOperator<concepts::Real>);
331  std::cout << sizeof(concepts::CG<concepts::Real>);
332  std::cout << sizeof(concepts::CG<concepts::Cmplx>);
333 
334 #ifdef HAS_MUMPS
335  std::cout << sizeof(concepts::Mumps<concepts::Real>);
336  std::cout << sizeof(concepts::Mumps<concepts::Cmplx>);
337 #endif // HAS_MUMPS
338  std::cout << sizeof(concepts::DenseMatrix<concepts::Real>);
339  std::cout << sizeof(concepts::DenseMatrix<concepts::Cmplx>);
340 
342  // std::cout << sizeof(concepts::BilinearForm<concepts::Cmplx,concepts::Cmplx>);
343  // std::cout << sizeof(concepts::BilinearForm<concepts::Real,concepts::Cmplx>);
345 
348 
351 
354 
357 
358  std::cout << sizeof(concepts::SolverFabric<concepts::Real>);
359 
360 #ifdef HAS_SuperLU
361  std::cout << sizeof(concepts::SuperLU<concepts::Real>);
362  std::cout << sizeof(concepts::SuperLU<concepts::Cmplx>);
363  std::cout << sizeof(concepts::SuperLUFabric<concepts::Real>);
364 #endif // HAS_SuperLU
365 
366  std::cout << sizeof(concepts::CGFabric<concepts::Real>);
368  std::cout << sizeof(concepts::GMResFabric<concepts::Real>);
369 
370  std::cout << sizeof(concepts::Estimator<concepts::Real>);
371  std::cout << sizeof(concepts::LocalEstimator<concepts::Real>);
372  std::cout << sizeof(concepts::ExplicitResidual<concepts::Real>);
373 
374 #endif // GEN_PYTHON
375 }
376 
377 #endif
Basic class for a 2D or 3D map.
Product of scalar and a bilinear form with possible different field type F.
A column of a T matrix.
Definition: analytical.hh:18
Element formula returning a vector.
An abstract class for a function in a FE space.
A linear combination of bilinear forms.
Definition: bilinearForm.hh:83
Piecewise constant function defined by the attribute of a cell.
Definition: formula.hh:84
Base class for Formula created from a FE function.
Fabric class for DiagonalSolver.
Solves a symmetric system of linear equations with conjugate gradients (CG).
Definition: cg.hh:39
Class representing a map of diameters of elements of a given Space.
Definition: diameter.hh:44
Piecewise defined function on a number of cells.
Direct sparse solver for unsymmetric matrices.
Definition: superLU.hh:70
Basic class for a Point or a vector.
A T matrix in sparse notation.
Definition: edgeTest.hh:17
Class for a constant formula.
Definition: constFormula.hh:26
Abstract class for a function.
Definition: basis.hh:21
void export_concepts_templates()
ElementFormulaContainer< Real > operator-(const ElementFormulaContainer< Real > frm, const Real a)
Simple subtracting of a element formulas and a constant via –operator.
Real L2product(const ElementWithCell< G > &elm, const ElementFormula< F, G > &u, const ElementFormula< Real > *c=0, const Real t=0.0, IntegrationCell::intFormType form=IntegrationCell::ZERO)
Returns the L2 product or with c weighted L2 product of an element formula u over the cell belonging ...
Definition: integral.hh:214
Set with operations, output operator, and method of the particular element types.
Definition: traces.hh:18
Interface for a formula.
Definition: lform.hh:18
Abstract class for a linear form.
Define a point inside a geometrical cell by its connector and the coordinate in the reference cell.
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
Abstract class for the Neumann boundary term.
Definition: linearForm.hh:89
Class for holding an offset of global indices of space.
Definition: space.hh:386
bool isParallelRunning()
Tests if the instruction MPI::Init() was called.
Vectorial formula created from a FE function.
An array of objects.
Definition: bilinearForm.hh:23
Abstract fabric class for linear solvers.
Definition: jdbsym.hh:16
Interface for a formula defined element by element.
Abstract class for an operator.
Definition: compositions.hh:31
Product of two element formulas or an element formula and a factor.
Definition: frmE_product.hh:39
Interface class for SpacesOnCells that also allow for allCells(), that i.e.
Definition: space.hh:127
Set with operations and output operator.
Definition: set.hh:28
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
A vector of dimension dim and length 1.
Fabric class for conjugate gradients: CG.
Definition: cgFabric.hh:27
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
Fabric class for generalized minimal residual: GMRes.
Definition: gmresFabric.hh:27
Mesh for with one quadrilateral.
Definition: square.hh:22
An abstract function class to query attributes.
Definition: semantics.hh:22
A matrix in sparse storage using hashes.
Definition: compositions.hh:34
Class for a sum of element formulas.
Definition: frmE_sum.hh:36
const_iterator begin(uint row=0) const
Constant iterator over the elements, standing at position (row,c), where row is the given row number ...
Abstract class for an operator acting on vectors only, not arbitrary functions.
MUMPS : MUltifrontal Massively Parallel sparse direct Solver.
Definition: mumps.hh:72
Element matrix.
Definition: linearForm.hh:18
Class to describe adjustments to elements in an adaptive space.
Definition: space.hh:299
Frm_Sum< Real > operator+(const Formula< Real > &frm, const Real a)
Simple adding two formulas by +-operator.
Abstract base class for an adaptive space.
Definition: space.hh:350
STL like iterator for hashed sparse matrices.
Parses the given string and evaluates it on request.
Fabric class for SuperLU.
Abstract class for 1D shape function.
Abstract class for per cell postprocessing.
Definition: postProcess.hh:38
Sum of two bilinear forms of possible different underlying field type F.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Class for calculating and holding local coefficients per element which represent the dirichlet bounda...
Definition: dirichlet.hh:24
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich