1 #ifndef DUNE_FEM_SPACE_BASISFUNCTIONSET_TRANSFORMATION_HH 2 #define DUNE_FEM_SPACE_BASISFUNCTIONSET_TRANSFORMATION_HH 4 #include <dune/common/exceptions.hh> 5 #include <dune/common/fmatrix.hh> 6 #include <dune/common/fvector.hh> 19 template<
class GeometryJacobianInverseTransposed,
class K,
int ROWS >
21 const FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::cols > &a,
22 FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::rows > &b )
24 for(
int r = 0; r < ROWS; ++r )
25 gjit.mv( a[ r ], b[ r ] );
33 template<
class Geometry >
40 : gjit_( geometry.jacobianInverseTransposed( x ) )
43 template<
class A,
class B >
50 GeometryJacobianInverseTransposed gjit_;
58 template<
class GeometryJacobianInverseTransposed,
class K,
int SIZE >
60 const FieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::cols, GeometryJacobianInverseTransposed::cols >, SIZE > &a,
61 FieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::rows, GeometryJacobianInverseTransposed::rows >, SIZE > &b )
63 const int dimLocal = GeometryJacobianInverseTransposed::cols;
64 const int dimGlobal = GeometryJacobianInverseTransposed::rows;
66 for(
int r = 0; r < SIZE; ++r )
69 FieldMatrix< K, dimLocal, dimGlobal > c;
70 for(
int i = 0; i < dimLocal; ++i )
71 gjit.mv( a[ r ][ i ], c[ i ] );
74 for(
int i = 0; i < dimGlobal; ++i )
82 for(
int k = 0; k < GeometryJacobianInverseTransposed::cols; ++k )
84 FieldVector< K, GeometryJacobianInverseTransposed::rows > c;
85 gjit.mv( a[ r ][ k ], c );
86 for(
int j = 0; j < GeometryJacobianInverseTransposed::rows; ++j )
87 b[ r ][ j ].
axpy( gjit[ j ][ k ], c );
98 template<
class Geometry >
105 : gjit_( geometry.jacobianInverseTransposed( x ) )
107 if( !geometry.affine() )
108 DUNE_THROW( NotImplemented,
"HessianTransformation not implemented for non-affine geometries." );
111 template<
class A,
class B >
118 GeometryJacobianInverseTransposed gjit_;
125 #endif // #ifndef DUNE_FEM_SPACE_BASISFUNCTIONSET_TRANSFORMATION_HH HessianTransformation(const Geometry &geometry, const LocalCoordinate &x)
Definition: transformation.hh:104
Geometry::JacobianInverseTransposed GeometryJacobianInverseTransposed
Definition: transformation.hh:102
Geometry::LocalCoordinate LocalCoordinate
Definition: transformation.hh:36
Definition: transformation.hh:99
Geometry::JacobianInverseTransposed GeometryJacobianInverseTransposed
Definition: transformation.hh:37
Definition: transformation.hh:34
void hessianTransformation(const GeometryJacobianInverseTransposed &gjit, const FieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::cols, GeometryJacobianInverseTransposed::cols >, SIZE > &a, FieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::rows, GeometryJacobianInverseTransposed::rows >, SIZE > &b)
Definition: transformation.hh:59
void axpy(const T &a, const T &x, T &y)
Definition: space/basisfunctionset/functor.hh:37
Definition: coordinate.hh:4
void jacobianTransformation(const GeometryJacobianInverseTransposed &gjit, const FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::cols > &a, FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::rows > &b)
Definition: transformation.hh:20
Definition: fmatrixcol.hh:16
Geometry::LocalCoordinate LocalCoordinate
Definition: transformation.hh:101
void operator()(const A &a, B &b) const
Definition: transformation.hh:44
JacobianTransformation(const Geometry &geometry, const LocalCoordinate &x)
Definition: transformation.hh:39