dune-geometry 2.12-git
Loading...
Searching...
No Matches
multilineargeometry.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// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
7
8#include <cassert>
9#include <functional>
10#include <iterator>
11#include <limits>
12#include <vector>
13
17
19#include <dune/geometry/type.hh>
21
22namespace Dune
23{
24
25 // MultiLinearGeometryTraits
26 // -------------------------
27
37 template< class ct >
39 {
58 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
59
61 static ct tolerance () { return ct( 16 ) * std::numeric_limits< ct >::epsilon(); }
62
127 template< int mydim, int cdim >
132
146 template< int dim >
148 {
149 static constexpr bool v = false;
150 static constexpr unsigned int topologyId = ~0u;
151 };
152 };
153
154
155
156 // MultiLinearGeometry
157 // -------------------
158
179 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
181 {
183
184 public:
186 typedef ct ctype;
187
189 static constexpr int mydimension= mydim;
191 static constexpr int coorddimension = cdim;
192
198 typedef ctype Volume;
199
202
205
208
211
212 protected:
213
215
216 public:
217
220
221 private:
222 static constexpr bool hasSingleGeometryType = Traits::template hasSingleGeometryType< mydimension >::v;
223
224 protected:
225 typedef typename Traits::MatrixHelper MatrixHelper;
227
228 public:
238 template< class Corners >
240 const Corners &corners )
241 : refElement_( refElement ),
242 corners_( corners )
243 {}
244
254 template< class Corners >
256 const Corners &corners )
257 : refElement_( ReferenceElements::general( gt ) ),
258 corners_( corners )
259 {}
260
262 bool affine () const
263 {
265 return affine( jt );
266 }
267
269 Dune::GeometryType type () const { return GeometryType( toUnsignedInt(topologyId()), mydimension ); }
270
272 int corners () const { return refElement().size( mydimension ); }
273
275 GlobalCoordinate corner ( int i ) const
276 {
277 assert( (i >= 0) && (i < corners()) );
278 return std::cref(corners_).get()[ i ];
279 }
280
282 GlobalCoordinate center () const { return global( refElement().position( 0, 0 ) ); }
283
291 {
292 using std::begin;
293
294 auto cit = begin(std::cref(corners_).get());
296 global< false >( topologyId(), std::integral_constant< int, mydimension >(), cit, ctype( 1 ), local, ctype( 1 ), y );
297 return y;
298 }
299
312 LocalCoordinate local ( const GlobalCoordinate &globalCoord ) const
313 {
314 const ctype tolerance = Traits::tolerance();
315 LocalCoordinate x = refElement().position( 0, 0 );
317 const bool affineMapping = this->affine();
318 do
319 {
320 // Newton's method: DF^n dx^n = F^n, x^{n+1} -= dx^n
321 const GlobalCoordinate dglobal = (*this).global( x ) - globalCoord;
322 const bool invertible =
323 MatrixHelper::xTRightInvA( jacobianTransposed( x ), dglobal, dx );
324 if( ! invertible )
326
327 // update x with correction
328 x -= dx;
329
330 // for affine mappings only one iteration is needed
331 if ( affineMapping ) break;
332 } while( dx.two_norm2() > tolerance );
333 return x;
334 }
335
351 {
352 return MatrixHelper::sqrtDetAAT( jacobianTransposed( local ) );
353 }
354
363 Volume volume () const
364 {
365 return integrationElement( refElement().position( 0, 0 ) ) * refElement().volume();
366 }
367
378 {
379 using std::begin;
380
382 auto cit = begin(std::cref(corners_).get());
383 jacobianTransposed< false >( topologyId(), std::integral_constant< int, mydimension >(), cit, ctype( 1 ), local, ctype( 1 ), jt );
384 return jt;
385 }
386
393 JacobianInverseTransposed jacobianInverseTransposed ( const LocalCoordinate &local ) const;
394
396 {
397 return geometry.refElement();
398 }
399
400
408 {
410 }
411
422
423 protected:
424
426 {
427 return refElement_;
428 }
429
434
435 template< bool add, int dim, class CornerIterator >
437 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
438 const ctype &rf, GlobalCoordinate &y );
439 template< bool add, class CornerIterator >
441 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
442 const ctype &rf, GlobalCoordinate &y );
443
444 template< bool add, int rows, int dim, class CornerIterator >
446 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
448 template< bool add, int rows, class CornerIterator >
450 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
452
453 template< int dim, class CornerIterator >
455 template< class CornerIterator >
457
458 bool affine ( JacobianTransposed &jacobianT ) const
459 {
460 using std::begin;
461
462 auto cit = begin(std::cref(corners_).get());
463 return affine( topologyId(), std::integral_constant< int, mydimension >(), cit, jacobianT );
464 }
465
466 private:
467 // The following methods are needed to convert the return type of topologyId to
468 // unsigned int with g++-4.4. It has problems casting integral_constant to the
469 // integral type.
470 static unsigned int toUnsignedInt(unsigned int i) { return i; }
471 template<unsigned int v>
472 static unsigned int toUnsignedInt(std::integral_constant<unsigned int,v> ) { return v; }
474 unsigned int topologyId ( std::integral_constant< bool, false > ) const { return refElement().type().id(); }
475
476 ReferenceElement refElement_;
477 typename Traits::template CornerStorage< mydimension, coorddimension >::Type corners_;
478 };
479
480
481
482 // MultiLinearGeometry::JacobianInverseTransposed
483 // ----------------------------------------------
484
485 template< class ct, int mydim, int cdim, class Traits >
486 class MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
487 : public FieldMatrix< ctype, coorddimension, mydimension >
488 {
490
491 public:
492 void setup ( const JacobianTransposed &jt )
493 {
494 detInv_ = MatrixHelper::rightInvA( jt, static_cast< Base & >( *this ) );
495 }
496
498 {
499 detInv_ = MatrixHelper::sqrtDetAAT( jt );
500 }
501
502 ctype det () const { return ctype( 1 ) / detInv_; }
503 ctype detInv () const { return detInv_; }
504
505 private:
506 ctype detInv_;
507 };
508
509
510
523 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
525 : public MultiLinearGeometry< ct, mydim, cdim, Traits >
526 {
529
530 protected:
532
533 public:
535
536 typedef typename Base::ctype ctype;
537
538 using Base::mydimension;
540
543 typedef typename Base::Volume Volume;
544
547 typedef typename Base::Jacobian Jacobian;
549
550 template< class CornerStorage >
551 CachedMultiLinearGeometry ( const ReferenceElement &referenceElement, const CornerStorage &cornerStorage )
552 : Base( referenceElement, cornerStorage ),
553 affine_( Base::affine( jacobianTransposed_ ) ),
554 jacobianInverseTransposedComputed_( false ),
555 integrationElementComputed_( false )
556 {}
557
558 template< class CornerStorage >
559 CachedMultiLinearGeometry ( Dune::GeometryType gt, const CornerStorage &cornerStorage )
560 : Base( gt, cornerStorage ),
561 affine_( Base::affine( jacobianTransposed_ ) ),
562 jacobianInverseTransposedComputed_( false ),
563 integrationElementComputed_( false )
564 {}
565
567 bool affine () const { return affine_; }
568
569 using Base::corner;
570
572 GlobalCoordinate center () const { return global( refElement().position( 0, 0 ) ); }
573
581 {
582 if( affine() )
583 {
585 jacobianTransposed_.umtv( local, global );
586 return global;
587 }
588 else
589 return Base::global( local );
590 }
591
605 {
606 if( affine() )
607 {
609 if( jacobianInverseTransposedComputed_ )
610 jacobianInverseTransposed_.mtv( global - corner( 0 ), local );
611 else
612 MatrixHelper::xTRightInvA( jacobianTransposed_, global - corner( 0 ), local );
613 return local;
614 }
615 else
616 return Base::local( global );
617 }
618
634 {
635 if( affine() )
636 {
637 if( !integrationElementComputed_ )
638 {
639 jacobianInverseTransposed_.setupDeterminant( jacobianTransposed_ );
640 integrationElementComputed_ = true;
641 }
642 return jacobianInverseTransposed_.detInv();
643 }
644 else
646 }
647
649 Volume volume () const
650 {
651 if( affine() )
652 return integrationElement( refElement().position( 0, 0 ) ) * refElement().volume();
653 else
654 return Base::volume();
655 }
656
667 {
668 if( affine() )
669 return jacobianTransposed_;
670 else
672 }
673
681 {
682 if( affine() )
683 {
684 if( !jacobianInverseTransposedComputed_ )
685 {
686 jacobianInverseTransposed_.setup( jacobianTransposed_ );
687 jacobianInverseTransposedComputed_ = true;
688 integrationElementComputed_ = true;
689 }
690 return jacobianInverseTransposed_;
691 }
692 else
694 }
695
703 {
705 }
706
717
718 protected:
719 using Base::refElement;
720
721 private:
722 mutable JacobianTransposed jacobianTransposed_;
723 mutable JacobianInverseTransposed jacobianInverseTransposed_;
724
725 mutable bool affine_ : 1;
726
727 mutable bool jacobianInverseTransposedComputed_ : 1;
728 mutable bool integrationElementComputed_ : 1;
729 };
730
731
732
733 // Implementation of MultiLinearGeometry
734 // -------------------------------------
735
736 template< class ct, int mydim, int cdim, class Traits >
737 inline typename MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
739 {
741 jit.setup( jacobianTransposed( local ) );
742 return jit;
743 }
744
745
746 template< class ct, int mydim, int cdim, class Traits >
747 template< bool add, int dim, class CornerIterator >
750 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
751 const ctype &rf, GlobalCoordinate &y )
752 {
753 const ctype xn = df*x[ dim-1 ];
754 const ctype cxn = ctype( 1 ) - xn;
755
756 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
757 {
758 // apply (1-xn) times mapping for bottom
759 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf*cxn, y );
760 // apply xn times mapping for top
761 global< true >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf*xn, y );
762 }
763 else
764 {
765 assert( Impl::isPyramid( toUnsignedInt(topologyId), mydimension, mydimension-dim ) );
766 // apply (1-xn) times mapping for bottom (with argument x/(1-xn))
767 if( cxn > Traits::tolerance() || cxn < -Traits::tolerance() )
768 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df/cxn, x, rf*cxn, y );
769 else
770 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, ctype( 0 ), y );
771 // apply xn times the tip
772 y.axpy( rf*xn, *cit );
773 ++cit;
774 }
775 }
776
777 template< class ct, int mydim, int cdim, class Traits >
778 template< bool add, class CornerIterator >
781 CornerIterator &cit, const ctype &, const LocalCoordinate &,
782 const ctype &rf, GlobalCoordinate &y )
783 {
784 const GlobalCoordinate &origin = *cit;
785 ++cit;
786 for( int i = 0; i < coorddimension; ++i )
787 if( add )
788 y[ i ] += rf*origin[ i ];
789 else
790 y[ i ] = rf*origin[ i ];
791 }
792
793
794 template< class ct, int mydim, int cdim, class Traits >
795 template< bool add, int rows, int dim, class CornerIterator >
798 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
800 {
801 assert( rows >= dim );
802
803 const ctype xn = df*x[ dim-1 ];
804 const ctype cxn = ctype( 1 ) - xn;
805
806 auto cit2( cit );
807 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
808 {
809 // apply (1-xn) times Jacobian for bottom
810 jacobianTransposed< add >( topologyId, std::integral_constant< int, dim-1 >(), cit2, df, x, rf*cxn, jt );
811 // apply xn times Jacobian for top
812 jacobianTransposed< true >( topologyId, std::integral_constant< int, dim-1 >(), cit2, df, x, rf*xn, jt );
813 // compute last row as difference between top value and bottom value
814 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, -rf, jt[ dim-1 ] );
815 global< true >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf, jt[ dim-1 ] );
816 }
817 else
818 {
819 assert( Impl::isPyramid( toUnsignedInt(topologyId), mydimension, mydimension-dim ) );
820 /*
821 * In the pyramid case, we need a transformation Tb: B -> R^n for the
822 * base B \subset R^{n-1}. The pyramid transformation is then defined as
823 * T: P \subset R^n -> R^n
824 * (x, xn) |-> (1-xn) Tb(x*) + xn t (x \in R^{n-1}, xn \in R)
825 * with the tip of the pyramid mapped to t and x* = x/(1-xn)
826 * the projection of (x,xn) onto the base.
827 *
828 * For the Jacobi matrix DT we get
829 * DT = ( A | b )
830 * with A = DTb(x*) (n x n-1 matrix)
831 * and b = dT/dxn (n-dim column vector).
832 * Furthermore
833 * b = -Tb(x*) + t + \sum_i dTb/dx_i(x^*) x_i/(1-xn)
834 *
835 * Note that both A and b are not defined in the pyramid tip (x=0, xn=1)!
836 * Indeed for B the unit square, Tb mapping B to the quadrilateral given
837 * by the vertices (0,0,0), (2,0,0), (0,1,0), (1,1,0) and t=(0,0,1), we get
838 *
839 * T(x,y,xn) = ( x(2-y/(1-xn)), y, xn )
840 * / 2-y/(1-xn) -x 0 \
841 * DT(x,y,xn) = | 0 1 0 |
842 * \ 0 0 1 /
843 * which is not continuous for xn -> 1, choose for example
844 * x=0, y=1-xn, xn -> 1 --> DT -> diag(1,1,1)
845 * x=1-xn, y=0, xn -> 1 --> DT -> diag(2,1,1)
846 *
847 * However, for Tb affine-linear, Tb(y) = My + y0, DTb = M:
848 * A = M
849 * b = -M x* - y0 + t + \sum_i M_i x_i/(1-xn)
850 * = -M x* - y0 + t + M x*
851 * = -y0 + t
852 * which is continuous for xn -> 1. Note that this b is also given by
853 * b = -Tb(0) + t + \sum_i dTb/dx_i(0) x_i/1
854 * that is replacing x* by 1 and 1-xn by 1 in the formular above.
855 *
856 * For xn -> 1, we can thus set x*=0, "1-xn"=1 (or anything != 0) and get
857 * the right result in case Tb is affine-linear.
858 */
859
860 /* The second case effectively results in x* = 0 */
861 ctype dfcxn = (cxn > Traits::tolerance() || cxn < -Traits::tolerance()) ? ctype(df / cxn) : ctype(0);
862
863 // initialize last row
864 // b = -Tb(x*)
865 // (b = -Tb(0) = -y0 in case xn -> 1 and Tb affine-linear)
866 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, dfcxn, x, -rf, jt[ dim-1 ] );
867 // b += t
868 jt[ dim-1 ].axpy( rf, *cit );
869 ++cit;
870 // apply Jacobian for bottom (with argument x/(1-xn)) and correct last row
871 if( add )
872 {
873 FieldMatrix< ctype, dim-1, coorddimension > jt2;
874 // jt2 = dTb/dx_i(x*)
875 jacobianTransposed< false >( topologyId, std::integral_constant< int, dim-1 >(), cit2, dfcxn, x, rf, jt2 );
876 // A = dTb/dx_i(x*) (jt[j], j=0..dim-1)
877 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) (jt[dim-1])
878 // (b += 0 in case xn -> 1)
879 for( int j = 0; j < dim-1; ++j )
880 {
881 jt[ j ] += jt2[ j ];
882 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt2[ j ] );
883 }
884 }
885 else
886 {
887 // jt = dTb/dx_i(x*)
888 jacobianTransposed< false >( topologyId, std::integral_constant< int, dim-1 >(), cit2, dfcxn, x, rf, jt );
889 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn)
890 for( int j = 0; j < dim-1; ++j )
891 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt[ j ] );
892 }
893 }
894 }
895
896 template< class ct, int mydim, int cdim, class Traits >
897 template< bool add, int rows, class CornerIterator >
900 CornerIterator &cit, const ctype &, const LocalCoordinate &,
902 {
903 ++cit;
904 }
905
906
907
908 template< class ct, int mydim, int cdim, class Traits >
909 template< int dim, class CornerIterator >
912 {
913 const GlobalCoordinate &orgBottom = *cit;
914 if( !affine( topologyId, std::integral_constant< int, dim-1 >(), cit, jt ) )
915 return false;
916 const GlobalCoordinate &orgTop = *cit;
917
918 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
919 {
920 JacobianTransposed jtTop;
921 if( !affine( topologyId, std::integral_constant< int, dim-1 >(), cit, jtTop ) )
922 return false;
923
924 // check whether both jacobians are identical
925 ctype norm( 0 );
926 for( int i = 0; i < dim-1; ++i )
927 norm += (jtTop[ i ] - jt[ i ]).two_norm2();
928 if( norm >= Traits::tolerance() )
929 return false;
930 }
931 else
932 ++cit;
933 jt[ dim-1 ] = orgTop - orgBottom;
934 return true;
935 }
936
937 template< class ct, int mydim, int cdim, class Traits >
938 template< class CornerIterator >
941 {
942 ++cit;
943 return true;
944 }
945
946} // namespace Dune
947
948#endif // #ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
A unique label for each type of element that can occur in a grid.
iterator begin()
size_type dim() const
const GlobalIndex & global() const
LocalIndex & local()
constexpr auto get(std::integer_sequence< T, II... >, std::integral_constant< std::size_t, pos >={})
constexpr derived_type & axpy(const field_type &a, const DenseMatrix< Other > &x)
constexpr void mtv(const X &x, Y &y) const
constexpr void umtv(const X &x, Y &y) const
constexpr FieldMatrix< K, COLS, ROWS > transposed() const
constexpr derived_type & axpy(const field_type &a, const DenseVector< Other > &x)
constexpr FieldTraits< value_type >::real_type two_norm2() const
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
default traits class for MultiLinearGeometry
Definition multilineargeometry.hh:39
Impl::FieldMatrixHelper< ct > MatrixHelper
helper structure containing some matrix routines
Definition multilineargeometry.hh:58
static ct tolerance()
tolerance to numerical algorithms
Definition multilineargeometry.hh:61
template specifying the storage for the corners
Definition multilineargeometry.hh:129
std::vector< FieldVector< ct, cdim > > Type
Definition multilineargeometry.hh:130
will there be only one geometry type for a dimension?
Definition multilineargeometry.hh:148
static constexpr unsigned int topologyId
Definition multilineargeometry.hh:150
static constexpr bool v
Definition multilineargeometry.hh:149
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
static void global(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
Definition multilineargeometry.hh:749
static constexpr int mydimension
geometry dimension
Definition multilineargeometry.hh:189
static constexpr int coorddimension
coordinate dimension
Definition multilineargeometry.hh:191
Dune::GeometryType type() const
obtain the name of the reference element
Definition multilineargeometry.hh:269
Traits::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:225
FieldVector< ctype, coorddimension > GlobalCoordinate
type of global coordinates
Definition multilineargeometry.hh:196
static void jacobianTransposed(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
Definition multilineargeometry.hh:899
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian
Definition multilineargeometry.hh:377
ReferenceElement refElement() const
Definition multilineargeometry.hh:425
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:290
GlobalCoordinate center() const
obtain the centroid of the mapping's image
Definition multilineargeometry.hh:282
GlobalCoordinate corner(int i) const
obtain coordinates of the i-th corner
Definition multilineargeometry.hh:275
Dune::ReferenceElements< ctype, mydimension > ReferenceElements
Definition multilineargeometry.hh:214
ct ctype
coordinate type
Definition multilineargeometry.hh:186
static void jacobianTransposed(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
Definition multilineargeometry.hh:797
int corners() const
obtain number of corners of the corresponding reference element
Definition multilineargeometry.hh:272
TopologyId topologyId() const
Definition multilineargeometry.hh:430
friend ReferenceElement referenceElement(const MultiLinearGeometry &geometry)
Definition multilineargeometry.hh:395
LocalCoordinate local(const GlobalCoordinate &globalCoord) const
evaluate the inverse mapping
Definition multilineargeometry.hh:312
static void global(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
Definition multilineargeometry.hh:780
Volume volume() const
obtain the volume of the mapping's image
Definition multilineargeometry.hh:363
FieldVector< ctype, mydimension > LocalCoordinate
type of local coordinates
Definition multilineargeometry.hh:194
MultiLinearGeometry(const ReferenceElement &refElement, const Corners &corners)
constructor
Definition multilineargeometry.hh:239
static bool affine(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt)
Definition multilineargeometry.hh:940
std::conditional< hasSingleGeometryType, std::integral_constant< unsignedint, Traits::templatehasSingleGeometryType< mydimension >::topologyId >, unsignedint >::type TopologyId
Definition multilineargeometry.hh:226
ctype Volume
type of volume
Definition multilineargeometry.hh:198
static bool affine(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt)
Definition multilineargeometry.hh:911
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition multilineargeometry.hh:418
MultiLinearGeometry(Dune::GeometryType gt, const Corners &corners)
constructor
Definition multilineargeometry.hh:255
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
type of jacobian transposed
Definition multilineargeometry.hh:201
ReferenceElements::ReferenceElement ReferenceElement
type of reference element
Definition multilineargeometry.hh:219
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian's inverse
Definition multilineargeometry.hh:738
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Type for the Jacobian matrix.
Definition multilineargeometry.hh:207
bool affine() const
is this mapping affine?
Definition multilineargeometry.hh:262
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
Definition multilineargeometry.hh:210
bool affine(JacobianTransposed &jacobianT) const
Definition multilineargeometry.hh:458
Volume integrationElement(const LocalCoordinate &local) const
obtain the integration element
Definition multilineargeometry.hh:350
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition multilineargeometry.hh:407
Definition multilineargeometry.hh:488
void setup(const JacobianTransposed &jt)
Definition multilineargeometry.hh:492
ctype det() const
Definition multilineargeometry.hh:502
ctype detInv() const
Definition multilineargeometry.hh:503
void setupDeterminant(const JacobianTransposed &jt)
Definition multilineargeometry.hh:497
Implement a MultiLinearGeometry with additional caching.
Definition multilineargeometry.hh:526
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:580
Base::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:534
bool affine() const
is this mapping affine?
Definition multilineargeometry.hh:567
CachedMultiLinearGeometry(const ReferenceElement &referenceElement, const CornerStorage &cornerStorage)
Definition multilineargeometry.hh:551
ReferenceElement refElement() const
Definition multilineargeometry.hh:425
LocalCoordinate local(const GlobalCoordinate &global) const
evaluate the inverse mapping
Definition multilineargeometry.hh:604
Base::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:531
Base::LocalCoordinate LocalCoordinate
Definition multilineargeometry.hh:541
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition multilineargeometry.hh:713
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian
Definition multilineargeometry.hh:666
GlobalCoordinate corner(int i) const
obtain coordinates of the i-th corner
Definition multilineargeometry.hh:275
Volume volume() const
obtain the volume of the mapping's image
Definition multilineargeometry.hh:649
CachedMultiLinearGeometry(Dune::GeometryType gt, const CornerStorage &cornerStorage)
Definition multilineargeometry.hh:559
ctype integrationElement(const LocalCoordinate &local) const
obtain the integration element
Definition multilineargeometry.hh:633
Base::ctype ctype
Definition multilineargeometry.hh:536
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition multilineargeometry.hh:702
Base::JacobianInverseTransposed JacobianInverseTransposed
Definition multilineargeometry.hh:546
Base::JacobianTransposed JacobianTransposed
Definition multilineargeometry.hh:545
Base::JacobianInverse JacobianInverse
Definition multilineargeometry.hh:548
Base::Jacobian Jacobian
Definition multilineargeometry.hh:547
Base::Volume Volume
Definition multilineargeometry.hh:543
Base::GlobalCoordinate GlobalCoordinate
Definition multilineargeometry.hh:542
GlobalCoordinate center() const
obtain the centroid of the mapping's image
Definition multilineargeometry.hh:572
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian's inverse
Definition multilineargeometry.hh:680
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:113
T begin(T... args)
T epsilon(T... args)
T cref(T... args)