This source file includes following definitions.
- evaluate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #ifndef SECORD_OP_IDENTITY_IMPL_H
25 #define SECORD_OP_IDENTITY_IMPL_H
26
27 #include <config.h>
28 #include <dune/fem/operator/lagrangeinterpolation.hh>
29 #include "grid.h"
30
31 namespace Esfem{
32 namespace Impl{
33 struct Identity_impl
34 : Dune::Fem::Function<Esfem::Grid::Grid_and_time::Vec_Function_space,
35 Identity_impl>
36 {
37 using FE_space = Esfem::Grid::Grid_and_time::Vec_Function_space;
38 using Domain = FE_space::DomainType;
39 using Range = FE_space::RangeType;
40 static_assert(Domain::dimension == Range::dimension, "Bad dimension");
41
42 void evaluate(const Domain& d, Range& r) const {
43 for(int i = 0; i < Domain::dimension; ++i) r[i] = d[i];
44 }
45 };
46 }
47 }
48
49 #endif