G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsSparseSystem< T, symm > Class Template Reference

Detailed Description

template<typename T, bool symm>
class gismo::gsSparseSystem< T, symm >

A sparse linear system indexed by sets of degrees of freedom.

+ Collaboration diagram for gsSparseSystem< T, symm >:

Public Member Functions

matBlockView blockView ()
 returns a block view of the matrix, easy way to extract single blocks
 
matBlockView blockView (size_t numRowBlocksNew, size_t numColBlocksNew, const gsVector< index_t > &rowBlocksNew, const gsVector< index_t > &colBlocksNew)
 returns a block view of the matrix, where you can choose which blocks (of gsSparseSystem) should be combined to one block More...
 
rhsBlockView blockViewRhs (size_t numRowBlocksNew, const gsVector< index_t > &rowBlocksNew)
 returns a block view of the rhs, where you can choose which blocks (of gsSparseSystem) should be combined to one block More...
 
index_t colBasis (const index_t c) const
 colBasis returns the index of the Basis used for column block c More...
 
const gsDofMappercolMapper (const index_t c) const
 colMapper returns the dofMapper for column block c More...
 
gsDofMappercolMapper (const index_t c)
 colMapper returns the dofMapper for column block c More...
 
index_t cols () const
 the number of matrix columns
 
const DofMappers & dofMappers () const
 returns all dof Mappers. More...
 
 gsSparseSystem (gsDofMapper &mapper)
 gsSparseSystem Constuctor for the sparse System only considering one block (scalar equation), described by the one DofMapper mapper. More...
 
 gsSparseSystem (DofMappers &mappers, const gsVector< index_t > &dims)
 gsSparseSystem Constructor of a sparse System specified by the number of unknows for each block, given by dims. It is assumed that the used Basis (m_bases in gsAssembler) has a one to one relation with the given mappers. E.g.: dims = {1,3,1,2}, then we consider a matrix with 1+3+1+2 = 7 x 7 blockstructure. Then a) mappers.size() == 7: In the first case, row and column mappers are identical, so there is no difference bettween column and row blocks. More...
 
 gsSparseSystem (DofMappers &mappers, const index_t rows, const index_t cols)
 gsSparseSystem Constructor for the sparse system, with given number of row and column blocks. It is assumed that the mappers have a one to one correspondence with the blocks, i.e. a) mappers.size() == rows + cols ==> the first row entries of mappers correspond to the row blocks and the last cols entries of mappers correspond to the column blocks Moreover, it is assumes that the basis for the solution space (column blocks) are indexed starting by 0. i.e. mappers[cols],...,mappers[rows+cols-1] correspond in a one to one relation to m_bases[0],...,m_bases[cols-1] in gsAssembler!!!! b) mappers.size() == rows == cols ==> row and column mappers are identical, and mappers[i] is the mapper for i-th column (and row) block c) mappers.size() == 1 ==> only one block More...
 
 gsSparseSystem (DofMappers &mappers, const gsVector< index_t > &rowInd, const gsVector< index_t > &colInd, const gsVector< index_t > &colvar)
 gsSparseSystem The constructor for the sparse system given the set of mappers, may be different for each column and row block, the assignment of mappers to row blocks and column block, and the relation which Multibases correspond to which unknown. This constructor allows for the most possible freedome to design your block system. More...
 
bool initialized () const
 checks if the system was initialized
 
void mapColIndices (const gsMatrix< index_t > &actives, const index_t patchIndex, gsMatrix< index_t > &result, const index_t c=0) const
 mapColIndices Maps a set of basis indices by the corresponding dofMapper. More...
 
void mapRowIndices (const gsMatrix< index_t > &actives, const index_t patchIndex, gsMatrix< index_t > &result, const index_t r=0) const
 mapRowIndices Maps a set of basis indices by the corresponding dofMapper. More...
 
void mapToGlobalColIndex (const index_t active, const index_t patchIndex, index_t &result, const index_t c=0) const
 mapToGlobalColIndex Maps a single basis index to the final position in the system, i.e. including the right shift due to the block structure More...
 
