Peano
Loading...
Searching...
No Matches
Average.h
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include <vector>
7
8#include "../DGUtils.h"
9#include "../Functors.h"
10
14#include "../CellIntegral.h"
15#include "../Riemann.h"
16
17#include "tarch/la/Vector.h"
19
22
23#if defined(GPUOffloadingOMP)
25#endif
26
27
28namespace exahype2 {
29 namespace dg {
30 namespace average {
78 double t,
79 double dt,
80 int order,
81 int unknowns,
82 int auxiliaryVariables,
83 int faceNumber,
84 const double* __restrict__ quadraturePoints,
85 bool useFlux,
86 const double* __restrict__ projectedValues,
87 double* __restrict__ solution
88 );
89
90
98 const int order,
99 const int unknowns,
100 const int auxiliaryVariables,
101 Flux flux,
102 NonConservativeProduct nonConservativeProduct,
103 Source source,
104 PointSources pointSources,
105 const double* __restrict__ QuadratureNodes1d,
106 const double* __restrict__ MassMatrixDiagonal1d,
107 const double* __restrict__ StiffnessMatrix1d,
108 const double* __restrict__ DerivativeOperator1d,
109 bool evaluateFlux,
110 bool evaluateNonconservativeProduct,
111 bool evaluateSource,
112 bool evaluatePointSources
113 ) {
115 cellData,
116 order, unknowns, auxiliaryVariables,
117 flux, nonConservativeProduct, source, pointSources,
118 QuadratureNodes1d,
119 MassMatrixDiagonal1d,
120 StiffnessMatrix1d,
121 DerivativeOperator1d,
122 evaluateFlux, evaluateNonconservativeProduct, evaluateSource, evaluatePointSources
123 );
124 }
125
126
134 const int order,
135 const int unknowns,
136 const int auxiliaryVariables,
137 const double* __restrict__ MassMatrixDiagonal1d
138 ) {
140 cellData,
141 order, unknowns, auxiliaryVariables, MassMatrixDiagonal1d
142 );
143 }
144
145
152 const double* const __restrict__ faceQLeft,
153 const double* const __restrict__ faceQRight,
154 const double* const __restrict__ faceQBottom,
155 const double* const __restrict__ faceQUp,
156 int order,
157 int unknowns,
158 const int auxiliaryVariables,
159 const tarch::la::Vector<2,double>& cellSize,
160 const double* const __restrict__ BasisFunctionValuesLeft,
161 const double* __restrict__ MassMatrixDiagonal1d,
162 double* __restrict__ cellQ
163 ) {
165 faceQLeft, faceQRight, faceQBottom, faceQUp,
166 order, unknowns, auxiliaryVariables,
167 cellSize,
168 BasisFunctionValuesLeft,
169 MassMatrixDiagonal1d,
170 cellQ
171 );
172 }
173
174
181 const double* const __restrict__ faceQLeft,
182 const double* const __restrict__ faceQRight,
183 const double* const __restrict__ faceQBottom,
184 const double* const __restrict__ faceQUp,
185 const double* const __restrict__ faceQFront,
186 const double* const __restrict__ faceQBack,
187 int order,
188 int unknowns,
189 const int auxiliaryVariables,
190 const tarch::la::Vector<3,double>& cellSize,
191 const double* const __restrict__ BasisFunctionValuesLeft,
192 const double* __restrict__ MassMatrixDiagonal1d,
193 double* __restrict__ cellQ
194 ) {
196 faceQLeft, faceQRight, faceQBottom, faceQUp, faceQFront, faceQBack,
197 order, unknowns, auxiliaryVariables,
198 cellSize,
199 BasisFunctionValuesLeft,
200 MassMatrixDiagonal1d,
201 cellQ
202 );
203 }
204
205
206 template <
207 typename Solver,
208 int order,
209 int unknowns,
210 int auxiliaryVariables
211 >
214 bool evaluateFlux,
215 bool evaluateNonconservativeProduct,
216 bool evaluateSource,
217 bool evaluatePointSources
218 ) {
219 ::exahype2::dg::cellIntegral_patchwise_in_situ_GaussLegendre<Solver,order,unknowns,auxiliaryVariables>(
220 cellData,
221 evaluateFlux,
222 evaluateNonconservativeProduct,
223 evaluateSource,
224 evaluatePointSources
225 );
226 }
227 }
228 }
229}
230
Definition dg.py:1
static void multiplyWithInvertedMassMatrix_GaussLegendre(::exahype2::CellData< double, double > &cellData, const int order, const int unknowns, const int auxiliaryVariables, const double *__restrict__ MassMatrixDiagonal1d)
Delegate to generic implementation.
Definition Average.h:132
static void integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre(const double *const __restrict__ faceQLeft, const double *const __restrict__ faceQRight, const double *const __restrict__ faceQBottom, const double *const __restrict__ faceQUp, int order, int unknowns, const int auxiliaryVariables, const tarch::la::Vector< 2, double > &cellSize, const double *const __restrict__ BasisFunctionValuesLeft, const double *__restrict__ MassMatrixDiagonal1d, double *__restrict__ cellQ)
Delegate to generic implementation.
Definition Average.h:151
void cellIntegral_patchwise_in_situ_GaussLegendre(::exahype2::CellData< double, double > &cellData, bool evaluateFlux, bool evaluateNonconservativeProduct, bool evaluateSource, bool evaluatePointSources)
Definition Average.h:212
static void cellIntegral_patchwise_in_situ_GaussLegendre_functors(::exahype2::CellData< double, double > &cellData, const int order, const int unknowns, const int auxiliaryVariables, Flux flux, NonConservativeProduct nonConservativeProduct, Source source, PointSources pointSources, const double *__restrict__ QuadratureNodes1d, const double *__restrict__ MassMatrixDiagonal1d, const double *__restrict__ StiffnessMatrix1d, const double *__restrict__ DerivativeOperator1d, bool evaluateFlux, bool evaluateNonconservativeProduct, bool evaluateSource, bool evaluatePointSources)
Delegate to generic implementation in parent directory.
Definition Average.h:96
void solveRiemannProblem_pointwise_in_situ(::exahype2::dg::Flux flux, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &cellSize, double t, double dt, int order, int unknowns, int auxiliaryVariables, int faceNumber, const double *__restrict__ quadraturePoints, bool useFlux, const double *__restrict__ projectedValues, double *__restrict__ solution)
Solve Riemann problem on face.
std::function< void(const double *__restrict__ Q, const double *__restrict__ dQdx, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal, double *__restrict__ F) NonConservativeProduct)
Definition Functors.h:54
void multiplyWithInvertedMassMatrix_GaussLegendre(::exahype2::CellData< double, double > &cellData, const int order, const int unknowns, const int auxiliaryVariables, const double *__restrict__ MassMatrixDiagonal1d)
Final step of DG algorithm.
std::function< std::vector< PointSource >(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &cellCentre, const tarch::la::Vector< Dimensions, double > &h, double t, double dt) PointSources)
This is the only routine within the DG framework which accepts the dimensions of the underlying cell ...
Definition Functors.h:87
void cellIntegral_patchwise_in_situ_GaussLegendre_functors(::exahype2::CellData< double, double > &cellData, const int order, const int unknowns, const int auxiliaryVariables, Flux flux, NonConservativeProduct nonconservativeProduct, Source source, PointSources pointSources, const double *__restrict__ QuadratureNodes1d, const double *__restrict__ MassMatrixDiagonal1d, const double *__restrict__ StiffnessMatrix1d, const double *__restrict__ DerivativeOperator1d, bool evaluateFlux, bool evaluateNonconservativeProduct, bool evaluateSource, bool evaluatePointSources)
std::function< void(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, double *__restrict__ S) Source)
Source functor.
Definition Functors.h:75
std::function< void(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal, double *__restrict__ F) Flux)
Flux functor.
Definition Functors.h:44
void integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre(const double *const __restrict__ faceQLeft, const double *const __restrict__ faceQRight, const double *const __restrict__ faceQBottom, const double *const __restrict__ faceQUp, int order, int unknowns, const int auxiliaryVariables, const tarch::la::Vector< 2, double > &cellSize, const double *const __restrict__ BasisFunctionValuesLeft, const double *__restrict__ MassMatrixDiagonal1d, double *__restrict__ cellQ)
Given a numerical flux at the various faces, this computes and adds the Riemann integral of this flux...
This file is part of the multigrid project within Peano 4.
Definition __init__.py:1
Representation of a number of cells which contains all information that's required to process the sto...
Definition CellData.h:78
Simple vector class.
Definition Vector.h:159