3#ifndef DUNE_ORTHONORMALBASIS_HH
4#define DUNE_ORTHONORMALBASIS_HH
8#include <dune/localfunctions/utility/polynomialbasis.hh>
9#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>
16 template< int dim, class SF, class CF = typename ComputeField< SF, 512 >::Type >
17 struct OrthonormalBasisFactory
19 static const unsigned int dimension = dim;
20 typedef SF StorageField;
21 typedef CF ComputeField;
23 template <
unsigned int dd,
class FF>
24 struct EvaluationBasisFactory
26 typedef MonomialBasisProvider<dd,FF> Type;
29 typedef typename EvaluationBasisFactory< dimension, StorageField >::Type MonomialBasisProviderType;
30 typedef typename MonomialBasisProviderType::Object MonomialBasisType;
32 typedef SparseCoeffMatrix< StorageField, 1 > CoefficientMatrix;
33 typedef StandardEvaluator< MonomialBasisType > Evaluator;
34 typedef PolynomialBasis< Evaluator, CoefficientMatrix > Basis;
36 typedef unsigned int Key;
37 typedef const Basis Object;
41 template< GeometryType::Id geometryId >
42 static Object *create (
const unsigned int order )
44 const MonomialBasisType &monomialBasis = *MonomialBasisProviderType::template create< SimplexGeometry >( order );
46 static CoefficientMatrix _coeffs;
47 if( _coeffs.size() <= monomialBasis.size() )
49 ONBCompute::ONBMatrix< geometryId, ComputeField > matrix( order );
50 _coeffs.fill( matrix );
53 return new Basis( monomialBasis, _coeffs, monomialBasis.size() );
55 static void release( Object *
object ) {
delete object; }
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:130
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:461
Dune namespace.
Definition: alignedallocator.hh:11