FrictionQPotFEM 0.23.3
|
Sparse matrix partitioned in an unknown and a prescribed part. More...
#include <include/GooseFEM/MatrixPartitioned.h>
Public Member Functions | |
MatrixPartitioned (const array_type::tensor< size_t, 2 > &conn, const array_type::tensor< size_t, 2 > &dofs, const array_type::tensor< size_t, 1 > &iip) | |
Constructor. More... | |
const Eigen::SparseMatrix< double > & | data_uu () const |
Pointer to data. More... | |
const Eigen::SparseMatrix< double > & | data_up () const |
Pointer to data. More... | |
const Eigen::SparseMatrix< double > & | data_pu () const |
Pointer to data. More... | |
const Eigen::SparseMatrix< double > & | data_pp () const |
Pointer to data. More... | |
void | set (const array_type::tensor< size_t, 1 > &rows, const array_type::tensor< size_t, 1 > &cols, const array_type::tensor< double, 2 > &matrix) |
Overwrite matrix. More... | |
void | add (const array_type::tensor< size_t, 1 > &rows, const array_type::tensor< size_t, 1 > &cols, const array_type::tensor< double, 2 > &matrix) |
Add matrix. More... | |
![]() | |
size_t | nnu () const |
Number of unknown DOFs. More... | |
size_t | nnp () const |
Number of prescribed DOFs. More... | |
const array_type::tensor< size_t, 1 > & | iiu () const |
Unknown DOFs. More... | |
const array_type::tensor< size_t, 1 > & | iip () const |
Prescribed DOFs. More... | |
array_type::tensor< double, 2 > | Reaction (const array_type::tensor< double, 2 > &x, const array_type::tensor< double, 2 > &b) const |
Right-hand-size for corresponding to the prescribed DOFs: More... | |
array_type::tensor< double, 1 > | Reaction (const array_type::tensor< double, 1 > &x, const array_type::tensor< double, 1 > &b) const |
Same as Reaction(const array_type::tensor<double, 2>&, const array_type::tensor<double, 2>&), but of "dofval" input and output. More... | |
void | reaction (const array_type::tensor< double, 2 > &x, array_type::tensor< double, 2 > &b) const |
Same as Reaction(const array_type::tensor<double, 2>&, const array_type::tensor<double, 2>&), but inserting in-place. More... | |
void | reaction (const array_type::tensor< double, 1 > &x, array_type::tensor< double, 1 > &b) const |
Same as Reaction(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but inserting in-place. More... | |
array_type::tensor< double, 1 > | Reaction_p (const array_type::tensor< double, 1 > &x_u, const array_type::tensor< double, 1 > &x_p) const |
Same as Reaction(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but with partitioned input and output. More... | |
void | reaction_p (const array_type::tensor< double, 1 > &x_u, const array_type::tensor< double, 1 > &x_p, array_type::tensor< double, 1 > &b_p) const |
Same as Reaction_p(const array_type::tensor<double, 1>&, const array_type::tensor<double,
1>&), but writing to preallocated output. More... | |
![]() | |
size_t | nelem () const |
Number of elements. More... | |
size_t | nne () const |
Number of nodes per element. More... | |
size_t | nnode () const |
Number of nodes. More... | |
size_t | ndim () const |
Number of dimensions. More... | |
size_t | ndof () const |
Number of DOFs. More... | |
const array_type::tensor< size_t, 2 > & | dofs () const |
DOFs per node. More... | |
const array_type::tensor< size_t, 2 > & | conn () const |
Connectivity. More... | |
std::array< size_t, 1 > | shape_dofval () const |
Shape of "dofval". More... | |
std::array< size_t, 2 > | shape_nodevec () const |
Shape of "nodevec". More... | |
std::array< size_t, 3 > | shape_elemmat () const |
Shape of "elemmat". More... | |
template<class T > | |
void | assemble (const T &elemmat) |
Assemble from "elemmat". More... | |
array_type::tensor< double, 2 > | Todense () const |
Copy as dense matrix. More... | |
template<class T > | |
void | todense (T &ret) const |
Copy to dense matrix. More... | |
array_type::tensor< double, 2 > | Dot (const array_type::tensor< double, 2 > &x) const |
Dot-product \( b_i = A_{ij} x_j \). More... | |
array_type::tensor< double, 1 > | Dot (const array_type::tensor< double, 1 > &x) const |
Dot-product \( b_i = A_{ij} x_j \). More... | |
void | dot (const array_type::tensor< double, 2 > &x, array_type::tensor< double, 2 > &b) const |
Dot-product \( b_i = A_{ij} x_j \). More... | |
void | dot (const array_type::tensor< double, 1 > &x, array_type::tensor< double, 1 > &b) const |
Dot-product \( b_i = A_{ij} x_j \). More... | |
Protected Attributes | |
Eigen::SparseMatrix< double > | m_Auu |
The matrix. More... | |
Eigen::SparseMatrix< double > | m_Aup |
The matrix. More... | |
Eigen::SparseMatrix< double > | m_Apu |
The matrix. More... | |
Eigen::SparseMatrix< double > | m_App |
The matrix. More... | |
std::vector< Eigen::Triplet< double > > | m_Tuu |
Matrix entries. More... | |
std::vector< Eigen::Triplet< double > > | m_Tup |
Matrix entries. More... | |
std::vector< Eigen::Triplet< double > > | m_Tpu |
Matrix entries. More... | |
std::vector< Eigen::Triplet< double > > | m_Tpp |
Matrix entries. More... | |
array_type::tensor< size_t, 2 > | m_part |
Renumbered DOFs per node, such that: More... | |
array_type::tensor< size_t, 1 > | m_part1d |
Map real DOF to DOF in partitioned system. More... | |
![]() | |
array_type::tensor< size_t, 1 > | m_iiu |
See iiu() More... | |
array_type::tensor< size_t, 1 > | m_iip |
See iip() More... | |
size_t | m_nnu |
See #nnu. More... | |
size_t | m_nnp |
See #nnp. More... | |
![]() | |
array_type::tensor< size_t, 2 > | m_conn |
Connectivity [nelem, nne]. More... | |
array_type::tensor< size_t, 2 > | m_dofs |
DOF-numbers per node [nnode, ndim]. More... | |
size_t | m_nelem |
See nelem(). More... | |
size_t | m_nne |
See nne(). More... | |
size_t | m_nnode |
See nnode(). More... | |
size_t | m_ndim |
See ndim(). More... | |
size_t | m_ndof |
See ndof(). More... | |
bool | m_changed = true |
Signal changes to data. More... | |
Friends | |
template<class > | |
class | MatrixPartitionedSolver |
Class to solve the system (allowing single factorisation for multiple right-hand-sides). More... | |
Additional Inherited Members | |
![]() | |
using | derived_type = MatrixPartitioned |
Underlying type. More... | |
![]() | |
using | derived_type = D |
Underlying type. More... | |
Sparse matrix partitioned in an unknown and a prescribed part.
In particular: \( \begin{bmatrix} A_{uu} & A_{up} \\ A_{pu} & A_{pp} \end{bmatrix} \)
See VectorPartitioned() for bookkeeping definitions.
Definition at line 34 of file MatrixPartitioned.h.
|
inline |
|
inline |
Add matrix.
rows | Row numbers [m]. |
cols | Column numbers [n]. |
matrix | Data entries matrix(i, j) for rows(i), cols(j) [m, n]. |
Definition at line 266 of file MatrixPartitioned.h.
|
inline |
Pointer to data.
Definition at line 149 of file MatrixPartitioned.h.
|
inline |
Pointer to data.
Definition at line 141 of file MatrixPartitioned.h.
|
inline |
Pointer to data.
Definition at line 133 of file MatrixPartitioned.h.
|
inline |
Pointer to data.
Definition at line 125 of file MatrixPartitioned.h.
|
inline |
Overwrite matrix.
rows | Row numbers [m]. |
cols | Column numbers [n]. |
matrix | Data entries matrix(i, j) for rows(i), cols(j) [m, n]. |
Definition at line 216 of file MatrixPartitioned.h.
|
friend |
Class to solve the system (allowing single factorisation for multiple right-hand-sides).
Definition at line 75 of file MatrixPartitioned.h.
|
protected |
The matrix.
Definition at line 43 of file MatrixPartitioned.h.
|
protected |
The matrix.
Definition at line 42 of file MatrixPartitioned.h.
|
protected |
The matrix.
Definition at line 41 of file MatrixPartitioned.h.
|
protected |
The matrix.
Definition at line 40 of file MatrixPartitioned.h.
|
protected |
Renumbered DOFs per node, such that:
iiu = arange(nnu) iip = nnu + arange(nnp)
making is much simpler to slice.
Definition at line 58 of file MatrixPartitioned.h.
|
protected |
Map real DOF to DOF in partitioned system.
The partitioned system is defined as:
iiu = arange(nnu) iip = nnu + arange(nnp)
Similar to m_part
but for a 1d sequential list of DOFs.
Definition at line 69 of file MatrixPartitioned.h.
|
protected |
Matrix entries.
Definition at line 48 of file MatrixPartitioned.h.
|
protected |
Matrix entries.
Definition at line 47 of file MatrixPartitioned.h.
|
protected |
Matrix entries.
Definition at line 46 of file MatrixPartitioned.h.
|
protected |
Matrix entries.
Definition at line 45 of file MatrixPartitioned.h.