3#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
4#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
12#include "../../common/localbasis.hh"
25 template<
class D,
class R>
36 sign0 = sign1 = sign2 = sign3 = 1.0;
46 sign0 = (s[0]) ? -1.0 : 1.0;
47 sign1 = (s[1]) ? -1.0 : 1.0;
48 sign2 = (s[2]) ? -1.0 : 1.0;
49 sign3 = (s[3]) ? -1.0 : 1.0;
65 std::vector<typename Traits::RangeType>& out)
const
69 auto const& x = in[0], y = in[1];
71 const auto l1_x = 2*x - 1;
72 const auto l2_x = x*(6*x - 6) + 1;
73 const auto l3_x = x*(x*(20*x - 30) + 12) - 1;
74 const auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1;
75 const auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1;
76 const auto l1_y = 2*y - 1;
77 const auto l2_y = y*(6*y - 6) + 1;
78 const auto l3_y = y*(y*(20*y - 30) + 12) - 1;
79 const auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1;
80 const auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1;
82 out[0][0]=sign0*(0.5*(-l4_x)+0.5*l5_x);
84 out[1][0]=-(1.5)*l4_x*l1_y+1.5*l5_x*l1_y;
86 out[2][0]=sign0*(-(2.5)*l4_x*l2_y+2.5*l5_x*l2_y);
88 out[3][0]=-(3.5)*l4_x*l3_y+3.5*l5_x*l3_y;
90 out[4][0]=sign0*(-(4.5)*l4_x*l4_y+4.5*l5_x*l4_y);
93 out[5][0]=sign1*(0.5*l4_x+0.5*l5_x);
95 out[6][0]=-(1.5)*l4_x*l1_y-1.5*l5_x*l1_y;
97 out[7][0]=sign1*(2.5*l4_x*l2_y+2.5*l5_x*l2_y);
99 out[8][0]=-(3.5)*l4_x*l3_y-3.5*l5_x*l3_y;
101 out[9][0]=sign1*(4.5*l4_x*l4_y+4.5*l5_x*l4_y);
105 out[10][1]=sign2*(0.5*(-l4_y)+0.5*l5_y);
107 out[11][1]=1.5*l1_x*l4_y-1.5*l1_x*l5_y;
109 out[12][1]=sign2*(-(2.5)*l2_x*l4_y+2.5*l2_x*l5_y);
111 out[13][1]=3.5*l3_x*l4_y-3.5*l3_x*l5_y;
113 out[14][1]=sign2*(-(4.5)*l4_x*l4_y+4.5*l4_x*l5_y);
116 out[15][1]=sign3*(0.5*l4_y+0.5*l5_y);
118 out[16][1]=1.5*l1_x*l4_y+1.5*l1_x*l5_y;
120 out[17][1]=sign3*(2.5*l2_x*l4_y+2.5*l2_x*l5_y);
122 out[18][1]=3.5*l3_x*l4_y+3.5*l3_x*l5_y;
124 out[19][1]=sign3*(4.5*l4_x*l4_y+4.5*l4_x*l5_y);
128 out[21][0]=3.0*l1_y-3.0*l4_x*l1_y;
130 out[22][0]=5.0*l2_y-5.0*l4_x*l2_y;
132 out[23][0]=7.0*l3_y-7.0*l4_x*l3_y;
134 out[24][0]=9.0*l4_y-9.0*l4_x*l4_y;
136 out[25][0]=3.0*l1_x-3.0*l5_x;
138 out[26][0]=9.0*l1_x*l1_y-9.0*l5_x*l1_y;
140 out[27][0]=15.0*l1_x*l2_y-15.0*l5_x*l2_y;
142 out[28][0]=21.0*l1_x*l3_y-21.0*l5_x*l3_y;
144 out[29][0]=27.0*l1_x*l4_y-27.0*l5_x*l4_y;
146 out[30][0]=5.0*l2_x-5.0*l4_x;
148 out[31][0]=15.0*l2_x*l1_y-15.0*l4_x*l1_y;
150 out[32][0]=25.0*l2_x*l2_y-25.0*l4_x*l2_y;
152 out[33][0]=35.0*l2_x*l3_y-35.0*l4_x*l3_y;
154 out[34][0]=45.0*l2_x*l4_y-45.0*l4_x*l4_y;
156 out[35][0]=7.0*l3_x-7.0*l5_x;
158 out[36][0]=21.0*l3_x*l1_y-21.0*l5_x*l1_y;
160 out[37][0]=35.0*l3_x*l2_y-35.0*l5_x*l2_y;
162 out[38][0]=49.0*l3_x*l3_y-49.0*l5_x*l3_y;
164 out[39][0]=63.0*l3_x*l4_y-63.0*l5_x*l4_y;
169 out[41][1]=3.0*l1_y-3.0*l5_y;
171 out[42][1]=5.0*l2_y-5.0*l4_y;
173 out[43][1]=7.0*l3_y-7.0*l5_y;
175 out[44][1]=3.0*l1_x-3.0*l1_x*l4_y;
177 out[45][1]=9.0*l1_x*l1_y-9.0*l1_x*l5_y;
179 out[46][1]=15.0*l1_x*l2_y-15.0*l1_x*l4_y;
181 out[47][1]=21.0*l1_x*l3_y-21.0*l1_x*l5_y;
183 out[48][1]=5.0*l2_x-5.0*l2_x*l4_y;
185 out[49][1]=15.0*l2_x*l1_y-15.0*l2_x*l5_y;
187 out[50][1]=25.0*l2_x*l2_y-25.0*l2_x*l4_y;
189 out[51][1]=35.0*l2_x*l3_y-35.0*l2_x*l5_y;
191 out[52][1]=7.0*l3_x-7.0*l3_x*l4_y;
193 out[53][1]=21.0*l3_x*l1_y-21.0*l3_x*l5_y;
195 out[54][1]=35.0*l3_x*l2_y-35.0*l3_x*l4_y;
197 out[55][1]=49.0*l3_x*l3_y-49.0*l3_x*l5_y;
199 out[56][1]=9.0*l4_x-9.0*l4_x*l4_y;
201 out[57][1]=27.0*l4_x*l1_y-27.0*l4_x*l5_y;
203 out[58][1]=45.0*l4_x*l2_y-45.0*l4_x*l4_y;
205 out[59][1]=63.0*l4_x*l3_y-63.0*l4_x*l5_y;
215 std::vector<typename Traits::JacobianType>& out)
const
218 auto const& x = in[0], y = in[1];
220 const auto l1_x = 2*x - 1;
221 const auto l2_x = x*(6*x - 6) + 1;
222 const auto l3_x = x*(x*(20*x - 30) + 12) - 1;
223 const auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1;
224 const auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1;
225 const auto l1_y = 2*y - 1;
226 const auto l2_y = y*(6*y - 6) + 1;
227 const auto l3_y = y*(y*(20*y - 30) + 12) - 1;
228 const auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1;
229 const auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1;
231 const auto dxl1_x = 2.0;
232 const auto dxl2_x = 12*x - 6;
233 const auto dxl3_x = x*(60*x - 60) + 12;
234 const auto dxl4_x = x*(x*(280*x - 420) + 180) - 20;
235 const auto dxl5_x = x*(x*(x*(1260*x - 2520) + 1680) - 420) + 30;
236 const auto dyl1_y = 2.0;
237 const auto dyl2_y = 12*y - 6;
238 const auto dyl3_y = y*(60*y - 60) + 12;
239 const auto dyl4_y = y*(y*(280*y - 420) + 180) - 20;
240 const auto dyl5_y = y*(y*(y*(1260*y - 2520) + 1680) - 420) + 30;
243 out[0][0][0]=sign0*(0.5*(-dxl4_x)+0.5*dxl5_x);
245 out[1][0][0]=-(1.5)*dxl4_x*l1_y+1.5*dxl5_x*l1_y;
247 out[2][0][0]=sign0*(-(2.5)*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
249 out[3][0][0]=-(3.5)*dxl4_x*l3_y+3.5*dxl5_x*l3_y;
251 out[4][0][0]=sign0*(-(4.5)*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
254 out[5][0][0]=sign1*(0.5*dxl4_x+0.5*dxl5_x);
256 out[6][0][0]=-(1.5)*dxl4_x*l1_y-1.5*dxl5_x*l1_y;
258 out[7][0][0]=sign1*(2.5*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
260 out[8][0][0]=-(3.5)*dxl4_x*l3_y-3.5*dxl5_x*l3_y;
262 out[9][0][0]=sign1*(4.5*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
268 out[11][1][0]=1.5*dxl1_x*l4_y-1.5*dxl1_x*l5_y;
270 out[12][1][0]=sign2*(-(2.5)*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
272 out[13][1][0]=3.5*dxl3_x*l4_y-3.5*dxl3_x*l5_y;
274 out[14][1][0]=sign2*(-(4.5)*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
279 out[16][1][0]=1.5*dxl1_x*l4_y+1.5*dxl1_x*l5_y;
281 out[17][1][0]=sign3*(2.5*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
283 out[18][1][0]=3.5*dxl3_x*l4_y+3.5*dxl3_x*l5_y;
285 out[19][1][0]=sign3*(4.5*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
287 out[20][0][0]=-dxl4_x;
289 out[21][0][0]=-3.0*dxl4_x*l1_y;
291 out[22][0][0]=-5.0*dxl4_x*l2_y;
293 out[23][0][0]=-7.0*dxl4_x*l3_y;
295 out[24][0][0]=-9.0*dxl4_x*l4_y;
297 out[25][0][0]=3.0*dxl1_x-3.0*dxl5_x;
299 out[26][0][0]=9.0*dxl1_x*l1_y-9.0*dxl5_x*l1_y;
301 out[27][0][0]=15.0*dxl1_x*l2_y-15.0*dxl5_x*l2_y;
303 out[28][0][0]=21.0*dxl1_x*l3_y-21.0*dxl5_x*l3_y;
305 out[29][0][0]=27.0*dxl1_x*l4_y-27.0*dxl5_x*l4_y;
307 out[30][0][0]=5.0*dxl2_x-5.0*dxl4_x;
309 out[31][0][0]=15.0*dxl2_x*l1_y-15.0*dxl4_x*l1_y;
311 out[32][0][0]=25.0*dxl2_x*l2_y-25.0*dxl4_x*l2_y;
313 out[33][0][0]=35.0*dxl2_x*l3_y-35.0*dxl4_x*l3_y;
315 out[34][0][0]=45.0*dxl2_x*l4_y-45.0*dxl4_x*l4_y;
317 out[35][0][0]=7.0*dxl3_x-7.0*dxl5_x;
319 out[36][0][0]=21.0*dxl3_x*l1_y-21.0*dxl5_x*l1_y;
321 out[37][0][0]=35.0*dxl3_x*l2_y-35.0*dxl5_x*l2_y;
323 out[38][0][0]=49.0*dxl3_x*l3_y-49.0*dxl5_x*l3_y;
325 out[39][0][0]=63.0*dxl3_x*l4_y-63.0*dxl5_x*l4_y;
336 out[44][1][0]=3.0*dxl1_x-3.0*dxl1_x*l4_y;
338 out[45][1][0]=9.0*dxl1_x*l1_y-9.0*dxl1_x*l5_y;
340 out[46][1][0]=15.0*dxl1_x*l2_y-15.0*dxl1_x*l4_y;
342 out[47][1][0]=21.0*dxl1_x*l3_y-21.0*dxl1_x*l5_y;
344 out[48][1][0]=5.0*dxl2_x-5.0*dxl2_x*l4_y;
346 out[49][1][0]=15.0*dxl2_x*l1_y-15.0*dxl2_x*l5_y;
348 out[50][1][0]=25.0*dxl2_x*l2_y-25.0*dxl2_x*l4_y;
350 out[51][1][0]=35.0*dxl2_x*l3_y-35.0*dxl2_x*l5_y;
352 out[52][1][0]=7.0*dxl3_x-7.0*dxl3_x*l4_y;
354 out[53][1][0]=21.0*dxl3_x*l1_y-21.0*dxl3_x*l5_y;
356 out[54][1][0]=35.0*dxl3_x*l2_y-35.0*dxl3_x*l4_y;
358 out[55][1][0]=49.0*dxl3_x*l3_y-49.0*dxl3_x*l5_y;
360 out[56][1][0]=9.0*dxl4_x-9.0*dxl4_x*l4_y;
362 out[57][1][0]=27.0*dxl4_x*l1_y-27.0*dxl4_x*l5_y;
364 out[58][1][0]=45.0*dxl4_x*l2_y-45.0*dxl4_x*l4_y;
366 out[59][1][0]=63.0*dxl4_x*l3_y-63.0*dxl4_x*l5_y;
371 out[1][0][1]=-(1.5)*l4_x*dyl1_y+1.5*l5_x*dyl1_y;
373 out[2][0][1]=sign0*(-(2.5)*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
375 out[3][0][1]=-(3.5)*l4_x*dyl3_y+3.5*l5_x*dyl3_y;
377 out[4][0][1]=sign0*(-(4.5)*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
382 out[6][0][1]=-(1.5)*l4_x*dyl1_y-1.5*l5_x*dyl1_y;
384 out[7][0][1]=sign1*(2.5*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
386 out[8][0][1]=-(3.5)*l4_x*dyl3_y-3.5*l5_x*dyl3_y;
388 out[9][0][1]=sign1*(4.5*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
392 out[10][1][1]=sign2*(0.5*(-dyl4_y)+0.5*dyl5_y);
394 out[11][1][1]=1.5*l1_x*dyl4_y-1.5*l1_x*dyl5_y;
396 out[12][1][1]=sign2*(-(2.5)*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
398 out[13][1][1]=3.5*l3_x*dyl4_y-3.5*l3_x*dyl5_y;
400 out[14][1][1]=sign2*(-(4.5)*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
403 out[15][1][1]=sign3*(0.5*dyl4_y+0.5*dyl5_y);
405 out[16][1][1]=1.5*l1_x*dyl4_y+1.5*l1_x*dyl5_y;
407 out[17][1][1]=sign3*(2.5*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
409 out[18][1][1]=3.5*l3_x*dyl4_y+3.5*l3_x*dyl5_y;
411 out[19][1][1]=sign3*(4.5*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
415 out[21][0][1]=3.0*dyl1_y-3.0*l4_x*dyl1_y;
417 out[22][0][1]=5.0*dyl2_y-5.0*l4_x*dyl2_y;
419 out[23][0][1]=7.0*dyl3_y-7.0*l4_x*dyl3_y;
421 out[24][0][1]=9.0*dyl4_y-9.0*l4_x*dyl4_y;
425 out[26][0][1]=9.0*l1_x*dyl1_y-9.0*l5_x*dyl1_y;
427 out[27][0][1]=15.0*l1_x*dyl2_y-15.0*l5_x*dyl2_y;
429 out[28][0][1]=21.0*l1_x*dyl3_y-21.0*l5_x*dyl3_y;
431 out[29][0][1]=27.0*l1_x*dyl4_y-27.0*l5_x*dyl4_y;
435 out[31][0][1]=15.0*l2_x*dyl1_y-15.0*l4_x*dyl1_y;
437 out[32][0][1]=25.0*l2_x*dyl2_y-25.0*l4_x*dyl2_y;
439 out[33][0][1]=35.0*l2_x*dyl3_y-35.0*l4_x*dyl3_y;
441 out[34][0][1]=45.0*l2_x*dyl4_y-45.0*l4_x*dyl4_y;
445 out[36][0][1]=21.0*l3_x*dyl1_y-21.0*l5_x*dyl1_y;
447 out[37][0][1]=35.0*l3_x*dyl2_y-35.0*l5_x*dyl2_y;
449 out[38][0][1]=49.0*l3_x*dyl3_y-49.0*l5_x*dyl3_y;
451 out[39][0][1]=63.0*l3_x*dyl4_y-63.0*l5_x*dyl4_y;
454 out[40][1][1]=-dyl4_y;
456 out[41][1][1]=3.0*dyl1_y-3.0*dyl5_y;
458 out[42][1][1]=5.0*dyl2_y-5.0*dyl4_y;
460 out[43][1][1]=7.0*dyl3_y-7.0*dyl5_y;
462 out[44][1][1]=-3.0*l1_x*dyl4_y;
464 out[45][1][1]=9.0*l1_x*dyl1_y-9.0*l1_x*dyl5_y;
466 out[46][1][1]=15.0*l1_x*dyl2_y-15.0*l1_x*dyl4_y;
468 out[47][1][1]=21.0*l1_x*dyl3_y-21.0*l1_x*dyl5_y;
470 out[48][1][1]=-5.0*l2_x*dyl4_y;
472 out[49][1][1]=15.0*l2_x*dyl1_y-15.0*l2_x*dyl5_y;
474 out[50][1][1]=25.0*l2_x*dyl2_y-25.0*l2_x*dyl4_y;
476 out[51][1][1]=35.0*l2_x*dyl3_y-35.0*l2_x*dyl5_y;
478 out[52][1][1]=-7.0*l3_x*dyl4_y;
480 out[53][1][1]=21.0*l3_x*dyl1_y-21.0*l3_x*dyl5_y;
482 out[54][1][1]=35.0*l3_x*dyl2_y-35.0*l3_x*dyl4_y;
484 out[55][1][1]=49.0*l3_x*dyl3_y-49.0*l3_x*dyl5_y;
486 out[56][1][1]=-9.0*l4_x*dyl4_y;
488 out[57][1][1]=27.0*l4_x*dyl1_y-27.0*l4_x*dyl5_y;
490 out[58][1][1]=45.0*l4_x*dyl2_y-45.0*l4_x*dyl4_y;
492 out[59][1][1]=63.0*l4_x*dyl3_y-63.0*l4_x*dyl5_y;
498 std::vector<typename Traits::RangeType>& out)
const
501 if (totalOrder == 0) {
503 }
else if (totalOrder == 1) {
505 auto const direction = std::distance(
order.begin(), std::find(
order.begin(),
order.end(), 1));
506 auto const& x = in[0], y = in[1];
509 auto l2_x = x*(6*x - 6) + 1;
510 auto l3_x = x*(x*(20*x - 30) + 12) - 1;
511 auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1;
512 auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1;
514 auto l2_y = y*(6*y - 6) + 1;
515 auto l3_y = y*(y*(20*y - 30) + 12) - 1;
516 auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1;
517 auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1;
519 if (direction == 0) {
521 auto dxl2_x = 12*x - 6;
522 auto dxl3_x = x*(60*x - 60) + 12;
523 auto dxl4_x = x*(x*(280*x - 420) + 180) - 20;
524 auto dxl5_x = x*(x*(x*(1260*x - 2520) + 1680) - 420) + 30;
526 out[0][0]=sign0*(0.5*(-dxl4_x)+0.5*dxl5_x);
528 out[1][0]=-(1.5)*dxl4_x*l1_y+1.5*dxl5_x*l1_y;
530 out[2][0]=sign0*(-(2.5)*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
532 out[3][0]=-(3.5)*dxl4_x*l3_y+3.5*dxl5_x*l3_y;
534 out[4][0]=sign0*(-(4.5)*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
537 out[5][0]=sign1*(0.5*dxl4_x+0.5*dxl5_x);
539 out[6][0]=-(1.5)*dxl4_x*l1_y-1.5*dxl5_x*l1_y;
541 out[7][0]=sign1*(2.5*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
543 out[8][0]=-(3.5)*dxl4_x*l3_y-3.5*dxl5_x*l3_y;
545 out[9][0]=sign1*(4.5*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
551 out[11][1]=1.5*dxl1_x*l4_y-1.5*dxl1_x*l5_y;
553 out[12][1]=sign2*(-(2.5)*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
555 out[13][1]=3.5*dxl3_x*l4_y-3.5*dxl3_x*l5_y;
557 out[14][1]=sign2*(-(4.5)*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
562 out[16][1]=1.5*dxl1_x*l4_y+1.5*dxl1_x*l5_y;
564 out[17][1]=sign3*(2.5*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
566 out[18][1]=3.5*dxl3_x*l4_y+3.5*dxl3_x*l5_y;
568 out[19][1]=sign3*(4.5*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
572 out[21][0]=-3.0*dxl4_x*l1_y;
574 out[22][0]=-5.0*dxl4_x*l2_y;
576 out[23][0]=-7.0*dxl4_x*l3_y;
578 out[24][0]=-9.0*dxl4_x*l4_y;
580 out[25][0]=3.0*dxl1_x-3.0*dxl5_x;
582 out[26][0]=9.0*dxl1_x*l1_y-9.0*dxl5_x*l1_y;
584 out[27][0]=15.0*dxl1_x*l2_y-15.0*dxl5_x*l2_y;
586 out[28][0]=21.0*dxl1_x*l3_y-21.0*dxl5_x*l3_y;
588 out[29][0]=27.0*dxl1_x*l4_y-27.0*dxl5_x*l4_y;
590 out[30][0]=5.0*dxl2_x-5.0*dxl4_x;
592 out[31][0]=15.0*dxl2_x*l1_y-15.0*dxl4_x*l1_y;
594 out[32][0]=25.0*dxl2_x*l2_y-25.0*dxl4_x*l2_y;
596 out[33][0]=35.0*dxl2_x*l3_y-35.0*dxl4_x*l3_y;
598 out[34][0]=45.0*dxl2_x*l4_y-45.0*dxl4_x*l4_y;
600 out[35][0]=7.0*dxl3_x-7.0*dxl5_x;
602 out[36][0]=21.0*dxl3_x*l1_y-21.0*dxl5_x*l1_y;
604 out[37][0]=35.0*dxl3_x*l2_y-35.0*dxl5_x*l2_y;
606 out[38][0]=49.0*dxl3_x*l3_y-49.0*dxl5_x*l3_y;
608 out[39][0]=63.0*dxl3_x*l4_y-63.0*dxl5_x*l4_y;
619 out[44][1]=3.0*dxl1_x-3.0*dxl1_x*l4_y;
621 out[45][1]=9.0*dxl1_x*l1_y-9.0*dxl1_x*l5_y;
623 out[46][1]=15.0*dxl1_x*l2_y-15.0*dxl1_x*l4_y;
625 out[47][1]=21.0*dxl1_x*l3_y-21.0*dxl1_x*l5_y;
627 out[48][1]=5.0*dxl2_x-5.0*dxl2_x*l4_y;
629 out[49][1]=15.0*dxl2_x*l1_y-15.0*dxl2_x*l5_y;
631 out[50][1]=25.0*dxl2_x*l2_y-25.0*dxl2_x*l4_y;
633 out[51][1]=35.0*dxl2_x*l3_y-35.0*dxl2_x*l5_y;
635 out[52][1]=7.0*dxl3_x-7.0*dxl3_x*l4_y;
637 out[53][1]=21.0*dxl3_x*l1_y-21.0*dxl3_x*l5_y;
639 out[54][1]=35.0*dxl3_x*l2_y-35.0*dxl3_x*l4_y;
641 out[55][1]=49.0*dxl3_x*l3_y-49.0*dxl3_x*l5_y;
643 out[56][1]=9.0*dxl4_x-9.0*dxl4_x*l4_y;
645 out[57][1]=27.0*dxl4_x*l1_y-27.0*dxl4_x*l5_y;
647 out[58][1]=45.0*dxl4_x*l2_y-45.0*dxl4_x*l4_y;
649 out[59][1]=63.0*dxl4_x*l3_y-63.0*dxl4_x*l5_y;
651 }
else if (direction == 1) {
653 auto dyl2_y = 12*y - 6;
654 auto dyl3_y = y*(60*y - 60) + 12;
655 auto dyl4_y = y*(y*(280*y - 420) + 180) - 20;
656 auto dyl5_y = y*(y*(y*(1260*y - 2520) + 1680) - 420) + 30;
660 out[1][0]=-(1.5)*l4_x*dyl1_y+1.5*l5_x*dyl1_y;
662 out[2][0]=sign0*(-(2.5)*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
664 out[3][0]=-(3.5)*l4_x*dyl3_y+3.5*l5_x*dyl3_y;
666 out[4][0]=sign0*(-(4.5)*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
671 out[6][0]=-(1.5)*l4_x*dyl1_y-1.5*l5_x*dyl1_y;
673 out[7][0]=sign1*(2.5*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
675 out[8][0]=-(3.5)*l4_x*dyl3_y-3.5*l5_x*dyl3_y;
677 out[9][0]=sign1*(4.5*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
681 out[10][1]=sign2*(0.5*(-dyl4_y)+0.5*dyl5_y);
683 out[11][1]=1.5*l1_x*dyl4_y-1.5*l1_x*dyl5_y;
685 out[12][1]=sign2*(-(2.5)*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
687 out[13][1]=3.5*l3_x*dyl4_y-3.5*l3_x*dyl5_y;
689 out[14][1]=sign2*(-(4.5)*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
692 out[15][1]=sign3*(0.5*dyl4_y+0.5*dyl5_y);
694 out[16][1]=1.5*l1_x*dyl4_y+1.5*l1_x*dyl5_y;
696 out[17][1]=sign3*(2.5*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
698 out[18][1]=3.5*l3_x*dyl4_y+3.5*l3_x*dyl5_y;
700 out[19][1]=sign3*(4.5*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
704 out[21][0]=3.0*dyl1_y-3.0*l4_x*dyl1_y;
706 out[22][0]=5.0*dyl2_y-5.0*l4_x*dyl2_y;
708 out[23][0]=7.0*dyl3_y-7.0*l4_x*dyl3_y;
710 out[24][0]=9.0*dyl4_y-9.0*l4_x*dyl4_y;
714 out[26][0]=9.0*l1_x*dyl1_y-9.0*l5_x*dyl1_y;
716 out[27][0]=15.0*l1_x*dyl2_y-15.0*l5_x*dyl2_y;
718 out[28][0]=21.0*l1_x*dyl3_y-21.0*l5_x*dyl3_y;
720 out[29][0]=27.0*l1_x*dyl4_y-27.0*l5_x*dyl4_y;
724 out[31][0]=15.0*l2_x*dyl1_y-15.0*l4_x*dyl1_y;
726 out[32][0]=25.0*l2_x*dyl2_y-25.0*l4_x*dyl2_y;
728 out[33][0]=35.0*l2_x*dyl3_y-35.0*l4_x*dyl3_y;
730 out[34][0]=45.0*l2_x*dyl4_y-45.0*l4_x*dyl4_y;
734 out[36][0]=21.0*l3_x*dyl1_y-21.0*l5_x*dyl1_y;
736 out[37][0]=35.0*l3_x*dyl2_y-35.0*l5_x*dyl2_y;
738 out[38][0]=49.0*l3_x*dyl3_y-49.0*l5_x*dyl3_y;
740 out[39][0]=63.0*l3_x*dyl4_y-63.0*l5_x*dyl4_y;
745 out[41][1]=3.0*dyl1_y-3.0*dyl5_y;
747 out[42][1]=5.0*dyl2_y-5.0*dyl4_y;
749 out[43][1]=7.0*dyl3_y-7.0*dyl5_y;
751 out[44][1]=-3.0*l1_x*dyl4_y;
753 out[45][1]=9.0*l1_x*dyl1_y-9.0*l1_x*dyl5_y;
755 out[46][1]=15.0*l1_x*dyl2_y-15.0*l1_x*dyl4_y;
757 out[47][1]=21.0*l1_x*dyl3_y-21.0*l1_x*dyl5_y;
759 out[48][1]=-5.0*l2_x*dyl4_y;
761 out[49][1]=15.0*l2_x*dyl1_y-15.0*l2_x*dyl5_y;
763 out[50][1]=25.0*l2_x*dyl2_y-25.0*l2_x*dyl4_y;
765 out[51][1]=35.0*l2_x*dyl3_y-35.0*l2_x*dyl5_y;
767 out[52][1]=-7.0*l3_x*dyl4_y;
769 out[53][1]=21.0*l3_x*dyl1_y-21.0*l3_x*dyl5_y;
771 out[54][1]=35.0*l3_x*dyl2_y-35.0*l3_x*dyl4_y;
773 out[55][1]=49.0*l3_x*dyl3_y-49.0*l3_x*dyl5_y;
775 out[56][1]=-9.0*l4_x*dyl4_y;
777 out[57][1]=27.0*l4_x*dyl1_y-27.0*l4_x*dyl5_y;
779 out[58][1]=45.0*l4_x*dyl2_y-45.0*l4_x*dyl4_y;
781 out[59][1]=63.0*l4_x*dyl3_y-63.0*l4_x*dyl5_y;
797 R sign0, sign1, sign2, sign3;
A dense n x m matrix.
Definition: fmatrix.hh:68
vector space out of a tensor product of fields.
Definition: fvector.hh:93
Default exception for dummy implementations.
Definition: exceptions.hh:261
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition: raviartthomas4cube2dlocalbasis.hh:27
RT4Cube2DLocalBasis(std::bitset< 4 > s)
Make set number s, where 0 <= s < 16.
Definition: raviartthomas4cube2dlocalbasis.hh:44
RT4Cube2DLocalBasis()
Standard constructor.
Definition: raviartthomas4cube2dlocalbasis.hh:34
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: raviartthomas4cube2dlocalbasis.hh:496
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition: raviartthomas4cube2dlocalbasis.hh:64
unsigned int size() const
number of shape functions
Definition: raviartthomas4cube2dlocalbasis.hh:53
unsigned int order() const
Polynomial order of the shape functions.
Definition: raviartthomas4cube2dlocalbasis.hh:791
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition: raviartthomas4cube2dlocalbasis.hh:214
Default exception class for range errors.
Definition: exceptions.hh:252
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:331
Dune namespace.
Definition: alignedallocator.hh:10
Type traits for LocalBasisVirtualInterface.
Definition: localbasis.hh:32
D DomainType
domain type
Definition: localbasis.hh:43