void mapToGlobalRowIndex (const index_t active, const index_t patchIndex, index_t &result, const index_t r=0) const
 mapToGlobalRowIndex Maps a single basis index to the final position in the system, i.e. including the right shift due to the block structure More...
 
const gsSparseMatrix< T > & matrix () const
 Access the system Matrix.
 
gsSparseMatrix< T > & matrix ()
 Access the system Matrix.
 
index_t numColBlocks () const
 returns the number of column blocks
 
index_t numColNz (const gsMultiBasis< T > &mb, const gsOptionList &opt) const
 Provides an estimation of the number of non-zero matrix entries per column. This value can be used for sparse matrix memory allocation.
 
index_t numRowBlocks () const
 returns the number of row blocks
 
index_t numUnknowns () const
 returns the number of unknowns
 
void push (const gsMatrix< T > &localMat, const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives, const gsMatrix< T > &eliminatedDofs, const size_t r=0, const size_t c=0)
 push pushes the local system matrix and rhs for an element to the global system, More...
 
void push (const gsMatrix< T > &localMat, const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives_i, const gsMatrix< index_t > &actives_j, const gsMatrix< T > &eliminatedDofs_j, const size_t r=0, const size_t c=0)
 push pushes the local system matrix and rhs for an element to the global system, More...
 
void push (const gsMatrix< T > &localMat, const gsMatrix< T > &localRhs, const std::vector< gsMatrix< index_t > > &actives_vec, const std::vector< gsMatrix< T > > &eliminatedDofs, const gsVector< index_t > &r_vec, const gsVector< index_t > &c_vec)
 pushToMatrix pushes one local matrix and rhs consisting of several blocks corresponding to blocks of the global system More...
 
void push (const gsMatrix< T > &localMat, const gsMatrix< T > &localRhs, const std::vector< gsMatrix< index_t > > &actives, const std::vector< gsMatrix< T > > &eliminatedDofs)
 push pushes one local system matrix and one local rhs for an element to the global system for several blocks More...
 
void push (const std::vector< gsMatrix< T > > &, const std::vector< gsMatrix< T > > &, const std::vector< gsMatrix< index_t > > &, const std::vector< gsMatrix< T > > &, const gsVector< index_t > &, const gsVector< index_t > &)
 push pushes several local system matrices and local rhs for an element to the global system for several blocks More...
 
GISMO_DEPRECATED void push (const gsMatrix< T > &localMat, const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives, const size_t r=0, const size_t c=0)
 push pushes the local system matrix and rhs for an element to the global system, More...
 
void pushAllFree (const gsMatrix< T > &localMat, const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives, const size_t r=0, const size_t c=0)
 pushAllFree pushes the local system matrix and rhs for an element to the global system, More...
 
void pushToMatrix (const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives, const gsMatrix< T > &eliminatedDofs, const size_t r=0, const size_t c=0)
 pushToMatrix pushes the local matrix for an element to the global system, More...
 
void pushToMatrix (const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives_i, const gsMatrix< index_t > &actives_j, const gsMatrix< T > &eliminatedDofs_j, const size_t r=0, const size_t c=0)
 pushToMatrix pushes the local matrix for an element to the global system, More...
 
void pushToMatrix (const gsMatrix< T > &localMat, const std::vector< gsMatrix< index_t > > &actives_vec, const std::vector< gsMatrix< T > > &eliminatedDofs, const gsVector< index_t > &r_vec, const gsVector< index_t > &c_vec)
 pushToMatrix pushes one local matrix consisting of several blocks corresponding to blocks of the global system More...
 
GISMO_DEPRECATED void pushToMatrix (const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives, const size_t r=0, const size_t c=0)
 pushToMatrix pushes the local matrix for an element to the global system, More...
 
GISMO_DEPRECATED void pushToMatrix (const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives_i, const gsMatrix< index_t > &actives_j, const size_t r=0, const size_t c=0)
 pushToMatrix pushes the local matrix for an element to the global system, More...
 
void pushToMatrixAllFree (const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives, const size_t r=0, const size_t c=0)
 pushToMatrixAllFree pushes the local matrix for an element to the global system, More...
 
