3 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
4 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
8 #include <dune/common/fmatrix.hh>
10 #include "../../common/localbasis.hh"
23 template<
class D,
class R>
34 sign0 = sign1 = sign2 = sign3 = 1.0;
44 sign0 = sign1 = sign2 = sign3 = 1.0;
76 std::vector<typename Traits::RangeType>& out)
const
80 double l1_x=(-1.0+2.0*in[0]);
81 double l1_y=(-1.0+2.0*in[1]);
82 double l2_x=(1.0-6.0*in[0]+6.0*pow(in[0],2));
83 double l2_y=(1.0-6.0*in[1]+6.0*pow(in[1],2));
84 double l3_x=(-1.0+12.0*in[0]-30.0*pow(in[0],2)+20.0*pow(in[0],3));
85 double l3_y=(-1.0+12.0*in[1]-30.0*pow(in[1],2)+20.0*pow(in[1],3));
86 double l4_x=(1.0-20.0*in[0]+90.0*pow(in[0],2)-140.0*pow(in[0],3)+70.0*pow(in[0],4));
87 double l4_y=(1.0-20.0*in[1]+90.0*pow(in[1],2)-140.0*pow(in[1],3)+70.0*pow(in[1],4));
88 double l5_x=(-1.0+30.0*in[0]-210.0*pow(in[0],2)+560.0*pow(in[0],3)-630.0*pow(in[0],4)+252.0*pow(in[0],5));
89 double l5_y=(-1.0+30.0*in[1]-210.0*pow(in[1],2)+560.0*pow(in[1],3)-630.0*pow(in[1],4)+252.0*pow(in[1],5));
91 out[0][0]=sign0*(0.5*(-l4_x)+0.5*l5_x);
93 out[1][0]=-(1.5)*l4_x*l1_y+1.5*l5_x*l1_y;
95 out[2][0]=sign0*(-(2.5)*l4_x*l2_y+2.5*l5_x*l2_y);
97 out[3][0]=-(3.5)*l4_x*l3_y+3.5*l5_x*l3_y;
99 out[4][0]=sign0*(-(4.5)*l4_x*l4_y+4.5*l5_x*l4_y);
102 out[5][0]=sign1*(0.5*l4_x+0.5*l5_x);
104 out[6][0]=-(1.5)*l4_x*l1_y-1.5*l5_x*l1_y;
106 out[7][0]=sign1*(2.5*l4_x*l2_y+2.5*l5_x*l2_y);
108 out[8][0]=-(3.5)*l4_x*l3_y-3.5*l5_x*l3_y;
110 out[9][0]=sign1*(4.5*l4_x*l4_y+4.5*l5_x*l4_y);
114 out[10][1]=sign2*(0.5*(-l4_y)+0.5*l5_y);
116 out[11][1]=1.5*l1_x*l4_y-1.5*l1_x*l5_y;
118 out[12][1]=sign2*(-(2.5)*l2_x*l4_y+2.5*l2_x*l5_y);
120 out[13][1]=3.5*l3_x*l4_y-3.5*l3_x*l5_y;
122 out[14][1]=sign2*(-(4.5)*l4_x*l4_y+4.5*l4_x*l5_y);
125 out[15][1]=sign3*(0.5*l4_y+0.5*l5_y);
127 out[16][1]=1.5*l1_x*l4_y+1.5*l1_x*l5_y;
129 out[17][1]=sign3*(2.5*l2_x*l4_y+2.5*l2_x*l5_y);
131 out[18][1]=3.5*l3_x*l4_y+3.5*l3_x*l5_y;
133 out[19][1]=sign3*(4.5*l4_x*l4_y+4.5*l4_x*l5_y);
137 out[21][0]=3.0*l1_y-3.0*l4_x*l1_y;
139 out[22][0]=5.0*l2_y-5.0*l4_x*l2_y;
141 out[23][0]=7.0*l3_y-7.0*l4_x*l3_y;
143 out[24][0]=9.0*l4_y-9.0*l4_x*l4_y;
145 out[25][0]=3.0*l1_x-3.0*l5_x;
147 out[26][0]=9.0*l1_x*l1_y-9.0*l5_x*l1_y;
149 out[27][0]=15.0*l1_x*l2_y-15.0*l5_x*l2_y;
151 out[28][0]=21.0*l1_x*l3_y-21.0*l5_x*l3_y;
153 out[29][0]=27.0*l1_x*l4_y-27.0*l5_x*l4_y;
155 out[30][0]=5.0*l2_x-5.0*l4_x;
157 out[31][0]=15.0*l2_x*l1_y-15.0*l4_x*l1_y;
159 out[32][0]=25.0*l2_x*l2_y-25.0*l4_x*l2_y;
161 out[33][0]=35.0*l2_x*l3_y-35.0*l4_x*l3_y;
163 out[34][0]=45.0*l2_x*l4_y-45.0*l4_x*l4_y;
165 out[35][0]=7.0*l3_x-7.0*l5_x;
167 out[36][0]=21.0*l3_x*l1_y-21.0*l5_x*l1_y;
169 out[37][0]=35.0*l3_x*l2_y-35.0*l5_x*l2_y;
171 out[38][0]=49.0*l3_x*l3_y-49.0*l5_x*l3_y;
173 out[39][0]=63.0*l3_x*l4_y-63.0*l5_x*l4_y;
178 out[41][1]=3.0*l1_y-3.0*l5_y;
180 out[42][1]=5.0*l2_y-5.0*l4_y;
182 out[43][1]=7.0*l3_y-7.0*l5_y;
184 out[44][1]=3.0*l1_x-3.0*l1_x*l4_y;
186 out[45][1]=9.0*l1_x*l1_y-9.0*l1_x*l5_y;
188 out[46][1]=15.0*l1_x*l2_y-15.0*l1_x*l4_y;
190 out[47][1]=21.0*l1_x*l3_y-21.0*l1_x*l5_y;
192 out[48][1]=5.0*l2_x-5.0*l2_x*l4_y;
194 out[49][1]=15.0*l2_x*l1_y-15.0*l2_x*l5_y;
196 out[50][1]=25.0*l2_x*l2_y-25.0*l2_x*l4_y;
198 out[51][1]=35.0*l2_x*l3_y-35.0*l2_x*l5_y;
200 out[52][1]=7.0*l3_x-7.0*l3_x*l4_y;
202 out[53][1]=21.0*l3_x*l1_y-21.0*l3_x*l5_y;
204 out[54][1]=35.0*l3_x*l2_y-35.0*l3_x*l4_y;
206 out[55][1]=49.0*l3_x*l3_y-49.0*l3_x*l5_y;
208 out[56][1]=9.0*l4_x-9.0*l4_x*l4_y;
210 out[57][1]=27.0*l4_x*l1_y-27.0*l4_x*l5_y;
212 out[58][1]=45.0*l4_x*l2_y-45.0*l4_x*l4_y;
214 out[59][1]=63.0*l4_x*l3_y-63.0*l4_x*l5_y;
224 std::vector<typename Traits::JacobianType>& out)
const
236 R sign0, sign1, sign2, sign3;
240 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition: raviartthomas4cube2dlocalbasis.hh:223
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition: raviartthomas4cube2dlocalbasis.hh:29
RT4Cube2DLocalBasis()
Standard constructor.
Definition: raviartthomas4cube2dlocalbasis.hh:32
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:14
RT4Cube2DLocalBasis(unsigned int s)
Make set number s, where 0 <= s < 16.
Definition: raviartthomas4cube2dlocalbasis.hh:42
Type traits for LocalBasisVirtualInterface.
Definition: localbasis.hh:37
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition: raviartthomas4cube2dlocalbasis.hh:24
unsigned int order() const
Polynomial order of the shape functions.
Definition: raviartthomas4cube2dlocalbasis.hh:230
D DomainType
domain type
Definition: localbasis.hh:49
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition: raviartthomas4cube2dlocalbasis.hh:75
unsigned int size() const
number of shape functions
Definition: raviartthomas4cube2dlocalbasis.hh:64