Peano 4
Loading...
Searching...
No Matches
sizes.cpph
Go to the documentation of this file.
1#ifndef __KERNELS_SIZES_SVEN__
2#define __KERNELS_SIZES_SVEN__
3
4#include "../Basis/GaussLegendreBasis.h" // for gaussLegendreWeights
5#include "peano/utils/Globals.h" // Dimensions
6#include "tarch/la/Vector.h"
7
8namespace kernels {
9
17inline double ADERDGVolume(const int order, const tarch::la::Vector<Dimensions, double>& sizeOfPatch, const tarch::la::Vector<Dimensions, int>& pos) {
18 // Gauss-Legendre weights from pos argument
19 double wx = kernels::legendre::weights[order][pos[0]];
20 double wy = kernels::legendre::weights[order][pos[1]];
21 double wz = 1;
22 #ifdef Dim3
23 wz = kernels::legendre::weights[order][pos[2]];
24 #endif
25
26 // volume form for integration
27 double scaling = tarch::la::volume(sizeOfPatch);
28
29 return scaling*wx*wy*wz;
30}
31
32
33
34
35} // namespace kernels
36
37#endif /* __KERNELS_SIZES_SVEN__ */
This file is part of the ExaHyPE project.
double ADERDGVolume(const int order, const tarch::la::Vector< Dimensions, double > &sizeOfPatch, const tarch::la::Vector< Dimensions, int > &pos)
A helper function to determine the volume element (dV=dx*dy*dz) for an integration in the ADER scheme...
Definition sizes.cpph:17
Scalar volume(const Vector< Size, Scalar > &vector)
Computes the volume of the tetrahedron spanned by the Cartesian unit vectors scaled by the correspond...
Simple vector class.
Definition Vector.h:134