void pushToMatrixAllFree (const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives_i, const gsMatrix< index_t > &actives_j, const size_t r=0, const size_t c=0)
 pushToMatrixAllFree pushes the local matrix for an element to the global system, More...
 
void pushToRhs (const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives, const size_t r=0)
 pushToRhs pushes the local rhs for an element to the global system More...
 
void pushToRhs (const gsMatrix< T > &localRhs, const std::vector< gsMatrix< index_t > > &actives_vec, const gsVector< index_t > &r_vec)
 pushToRhs pushes one local rhs consisting of several blocks corresponding to blocks of the global system More...
 
void pushToRhsAllFree (const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives, const size_t r=0)
 pushToRhsAllFree pushes the local rhs for an element to the global system More...
 
void reserve (const index_t nz, const index_t numRhs)
 reserve reserves the memory for the sparse matrix and the rhs. More...
 
void reserve (const gsMultiBasis< T > &mb, const gsOptionList &opt, const index_t numRhs)
 Reserves the memory for the sparse matrix and the rhs, based on the polynomial degree of the first basis-piece in /em mb, as well as the input options bdA, bdB and bdO. More...
 
const gsMatrix< T > & rhs () const
 Access the right hand side.
 
gsMatrix< T > & rhs ()
 Access the right hand side.
 
index_t rhsCols () const
 the number of right-hand side vectors
 
index_t rhsRows () const
 the rows of the right-hand side vector
 
const gsDofMapperrowMapper (const index_t r) const
 rowMapper returns the dofMapper for row block r More...
 
gsDofMapperrowMapper (const index_t r)
 rowMapper returns the dofMapper for row block r More...
 
index_t rows () const
 the number of matrix rows
 
void setZero ()
 set everything to zero
 
void swap (gsSparseSystem &other)
 swap swaps the content of the Sparse System with the other given one More...
 
bool symmetry () const
 returns true if only half of the matrix is stored, due to its symmetry
 
index_t unkSize (const index_t unk) const
 return the number of components for the given component
 

Protected Attributes

gsVector< index_tm_col
 map between column blocks and index of m_mappers i.e. col block j is described by m_mappers[m_col[j]].
 
gsVector< index_tm_cstr
 strides for the column blocks (shifting of mapped indices). The mapper do not have this information anymore.
 
gsVector< index_tm_cvar
 map between column blocks and used multibasis (which unknown/component correlate to which multibasis), i.e. column block i uses multibasis m_cvar[i]. So this allows e.g. a single multibasis for several components.
 
DofMappers m_mappers
 the mappers for the different blocks. The assignment of the mappers to the column (and row) blocks is done via the members m_row and m_col. This also allows for different mappers for columns and rows. There are no assumptions on the ordering of m_mappers. The relation of column mappers and the used multibasis is done via m_cvar.
 
gsSparseMatrix< T > m_matrix
 the system matrix
 
gsMatrix< T > m_rhs
 the right hand side of the system
 
gsVector< index_tm_row
 map between row blocks and index of m_mappers, i.e. row block i is described by m_mappers[m_row[i]].
 
gsVector< index_tm_rstr
 strides for the row blocks (shifting of mapped indices). The mapper do not have this information anymore.
 

Constructor & Destructor Documentation

gsSparseSystem ( gsDofMapper mapper)
inline

gsSparseSystem Constuctor for the sparse System only considering one block (scalar equation), described by the one DofMapper mapper.

Parameters
[in]mapperthe one DofMapper discribing the discretization.
gsSparseSystem ( DofMappers &  mappers,
const gsVector< index_t > &  dims 
)
inline

