13{{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::~{{CLASSNAME}}() {}
16{%
if CUSTOM_INIT_VERTEX!=
"" %}
17void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::initVertex(
28{%
if CUSTOM_BOUNDARY_CONDITIONS!=
"" %}
29void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::setBoundaryConditions(
34{{CUSTOM_BOUNDARY_CONDITIONS}}
39{%
if LOCAL_ASSEMBLY_MATRIX is defined %}
46 {%
for MATRIX in LOCAL_ASSEMBLY_MATRIX %}
48 {{MATRIX[0]| join(
", ")}}
49 {%
for ROW in MATRIX[1:] %}
56 {%
if LOCAL_ASSEMBLY_MATRIX_SCALING is not defined %}
57 #error If matrices are predefined, scaling has to be defined, too
60 static std::vector<int> scaleFactors = {
61 {%
for el in LOCAL_ASSEMBLY_MATRIX_SCALING %}
75{%
if MASS_MATRIX is defined %}
81 {%
for MATRIX in MASS_MATRIX %}
84 {{MATRIX[0]| join(
", ")}}
85 {%
for ROW in MATRIX[1:] %}
92 {%
if MASS_MATRIX_SCALING is not defined %}
93 #error If matrices are predefined, scaling has to be defined, too
96 static std::vector<int> scaleFactors = {
97 {%
for el in MASS_MATRIX_SCALING %}
110{{NAMESPACE | join(
"::")}}::vertexdata::{{SOLVER_NAME}}::Type {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getVertexType(
115 bool isOnBoundary =
false;
116 for (
int d=0;
d<Dimensions;
d++) {
123 return isOnBoundary(x) ? vertexdata::{{SOLVER_NAME}}::Type::Boundary : vertexdata::{{SOLVER_NAME}}::Type::Interior;
127{{NAMESPACE | join(
"::")}}::celldata::{{SOLVER_NAME}}::Type {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getCellType(
131 return celldata::{{SOLVER_NAME}}::Type::Interior;
135void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::suspend() {
145bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::isSuspended()
const {
146 return _state == State::Suspend;
149void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::beginMeshSweep() {
150 clearGlobalResidualAndSolutionUpdate();
154void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::endMeshSweep() {
155 if (
_state == State::Solve ) {
156 synchroniseGlobalResidualAndSolutionUpdate();
174bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::updateSolution()
const {
182bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::updateResidual()
const {
183 return _state == State::Solve;
186{{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::State {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getState()
const {
189{{ABSTRACT_SOLVER_IMPLEMENTATION_EXTRAS}}
tarch::la::Matrix< Rows, Cols, double > composeMatrixFromHWeightedLinearCombination(const std::vector< tarch::la::Matrix< Rows, Cols, double > > &matrices, const std::vector< int > &scaleFactors, const tarch::la::Vector< Dimensions, double > &h)
Compute a weighted linear combination of matrices.