G+Smo
24.08.0
Geometry + Simulation Modules
|
Simple class create a block operator structure.
This class represents a linear operator \(C\) having block structure:
\[ C = \left( \begin{array}{cccc} C_{00} & C_{01} & \ldots & C_{0m} \\ C_{10} & C_{11} & \ldots & C_{1m} \\ \vdots & \vdots & \ddots & \vdots \\ C_{n0} & C_{n1} & \ldots & C_{nm} \end{array} \right), \]
where \(C_{ij}\) are themselves gsLinearOperators.
The number of blocks (m and n) are specified in the constructor. The blocks \(C_{ij}\) are defined using addOperator(i,j,...). Unspecified blocks are considered to be 0.
Public Types | |
typedef memory::shared_ptr < gsLinearOperator< T > > | BasePtr |
Base class. | |
typedef memory::shared_ptr < gsBlockOp< T > > | Ptr |
Shared pointer for gsBlockOp. | |
typedef memory::unique_ptr < gsBlockOp< T > > | uPtr |
Unique pointer for gsBlockOp. | |
Public Member Functions | |
void | addOperator (index_t row, index_t col, const BasePtr &op) |
Add a preconditioner \(C_{ij}\) to the block structure. More... | |
void | apply (const gsMatrix< T > &input, gsMatrix< T > &result) const |
Apply the correct segment of the input vector on the preconditioners in the block structure and store the result. More... | |
index_t | colBlocks () const |
Number of col blocks. | |
index_t | cols () const |
Returns the number of columns of the operator. | |
const BasePtr & | getOperator (index_t row, index_t col) const |
Returns the pointer to a linear operator of a specific block (if existent) More... | |
gsBlockOp (index_t nRows, index_t nCols) | |
Constructor. Takes the number of blocks (nRows, nCols). Provide the contents of the blocks with addOperator. | |
index_t | rowBlocks () const |
Number of row blocks. | |
index_t | rows () const |
Returns the number of rows of the operator. | |
virtual void | setOptions (const gsOptionList &) |
Set options based on a gsOptionList object. | |
Static Public Member Functions | |
static gsOptionList | defaultOptions () |
Get the default options as gsOptionList object. | |
static gsIdentityOp< T > | Identity (const index_t dim) |
Identity operator. | |
static uPtr | make (index_t nRows, index_t nCols) |
Make function returning a smart pointer. | |
Add a preconditioner \(C_{ij}\) to the block structure.
row | row position in the block operator |
col | column position in the block operator |
op | shared pointer to the operator |
Apply the correct segment of the input vector on the preconditioners in the block structure and store the result.
input | Input vector |
result | Result vector |
Implements gsLinearOperator< T >.