Peano
Loading...
Searching...
No Matches
CollocatedLowOrderDiscretisation.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 constexpr int VertexUnknowns = {{VERTEX_CARDINALITY}};
51
52 {{CLASSNAME}}();
53 virtual ~{{CLASSNAME}}();
54
58 virtual void initVertex(
61 tarch::la::Vector< {{VERTEX_CARDINALITY}}, double >& value,
62 tarch::la::Vector< {{VERTEX_CARDINALITY}}, double >& rhs
63 ) = 0;
64
65 virtual vertexdata::{{SOLVER_NAME}}PETScData::Type getVertexType(
68 ) final;
69
70 /*
71 In this experiement, we have data only on vertices, so the following
72 method returns Outside
73 */
74 virtual facedata::{{SOLVER_NAME}}PETScData::Type getFaceType(
77 );
78
79 /*
80 We need the cells to be marked Interior. Only cells marked interior
81 are ones that we add elements to PETSc matrix.
82 */
83 virtual celldata::{{SOLVER_NAME}}PETScData::Type getCellType(
86 );
87
96 void finishAssembly();
97
98 virtual tarch::la::Matrix< {{VERTEX_CARDINALITY}}*TwoPowerD, {{VERTEX_CARDINALITY}}*TwoPowerD, double > getLhsMatrix(
101 )
102 {% if CELL_LHS_MATRIX==[] %} = 0 {% endif %};
103
104
105 virtual tarch::la::Matrix< {{VERTEX_CARDINALITY}}*TwoPowerD, {{VERTEX_CARDINALITY}}*TwoPowerD, double > getRhsMatrix(
108 )
109 {% if CELL_RHS_MATRIX==[] %} = 0 {% endif %};
110
111 ::petsc::LocalToGlobalMap& getLocalToGlobalMap();
112 ::petsc::LinearEquationSystem& getLinearEquationSystem();
113 protected:
115
116 double _minH;
117 double _maxH;
118
120
121 ::petsc::LocalToGlobalMap _localToGlobalMap;
122 ::petsc::LinearEquationSystem _linearEquationSystem;
123};
124
125
126
127{# Empty line here #}
#define TwoPowerD
Definition Globals.h:19
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