Peano
Loading...
Searching...
No Matches
DiscontinuousGalerkinDiscretisation.Abstract.template.h
Go to the documentation of this file.
1//
2// Solver file of Peano's PETSc add-on
3// Generated by Peano's Python API
4// www.peano-framework.org
5//
6// This is generated. Don't change it! Every rerun of the Python API will
7// overwrite your changes.
8//
9#pragma once
10
11
12#include "tarch/la/Vector.h"
13#include "tarch/la/Matrix.h"
14#include "tarch/logging/Log.h"
17
19
22
23#include "Constants.h"
24
25#include "vertexdata/{{SOLVER_NAME}}PETScData.h"
26#include "facedata/{{SOLVER_NAME}}PETScData.h"
27#include "celldata/{{SOLVER_NAME}}PETScData.h"
28
29
30{{SOLVER_INCLUDES}}
31
32
33{% for item in NAMESPACE -%}
34 namespace {{ item }} {
35
36{%- endfor %}
37 class {{CLASSNAME}};
38
39{% for item in NAMESPACE -%}
40 }
41{%- endfor %}
42
43
44
45class {{NAMESPACE | join("::")}}::{{CLASSNAME}} {
46 public:
47 static constexpr double MinH = {{MIN_H}};
48 static constexpr double MaxH = {{MAX_H}};
49
50 static const double QuadraturePointsInUnitInterval[];
51
52 static const double GaussianIntegrationPoints[];
53 static const double GaussianIntegrationWeights[];
54
55 static constexpr int Order = {{POLYNOMIAL_DEGREE}};
56 static constexpr int CellUnknowns = {{CELL_UNKNOWNS}};
57 static constexpr int FaceUnknowns = {{FACE_UNKNOWNS}};
58
59 static constexpr int FacesPerCell = 2 * Dimensions;
60
61 #if Dimensions==2
62 static constexpr int NodesPerCell = (Order+1) * (Order+1);
63 static constexpr int NodesPerFace = (Order+1);
64 #else
65 static constexpr int NodesPerCell = (Order+1) * (Order+1) * (Order+1);
66 static constexpr int NodesPerFace = (Order+1) * (Order+1);
67 #endif
68
69 static constexpr int DoFsPerCell = CellUnknowns * NodesPerCell;
70
71 {{CLASSNAME}}();
72 virtual ~{{CLASSNAME}}();
73
77 virtual void initNode(
80 {% if CELL_UNKNOWNS==1 %}
81 double& value,
82 double& rhs,
83 double& exactSol
84 {% else %}
85 tarch::la::Vector< {{CELL_UNKNOWNS}}, double >& value,
86 tarch::la::Vector< {{CELL_UNKNOWNS}}, double >& rhs
87 tarch::la::Vector< {{CELL_UNKNOWNS}}, double >& exactSol
88 {% endif %}
89 ) = 0;
90
91 double EvalGaussianIntegral( double val );
92
97 virtual vertexdata::{{SOLVER_NAME}}PETScData::Type getVertexType(
100 ) final;
101
102
119 virtual facedata::{{SOLVER_NAME}}PETScData::Type getFaceType(
122 );
123
124
134 virtual celldata::{{SOLVER_NAME}}PETScData::Type getCellType(
137 );
138
139
148 void finishAssembly();
149
150
154 )
155 {% if CELL_CELL_LHS_MATRIX==[] %} = 0 {% endif %};
156
157
161 )
162 {% if CELL_CELL_RHS_MATRIX==[] %} = 0 {% endif %};
163
164
168 )
169 {% if CELL_TO_FACE_MATRIX==[] %} = 0 {% endif %};
170
171
175 )
176 {% if FACE_TO_CELL_MATRIX==[] %} = 0 {% endif %};
177
178
182 )
183 {% if FACE_FACE_RIEMANN_PROBLEM_MATRIX==[] %} = 0 {% endif %};
184
185
186 ::petsc::LocalToGlobalMap& getLocalToGlobalMap();
187 ::petsc::LinearEquationSystem& getLinearEquationSystem();
188 protected:
190
191 double _minH;
192 double _maxH;
193
195
196 ::petsc::LocalToGlobalMap _localToGlobalMap;
197 ::petsc::LinearEquationSystem _linearEquationSystem;
198
199};
200
201
202
203{# Empty line here #}
Class to capture all of the PETSc objects needed by some experiements.
Static (i.e.
Definition Matrix.h:42
Log Device.
Definition Log.h:517
Simple vector class.
Definition Vector.h:159