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< double(
90 const double * __restrict__ Q,
92 double t,
93 double dt,
94 int normal
96
97
98
99 /*
100 * This is only used within DGUtils in order to apply the boundary conditions
101 * to a given face.
102 */
103 typedef std::function< void(
104 const double * __restrict__ Qinside,
105 double * __restrict__ Qoutside,
107 double t,
108 int normal
110
111 }
112}
113
114
Definition dg.py:1
std::function< double(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal) MaxEigenvalue)
Definition Functors.h:95
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__ Qinside, double *__restrict__ Qoutside, const tarch::la::Vector< Dimensions, double > &x, double t, int normal) BoundaryConditions)
Definition Functors.h:109
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
For the generic kernels that I use here most of the time.
Definition CellAccess.h:13
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:150