|
NEML2 2.1.0
|
Definition of a linear system of equations, Au = b. More...
Definition of a linear system of equations, Au = b.
#include <LinearSystem.h>

Public Member Functions | |
| LinearSystem ()=default | |
| LinearSystem (const LinearSystem &)=default | |
| LinearSystem (LinearSystem &&) noexcept=default | |
| LinearSystem & | operator= (const LinearSystem &)=default |
| LinearSystem & | operator= (LinearSystem &&) noexcept=default |
| virtual | ~LinearSystem ()=default |
| virtual void | init () |
| Setup axis layouts. | |
| virtual void | set_u (const AssembledVector &)=0 |
| Set the unknown u. | |
| virtual void | set_g (const AssembledVector &)=0 |
| Set the given variables g from the current step. | |
| virtual AssembledVector | u () const =0 |
| Get the unknown u. | |
| virtual AssembledVector | g () const =0 |
| Get the given variables g from the current step. | |
| virtual void | u_changed () |
| Trigger when unknown variables changed. | |
| virtual void | g_changed () |
| Trigger when given variables changed. | |
| AssembledMatrix | A () |
| Assemble and return the operator, A. | |
| AssembledVector | b () |
| Assemble and return the right-hand side, b. | |
| std::tuple< AssembledMatrix, AssembledVector > | A_and_b () |
| Assemble and return the right-hand side and operator. | |
| std::tuple< AssembledMatrix, AssembledMatrix > | A_and_B () |
| Assemble the auxiliary matrix B = dr/dg along with A. | |
| std::tuple< AssembledMatrix, AssembledMatrix, AssembledVector > | A_and_B_and_b () |
| Assemble the auxiliary matrix B = dr/dg along with A and b. | |
| AxisLayout | ulayout () const |
| Get the unknown-variable layout. | |
| AxisLayout | glayout () const |
| Get the given-variable layout. | |
| AxisLayout | blayout () const |
| Get the RHS variable layout. | |
Protected Member Functions | |
| virtual std::shared_ptr< AxisLayout > | setup_ulayout ()=0 |
| Setup the unknown layout, partitioned by variable group. | |
| virtual std::shared_ptr< AxisLayout > | setup_glayout ()=0 |
| Setup the given variable layout. | |
| virtual std::shared_ptr< AxisLayout > | setup_blayout ()=0 |
| Setup the RHS variable layout. | |
| virtual void | assemble (AssembledMatrix *A, AssembledMatrix *B, AssembledVector *b)=0 |
| Compute the operator and right-hand side. | |
| virtual void | pre_assemble (bool A, bool B, bool b) |
| Callback before assembly to perform. | |
| virtual void | post_assemble (bool A, bool B, bool b) |
| Callback after assembly to perform. | |
Protected Attributes | |
| bool | _A_up_to_date = false |
| Flag indicating if the system matrix is up to date. Setters invalidate this. | |
| bool | _B_up_to_date = false |
| Flag indicating if the auxiliary matrix is up to date. Setters invalidate this. | |
| bool | _b_up_to_date = false |
| Flag indicating if the system RHS is up to date. Setters invalidate this. | |
| std::shared_ptr< AxisLayout > | _ulayout |
| Layout of unknowns, partitioned by variable groups. | |
| std::shared_ptr< AxisLayout > | _glayout |
| Layout of given variables. | |
| std::shared_ptr< AxisLayout > | _blayout |
| Layout of RHS variables, partitioned by variable groups. | |
|
default |
|
default |
|
defaultnoexcept |
|
virtualdefault |
| AssembledMatrix A | ( | ) |
Assemble and return the operator, A.
| std::tuple< AssembledMatrix, AssembledMatrix > A_and_B | ( | ) |
Assemble the auxiliary matrix B = dr/dg along with A.
| std::tuple< AssembledMatrix, AssembledVector > A_and_b | ( | ) |
Assemble and return the right-hand side and operator.
| std::tuple< AssembledMatrix, AssembledMatrix, AssembledVector > A_and_B_and_b | ( | ) |
Assemble the auxiliary matrix B = dr/dg along with A and b.
|
protectedpure virtual |
Compute the operator and right-hand side.
| A | Pointer to the operator matrix – nullptr if not requested |
| B | Pointer to the auxiliary matrix – nullptr if not requested |
| b | Pointer to the RHS vector – nullptr if not requested |
Implemented in ModelNonlinearSystem.
| AssembledVector b | ( | ) |
Assemble and return the right-hand side, b.
| AxisLayout blayout | ( | ) | const |
Get the RHS variable layout.
|
pure virtual |
Get the given variables g from the current step.
Implemented in ModelNonlinearSystem.
|
virtual |
Trigger when given variables changed.
| AxisLayout glayout | ( | ) | const |
Get the given-variable layout.
|
virtual |
Setup axis layouts.
|
default |
|
defaultnoexcept |
|
protectedvirtual |
Callback after assembly to perform.
This is useful, for example, to collect information that isn't available after the first assembly
| A | Whether the operator matrix was assembled |
| B | Whether the auxiliary matrix was assembled |
| b | Whether the RHS vector was assembled |
Reimplemented in ModelNonlinearSystem.
|
protectedvirtual |
Callback before assembly to perform.
This is useful, for example, to clear obsolete data structures
| A | Whether the operator matrix was assembled |
| B | Whether the auxiliary matrix was assembled |
| b | Whether the RHS vector was assembled |
Reimplemented in ModelNonlinearSystem.
|
pure virtual |
Set the given variables g from the current step.
Implemented in ModelNonlinearSystem.
|
pure virtual |
Set the unknown u.
Implemented in ModelNonlinearSystem.
|
protectedpure virtual |
Setup the RHS variable layout.
Implemented in ModelNonlinearSystem.
|
protectedpure virtual |
Setup the given variable layout.
Implemented in ModelNonlinearSystem.
|
protectedpure virtual |
Setup the unknown layout, partitioned by variable group.
Implemented in ModelNonlinearSystem.
|
pure virtual |
Get the unknown u.
Implemented in ModelNonlinearSystem.
|
virtual |
Trigger when unknown variables changed.
Reimplemented in NonlinearSystem.
| AxisLayout ulayout | ( | ) | const |
Get the unknown-variable layout.
|
protected |
Flag indicating if the system matrix is up to date. Setters invalidate this.
|
protected |
Flag indicating if the auxiliary matrix is up to date. Setters invalidate this.
|
protected |
Flag indicating if the system RHS is up to date. Setters invalidate this.
|
protected |
Layout of RHS variables, partitioned by variable groups.
|
protected |
Layout of given variables.
|
protected |
Layout of unknowns, partitioned by variable groups.