gsSparseSystem Constructor of a sparse System specified by the number of unknows for each block, given by dims. It is assumed that the used Basis (m_bases in gsAssembler) has a one to one relation with the given mappers. E.g.: dims = {1,3,1,2}, then we consider a matrix with 1+3+1+2 = 7 x 7 blockstructure. Then a) mappers.size() == 7: In the first case, row and column mappers are identical, so there is no difference bettween column and row blocks.

  • Column block 0 uses mapper 0 and corresponds to m_bases[0]
  • Column block 1,2,3 uses mapper 1 and corresponds to m_bases[1]
  • Column block 4 uses mapper 2 and corresponds to m_bases[2]
  • Column block 5,6 uses mapper 3 and corresponds to m_bases[3] (in C++ indexing) Identical maps for Row blocks b) mappers.size() == 14: In the second case, row and column mappers are not identical.
  • Row block 0 uses mapper 0
  • Row block 1,2,3 uses mapper 1
  • Row block 4 uses mapper 2
  • Row block 5,6 uses mapper 3
  • Column block 0 uses mapper 4 and corresponds to m_bases[0]
  • Column block 1,2,3 uses mapper 5 and corresponds to m_bases[1]
  • Column block 4 uses mapper 6 and corresponds to m_bases[2]
  • Column block 5,6 uses mapper 7 and corresponds to m_bases[3] (in C++ indexing) Other cases are not handled!
    Parameters
    mappersa vector of gsDofMapper with size == dims.sum() or 2*dims.sum() according to the definition above
    dimsDefines how many unknown are determined by a certain dofMapper.
gsSparseSystem ( DofMappers &  mappers,
const index_t  rows,
const index_t  cols 
)
inline

gsSparseSystem Constructor for the sparse system, with given number of row and column blocks. It is assumed that the mappers have a one to one correspondence with the blocks, i.e. a) mappers.size() == rows + cols ==> the first row entries of mappers correspond to the row blocks and the last cols entries of mappers correspond to the column blocks Moreover, it is assumes that the basis for the solution space (column blocks) are indexed starting by 0. i.e. mappers[cols],...,mappers[rows+cols-1] correspond in a one to one relation to m_bases[0],...,m_bases[cols-1] in gsAssembler!!!! b) mappers.size() == rows == cols ==> row and column mappers are identical, and mappers[i] is the mapper for i-th column (and row) block c) mappers.size() == 1 ==> only one block

Parameters
mappersthe set of mappers, with restrictions above
rowsthe number of row blocks
colsthe number of column blocks
gsSparseSystem ( DofMappers &  mappers,
const gsVector< index_t > &  rowInd,
const gsVector< index_t > &  colInd,
const gsVector< index_t > &  colvar 
)
inline

gsSparseSystem The constructor for the sparse system given the set of mappers, may be different for each column and row block, the assignment of mappers to row blocks and column block, and the relation which Multibases correspond to which unknown. This constructor allows for the most possible freedome to design your block system.

What is not possible here, cannot be done!

a fancy example: rowInd = {1,1,0,3}, colInd={0,2,2}, colvar={1,0,0}. this leads to a 4x3 block structure matrix

  • Row block 0,1 uses mapper 1
  • Row block 2 uses mapper 0
  • Row block 3 uses mapper 3
  • Column block 0 uses mapper 0 and corresponds to m_bases[1]
  • Column block 1,2 uses mapper 2 and corresponds to m_bases[0] (in C++ indexing)
Parameters
[in]mappersthe set of mappers, need not be a one to one relation with the blocks.
[in]rowIndassignment of row blocks to mappers, e.g. row block i uses mapper rowInd[i] of the set mappers.
[in]colIndassignment of column blocks to mappers, e.g. column block j uses mapper colInd[j] of the set mappers. (need not be the same mappers as for the row blocks)
[in]colvarassignment of unknowns to the used bases (i.e. column blocks to MultiBasis)

Member Function Documentation

matBlockView blockView ( size_t  numRowBlocksNew,
size_t  numColBlocksNew,
const gsVector< index_t > &  rowBlocksNew,
const gsVector< index_t > &  colBlocksNew 
)
inline

returns a block view of the matrix, where you can choose which blocks (of gsSparseSystem) should be combined to one block

Parameters
[in]numRowBlocksNewnumber of row blocks
[in]numColBlocksNewnumber of column blocks
[in]rowBlocksNewa vector defining the row blocks
[in]colBlocksNewa vector defining the column blocks

example: assume in gsSparseSystem we have 4 row blocks

