3#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
4#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
11#include "../../common/localbasis.hh"
24 template<
class D,
class R>
39 sign0 = sign1 = sign2 = sign3 = 1.0;
71 std::vector<typename Traits::RangeType>& out)
const
75 out[0][0] = sign0*(-1.0 + 4.0*in[0]-3*in[0]*in[0]);
77 out[1][0] = 3.0 - 12.0*in[0] - 6.0*in[1] + 24.0*in[0]*in[1]+9*in[0]*in[0] - 18.0*in[0]*in[0]*in[1];
79 out[2][0] = sign1*(-2.0*in[0] + 3.0*in[0]*in[0]);
81 out[3][0] = -6.0*in[0] + 12.0*in[0]*in[1] + 9.0*in[0]*in[0] - 18.0*in[0]*in[0]*in[1];
84 out[4][1] = sign2*(-1.0 + 4.0*in[1] - 3.0*in[1]*in[1]);
86 out[5][1] = -3.0 + 6.0*in[0] + 12.0*in[1] - 24.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in[1]*in[1];
88 out[6][1] = sign3*(-2.0*in[1] + 3.0*in[1]*in[1]);
90 out[7][1] = 6.0*in[1] - 12.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in[1]*in[1];
91 out[8][0] = 24.0*in[0] - 36.0*in[0]*in[1] - 24.0*in[0]*in[0] + 36.0*in[0]*in[0]*in[1];
94 out[9][1] = 24.0*in[1] - 36.0*in[0]*in[1] - 24.0*in[1]*in[1] + 36.0*in[0]*in[1]*in[1];
95 out[10][0] = -36.0*in[0] + 72.0*in[0]*in[1] + 36.0*in[0]*in[0] - 72.0*in[0]*in[0]*in[1];
98 out[11][1] = -36.0*in[1] + 72.0*in[0]*in[1] + 36*in[1]*in[1] - 72.0*in[0]*in[1]*in[1];
108 std::vector<typename Traits::JacobianType>& out)
const
112 out[0][0][0] = sign0*(4.0 - 6.0*in[0]);
117 out[1][0][0] = -12.0 + 24.0*in[1] + 18.0*in[0] - 36.0*in[0]*in[1];
118 out[1][0][1] = -6 + 24.0*in[0] - 18.0*in[0]*in[0];
122 out[2][0][0] = sign1*(-2.0 + 6.0*in[0]);
127 out[3][0][0] = -6.0 + 12.0*in[1] + 18.0*in[0] - 36.0*in[0]*in[1];
128 out[3][0][1] = 12.0*in[0] - 18.0*in[0]*in[0];
135 out[4][1][1] = sign2*(4.0 - 6.0*in[1]);
139 out[5][1][0] = 6.0 - 24.0*in[1] + 18.0*in[1]*in[1];
140 out[5][1][1] = 12.0 - 24.0*in[0] - 18.0*in[1] + 36.0*in[0]*in[1];
145 out[6][1][1] = sign3*(-2.0 + 6.0*in[1]);
149 out[7][1][0] = -12.0*in[1] + 18.0*in[1]*in[1];
150 out[7][1][1] = 6.0 - 12.0*in[0] - 18.0*in[1] + 36.0*in[1]*in[0];
152 out[8][0][0] = 24.0 - 36.0*in[1] - 48.0*in[0] + 72.0*in[0]*in[1];
153 out[8][0][1] = -36.0*in[0] + 36.0*in[0]*in[0];
159 out[9][1][0] = -36.0*in[1] + 36.0*in[1]*in[1];
160 out[9][1][1] = 24.0 - 36.0*in[0] - 48.0*in[1] + 72.0*in[0]*in[1];
162 out[10][0][0] = -36.0 + 72.0*in[1] + 72.0*in[0] - 144.0*in[0]*in[1];
163 out[10][0][1] = 72.0*in[0] - 72.0*in[0]*in[0];
169 out[11][1][0] = 72.0*in[1] - 72.0*in[1]*in[1];
170 out[11][1][1] = -36.0 + 72.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1];
176 std::vector<typename Traits::RangeType>& out)
const
179 if (totalOrder == 0) {
193 R sign0, sign1, sign2, sign3;
A dense n x m matrix.
Definition: fmatrix.hh:69
vector space out of a tensor product of fields.
Definition: fvector.hh:96
Default exception for dummy implementations.
Definition: exceptions.hh:261
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition: raviartthomas1cube2dlocalbasis.hh:26
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition: raviartthomas1cube2dlocalbasis.hh:107
unsigned int order() const
Polynomial order of the shape functions.
Definition: raviartthomas1cube2dlocalbasis.hh:187
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition: raviartthomas1cube2dlocalbasis.hh:70
unsigned int size() const
number of shape functions
Definition: raviartthomas1cube2dlocalbasis.hh:59
RT1Cube2DLocalBasis(unsigned int s=0)
Make set number s, where 0 <= s < 16.
Definition: raviartthomas1cube2dlocalbasis.hh:37
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition: raviartthomas1cube2dlocalbasis.hh:174
Implements a matrix constructed from a given type representing a field and compile-time given number ...
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
T accumulate(Range &&range, T value, F &&f)
Accumulate values.
Definition: hybridutilities.hh:290
Dune namespace.
Definition: alignedallocator.hh:14
Type traits for LocalBasisVirtualInterface.
Definition: localbasis.hh:32
D DomainType
domain type
Definition: localbasis.hh:43