|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
localmassmatrix.hh
Go to the documentation of this file.
64 static const bool hasSingleGeometryType = Dune :: Capabilities :: hasSingleGeometryType< GridType > :: v;
102 typedef std::pair< std::unique_ptr< MatrixType >, std::unique_ptr< VectorType > > MatrixPairType;
148 MassMatrixStorageType &massMap = localInverseMassMatrix_[ GlobalGeometryTypeIndex::index( geomType ) ];
153 std::pair< iterator, bool > insertPair = massMap.insert( std::make_pair( numBasisFct, MatrixPairType(nullptr,nullptr) ) );
234 std::function<int(const int)> volQuadOrderFct = [](const int order) { return Capabilities::DefaultQuadrature< DiscreteFunctionSpaceType >::volumeOrder(order); } )
243 , volumeQuadratures_( std::max(20, 4*spc.order()+4) ) // 19 is the highest order for gauss quadratures currently implemented
340 void applyInverse ( MassCaller &caller, const EntityType &entity, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf ) const
366 void applyInverse ( const EntityType &entity, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf ) const
562 void rightMultiplyInverseDefault ( const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix ) const
566 = getLocalInverseMassMatrixDefault ( caller, entity, geo, localMatrix.rangeBasisFunctionSet() );
590 void leftMultiplyInverseDefault ( const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix ) const
594 = getLocalInverseMassMatrixDefault ( caller, entity, geo, localMatrix.rangeBasisFunctionSet() );
696 void rightMultiplyInverseLocally ( const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix ) const
752 void leftMultiplyInverseLocally ( const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix ) const
986 : public LocalMassMatrixImplementation< DiscreteFunctionSpace, VolumeQuadrature, refElemScaling >
988 typedef LocalMassMatrixImplementation< DiscreteFunctionSpace, VolumeQuadrature, refElemScaling > BaseType;
Col col
Y & rhs()
int size() const
const FieldVector< K, n > & diagonal() const
iterator(ParallelIndexSet< TG, TL, N > &indexSet, const Father &father)
STL namespace.
detail::SelectPointSetId< Quadrature, -Dune::QuadratureType::size > SelectQuadraturePointSetId
Definition quadrature.hh:454
static std::shared_ptr< T > referenceToSharedPtr(T &t)
Definition memory.hh:19
void solve(V1 &x, const V2 &b, bool doPivoting=true) const
void invert(bool doPivoting=true)
constexpr size_type rows() const
constexpr void mv(const X &x, Y &y) const
constexpr void mtv(const X &x, Y &y) const
void resize(size_type r, size_type c, value_type v=value_type())
void resize(size_type n, value_type c=value_type())
size_type size() const
static constexpr std::size_t index(const GeometryType >)
const EntityType & entity() const
obtain the entity, this local function lives on
Definition localfunction.hh:305
const BasisFunctionSetType & basisFunctionSet() const
obtain the basis function set for this local function
Definition localfunction.hh:299
SizeType size() const
obtain the number of local DoFs
Definition localfunction.hh:369
Helper class to check affinity of the grid's geometries.
Definition checkgeomaffinity.hh:22
Local Mass Matrix inversion implementation, select the correct method in your implementation.
Definition localmassmatrix.hh:37
void buildMatrixNoMassFactor(const EntityType &en, const Geometry &geo, const BasisFunctionSetType &set, const VolumeQuadratureType &volQuad, const int numDofs, Matrix &matrix, const bool applyIntegrationElement=true) const
build local mass matrix with mass factor
Definition localmassmatrix.hh:849
void applyInverseDefault(MassCaller &caller, const EntityType &entity, const Geometry &geo, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf) const
Definition localmassmatrix.hh:543
Dune::FieldMatrix< ctype, dgNumDofs, dgNumDofs > DGMatrixType
Definition localmassmatrix.hh:50
AllGeomTypes< typename GridPartType ::IndexSetType, GridType > GeometryInformationType
Definition localmassmatrix.hh:73
void leftMultiplyInverse(LocalMatrix &localMatrix) const
compute M^-1 * localMatrix
Definition localmassmatrix.hh:394
void leftMultiplyInverseLocally(const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix) const
compute M^-1 * localMatrix
Definition localmassmatrix.hh:752
Fem::GeometryAffinityCheck< VolumeQuadratureType > GeometryAffinityCheckType
Definition localmassmatrix.hh:68
std::vector< MassMatrixStorageType > LocalInverseMassMatrixStorageType
Definition localmassmatrix.hh:104
GeometryInformationType geoInfo_
Definition localmassmatrix.hh:84
GeometryInformationType::DomainType DomainType
Definition localmassmatrix.hh:74
bool entityHasChanged(const EntityType &entity) const
returns true if the entity has been changed
Definition localmassmatrix.hh:513
int maxNumDofs() const
Definition localmassmatrix.hh:209
std::map< const int, MatrixPairType > MassMatrixStorageType
Definition localmassmatrix.hh:103
const DiscreteFunctionSpaceType & space() const
Definition localmassmatrix.hh:404
DiscreteFunctionSpaceType::GridPartType GridPartType
Definition localmassmatrix.hh:53
std::vector< RangeType > phiMass_
Definition localmassmatrix.hh:97
GridPartType::GridType GridType
Definition localmassmatrix.hh:60
LocalMassMatrixImplementation(const DiscreteFunctionSpaceType &spc, int volQuadOrd)
constructor taking space and volume quadrature order
Definition localmassmatrix.hh:228
VolumeQuadrature VolumeQuadratureType
Definition localmassmatrix.hh:66
DGMatrixType dgMatrix_
Definition localmassmatrix.hh:88
bool checkInterpolationBFS(const BasisFunctionSet &bfs) const
Definition localmassmatrix.hh:320
void applyInverse(MassCaller &caller, const EntityType &entity, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf) const
Definition localmassmatrix.hh:340
void rightMultiplyInverseLocally(const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix) const
Definition localmassmatrix.hh:696
DiscreteFunctionSpaceType::EntityType EntityType
Definition localmassmatrix.hh:61
std::pair< std::unique_ptr< MatrixType >, std::unique_ptr< VectorType > > MatrixPairType
Definition localmassmatrix.hh:102
IndexSetType::IndexType IndexType
Definition localmassmatrix.hh:56
const std::function< int(const int)> volumeQuadratureOrder_
Definition localmassmatrix.hh:85
@ StructuredGrid
Definition localmassmatrix.hh:71
bool affine() const
returns true if geometry mapping is affine
Definition localmassmatrix.hh:301
double getAffineMassFactor(const Geometry &geo) const
return mass factor for diagonal mass matrix
Definition localmassmatrix.hh:304
void applyInverse(const EntityType &entity, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf) const
Definition localmassmatrix.hh:366
void applyInverseLocally(const EntityType &entity, const Geometry &geo, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf) const
apply local mass matrix to local function lf
Definition localmassmatrix.hh:622
std::vector< RangeType > phi_
Definition localmassmatrix.hh:96
EntityType::Geometry Geometry
Definition localmassmatrix.hh:62
DiscreteFunctionSpaceType::IndexSetType IndexSetType
Definition localmassmatrix.hh:55
MatrixPairType & getLocalInverseMassMatrix(const EntityType &entity, const Geometry &geo, const BasisFunctionSet &basisSet, int numBasisFct) const
Definition localmassmatrix.hh:143
@ localBlockSize
Definition localmassmatrix.hh:47
std::vector< std::shared_ptr< VolumeQuadratureType > > volumeQuadratures_
Definition localmassmatrix.hh:99
void applyInverse(const EntityType &entity, LocalFunction &lf) const
apply local dg mass matrix to local function lf without mass factor
Definition localmassmatrix.hh:360
const IndexSetType & indexSet_
Definition localmassmatrix.hh:82
void applyInverse(LocalFunction &lf) const
apply local dg mass matrix to local function lf without mass factor
Definition localmassmatrix.hh:375
void buildMatrix(MassCaller &caller, const EntityType &entity, const Geometry &geo, const BasisFunctionSetType &set, std::size_t numDofs, Matrix &matrix) const
build local mass matrix
Definition localmassmatrix.hh:828
const VectorType & setupInverseDiagonal(const EntityType &entity, const Geometry &geo, const VectorType &refElemDiagonal, LocalMatrix &localMatrix) const
Definition localmassmatrix.hh:668
IndexType lastEntityIndex_
Definition localmassmatrix.hh:109
Dune::DynamicVector< RangeFieldType > VectorType
Definition localmassmatrix.hh:78
LocalInverseMassMatrixStorageType localInverseMassMatrix_
Definition localmassmatrix.hh:106
DiscreteFunctionSpaceType::RangeType RangeType
Definition localmassmatrix.hh:44
DiscreteFunctionSpaceType::BasisFunctionSetType BasisFunctionSetType
Definition localmassmatrix.hh:58
void rightMultiplyInverseDgOrthoNormalBasis(LocalMatrix &localMatrix) const
compute localMatrix * M^-1
Definition localmassmatrix.hh:452
static const bool hasSingleGeometryType
Definition localmassmatrix.hh:64
int maxVolumeQuadratureOrder() const
return appropriate quadrature order, default is 2 * order()
Definition localmassmatrix.hh:215
LocalMassMatrixImplementation(const ThisType &other)
copy constructor
Definition localmassmatrix.hh:252
int volumeQuadratureOrder(const EntityType &entity) const
return appropriate quadrature order, default is 2 * order(entity)
Definition localmassmatrix.hh:222
void rightMultiplyInverseDefault(const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix) const
compute localMatrix * M^-1
Definition localmassmatrix.hh:562
void applyInverse(MassCaller &caller, const EntityType &entity, LocalFunction &lf) const
Definition localmassmatrix.hh:353
Dune::FieldVector< ctype, dgNumDofs > DGVectorType
Definition localmassmatrix.hh:51
void multiply(const int size, const Matrix &matrix, const Rhs &rhs, X &x) const
Definition localmassmatrix.hh:930
void buildMatrixWithMassFactor(MassCallerType &caller, const EntityType &en, const Geometry &geo, const BasisFunctionSetType &set, const VolumeQuadratureType &volQuad, const int numDofs, Matrix &matrix) const
build local mass matrix with mass factor
Definition localmassmatrix.hh:886
std::shared_ptr< VolumeQuadratureType > getVolumeQuadrature(const EntityType &entity, const int order) const
Definition localmassmatrix.hh:269
unsigned int lastTopologyId_
Definition localmassmatrix.hh:110
void applyInverseDgOrthoNormalBasis(MassCaller &caller, const EntityType &entity, const BasisFunctionSet &basisFunctionSet, LocalFunction &lf) const
Definition localmassmatrix.hh:415
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
Definition localmassmatrix.hh:43
DiscreteFunctionSpace DiscreteFunctionSpaceType
Definition localmassmatrix.hh:41
void rightMultiplyInverse(LocalMatrix &localMatrix) const
compute localMatrix * M^-1
Definition localmassmatrix.hh:382
DiscreteFunctionSpaceType::RangeFieldType ctype
Definition localmassmatrix.hh:42
MatrixType & getLocalInverseMassMatrixDefault(MassCaller &caller, const EntityType &entity, const Geometry &geo, const BasisFunctionSet &basisSet) const
Definition localmassmatrix.hh:188
void leftMultiplyInverseDefault(const EntityType &entity, const Geometry &geo, LocalMatrix &localMatrix) const
compute M^-1 * localMatrix
Definition localmassmatrix.hh:590
Dune::DynamicMatrix< RangeFieldType > MatrixType
Definition localmassmatrix.hh:77
LocalMassMatrixImplementation(const DiscreteFunctionSpaceType &spc, std::function< int(const int)> volQuadOrderFct=[](const int order) { return Capabilities::DefaultQuadrature< DiscreteFunctionSpaceType >::volumeOrder(order);})
constructor taking space and volume quadrature order
Definition localmassmatrix.hh:233
std::shared_ptr< const DiscreteFunctionSpaceType > spc_
Definition localmassmatrix.hh:81
bool checkDiagonalMatrix(const MatrixType &matrix) const
Definition localmassmatrix.hh:126
bool setup() const
setup and return affinity
Definition localmassmatrix.hh:807
void leftMultiplyInverseDgOrthoNormalBasis(LocalMatrix &localMatrix) const
compute M^-1 * localMatrix
Definition localmassmatrix.hh:483
Definition localmassmatrix.hh:115
Dune::FieldMatrix< ctype, dimRange, dimRange > MassFactorType
Definition localmassmatrix.hh:116
bool hasMass() const
Definition localmassmatrix.hh:119
void mass(const EntityType &, const VolumeQuadratureType &, int, MassFactorType &) const
Definition localmassmatrix.hh:121
DG Local Mass Matrix for arbitrary spaces.
Definition localmassmatrix.hh:987
void applyInverse(MassCallerType &caller, const EntityType &en, LocalFunctionType &lf) const
Definition localmassmatrix.hh:1007
void applyInverse(const EntityType &en, LocalFunctionType &lf) const
apply local dg mass matrix to local function lf without mass factor
Definition localmassmatrix.hh:1016
void rightMultiplyInverse(LocalMatrix &localMatrix) const
compute localMatrix * M^-1
Definition localmassmatrix.hh:1041
void applyInverse(MassCallerType &caller, const EntityType &en, const BasisFunction &basisFunction, LocalFunctionType &lf) const
Definition localmassmatrix.hh:999
void applyInverse(LocalFunction &lf) const
apply local dg mass matrix to local function lf without mass factor
Definition localmassmatrix.hh:1034
void leftMultiplyInverse(LocalMatrix &localMatrix) const
compute M^-1 * localMatrix
Definition localmassmatrix.hh:1048
BaseType::EntityType EntityType
Definition localmassmatrix.hh:991
void applyInverse(const EntityType &en, const BasisFunction &basisFunction, LocalFunctionType &lf) const
Definition localmassmatrix.hh:1024
Interface class for basis function sets.
Definition basisfunctionset/basisfunctionset.hh:32
ctype referenceVolume(const GeometryType &type) const
return volume of reference element for geometry of type type
Definition allgeomtypes.hh:72
default implementation uses method geomTypes of given index set. Used in DiscreteFunctionSpaces.
Definition allgeomtypes.hh:99
const std ::vector< GeometryType > & geomTypes(unsigned int codim) const
returns vector with geometry tpyes this index set has indices for
Definition allgeomtypes.hh:171
static int volumeOrder(const int k)
return quadrature order for volume quadratures for given polynomial order k
Definition space/common/capabilities.hh:149
discrete function space
T end(T... args)
T endl(T... args)
T find(T... args)
T insert(T... args)
T make_pair(T... args)
T reset(T... args)
T size(T... args)
T terminate(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8