Peano
Loading...
Searching...
No Matches
Rusanov.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 rusanov {
103 ::exahype2::dg::MaxEigenvalue maxEigenvalue,
104 const tarch::la::Vector<Dimensions,double>& faceCentre,
106 double t,
107 double dt,
108 int order,
109 int unknowns,
110 int auxiliaryVariables,
111 int faceNumber,
112 const double* __restrict__ quadraturePoints,
113 bool useFlux,
114 bool useNcp,
115 const double* __restrict__ projectedValues,
116 double* __restrict__ solution
117 );
118
122 ::exahype2::dg::MaxEigenvalue maxEigenvalue,
123 const tarch::la::Vector<Dimensions,double>& faceCentre,
125 double t,
126 double dt,
127 int order,
128 int unknowns,
129 int auxiliaryVariables,
130 int faceNumber,
131 const double* __restrict__ quadraturePoints,
132 bool useFlux,
133 bool useNcp,
134 const double* __restrict__ projectedValues,
135 double* __restrict__ solution,
136 tarch::timing::Measurement& measurement
137 );
138
139
147 ::exahype2::dg::MaxEigenvalue maxEigenvalue,
148 const tarch::la::Vector<Dimensions,double>& faceCentre,
150 double t,
151 double dt,
152 int order,
153 int unknowns,
154 int auxiliaryVariables,
155 int faceNumber,
156 const double* __restrict__ quadraturePoints,
157 bool useFlux,
158 bool useNcp,
159 const double* __restrict__ projectedValues,
160 double* __restrict__ solution
161 );
162
163
171 const int order,
172 const int unknowns,
173 const int auxiliaryVariables,
174 Flux flux,
175 NonConservativeProduct nonConservativeProduct,
176 Source source,
177 PointSources pointSources,
178 const double* __restrict__ QuadratureNodes1d,
179 const double* __restrict__ MassMatrixDiagonal1d,
180 const double* __restrict__ StiffnessMatrix1d,
181 const double* __restrict__ DerivativeOperator1d,
182 bool evaluateFlux,
183 bool evaluateNonconservativeProduct,
184 bool evaluateSource,
185 bool evaluatePointSources
186 ) {
188 cellData,
189 order, unknowns, auxiliaryVariables,
190 flux, nonConservativeProduct, source, pointSources,
191 QuadratureNodes1d,
192 MassMatrixDiagonal1d,
193 StiffnessMatrix1d,
194 DerivativeOperator1d,
195 evaluateFlux, evaluateNonconservativeProduct, evaluateSource, evaluatePointSources
196 );
197 }
198
199
207 const int order,
208 const int unknowns,
209 const int auxiliaryVariables,
210 const double* __restrict__ MassMatrixDiagonal1d
211 ) {
213 cellData,
214 order, unknowns, auxiliaryVariables, MassMatrixDiagonal1d
215 );
216 }
217
218
225 const double* const __restrict__ faceQLeft,
226 const double* const __restrict__ faceQRight,
227 const double* const __restrict__ faceQBottom,
228 const double* const __restrict__ faceQUp,
229 int order,
230 int unknowns,
231 const int auxiliaryVariables,
232 const tarch::la::Vector<2,double>& cellSize,
233 const double* const __restrict__ BasisFunctionValuesLeft,
234 const double* __restrict__ MassMatrixDiagonal1d,
235 double* __restrict__ cellQ
236 ) {
238 faceQLeft, faceQRight, faceQBottom, faceQUp,
239 order, unknowns, auxiliaryVariables,
240 cellSize,
241 BasisFunctionValuesLeft,
242 MassMatrixDiagonal1d,
243 cellQ
244 );
245 }
246
247
254 const double* const __restrict__ faceQLeft,
255 const double* const __restrict__ faceQRight,
256 const double* const __restrict__ faceQBottom,
257 const double* const __restrict__ faceQUp,
258 const double* const __restrict__ faceQFront,
259 const double* const __restrict__ faceQBack,
260 int order,
261 int unknowns,
262 const int auxiliaryVariables,
263 const tarch::la::Vector<3,double>& cellSize,
264 const double* const __restrict__ BasisFunctionValuesLeft,
265 const double* __restrict__ MassMatrixDiagonal1d,
266 double* __restrict__ cellQ
267 ) {
269 faceQLeft, faceQRight, faceQBottom, faceQUp, faceQFront, faceQBack,
270 order, unknowns, auxiliaryVariables,
271 cellSize,
272 BasisFunctionValuesLeft,
273 MassMatrixDiagonal1d,
274 cellQ
275 );
276 }
277
278
279 template <
280 typename Solver,
281 int order,
282 int unknowns,
283 int auxiliaryVariables
284 >
287 bool evaluateFlux,
288 bool evaluateNonconservativeProduct,
289 bool evaluateSource,
290 bool evaluatePointSources
291 ) {
292 ::exahype2::dg::cellIntegral_patchwise_in_situ_GaussLegendre<Solver,order,unknowns,auxiliaryVariables>(
293 cellData,
294 evaluateFlux,
295 evaluateNonconservativeProduct,
296 evaluateSource,
297 evaluatePointSources
298 );
299 }
300 }
301 }
302}
303
Definition dg.py:1
void solveRiemannProblem_pointwise_in_situ(::exahype2::dg::Flux flux, ::exahype2::dg::NonConservativeProduct ncp, ::exahype2::dg::MaxEigenvalue maxEigenvalue, 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, bool useNcp, const double *__restrict__ projectedValues, double *__restrict__ solution)
Solve Riemann problem on face.
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 Rusanov.h:224
void cellIntegral_patchwise_in_situ_GaussLegendre(::exahype2::CellData< double, double > &cellData, bool evaluateFlux, bool evaluateNonconservativeProduct, bool evaluateSource, bool evaluatePointSources)
Definition Rusanov.h:285
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 Rusanov.h:169
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 Rusanov.h:205
void solveRiemannProblem_pointwise_in_situ_with_gradient_projection(::exahype2::dg::Flux flux, ::exahype2::dg::NonConservativeProduct ncp, ::exahype2::dg::MaxEigenvalue maxEigenvalue, 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, bool useNcp, const double *__restrict__ projectedValues, double *__restrict__ solution)
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< void(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal, double *maxEigenvalue) > MaxEigenvalue
Definition Functors.h:96
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
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
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, int normal, double *__restrict__ F) > Flux
Flux functor.
Definition Functors.h:44
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 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 ExaHyPE 2 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