Discontinuous Galerkin Library
#include "dg/algorithm.h"
evaluationX.h
Go to the documentation of this file.
1#pragma once
2
3#include "gridX.h"
4#include "evaluation.h"
5
6
10namespace dg
11{
12
14namespace create{
15template<class real_type>
16thrust::host_vector<real_type> abscissas( const RealGridX1d<real_type>& g)
17{
18 return abscissas(g.grid());
19}
20}//namespace create
22
25
27template< class UnaryOp,class real_type>
28thrust::host_vector<real_type> evaluate( UnaryOp f, const RealGridX1d<real_type>& g)
29{
30 return evaluate( f, g.grid());
31};
33template<class real_type>
34thrust::host_vector<real_type> evaluate( real_type (f)(real_type), const RealGridX1d<real_type>& g)
35{
36 return evaluate( *f, g.grid());
37};
39
41template< class BinaryOp, class real_type>
42thrust::host_vector<real_type> evaluate( const BinaryOp& f, const aRealTopologyX2d<real_type>& g)
43{
44 return evaluate( f, g.grid());
45};
47template<class real_type>
48thrust::host_vector<real_type> evaluate( real_type(f)(real_type, real_type), const aRealTopologyX2d<real_type>& g)
49{
50 return evaluate( *f, g.grid());
51};
53
55template< class TernaryOp, class real_type>
56thrust::host_vector<real_type> evaluate( const TernaryOp& f, const aRealTopologyX3d<real_type>& g)
57{
58 return evaluate( f, g.grid());
59};
61template<class real_type>
62thrust::host_vector<real_type> evaluate( real_type(f)(real_type, real_type, real_type), const aRealTopologyX3d<real_type>& g)
63{
64 return evaluate( *f, g.grid());
65};
67
69}//namespace dg
70
Function discretization routines.
base X-point topology classes
thrust::host_vector< real_type > evaluate(UnaryOp f, const RealGrid1d< real_type > &g)
Evaluate a 1d function on grid coordinates.
Definition: evaluation.h:67
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
1D grid for X-point topology
Definition: gridX.h:68
RealGrid1d< real_type > grid() const
Definition: gridX.h:185
A 2D grid class with X-point topology.
Definition: gridX.h:257
RealGrid2d< real_type > grid() const
Return a copy without topology.
Definition: gridX.h:382
A 3D grid class with X-point topology.
Definition: gridX.h:541
RealGrid3d< real_type > grid() const
Return a copy without topology.
Definition: gridX.h:705