rowBlocksNew = {0,1,1,2} yields a block system with only 3 row blocks, where the blocks 1 and 2 of gsSparseSystem are combined to one block

rhsBlockView blockViewRhs ( size_t  numRowBlocksNew,
const gsVector< index_t > &  rowBlocksNew 
)
inline

returns a block view of the rhs, where you can choose which blocks (of gsSparseSystem) should be combined to one block

Parameters
[in]numRowBlocksNewnumber of row blocks
[in]rowBlocksNewa vector defining the row blocks
index_t colBasis ( const index_t  c) const
inline

colBasis returns the index of the Basis used for column block c

Parameters
[in]cthe index of the column block
Returns
the index of the used basis
const gsDofMapper& colMapper ( const index_t  c) const
inline

colMapper returns the dofMapper for column block c

Parameters
[in]cthe index of the column block
Returns
the corresponding DofMapper
gsDofMapper& colMapper ( const index_t  c)
inline

colMapper returns the dofMapper for column block c

Parameters
[in]cthe index of the column block
Returns
the corresponding DofMapper
const DofMappers& dofMappers ( ) const
inline

returns all dof Mappers.

Note
the result is not a one to one relation with the blocks.
void mapColIndices ( const gsMatrix< index_t > &  actives,
const index_t  patchIndex,
gsMatrix< index_t > &  result,
const index_t  c = 0 
) const
inline

mapColIndices Maps a set of basis indices by the corresponding dofMapper.

Note
that the result is not the position in the sparse system, since the shifts due to the block structure are not included.
Parameters
[in]activesthe set of basis indices
[in]patchIndexthe patch under consideration
[out]resultthe mapped indices
[in]cthe considered column block
void mapRowIndices ( const gsMatrix< index_t > &  actives,
const index_t  patchIndex,
gsMatrix< index_t > &  result,
const index_t  r = 0 
) const
inline

mapRowIndices Maps a set of basis indices by the corresponding dofMapper.

Note
that the result is not the position in the sparse system, since the shifts are not included.
Parameters
[in]activesthe set of basis indices
[in]patchIndexthe patch under consideration
[out]resultthe mapped indices
[in]rthe considered row block
void mapToGlobalColIndex ( const index_t  active,
const index_t  patchIndex,
index_t result,
const index_t  c = 0 
) const
inline

mapToGlobalColIndex Maps a single basis index to the final position in the system, i.e. including the right shift due to the block structure

Parameters
[in]activethe basis index
[in]patchIndexthe patch index
[out]resultthe mapped index
[in]cthe considered column block
void mapToGlobalRowIndex ( const index_t  active,
const index_t  patchIndex,
index_t result,
const index_t  r = 0 
) const
inline

mapToGlobalRowIndex Maps a single basis index to the final position in the system, i.e. including the right shift due to the block structure

Parameters
[in]activethe basis index
[in]patchIndexthe patch index
[out]resultthe mapped index
[in]rthe considered row block
void push ( const gsMatrix< T > &  localMat,
const gsMatrix< T > &  localRhs,
const gsMatrix< index_t > &  actives,
const gsMatrix< T > &  eliminatedDofs,
const size_t  r = 0,
const size_t  c = 0 
)
inline

push pushes the local system matrix and rhs for an element to the global system,

Note
  1. the same index set is assumed for row and column block
  2. eliminated dofs are incorporated in the right way
Parameters
[in]localMatthe local system matrix
[in]localRhsthe local rhs matrix/vector
[in]activesthe mapped index of basis functions, without shifts!
[in]eliminatedDofsthe values for the dofs, which are removed from the system
[in]rthe row block
[in]cthe column block
void push ( const gsMatrix< T > &  localMat,
const gsMatrix< T > &  localRhs,
const gsMatrix< index_t > &  actives_i,
const gsMatrix< index_t > &  actives_j,
const gsMatrix< T > &  eliminatedDofs_j,
const size_t  r = 0,
const size_t  c = 0 
)
inline

push pushes the local system matrix and rhs for an element to the global system,

Note
  1. different index sets can be used for row and column blocks
  2. eliminated dofs are incorporated in the right way
