Peano
Loading...
Searching...
No Matches
Functors.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
7#include "tarch/la/Vector.h"
10
11
12#include <functional>
13#include <vector>
14
15
16namespace exahype2 {
17 namespace dg {
18 struct PointSource {
20 const double* __restrict__ values;
21 };
22
37 typedef std::function< void(
38 const double * __restrict__ Q,
40 double t,
41 double dt,
42 int normal,
43 double * __restrict__ F
44 ) > Flux;
45
46 typedef std::function< void(
47 const double * __restrict__ Q,
48 const double * __restrict__ dQdx,
50 double t,
51 double dt,
52 int normal,
53 double * __restrict__ F
55
69 typedef std::function< void(
70 const double * __restrict__ Q,
72 double t,
73 double dt,
74 double * __restrict__ S
75 ) > Source;
76
81 typedef std::function< std::vector<PointSource>(
82 const double * __restrict__ Q,
85 double t,
86 double dt
88
89 typedef std::function< void(
90 const double * __restrict__ Q,
92 double t,
93 double dt,
94 int normal,
95 double* maxEigenvalue
97
98
99
100 /*
101 * This is only used within DGUtils in order to apply the boundary conditions
102 * to a given face.
103 */
104 typedef std::function< void(
105 const double * __restrict__ Qinside,
106 double * __restrict__ Qoutside,
108 double t,
109 int normal
111
112
113 typedef std::function< void(
115 const tarch::la::Vector<Dimensions,double>& cellCentre,
117 int polynomialOrder,
118 const double* __restrict__ quadraturePoints,
119 tarch::la::Vector<Dimensions,double>* __restrict__ quadraturePositions
121
122 }
123}
124
125
Definition dg.py:1
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
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, int normal, double *maxEigenvalue) MaxEigenvalue)
Definition Functors.h:96
std::function< void(const double *__restrict__ Qinside, double *__restrict__ Qoutside, const tarch::la::Vector< Dimensions, double > &x, double t, int normal) BoundaryConditions)
Definition Functors.h:110
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 tarch::la::Vector< Dimensions, int > &index, const tarch::la::Vector< Dimensions, double > &cellCentre, const tarch::la::Vector< Dimensions, double > &cellSize, int polynomialOrder, const double *__restrict__ quadraturePoints, tarch::la::Vector< Dimensions, double > *__restrict__ quadraturePositions) QuadraturePoint)
Definition Functors.h:120
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
This file is part of the multigrid project within Peano 4.
Definition __init__.py:1
const tarch::la::Vector< Dimensions, double > & x
Definition Functors.h:19
const double *__restrict__ values
Definition Functors.h:20
Simple vector class.
Definition Vector.h:159