DUNE PDELab (2.8)

refinedp1localbasis.hh
Go to the documentation of this file.
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_REFINED_P1_LOCALBASIS_HH
4#define DUNE_REFINED_P1_LOCALBASIS_HH
5
10#include <numeric>
11
13
15
16namespace Dune
17{
18 template<class D, class R, int dim>
19 class RefinedP1LocalBasis
20 : public RefinedSimplexLocalBasis<D,dim>
21 {
22 public:
23 RefinedP1LocalBasis()
24 {
25 DUNE_THROW(Dune::NotImplemented,"RefinedP1LocalBasis not implemented for dim > 3.");
26 }
27 };
28
50 template<class D, class R>
51 class RefinedP1LocalBasis<D,R,1>
52 : public RefinedSimplexLocalBasis<D,1>
53 {
54 public:
58
60 static constexpr unsigned int size ()
61 {
62 return 3;
63 }
64
66 inline void evaluateFunction (const typename Traits::DomainType& in,
67 std::vector<typename Traits::RangeType>& out) const
68 {
69 out.resize(3);
70
71 int subElement;
72 typename Traits::DomainType local;
73 this->getSubElement(in, subElement, local);
74
75 switch (subElement) {
76 case 0 :
77
78 out[0] = 1 - local[0];
79 out[1] = local[0];
80 out[2] = 0;
81 break;
82
83 case 1 :
84
85 out[0] = 0;
86 out[1] = 1 - local[0];
87 out[2] = local[0];
88 break;
89
90 }
91
92 }
93
95 inline void
96 evaluateJacobian (const typename Traits::DomainType& in, // position
97 std::vector<typename Traits::JacobianType>& out) const // return value
98 {
99 out.resize(3);
100
101 int subElement;
102 typename Traits::DomainType local;
103 this->getSubElement(in, subElement, local);
104
105 switch (subElement) {
106 case 0 :
107
108 out[0][0][0] = -2;
109 out[1][0][0] = 2;
110 out[2][0][0] = 0;
111 break;
112
113 case 1 :
114
115 out[0][0][0] = 0;
116 out[1][0][0] = -2;
117 out[2][0][0] = 2;
118 break;
119
120 }
121 }
122
124 void partial (const std::array<unsigned int, 1>& order,
125 const typename Traits::DomainType& in, // position
126 std::vector<typename Traits::RangeType>& out) const // return value
127 {
128 auto totalOrder = order[0];
129 if (totalOrder == 0) {
130 evaluateFunction(in, out);
131 } else if (totalOrder == 1)
132 {
133 out.resize(3);
134
135 int subElement;
136 typename Traits::DomainType local;
137 this->getSubElement(in, subElement, local);
138
139 switch (subElement) {
140 case 0:
141 out[0] = -2;
142 out[1] = 2;
143 out[2] = 0;
144 break;
145 case 1:
146 out[0] = 0;
147 out[1] = -2;
148 out[2] = 2;
149 break;
150 }
151 } else {
152 out.resize(3);
153 out[0] = out[1] = out[2] = 0;
154 }
155 }
156
160 static constexpr unsigned int order ()
161 {
162 return 1;
163 }
164
165 };
166
191 template<class D, class R>
192 class RefinedP1LocalBasis<D,R,2>
193 : public RefinedSimplexLocalBasis<D,2>
194 {
195 public:
199
201 static constexpr unsigned int size ()
202 {
203 return 6;
204 }
205
207 inline void evaluateFunction (const typename Traits::DomainType& in,
208 std::vector<typename Traits::RangeType>& out) const
209 {
210 out.resize(6);
211
212 int subElement;
213 typename Traits::DomainType local;
214 this->getSubElement(in, subElement, local);
215
216 switch (subElement) {
217 case 0 :
218
219 out[0] = 1 - local[0] - local[1];
220 out[1] = local[0];
221 out[2] = 0;
222 out[3] = local[1];
223 out[4] = 0;
224 out[5] = 0;
225 break;
226
227 case 1 :
228
229 out[0] = 0;
230 out[1] = 1 - local[0] - local[1];
231 out[2] = local[0];
232 out[3] = 0;
233 out[4] = local[1];
234 out[5] = 0;
235 break;
236
237 case 2 :
238
239 out[0] = 0;
240 out[1] = 0;
241 out[2] = 0;
242 out[3] = 1 - local[0] - local[1];
243 out[4] = local[0];
244 out[5] = local[1];
245 break;
246 case 3 :
247
248 out[0] = 0;
249 out[1] = local[1];
250 out[2] = 0;
251 out[3] = local[0];
252 out[4] = 1 - local[0] - local[1];
253 out[5] = 0;
254 }
255
256 }
257
259 inline void
260 evaluateJacobian (const typename Traits::DomainType& in, // position
261 std::vector<typename Traits::JacobianType>& out) const // return value
262 {
263 out.resize(6);
264
265 int subElement;
266 typename Traits::DomainType local;
267 this->getSubElement(in, subElement, local);
268
269 switch (subElement) {
270 case 0 :
271
272 out[0][0][0] = -2; out[0][0][1] = -2;
273 out[1][0][0] = 2; out[1][0][1] = 0;
274 out[2][0][0] = 0; out[2][0][1] = 0;
275 out[3][0][0] = 0; out[3][0][1] = 2;
276 out[4][0][0] = 0; out[4][0][1] = 0;
277 out[5][0][0] = 0; out[5][0][1] = 0;
278 break;
279
280 case 1 :
281
282 out[0][0][0] = 0; out[0][0][1] = 0;
283 out[1][0][0] = -2; out[1][0][1] = -2;
284 out[2][0][0] = 2; out[2][0][1] = 0;
285 out[3][0][0] = 0; out[3][0][1] = 0;
286 out[4][0][0] = 0; out[4][0][1] = 2;
287 out[5][0][0] = 0; out[5][0][1] = 0;
288 break;
289
290 case 2 :
291
292 out[0][0][0] = 0; out[0][0][1] = 0;
293 out[1][0][0] = 0; out[1][0][1] = 0;
294 out[2][0][0] = 0; out[2][0][1] = 0;
295 out[3][0][0] = -2; out[3][0][1] = -2;
296 out[4][0][0] = 2; out[4][0][1] = 0;
297 out[5][0][0] = 0; out[5][0][1] = 2;
298 break;
299 case 3 :
300
301 out[0][0][0] = 0; out[0][0][1] = 0;
302 out[1][0][0] = 0; out[1][0][1] = -2;
303 out[2][0][0] = 0; out[2][0][1] = 0;
304 out[3][0][0] = -2; out[3][0][1] = 0;
305 out[4][0][0] = 2; out[4][0][1] = 2;
306 out[5][0][0] = 0; out[5][0][1] = 0;
307 }
308 }
309
311 void partial (const std::array<unsigned int, 2>& order,
312 const typename Traits::DomainType& in, // position
313 std::vector<typename Traits::RangeType>& out) const // return value
314 {
315 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
316 if (totalOrder == 0) {
317 evaluateFunction(in, out);
318 } else if (totalOrder == 1) {
319 int subElement;
320 typename Traits::DomainType local;
321 this->getSubElement(in, subElement, local);
322
323 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
324 out.resize(size());
325
326 for (std::size_t i = 0; i < size(); ++i)
327 out[i] = 0;
328
329 switch (direction) {
330 case 0: // direction == 0
331
332 switch (subElement) {
333 case 0 :
334 out[0] = -2;
335 out[1] = 2;
336 break;
337 case 1 :
338 out[1] = -2;
339 out[2] = 2;
340 break;
341 case 2 :
342 out[3] = -2;
343 out[4] = 2;
344 break;
345 case 3 :
346 out[3] = -2;
347 out[4] = 2;
348 }
349 break;
350
351 case 1: // direction == 1
352
353 switch (subElement) {
354 case 0 :
355 out[0] = -2;
356 out[3] = 2;
357 break;
358 case 1 :
359 out[1] = -2;
360 out[4] = 2;
361 break;
362 case 2 :
363 out[3] = -2;
364 out[5] = 2;
365 break;
366 case 3 :
367 out[1] = -2;
368 out[4] = 2;
369 }
370 break;
371
372 default:
373 DUNE_THROW(RangeError, "Component out of range.");
374 }
375 } else {
376 out.resize(size());
377 for (std::size_t i = 0; i < size(); ++i)
378 out[i] = 0;
379 }
380 }
381
385 static constexpr unsigned int order ()
386 {
387 return 1;
388 }
389
390 };
391
420 template<class D, class R>
421 class RefinedP1LocalBasis<D,R,3>
422 : public RefinedSimplexLocalBasis<D,3>
423 {
424 public:
428
430 static constexpr unsigned int size ()
431 {
432 return 10;
433 }
434
436 inline void evaluateFunction (const typename Traits::DomainType& in,
437 std::vector<typename Traits::RangeType>& out) const
438 {
439 out.resize(10);
440
441 int subElement;
442 typename Traits::DomainType local;
443 this->getSubElement(in, subElement, local);
444
445 switch (subElement) {
446 case 0 :
447
448 out[0] = 1 - local[0] - local[1] - local[2];
449 out[1] = local[0];
450 out[2] = 0;
451 out[3] = local[1];
452 out[4] = 0;
453 out[5] = 0;
454 out[6] = local[2];
455 out[7] = 0;
456 out[8] = 0;
457 out[9] = 0;
458 break;
459
460 case 1 :
461
462 out[0] = 0;
463 out[1] = 1 - local[0] - local[1] -local[2];
464 out[2] = local[0];
465 out[3] = 0;
466 out[4] = local[1];
467 out[5] = 0;
468 out[6] = 0;
469 out[7] = local[2];
470 out[8] = 0;
471 out[9] = 0;
472 break;
473
474 case 2 :
475
476 out[0] = 0;
477 out[1] = 0;
478 out[2] = 0;
479 out[3] = 1 - local[0] - local[1] -local[2];
480 out[4] = local[0];
481 out[5] = local[1];
482 out[6] = 0;
483 out[7] = 0;
484 out[8] = local[2];
485 out[9] = 0;
486 break;
487
488 case 3 :
489
490 out[0] = 0;
491 out[1] = 0;
492 out[2] = 0;
493 out[3] = 0;
494 out[4] = 0;
495 out[5] = 0;
496 out[6] = 1 - local[0] - local[1] -local[2];
497 out[7] = local[0];
498 out[8] = local[1];
499 out[9] = local[2];
500 break;
501
502 case 4 :
503
504 out[0] = 0;
505 out[1] = 1 - local[0] - local[1] -local[2];
506 out[2] = 0;
507 out[3] = local[0];
508 out[4] = 0;
509 out[5] = 0;
510 out[6] = local[1];
511 out[7] = local[2];
512 out[8] = 0;
513 out[9] = 0;
514 break;
515
516 case 5 :
517
518 out[0] = 0;
519 out[1] = local[1];
520 out[2] = 0;
521 out[3] = local[0];
522 out[4] = 1 - local[0] - local[1] -local[2];
523 out[5] = 0;
524 out[6] = 0;
525 out[7] = local[2];
526 out[8] = 0;
527 out[9] = 0;
528 break;
529
530 case 6 :
531
532 out[0] = 0;
533 out[1] = 0;
534 out[2] = 0;
535 out[3] = 1 - local[0] - local[1] -local[2];
536 out[4] = 0;
537 out[5] = 0;
538 out[6] = local[0];
539 out[7] = local[1];
540 out[8] = local[2];
541 out[9] = 0;
542 break;
543
544 case 7 :
545
546 out[0] = 0;
547 out[1] = 0;
548 out[2] = 0;
549 out[3] = 1 - local[0] - local[1] -local[2];
550 out[4] = local[2];
551 out[5] = 0;
552 out[6] = 0;
553 out[7] = local[1];
554 out[8] = local[0];
555 out[9] = 0;
556 break;
557 }
558
559 }
560
562 inline void
563 evaluateJacobian (const typename Traits::DomainType& in, // position
564 std::vector<typename Traits::JacobianType>& out) const // return value
565 {
566 out.resize(10);
567
568 int subElement;
569 typename Traits::DomainType local;
570 this->getSubElement(in, subElement, local);
571
572 switch (subElement) {
573 case 0 :
574
575 out[0][0][0] = -2; out[0][0][1] = -2; out[0][0][2] = -2;
576 out[1][0][0] = 2; out[1][0][1] = 0; out[1][0][2] = 0;
577 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
578 out[3][0][0] = 0; out[3][0][1] = 2; out[3][0][2] = 0;
579 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
580 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
581 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 2;
582 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 0;
583 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
584 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
585 break;
586
587 case 1 :
588
589 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
590 out[1][0][0] = -2; out[1][0][1] = -2; out[1][0][2] = -2;
591 out[2][0][0] = 2; out[2][0][1] = 0; out[2][0][2] = 0;
592 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0;
593 out[4][0][0] = 0; out[4][0][1] = 2; out[4][0][2] = 0;
594 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
595 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
596 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 2;
597 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
598 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
599 break;
600
601 case 2 :
602
603 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
604 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
605 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
606 out[3][0][0] = -2; out[3][0][1] = -2; out[3][0][2] = -2;
607 out[4][0][0] = 2; out[4][0][1] = 0; out[4][0][2] = 0;
608 out[5][0][0] = 0; out[5][0][1] = 2; out[5][0][2] = 0;
609 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
610 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 0;
611 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 2;
612 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
613 break;
614
615 case 3 :
616
617 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
618 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
619 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
620 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0;
621 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
622 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
623 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = -2;
624 out[7][0][0] = 2; out[7][0][1] = 0; out[7][0][2] = 0;
625 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 0;
626 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 2;
627 break;
628
629 case 4 :
630
631 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
632 out[1][0][0] = 0; out[1][0][1] = -2; out[1][0][2] = -2;
633 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
634 out[3][0][0] = 0; out[3][0][1] = 2; out[3][0][2] = 0;
635 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
636 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
637 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = 0;
638 out[7][0][0] = 2; out[7][0][1] = 2; out[7][0][2] = 2;
639 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
640 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
641 break;
642
643 case 5 :
644
645 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
646 out[1][0][0] = 0; out[1][0][1] = -2; out[1][0][2] = -2;
647 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
648 out[3][0][0] = -2; out[3][0][1] = 0; out[3][0][2] = 0;
649 out[4][0][0] = 2; out[4][0][1] = 2; out[4][0][2] = 0;
650 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
651 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
652 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 2;
653 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
654 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
655 break;
656
657 case 6 :
658
659 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
660 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
661 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
662 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = -2;
663 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
664 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
665 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = 0;
666 out[7][0][0] = 2; out[7][0][1] = 0; out[7][0][2] = 0;
667 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 2;
668 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
669 break;
670
671 case 7 :
672
673 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
674 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
675 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
676 out[3][0][0] = -2; out[3][0][1] = -2; out[3][0][2] = -2;
677 out[4][0][0] = 2; out[4][0][1] = 2; out[4][0][2] = 0;
678 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
679 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
680 out[7][0][0] = 0; out[7][0][1] = -2; out[7][0][2] = 0;
681 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 2;
682 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
683 break;
684 }
685 }
686
688 void partial (const std::array<unsigned int, 3>& order,
689 const typename Traits::DomainType& in, // position
690 std::vector<typename Traits::RangeType>& out) const // return value
691 {
692 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
693 if (totalOrder == 0) {
694 evaluateFunction(in, out);
695 } else if (totalOrder == 1) {
696 int subElement;
697 typename Traits::DomainType local;
698 this->getSubElement(in, subElement, local);
699
700 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
701 out.resize(size());
702
703 for (std::size_t i = 0; i < size(); ++i)
704 out[i] = 0;
705
706 switch (direction) {
707 case 0: // direction == 0
708
709 switch (subElement) {
710 case 0 :
711 out[0] = -2;
712 out[1] = 2;
713 break;
714 case 1 :
715 out[1] = -2;
716 out[2] = 2;
717 break;
718 case 2 :
719 out[3] = -2;
720 out[4] = 2;
721 break;
722 case 3 :
723 out[6] = -2;
724 out[7] = 2;
725 break;
726 case 4 :
727 out[6] = -2;
728 out[7] = 2;
729 break;
730 case 5 :
731 out[3] = -2;
732 out[4] = 2;
733 break;
734 case 6 :
735 out[6] = -2;
736 out[7] = 2;
737 break;
738 case 7 :
739 out[3] = -2;
740 out[4] = 2;
741 break;
742 }
743 break;
744
745 case 1: // direction == 1
746
747 switch (subElement) {
748 case 0 :
749 out[0] = -2;
750 out[3] = 2;
751 break;
752 case 1 :
753 out[1] = -2;
754 out[4] = 2;
755 break;
756 case 2 :
757 out[3] = -2;
758 out[5] = 2;
759 break;
760 case 3 :
761 out[6] = -2;
762 out[8] = 2;
763 break;
764 case 4 :
765 out[1] = -2;
766 out[3] = 2;
767 out[6] = -2;
768 break;
769 case 5 :
770 out[1] = -2;
771 out[4] = 2;
772 break;
773 case 6 :
774 out[6] = -2;
775 out[8] = 2;
776 break;
777 case 7 :
778 out[3] = -2;
779 out[4] = 2;
780 out[7] = -2;
781 out[8] = 2;
782 break;
783 }
784 break;
785
786 case 2: // direction == 2
787
788 switch (subElement) {
789 case 0 :
790 out[0] = -2;
791 out[6] = 2;
792 break;
793 case 1 :
794 out[1] = -2;
795 out[7] = 2;
796 break;
797 case 2 :
798 out[3] = -2;
799 out[8] = 2;
800 break;
801 case 3 :
802 out[6] = -2;
803 out[9] = 2;
804 break;
805 case 4 :
806 out[1] = -2;
807 out[7] = 2;
808 break;
809 case 5 :
810 out[1] = -2;
811 out[7] = 2;
812 break;
813 case 6 :
814 out[3] = -2;
815 out[8] = 2;
816 break;
817 case 7 :
818 out[3] = -2;
819 out[8] = 2;
820 break;
821 }
822 break;
823
824 default:
825 DUNE_THROW(RangeError, "Component out of range.");
826 }
827 } else {
828 out.resize(size());
829 for (std::size_t i = 0; i < size(); ++i)
830 out[i] = 0;
831 }
832 }
833
837 static constexpr unsigned int order ()
838 {
839 return 1;
840 }
841
842 };
843}
844#endif
A dense n x m matrix.
Definition: fmatrix.hh:69
vector space out of a tensor product of fields.
Definition: fvector.hh:95
Default exception for dummy implementations.
Definition: exceptions.hh:261
Default exception class for range errors.
Definition: exceptions.hh:252
LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 1 > > Traits
export type traits for function signature
Definition: refinedp1localbasis.hh:57
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition: refinedp1localbasis.hh:96
static constexpr unsigned int order()
Polynomial order of the shape functions Doesn't really apply: these shape functions are only piecewis...
Definition: refinedp1localbasis.hh:160
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition: refinedp1localbasis.hh:66
void partial(const std::array< unsigned int, 1 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition: refinedp1localbasis.hh:124
static constexpr unsigned int size()
number of shape functions
Definition: refinedp1localbasis.hh:60
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition: refinedp1localbasis.hh:260
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 2 > > Traits
export type traits for function signature
Definition: refinedp1localbasis.hh:198
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition: refinedp1localbasis.hh:207
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: refinedp1localbasis.hh:311
static constexpr unsigned int order()
Polynomial order of the shape functions Doesn't really apply: these shape functions are only piecewis...
Definition: refinedp1localbasis.hh:385
static constexpr unsigned int size()
number of shape functions
Definition: refinedp1localbasis.hh:201
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition: refinedp1localbasis.hh:688
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition: refinedp1localbasis.hh:436
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition: refinedp1localbasis.hh:427
static constexpr unsigned int size()
number of shape functions
Definition: refinedp1localbasis.hh:430
static constexpr unsigned int order()
Polynomial order of the shape functions Doesn't really apply: these shape functions are only piecewis...
Definition: refinedp1localbasis.hh:837
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition: refinedp1localbasis.hh:563
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
constexpr T accumulate(Range &&range, T value, F &&f)
Accumulate values.
Definition: hybridutilities.hh:289
Dune namespace.
Definition: alignedallocator.hh:11
Contains a base class for LocalBasis classes based on uniform refinement.
Type traits for LocalBasisVirtualInterface.
Definition: localbasis.hh:32
D DomainType
domain type
Definition: localbasis.hh:43
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)