![]() |
v0.16.3 |
Storage of block matrix, shared by block matrix and its nested (Schur) sub-matrices. More...
Classes | |
| struct | Elem |
| A00 element. More... | |
| struct | ElemEntity |
| DOFs on one entity (node) of A00 element. More... | |
| struct | Indexes |
| block data indexes More... | |
| struct | Pattern |
| Block pattern of A00 element and layout of element buffer. More... | |
| struct | RowUIdLess |
Public Types | |
| enum | FactorStorage { FACTOR_NONE , FACTOR_IN_DATA , FACTOR_IN_PRECONDITIONER , FACTOR_FAILED } |
Public Member Functions | |
| void | ensureAllocated () |
| bool | isFactorised () const |
| MoFEMErrorCode | checkNotFailed () const |
| Fails if factorisation failed, storage has to be zeroed. | |
| MoFEMErrorCode | modified () const |
| Call before modification of data, fails if factors are stored in place. | |
| void | resetFactors () |
| double * | blockPtr (const Indexes &b, bool prec=false) |
| values of block, preconditioner buffer if prec is true | |
| const Indexes * | find (const UId &row, const UId &col) const |
| find block by row and column entity uid, return nullptr if not found | |
| Indexes * | findMutable (const UId &row, const UId &col) |
| auto | rowRange (const UId &row) const |
| range of blocks with given row entity uid | |
| auto | colRange (const UId &col) const |
| range (in colOrder) of blocks with given column entity uid | |
Static Public Member Functions | |
| static bool | lessRowCol (const Indexes &a, const Indexes &b) |
Public Attributes | |
| std::vector< Indexes > | blockIndex |
| blocks sorted by (row uid, col uid) | |
| std::vector< int > | feOrder |
| blocks sorted by (fe uid, row uid, col uid) | |
| std::vector< int > | colOrder |
| blocks sorted by (col uid, row uid) | |
| std::vector< Pattern > | patterns |
| std::vector< Elem > | elems |
| std::vector< ElemEntity > | elemEntities |
| std::vector< std::vector< double > > | elemData |
| A00 element buffers. | |
| std::vector< std::vector< double > > | elemPrec |
| preconditioner buffers | |
| std::vector< std::vector< double > > | elemDense |
| dense factors (fallback) | |
| int | maxElemSize = 0 |
| maximal DOFs of element | |
| size_t | maxElemBuffer = 0 |
| maximal size of element buffer | |
| size_t | dataSize = 0 |
| required size of data | |
| std::vector< double > | data |
| blocks not in A00, allocated on first use | |
| std::vector< __CLPK_integer > | pivots |
| FactorStorage | factorStorage = FACTOR_NONE |
| bool | nested = false |
| nested Schur structure has been created | |
| bool | hasPreconditioner = false |
| preconditioner blocks are enabled | |
| bool | optDense = false |
| -schur_a00_dense | |
| double | optPivotThreshold = 0 |
| -schur_a00_pivot_threshold | |
| double | optRcondMin = 1e-12 |
| -schur_a00_rcond_min | |
| double | optBackwardError = 1e-12 |
| -schur_a00_backward_error | |
Storage of block matrix, shared by block matrix and its nested (Schur) sub-matrices.
Block is dense sub-matrix coupling DOFs on one row entity with DOFs on one column entity, stored row-major at mat_shift with leading dimension ld.
Blocks which are not part of A00 are stored in data. When nested Schur structure is created (see createSchurNestedMatrixStruture), blocks of A00 which belong to one finite element are stored in a buffer of that element. Elements with the same block pattern (entities, numbers of DOFs and listed pairs) share a Pattern, which defines the layout of element buffers.
Element buffers start in listed layout (listed blocks only). At the first factorisation each pattern is analysed on a probe element: nodes (entities) whose diagonal block is a safe pivot are eliminated one by one (block LU in place, fill only where the pattern creates it), the remaining nodes form a dense core factorised with partial pivoting. Element buffers are then relaid element by element, and factors are kept until MatZeroEntries. Elements failing the pivot test at a later factorisation are factorised dense in a buffer of their own. See doc/development/schur.md.
Factorisation works on M = A^T, which is how LAPACK reads row-major element blocks. Slot (r, c), i.e. block of A coupling row node r with column node c, read column-major is block (c, r) of M.
If preconditioner blocks are requested, they are allocated for A00 element buffers only, with the same layout. Then factors of (A00 + preconditioner) are stored in place of preconditioner blocks, and A00 blocks are intact.
| Enumerator | |
|---|---|
| FACTOR_NONE | |
| FACTOR_IN_DATA | |
| FACTOR_IN_PRECONDITIONER | |
| FACTOR_FAILED | factorisation failed, data is corrupted |
Definition at line 397 of file Schur.cpp.
values of block, preconditioner buffer if prec is true
Definition at line 447 of file Schur.cpp.
|
inline |
Fails if factorisation failed, storage has to be zeroed.
Definition at line 416 of file Schur.cpp.
|
inline |
range (in colOrder) of blocks with given column entity uid
Definition at line 494 of file Schur.cpp.
|
inline |
find block by row and column entity uid, return nullptr if not found
Definition at line 460 of file Schur.cpp.
Definition at line 474 of file Schur.cpp.
|
inline |
Call before modification of data, fails if factors are stored in place.
Definition at line 426 of file Schur.cpp.
|
inline |
Definition at line 436 of file Schur.cpp.
|
inline |
| std::vector<Indexes> MoFEM::BlockStorage::blockIndex |
| std::vector<int> MoFEM::BlockStorage::colOrder |
| std::vector<double> MoFEM::BlockStorage::data |
| size_t MoFEM::BlockStorage::dataSize = 0 |
| std::vector<std::vector<double> > MoFEM::BlockStorage::elemData |
| std::vector<std::vector<double> > MoFEM::BlockStorage::elemDense |
| std::vector<ElemEntity> MoFEM::BlockStorage::elemEntities |
| std::vector<std::vector<double> > MoFEM::BlockStorage::elemPrec |
| FactorStorage MoFEM::BlockStorage::factorStorage = FACTOR_NONE |
| std::vector<int> MoFEM::BlockStorage::feOrder |
| bool MoFEM::BlockStorage::hasPreconditioner = false |
| size_t MoFEM::BlockStorage::maxElemBuffer = 0 |
| int MoFEM::BlockStorage::maxElemSize = 0 |
| bool MoFEM::BlockStorage::nested = false |
| double MoFEM::BlockStorage::optBackwardError = 1e-12 |
| bool MoFEM::BlockStorage::optDense = false |
| double MoFEM::BlockStorage::optPivotThreshold = 0 |
| double MoFEM::BlockStorage::optRcondMin = 1e-12 |
| std::vector<__CLPK_integer> MoFEM::BlockStorage::pivots |