dune-localfunctions
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
localfunctions
orthonormal
orthonormalbasis.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_ORTHONORMALBASIS_HH
6
#define DUNE_ORTHONORMALBASIS_HH
7
8
#include <sstream>
9
10
#include <
dune/localfunctions/utility/polynomialbasis.hh
>
11
#include <
dune/localfunctions/orthonormal/orthonormalcompute.hh
>
12
13
namespace
Dune
14
{
15
16
// OrthonormalBasisFactory
17
// -----------------------
18
template< int dim, class D, class R, class SF, class CF = typename ComputeField< SF, 512 >::Type >
19
struct
OrthonormalBasisFactory
20
{
21
static
const
unsigned
int
dimension
= dim;
22
typedef
D
Domain
;
23
typedef
R
Range
;
24
typedef
SF
StorageField
;
25
typedef
CF
ComputeField
;
26
27
template
<
unsigned
int
dd,
class
FF>
28
struct
EvaluationBasisFactory
29
{
30
typedef
MonomialBasisProvider<dd,FF>
Type
;
31
};
32
33
typedef
typename
EvaluationBasisFactory< dimension, StorageField >::Type
MonomialBasisProviderType
;
34
typedef
typename
MonomialBasisProviderType::Object
MonomialBasisType
;
35
36
typedef
SparseCoeffMatrix< StorageField, 1 >
CoefficientMatrix
;
37
typedef
StandardEvaluator< MonomialBasisType >
Evaluator
;
38
typedef
PolynomialBasis< Evaluator, CoefficientMatrix, Domain, Range >
Basis
;
39
40
typedef
unsigned
int
Key
;
41
typedef
const
Basis
Object
;
42
43
static
constexpr
GeometryType
SimplexGeometry
= GeometryTypes::simplex(dim);
44
45
template
< GeometryType::Id geometryId >
46
static
Object
*
create
(
const
unsigned
int
order )
47
{
48
const
MonomialBasisType
&monomialBasis = *MonomialBasisProviderType::template
create< SimplexGeometry >
( order );
49
50
static
CoefficientMatrix
_coeffs;
51
if
( _coeffs.
size
() <= monomialBasis.size() )
52
{
53
ONBCompute::ONBMatrix< geometryId, ComputeField >
matrix( order );
54
_coeffs.
fill
( matrix );
55
}
56
57
return
new
Basis
( monomialBasis, _coeffs, monomialBasis.
size
() );
58
}
59
static
void
release
(
Object
*
object
) {
delete
object; }
60
};
61
62
}
63
64
#endif
// #ifndef DUNE_ORTHONORMALBASIS_HH
orthonormalcompute.hh
polynomialbasis.hh
Dune
Definition
bdfmcube.hh:18
Dune::OrthonormalBasisFactory
Definition
orthonormalbasis.hh:20
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::ComputeField
typename ComputeField< Field, 512 >::Type ComputeField
Definition
orthonormalbasis.hh:25
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::Domain
Field Domain
Definition
orthonormalbasis.hh:22
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::Key
unsigned int Key
Definition
orthonormalbasis.hh:40
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::StorageField
Field StorageField
Definition
orthonormalbasis.hh:24
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::SimplexGeometry
static constexpr GeometryType SimplexGeometry
Definition
orthonormalbasis.hh:43
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::Evaluator
StandardEvaluator< MonomialBasisType > Evaluator
Definition
orthonormalbasis.hh:37
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::Range
Field Range
Definition
orthonormalbasis.hh:23
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::MonomialBasisType
MonomialBasisProviderType::Object MonomialBasisType
Definition
orthonormalbasis.hh:34
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::MonomialBasisProviderType
EvaluationBasisFactory< dimension, StorageField >::Type MonomialBasisProviderType
Definition
orthonormalbasis.hh:33
Dune::OrthonormalBasisFactory::release
static void release(Object *object)
Definition
orthonormalbasis.hh:59
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::Basis
PolynomialBasis< Evaluator, CoefficientMatrix, Domain, Range > Basis
Definition
orthonormalbasis.hh:38
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::dimension
static const unsigned int dimension
Definition
orthonormalbasis.hh:21
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::CoefficientMatrix
SparseCoeffMatrix< StorageField, 1 > CoefficientMatrix
Definition
orthonormalbasis.hh:36
Dune::OrthonormalBasisFactory::create
static Object * create(const unsigned int order)
Definition
orthonormalbasis.hh:46
Dune::OrthonormalBasisFactory< dimension, Field, Field, Field >::Object
const Basis Object
Definition
orthonormalbasis.hh:41
Dune::OrthonormalBasisFactory::EvaluationBasisFactory
Definition
orthonormalbasis.hh:29
Dune::OrthonormalBasisFactory::EvaluationBasisFactory::Type
MonomialBasisProvider< dd, FF > Type
Definition
orthonormalbasis.hh:30
ONBCompute::ONBMatrix
Definition
orthonormalcompute.hh:95
Dune::StandardEvaluator< MonomialBasisType >
Dune::SparseCoeffMatrix< StorageField, 1 >
Dune::SparseCoeffMatrix::size
unsigned int size() const
Definition
coeffmatrix.hh:69
Dune::SparseCoeffMatrix::fill
void fill(const RowMatrix &mat, bool verbose=false)
Definition
coeffmatrix.hh:160
Dune::MonomialBasisProvider
Definition
monomialbasis.hh:843
Dune::PolynomialBasis< Evaluator, CoefficientMatrix, Domain, Range >
Generated by
1.17.0