Parameters
[in]localMatthe local system matrix
[in]localRhsthe local rhs matrix/vector
[in]actives_ithe mapped index of row basis functions, without shifts!
[in]actives_jthe mapped index of column basis functions, without shifts!
[in]eliminatedDofs_jthe values for the dofs (corresponding to the columns), which are removed from the system
[in]rthe row block
[in]cthe column block
void push ( const gsMatrix< T > &  localMat,
const gsMatrix< T > &  localRhs,
const std::vector< gsMatrix< index_t > > &  actives_vec,
const std::vector< gsMatrix< T > > &  eliminatedDofs,
const gsVector< index_t > &  r_vec,
const gsVector< index_t > &  c_vec 
)
inline

pushToMatrix pushes one local matrix and rhs consisting of several blocks corresponding to blocks of the global system

Note
  1. Usefull for bilinear forms depending on vector valued functions
  2. different index sets are used for row and column blocks
  3. eliminated dofs are incorporated in the right way
  4. assume identical row and column mappers for the global system, therefore only one vector of mapped index sets is given
Parameters
[in]localMatlocal system matrix
[in]localRhslocal rhs vector
[in]actives_veca vector of mapped index sets (for ALL blocks of the global system), accessed via actives_vec[r_vec(i)]
[in]eliminatedDofsa vector of values for the dofs (corresponding to the columns) that are eliminated from the system (for ALL blocks of the global system), accessed via eliminatedDofs[r_vec(i)]
[in]r_veca vector of row block indices to which the local matrix is pushed
[in]c_veca vector of column block indices to which the local matrix is pushed
void push ( const gsMatrix< T > &  localMat,
const gsMatrix< T > &  localRhs,
const std::vector< gsMatrix< index_t > > &  actives,
const std::vector< gsMatrix< T > > &  eliminatedDofs 
)
inline

push pushes one local system matrix and one local rhs for an element to the global system for several blocks

Note
  1. the same index set is assumed for row and column blocks
  2. eliminated dofs are incorporated in the right way
  3. several blocks can be pused with one function call, but the same local matrix is assumed
  4. if the size of the vector is smaller, than the number of blocks, then only the the first actives.size() blocks are filled.
Parameters
[in]localMatlocal system matrices
[in]localRhslocal rhs vector/matrices
[in]activesa vector of index sets (one per block)
[in]eliminatedDofsa vector of values for the dofs (corresponding to the columns), which are removed from the system, (one per block)
void push ( const std::vector< gsMatrix< T > > &  ,
const std::vector< gsMatrix< T > > &  ,
const std::vector< gsMatrix< index_t > > &  ,
const std::vector< gsMatrix< T > > &  ,
const gsVector< index_t > &  ,
const gsVector< index_t > &   
)
inline

push pushes several local system matrices and local rhs for an element to the global system for several blocks

Note
  1. the same index set is assumed for row and column blocks
  2. eliminated dofs are incorporated in the right way
  3. several blocks can be pused with one function call

Parameters
[in]localMat a vector local system matrices
[in]localRhs a vector local rhs vector/matrices
[in]actives a vector of index sets (one per block)
[in]fixedDofs
[in]r the row blocks where the matrices should be pushed
[in]c the colum blocks where the matrices shouldbe pushed

GISMO_DEPRECATED void push ( const gsMatrix< T > &  localMat,
const gsMatrix< T > &  localRhs,
const gsMatrix< index_t > &  actives,
const size_t  r = 0,
const size_t  c = 0 
)
inline

push pushes the local system matrix and rhs for an element to the global system,

Note
  1. the same index set is assumed for row and column block
  2. dofs wich are eliminated are NOT moved to the rhs, they are just ignored in the assembly (only works for homogeneous BC)
