SparseFlatAssembler assembles matrix quantities using a flat basis Indexing strategy. The matrix is stored in a sparse matrix format. This format is exploited during the assembly process. More...
#include <ikarus/assembler/simpleassemblers.hh>
Public Types | |
using | Basis = typename DV::Basis |
Type of the basis. More... | |
using | DirichletValuesType = DV |
Type of the Dirichlet values. More... | |
using | FEContainer = FEC |
Type of the finite element container (reference or by value). More... | |
using | FERequirement = typename FEContainerRaw::value_type::Requirement |
Type of the finite element requirement. More... | |
using | GlobalIndex = typename FEContainerRaw::value_type::GlobalIndex |
Type of the global index. More... | |
using | MatrixAssemblerType = SparseFlatAssembler< FEC, DV > |
using | MatrixType = Eigen::SparseMatrix< double > |
using | FEContainerRaw = std::remove_cvref_t< FEC > |
Type of the raw finite element container. More... | |
using | ScalarAssemblerType = ScalarFlatAssembler< FEC, DV > |
using | ScalarType = double |
using | FEContainerRaw = std::remove_cvref_t< FEC > |
Type of the raw finite element container. More... | |
using | FEContainerRaw = std::remove_cvref_t< FEC > |
Type of the raw finite element container. More... | |
using | FEContainerRaw = std::remove_cvref_t< FEC > |
Type of the raw finite element container. More... | |
using | GridView = typename Basis::GridView |
Type of the grid view. More... | |
using | SizeType = typename DirichletValuesType::SizeType |
size_type of the container storing Dirichlet flags More... | |
using | AffordanceCollectionType = AffordanceCollection< ScalarAffordance, VectorAffordance, MatrixAffordance > |
using | VectorAssemblerType = VectorFlatAssembler< FEC, DV > |
using | VectorType = Eigen::VectorXd |
Public Member Functions | |
const MatrixType & | matrix (const FERequirement &feRequirements, MatrixAffordance affordance, DBCOption dbcOption=DBCOption::Full) |
Calculates the matrix quantity requested by feRequirements and the affordance. For DBCOption::Full a zero is written on fixed degrees of freedom rows and columns, and a one is written on the diagonal. For DBCOption::Raw the untouched matrix is returned. For DBCOption::Reduced the matrix is reduced in size by removing the fixed degrees of freedom. More... | |
const MatrixType & | matrix (DBCOption dbcOption) |
Calculates the matrix quantity requested by the bound feRequirements and the affordance. More... | |
const MatrixType & | matrix () |
Calculates the matrix quantity requested by the bound feRequirements, the affordance and the dBCOption. More... | |
const ScalarType & | scalar (const FERequirement &feRequirements, ScalarAffordance affordance) |
Calculates the scalar quantity requested by feRequirements and affordance. More... | |
const ScalarType & | scalar () |
Calculates the scalar quantity requested by the bound feRequirements and returns a reference. More... | |
size_t | reducedSize () |
Returns the size of the free degrees of freedom, which are not fixed by a Dirichlet boundary condition. More... | |
size_t | size () |
Returns the size of nodes, i.e., the number of degrees of freedom. More... | |
Eigen::VectorXd | createFullVector (Eigen::Ref< const Eigen::VectorXd > reducedVector) |
Creates the full-sized vector of size Dof and inserts the values of a reduced vector at the "free" degrees of freedom and writes a zero for the fixed doffs. More... | |
auto & | finiteElements () const |
Returns the container of finite elements. More... | |
const auto & | dirichletValues () const |
Returns the dirichlet value object. More... | |
const auto & | gridView () const |
Returns the gridView object. More... | |
size_t | constraintsBelow (SizeType i) const |
Returns the number of constraints below a given degrees of freedom index. More... | |
bool | isConstrained (SizeType i) const |
Returns true if a given degree of freedom is fixed by a Dirichlet boundary condition. More... | |
size_t | estimateOfConnectivity () const |
Coarse estimate of node connectivity, i.e., this relates to the bandwidth of a sparse matrix. This estimate overestimates the real connectivity and should only be used for allocating vectors. More... | |
void | bind (const FERequirement &req, AffordanceCollectionType affordanceCollection, DBCOption dbcOption=DBCOption::Full) |
Binds the assembler to a set of finite element requirement and affordance. More... | |
void | bind (const FERequirement &req) |
Binds the assembler to a finite element requirement. More... | |
void | bind (AffordanceCollectionType affordanceCollection) |
Binds the assembler to an affordance collection. More... | |
void | bind (DBCOption dbcOption) |
Binds the assembler to an affordance collection. More... | |
bool | bound () const |
Returns true if the assembler is bound to a finite element requirement and affordance. More... | |
bool | boundToRequirement () const |
Returns true if the assembler is bound to a finite element requirement. More... | |
bool | boundToAffordanceCollection () const |
Returns true if the assembler is bound to an affordance collection. More... | |
bool | boundToDBCOption () const |
Returns true if the assembler is bound to an affordance collection. More... | |
FERequirement & | requirement () |
Returns the requirement. More... | |
AffordanceCollectionType | affordanceCollection () const |
Returns the affordance. More... | |
DBCOption | dBCOption () const |
Returns the dirichlet boundary condition enforcement option. More... | |
const VectorType & | vector (const FERequirement &feRequirements, VectorAffordance affordance, DBCOption dbcOption=DBCOption::Full) |
Calculates the vectorial quantity requested by the feRequirements and the affordance. Depending on the requested DBCOption, the raw, reduced or full vector is returned. Raw means the degrees of freedom associated with dirichlet boundary conditions are not changed. Full means that degrees of freedom associated with dirichlet boundary conditions are set to zero in the vector. Reduced means that degrees of freedom associated with dirichlet boundary conditions are removed and the returned vector has reduced size. More... | |
const VectorType & | vector (DBCOption dbcOption) |
Calculates the vectorial quantity requested by the bound feRequirements and the affordance. Depending on the requested DBCOption, the raw, reduced or full vector is returned. Raw means the degrees of freedom associated with dirichlet boundary conditions are not changed. Full means that degrees of freedom associated with dirichlet boundary conditions are set to zero in the vector. Reduced means that degrees of freedom associated with dirichlet boundary conditions are removed and the returned vector has reduced size. More... | |
const VectorType & | vector () |
Calculates the vectorial quantity requested by the bound feRequirements, the affordance and the dBCOption. Depending on the DBCOption, the raw, reduced or full vector is returned. Raw means the degrees of freedom associated with dirichlet boundary conditions are not changed. Full means that degrees of freedom associated with dirichlet boundary conditions are set to zero in the vector. Reduced means that degrees of freedom associated with dirichlet boundary conditions are removed and the returned vector has reduced size. More... | |
Protected Types | |
using | Base = VectorFlatAssembler< FEC, DV > |
Type alias for the base class. More... | |
Protected Member Functions | |
MatrixType & | getRawMatrixImpl (const FERequirement &feRequirements, MatrixAffordance affordance) |
MatrixType & | getMatrixImpl (const FERequirement &feRequirements, MatrixAffordance affordance) |
MatrixType & | getReducedMatrixImpl (const FERequirement &feRequirements, MatrixAffordance affordance) |
void | assembleRawVectorImpl (const FERequirement &feRequirements, VectorAffordance affordance, VectorType &assemblyVec) |
VectorType & | getRawVectorImpl (const FERequirement &feRequirements, VectorAffordance affordance) |
VectorType & | getVectorImpl (const FERequirement &feRequirements, VectorAffordance affordance) |
VectorType & | getReducedVectorImpl (const FERequirement &feRequirements, VectorAffordance affordance) |
ScalarType & | getScalarImpl (const FERequirement &feRequirements, ScalarAffordance affordance) |
Protected Attributes | |
VectorType | vecRaw_ {} |
Raw vector without changes for dirichlet degrees of freedom. More... | |
VectorType | vec_ {} |
Vector quantity. More... | |
VectorType | vecRed_ {} |
Reduced vector quantity. More... | |
friend | ScalarAssembler< ScalarFlatAssembler, FEC, DV, double > |
ScalarType | scal_ {0.0} |
FEC | Type of the finite element container. |
DV | Type of the Dirichlet values. |
|
inherited |
|
protected |
using Ikarus::FlatAssemblerBase< FEC, DV >::Basis = typename DV::Basis |
using Ikarus::FlatAssemblerBase< FEC, DV >::DirichletValuesType = DV |
using Ikarus::FlatAssemblerBase< FEC, DV >::FEContainer = FEC |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
using Ikarus::FlatAssemblerBase< FEC, DV >::FERequirement = typename FEContainerRaw::value_type::Requirement |
using Ikarus::FlatAssemblerBase< FEC, DV >::GlobalIndex = typename FEContainerRaw::value_type::GlobalIndex |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
|
protectedinherited |
|
inlineinherited |
affordanceCollection | The affordance collection |
|
inlineinherited |
req | Reference to the finite element requirement. |
|
inlineinherited |
req | Reference to the finite element requirement. |
affordanceCollection | The affordance collection |
|
inlineinherited |
dbcOption | The EnforcingDBC option |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
i | Index of the degree of freedom. |
|
inherited |
reducedVector | Reference to the reduced vector. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inlineinherited |
|
inlineinherited |
i | Index of the degree of freedom. |
|
inlineinherited |
|
inlineinherited |
feRequirements | Reference to the finite element requirements. |
affordance | The matrix affordance |
dbcOption | The DBCOption |
|
inlineinherited |
dbcOption | The DBCOption |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
feRequirements | Reference to the finite element requirements. |
affordance | The scalar affordance |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
feRequirements | Reference to the finite element requirements. |
affordance | The vector affordance |
dbcOption | The DBCOption |
|
inlineinherited |
dbcOption | The DBCOption |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |