1#ifndef DUNE_FEM_SHAPEFUNCTIONSET_VECTORIAL_HH
2#define DUNE_FEM_SHAPEFUNCTIONSET_VECTORIAL_HH
24 template<
class Scalar,
class Vectorial >
27 template<
class K,
int dimR >
33 typedef typename FieldTraits< VectorialType >::field_type
field_type;
35 typedef typename VectorialType::size_type
size_type;
53 template<
class K,
int dimR >
59 typedef typename FieldTraits< VectorialType >::field_type
field_type;
61 typedef typename VectorialType::size_type
size_type;
79 template<
class K,
int dimR,
int dimD >
85 typedef typename FieldTraits< VectorialType >::field_type
field_type;
87 typedef typename VectorialType::size_type
size_type;
109 template<
class Scalar,
class Vectorial >
163 template<
class Scalar,
class Vectorial >
179 template<
class K,
int dimR >
221 template<
class K,
int dimR,
int dimD >
243 template<
class X,
class Y >
244 void mv (
const X &x, Y &y )
const
252 template<
class X,
class Y >
253 void mtv (
const X &x, Y &y )
const
259 template<
class X,
class Y >
260 void umv (
const X &x, Y &y )
const
266 template<
class X,
class Y >
267 void umtv (
const X &x, Y &y )
const
273 template<
class X,
class Y >
274 void mmv (
const X &x, Y &y )
const
280 template<
class X,
class Y >
281 void mmtv (
const X &x, Y &y )
const
305 template<
class Scalar,
class Vectorial >
313 template<
class Scalar,
class Vectorial >
321 template<
class Scalar,
class Vectorial >
326 return (a ==
static_cast< Vectorial
>( b ));
329 template<
class Scalar,
class Vectorial >
334 return (a !=
static_cast< Vectorial
>( b ));
337 template<
class Scalar,
class Vectorial >
342 return (
static_cast< Vectorial
>( a ) == b);
345 template<
class Scalar,
class Vectorial >
350 return (
static_cast< Vectorial
>( a ) != b);
353 template<
class Scalar,
class Vectorial >
363 template<
class GeometryJacobianInverseTransposed,
class K,
int ROWS >
365 const MakeVectorialExpression< FieldMatrix< K, 1, GeometryJacobianInverseTransposed::cols >, FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::cols > > &a,
366 FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::rows > &b )
370 b = RgTraits::zeroVectorial();
371 gjit.mv( Traits::access( a.scalar() ), b[ a.component() ] );
374 template<
class GeometryJacobianInverseTransposed,
class K,
int SIZE >
377 ExplicitFieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::rows, GeometryJacobianInverseTransposed::rows >, SIZE > &b )
379 const int dimLocal = GeometryJacobianInverseTransposed::cols;
380 const int dimGlobal = GeometryJacobianInverseTransposed::rows;
384 b = RgTraits::zeroVectorial();
387 FieldMatrix< K, dimLocal, dimGlobal > c;
388 for(
int i = 0; i < dimLocal; ++i )
389 gjit.mv( Traits::access( a.scalar() )[ i ], c[ i ] );
392 for(
int i = 0; i < dimGlobal; ++i )
401 template<
class Scalar,
class Vectorial >
402 inline typename MakeVectorialTraits< Scalar, Vectorial >::field_type
409 template<
class Scalar,
class Vectorial >
410 inline typename MakeVectorialTraits< Scalar, Vectorial >::field_type
417 template<
class Scalar,
class Vectorial >
418 inline typename MakeVectorialTraits< Scalar, Vectorial >::field_type
431 template<
class ScalarFunctionSpace,
class RangeVector >
434 template<
class DomainField,
class RangeField,
int dimD,
int dimR >
445 template<
class ScalarShapeFunctionSet,
class RangeVector >
456 static const int pointSetId = detail::SelectPointSetId< ScalarShapeFunctionSetType >::value;
463 template<
class Functor,
class Vectorial >
469 typedef typename FunctionSpaceType::RangeType
RangeType;
473 template<
class ... Args >
489 template<
class Po
int,
class Functor >
490 void evaluateEach (
const Point &x, Functor functor )
const;
492 template<
class Po
int,
class Functor >
493 void jacobianEach (
const Point &x, Functor functor )
const;
495 template<
class Po
int,
class Functor >
496 void hessianEach (
const Point &x, Functor functor )
const;
507 template<
class ScalarShapeFunctionSet,
class RangeVector >
508 template<
class Functor,
class Vectorial >
512 : functor_( functor )
515 template<
class Scalar >
516 void operator() (
const std::size_t i,
const Scalar &value )
520 const typename Traits::ComponentType end = Traits::end();
521 for(
typename Traits::ComponentType k = Traits::begin(); k != end; ++k )
522 functor_( i*Traits::factor + Traits::index( k ), Expression( k, value ) );
534 template<
class ScalarShapeFunctionSet,
class RangeVector >
535 template<
class Po
int,
class Functor >
539 typedef typename FunctionSpaceType::RangeType VectorialType;
544 template<
class ScalarShapeFunctionSet,
class RangeVector >
545 template<
class Po
int,
class Functor >
549 typedef typename FunctionSpaceType::JacobianRangeType VectorialType;
554 template<
class ScalarShapeFunctionSet,
class RangeVector >
555 template<
class Po
int,
class Functor >
559 typedef typename FunctionSpaceType::HessianRangeType VectorialType;
bool operator==(const DiscreteFunctionInterface< ImplX > &x, const DiscreteFunctionInterface< ImplY > &y)
Definition: common/discretefunction.hh:1053
bool operator!=(const DiscreteFunctionInterface< ImplX > &x, const DiscreteFunctionInterface< ImplY > &y)
Definition: common/discretefunction.hh:1059
Definition: bindguard.hh:11
void jacobianTransformation(const GeometryJacobianInverseTransposed &gjit, const FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::cols > &a, FieldMatrix< K, ROWS, GeometryJacobianInverseTransposed::rows > &b)
Definition: transformation.hh:21
Double operator*(const Double &a, const Double &b)
Definition: double.hh:506
double scalarProduct(const double &a, const double &b)
Definition: space/basisfunctionset/functor.hh:65
void axpy(const T &a, const T &x, T &y)
Definition: space/basisfunctionset/functor.hh:38
void hessianTransformation(const GeometryJacobianInverseTransposed &gjit, const ExplicitFieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::cols, GeometryJacobianInverseTransposed::cols >, SIZE > &a, ExplicitFieldVector< FieldMatrix< K, GeometryJacobianInverseTransposed::rows, GeometryJacobianInverseTransposed::rows >, SIZE > &b)
Definition: transformation.hh:60
Definition: explicitfieldvector.hh:75
Definition: fmatrixcol.hh:16
A vector valued function space.
Definition: functionspace.hh:60
Definition: shapefunctionset/vectorial.hh:25
static ComponentType begin()
Definition: shapefunctionset/vectorial.hh:39
static const K & access(const VectorialType &x, const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:47
VectorialType::size_type ComponentType
Definition: shapefunctionset/vectorial.hh:34
FieldTraits< VectorialType >::field_type field_type
Definition: shapefunctionset/vectorial.hh:33
static VectorialType zeroVectorial()
Definition: shapefunctionset/vectorial.hh:42
FieldVector< K, 1 > ScalarType
Definition: shapefunctionset/vectorial.hh:30
VectorialType::size_type size_type
Definition: shapefunctionset/vectorial.hh:35
FieldVector< K, dimR > VectorialType
Definition: shapefunctionset/vectorial.hh:31
static ComponentType end()
Definition: shapefunctionset/vectorial.hh:40
static size_type index(const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:50
static K & access(VectorialType &x, const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:48
static K & access(ScalarType &x)
Definition: shapefunctionset/vectorial.hh:45
static const K & access(const ScalarType &x)
Definition: shapefunctionset/vectorial.hh:44
FieldTraits< VectorialType >::field_type field_type
Definition: shapefunctionset/vectorial.hh:59
static const K & access(const ScalarType &x)
Definition: shapefunctionset/vectorial.hh:70
ExplicitFieldVector< K, dimR > VectorialType
Definition: shapefunctionset/vectorial.hh:57
static K & access(VectorialType &x, const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:74
FieldVector< K, 1 > ScalarType
Definition: shapefunctionset/vectorial.hh:56
VectorialType::size_type ComponentType
Definition: shapefunctionset/vectorial.hh:60
static ComponentType begin()
Definition: shapefunctionset/vectorial.hh:65
static const K & access(const VectorialType &x, const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:73
VectorialType::size_type size_type
Definition: shapefunctionset/vectorial.hh:61
static ComponentType end()
Definition: shapefunctionset/vectorial.hh:66
static size_type index(const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:76
static VectorialType zeroVectorial()
Definition: shapefunctionset/vectorial.hh:68
static K & access(ScalarType &x)
Definition: shapefunctionset/vectorial.hh:71
static size_type index(const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:102
static ComponentType end()
Definition: shapefunctionset/vectorial.hh:92
VectorialType::size_type size_type
Definition: shapefunctionset/vectorial.hh:87
FieldTraits< VectorialType >::field_type field_type
Definition: shapefunctionset/vectorial.hh:85
static const FieldVector< K, dimD > & access(const ScalarType &x)
Definition: shapefunctionset/vectorial.hh:96
static FieldVector< K, dimD > & access(ScalarType &x)
Definition: shapefunctionset/vectorial.hh:97
static ComponentType begin()
Definition: shapefunctionset/vectorial.hh:91
static const FieldVector< K, dimD > & access(const VectorialType &x, const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:99
FieldMatrix< K, dimR, dimD > VectorialType
Definition: shapefunctionset/vectorial.hh:83
static FieldVector< K, dimD > & access(VectorialType &x, const ComponentType &i)
Definition: shapefunctionset/vectorial.hh:100
static VectorialType zeroVectorial()
Definition: shapefunctionset/vectorial.hh:94
FieldMatrix< K, 1, dimD > ScalarType
Definition: shapefunctionset/vectorial.hh:82
VectorialType::size_type ComponentType
Definition: shapefunctionset/vectorial.hh:86
Definition: shapefunctionset/vectorial.hh:111
const ComponentType & component() const
Definition: shapefunctionset/vectorial.hh:148
BasicMakeVectorialExpression(const ComponentType &component, const ScalarType &scalar)
Definition: shapefunctionset/vectorial.hh:124
Traits::VectorialType VectorialType
Definition: shapefunctionset/vectorial.hh:118
Traits::ComponentType ComponentType
Definition: shapefunctionset/vectorial.hh:121
ScalarType scalar_
Definition: shapefunctionset/vectorial.hh:155
ScalarType & scalar()
Definition: shapefunctionset/vectorial.hh:151
const ThisType & operator/=(const field_type &s)
Definition: shapefunctionset/vectorial.hh:142
Traits::size_type size_type
Definition: shapefunctionset/vectorial.hh:122
const ThisType & operator*=(const field_type &s)
Definition: shapefunctionset/vectorial.hh:136
ComponentType component_
Definition: shapefunctionset/vectorial.hh:154
Traits::ScalarType ScalarType
Definition: shapefunctionset/vectorial.hh:117
Traits::field_type field_type
Definition: shapefunctionset/vectorial.hh:120
const ScalarType & scalar() const
Definition: shapefunctionset/vectorial.hh:150
Definition: shapefunctionset/vectorial.hh:166
MakeVectorialExpression(const ComponentType &component, const ScalarType &scalar)
Definition: shapefunctionset/vectorial.hh:174
BaseType::ComponentType ComponentType
Definition: shapefunctionset/vectorial.hh:171
BaseType::ScalarType ScalarType
Definition: shapefunctionset/vectorial.hh:172
Definition: shapefunctionset/vectorial.hh:182
field_type two_norm2() const
Definition: shapefunctionset/vectorial.hh:213
BaseType::size_type size_type
Definition: shapefunctionset/vectorial.hh:192
field_type one_norm() const
Definition: shapefunctionset/vectorial.hh:211
BaseType::field_type field_type
Definition: shapefunctionset/vectorial.hh:190
size_type size() const
Definition: shapefunctionset/vectorial.hh:216
BaseType::ComponentType ComponentType
Definition: shapefunctionset/vectorial.hh:191
field_type two_norm() const
Definition: shapefunctionset/vectorial.hh:212
BaseType::VectorialType VectorialType
Definition: shapefunctionset/vectorial.hh:188
field_type infinity_norm() const
Definition: shapefunctionset/vectorial.hh:214
BaseType::ScalarType ScalarType
Definition: shapefunctionset/vectorial.hh:187
MakeVectorialExpression(const ComponentType &component, const ScalarType &scalar)
Definition: shapefunctionset/vectorial.hh:197
Definition: shapefunctionset/vectorial.hh:224
field_type frobenius_norm() const
Definition: shapefunctionset/vectorial.hh:287
BaseType::field_type field_type
Definition: shapefunctionset/vectorial.hh:232
void mtv(const X &x, Y &y) const
Definition: shapefunctionset/vectorial.hh:253
field_type infinity_norm() const
Definition: shapefunctionset/vectorial.hh:289
size_type cols() const
Definition: shapefunctionset/vectorial.hh:297
size_type N() const
Definition: shapefunctionset/vectorial.hh:293
BaseType::size_type size_type
Definition: shapefunctionset/vectorial.hh:234
void mmv(const X &x, Y &y) const
Definition: shapefunctionset/vectorial.hh:274
BaseType::VectorialType VectorialType
Definition: shapefunctionset/vectorial.hh:230
field_type frobenius_norm2() const
Definition: shapefunctionset/vectorial.hh:288
void umv(const X &x, Y &y) const
Definition: shapefunctionset/vectorial.hh:260
BaseType::ScalarType ScalarType
Definition: shapefunctionset/vectorial.hh:229
size_type M() const
Definition: shapefunctionset/vectorial.hh:294
BaseType::ComponentType ComponentType
Definition: shapefunctionset/vectorial.hh:233
field_type determinant() const
Definition: shapefunctionset/vectorial.hh:291
void mmtv(const X &x, Y &y) const
Definition: shapefunctionset/vectorial.hh:281
MakeVectorialExpression(const ComponentType &component, const ScalarType &scalar)
Definition: shapefunctionset/vectorial.hh:239
void mv(const X &x, Y &y) const
Definition: shapefunctionset/vectorial.hh:244
void umtv(const X &x, Y &y) const
Definition: shapefunctionset/vectorial.hh:267
size_type rows() const
Definition: shapefunctionset/vectorial.hh:296
Definition: shapefunctionset/vectorial.hh:432
FunctionSpace< DomainField, RangeField, dimD, dimR > Type
Definition: shapefunctionset/vectorial.hh:437
Definition: shapefunctionset/vectorial.hh:447
void hessianEach(const Point &x, Functor functor) const
Definition: shapefunctionset/vectorial.hh:557
ScalarShapeFunctionSet ScalarShapeFunctionSetType
Definition: shapefunctionset/vectorial.hh:451
void evaluateEach(const Point &x, Functor functor) const
Definition: shapefunctionset/vectorial.hh:537
std::size_t size() const
Definition: shapefunctionset/vectorial.hh:487
static constexpr bool codegenShapeFunctionSet
Definition: shapefunctionset/vectorial.hh:455
static const int pointSetId
Definition: shapefunctionset/vectorial.hh:456
const ScalarShapeFunctionSetType & scalarShapeFunctionSet() const
Definition: shapefunctionset/vectorial.hh:482
ToNewRange< ScalarFunctionSpaceType, RangeVector >::Type FunctionSpaceType
Definition: shapefunctionset/vectorial.hh:467
void jacobianEach(const Point &x, Functor functor) const
Definition: shapefunctionset/vectorial.hh:547
int order() const
Definition: shapefunctionset/vectorial.hh:484
static const std::size_t dimRangeFactor
Definition: shapefunctionset/vectorial.hh:461
ScalarShapeFunctionSetType::FunctionSpaceType ScalarFunctionSpaceType
Definition: shapefunctionset/vectorial.hh:459
ScalarShapeFunctionSet scalarShapeFunctionSet_
Definition: shapefunctionset/vectorial.hh:499
VectorialShapeFunctionSet(const ScalarShapeFunctionSetType &scalarShapeFunctionSet)
Definition: shapefunctionset/vectorial.hh:478
FunctionSpaceType::JacobianRangeType JacobianRangeType
Definition: shapefunctionset/vectorial.hh:470
FunctionSpaceType::RangeType RangeType
Definition: shapefunctionset/vectorial.hh:469
FunctionSpaceType::HessianRangeType HessianRangeType
Definition: shapefunctionset/vectorial.hh:471
VectorialShapeFunctionSet(Args &&... args)
Definition: shapefunctionset/vectorial.hh:474
Definition: shapefunctionset/vectorial.hh:510
VectorialFunctor(const Functor &functor)
Definition: shapefunctionset/vectorial.hh:511