Parameters
[in]localMatthe local system matrix
[in]localRhsthe local rhs matrix/vector
[in]activesthe mapped index of basis functions, without shifts!
[in]rthe row block
[in]cthe column block
void pushAllFree ( const gsMatrix< T > &  localMat,
const gsMatrix< T > &  localRhs,
const gsMatrix< index_t > &  actives,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushAllFree pushes the local system matrix and rhs for an element to the global system,

Note
  1. the same index set is assumed for row and column block
  2. no checks are done if an index is eliminated or not

Use this functions if you already know that your block has no eliminated dofs

Parameters
[in]localMatthe local system matrix
[in]localRhsthe local rhs matrix/vector
[in]activesthe mapped index of basis functions, without shifts!
[in]rthe row block
[in]cthe column block
void pushToMatrix ( const gsMatrix< T > &  localMat,
const gsMatrix< index_t > &  actives,
const gsMatrix< T > &  eliminatedDofs,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushToMatrix pushes the local matrix for an element to the global system,

Note
  1. the same index set is assumed for row and column block
  2. eliminated dofs are incorporated in the right way
  3. no assembling is done for the rhs
Parameters
[in]localMatthe local matrix
[in]activesthe mapped index of basis functions, without shifts!
[in]eliminatedDofsthe values for the dofs, which are removed from the system
[in]rthe row block
[in]cthe column block
void pushToMatrix ( const gsMatrix< T > &  localMat,
const gsMatrix< index_t > &  actives_i,
const gsMatrix< index_t > &  actives_j,
const gsMatrix< T > &  eliminatedDofs_j,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushToMatrix pushes the local matrix for an element to the global system,

Note
  1. different index sets are used for row and column block
  2. eliminated dofs are incorporated in the right way
  3. no assembling is done for the rhs
Parameters
[in]localMatthe local matrix
[in]actives_ithe mapped index of row - basis functions, without shifts!
[in]actives_jthe mapped index of column - basis functions, without shifts!
[in]eliminatedDofs_jthe values for the dofs (corresponding to the columns), which are removed from the system remark: if no column dofs are eliminated (only row dofs are eliminated), you can just give an empty matrix, because it will not be used
[in]rthe row block
[in]cthe column block
void pushToMatrix ( const gsMatrix< T > &  localMat,
const std::vector< gsMatrix< index_t > > &  actives_vec,
const std::vector< gsMatrix< T > > &  eliminatedDofs,
const gsVector< index_t > &  r_vec,
const gsVector< index_t > &  c_vec 
)
inline

pushToMatrix pushes one local matrix consisting of several blocks corresponding to blocks of the global system

Note
  1. Usefull for bilinear forms depending on vector valued functions
  2. different index sets are used for row and column blocks
  3. eliminated dofs are incorporated in the right way
  4. assume identical row and column mappers for the global system, therefore only one vector of mapped index sets is given
Parameters
[in]localMatlocal system matrix
[in]actives_veca vector of mapped index sets (for ALL blocks of the global system), accessed via actives_vec[r_vec(i)]
[in]eliminatedDofsa vector of values for the dofs (corresponding to the columns) that are eliminated from the system (for ALL blocks of the global system), accessed via eliminatedDofs[r_vec(i)]
[in]r_veca vector of row block indices to which the local matrix is pushed
[in]c_veca vector of column block indices to which the local matrix is pushed
GISMO_DEPRECATED void pushToMatrix ( const gsMatrix< T > &  localMat,
const gsMatrix< index_t > &  actives,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushToMatrix pushes the local matrix for an element to the global system,

Note
  1. the same index set is assumed for row and column block
  2. dofs wich are eliminated are NOT moved to the rhs, they are just ignored in the assembly (only works for homogeneous BC)
  3. no assembling is done for the rhs
Parameters
[in]localMatthe local matrix
[in]activesthe mapped index of basis functions, without shifts!
[in]rthe row block
[in]cthe column block
GISMO_DEPRECATED void pushToMatrix ( const gsMatrix< T > &  localMat,
const gsMatrix< index_t > &  actives_i,
const gsMatrix< index_t > &  actives_j,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushToMatrix pushes the local matrix for an element to the global system,

Note
  1. the different index sets are used for row and column block
  2. dofs wich are eliminated are NOT moved to the rhs, they are just ignored in the assembly (only works for homogeneous BC)
  3. no assembling is done for the rhs
Parameters
[in]localMatthe local matrix
[in]actives_ithe mapped index of row - basis functions, without shifts!
[in]actives_jthe mapped index of column - basis functions, without shifts!
[in]rthe row block
[in]cthe column block
void pushToMatrixAllFree ( const gsMatrix< T > &  localMat,
const gsMatrix< index_t > &  actives,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushToMatrixAllFree pushes the local matrix for an element to the global system,

Note
  1. the same index set is assumed for row and column block
  2. no checks are done if an index is eliminated or not
  3. no assembling is done for the rhs
Parameters
[in]localMatthe local matrix
[in]activesthe mapped index of basis functions, without shifts!
[in]rthe row block
[in]cthe column block
void pushToMatrixAllFree ( const gsMatrix< T > &  localMat,
const gsMatrix< index_t > &  actives_i,
const gsMatrix< index_t > &  actives_j,
const size_t  r = 0,
const size_t  c = 0 
)
inline

pushToMatrixAllFree pushes the local matrix for an element to the global system,

Note
  1. different index sets are used for row and column block
  2. no checks are done if an index is eliminated or not
  3. no assembling is done for the rhs
Parameters
[in]localMatthe local matrix
[in]actives_ithe mapped index of row - basis functions, without shifts!
[in]actives_jthe mapped index of column - basis functions, without shifts!
[in]rthe row block
[in]cthe column block
void pushToRhs ( const gsMatrix< T > &  localRhs,
const gsMatrix< index_t > &  actives,
const size_t  r = 0 
)
inline

pushToRhs pushes the local rhs for an element to the global system

Note
checks are done if an index is eliminated or not
Parameters
[in]localRhsthe local right hand side matrix/vector
[in]activesthe corresponding mapped index of basis functions without shifts
[in]rthe row block associated to
void pushToRhs ( const gsMatrix< T > &  localRhs,
const std::vector< gsMatrix< index_t > > &  actives_vec,
const gsVector< index_t > &  r_vec 
)
inline

pushToRhs pushes one local rhs consisting of several blocks corresponding to blocks of the global system

Note
Usefull for rhs depending on a vector valued function
Parameters
[in]localRhslocal system matrix
[in]actives_veca vector of mapped index sets (for ALL row blocks of the global system), accessed via actives_vec[r_vec(i)]
[in]r_veca vector of row block indices to which the local matrix is pushed
void pushToRhsAllFree ( const gsMatrix< T > &  localRhs,
const gsMatrix< index_t > &  actives,
const size_t  r = 0 
)
inline

pushToRhsAllFree pushes the local rhs for an element to the global system

Note
no checks are done if an index is eliminated or not
Parameters
[in]localRhsthe local right hand side matrix/vector
[in]activesthe corresponding mapped index of basis functions without shifts
[in]rthe row block associated to
void reserve ( const index_t  nz,
const index_t  numRhs 
)
inline

reserve reserves the memory for the sparse matrix and the rhs.

Parameters
[in]nzNon-zeros per column for the sparse matrix
[in]numRhsnumber of columns
void reserve ( const gsMultiBasis< T > &  mb,
const gsOptionList opt,
const index_t  numRhs 
)
inline

Reserves the memory for the sparse matrix and the rhs, based on the polynomial degree of the first basis-piece in /em mb, as well as the input options bdA, bdB and bdO.

At each column approximately bdA * deg + dbB non-zero entries are expected. An extra amount of memory of bdO percent is allocated, in order to speedup the process.

Parameters
mb
opt
[in]numRhsnumber of columns
const gsDofMapper& rowMapper ( const index_t  r) const
inline

rowMapper returns the dofMapper for row block r

Parameters
[in]rthe index of the row block
Returns
the corresponding DofMapper
gsDofMapper& rowMapper ( const index_t  r)
inline

rowMapper returns the dofMapper for row block r

Parameters
[in]rthe index of the row block
Returns
the corresponding DofMapper
void swap ( gsSparseSystem< T, symm > &  other)
inline

swap swaps the content of the Sparse System with the other given one

Parameters
[in]otherthe other sparse system