Dune Core Modules (2.6.0)

prismp1localinterpolation.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_PRISM_P1_LOCALINTERPOLATION_HH
4#define DUNE_PRISM_P1_LOCALINTERPOLATION_HH
5
6#include <vector>
7
8namespace Dune
9{
10 template<class LB>
11 class PrismP1LocalInterpolation
12 {
13 public:
14 PrismP1LocalInterpolation ()
15 {
16 x[0][0] = 0.0; x[0][1] = 0.0; x[0][2] = 0.0;
17 x[1][0] = 1.0; x[1][1] = 0.0; x[1][2] = 0.0;
18 x[2][0] = 0.0; x[2][1] = 1.0; x[2][2] = 0.0;
19 x[3][0] = 0.0; x[3][1] = 0.0; x[3][2] = 1.0;
20 x[4][0] = 1.0; x[4][1] = 0.0; x[4][2] = 1.0;
21 x[5][0] = 0.0; x[5][1] = 1.0; x[5][2] = 1.0;
22 }
23
25 template<typename F, typename C>
26 void interpolate (const F& f, std::vector<C>& out) const
27 {
28 typename LB::Traits::RangeType y;
29
30 out.resize(6);
31 f.evaluate(x[0],y); out[0] = y;
32 f.evaluate(x[1],y); out[1] = y;
33 f.evaluate(x[2],y); out[2] = y;
34 f.evaluate(x[3],y); out[3] = y;
35 f.evaluate(x[4],y); out[4] = y;
36 f.evaluate(x[5],y); out[5] = y;
37 }
38
39 private:
40 typename LB::Traits::DomainType x[6];
41 };
42}
43
44#endif
Dune namespace.
Definition: alignedallocator.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)