Sparse system.
More...
#include <SparseSystem.h>
|
| SparseSystem () |
| Construct a new Sparse System object.
|
|
| SparseSystem (int n) |
| Construct a new Sparse System object.
|
|
| ~SparseSystem () |
| Destroy the Sparse System object.
|
|
void | reserve (Model *model) |
| Reserve memory in system matrices based on number of triplets.
|
|
void | update_residual (Eigen::Matrix< double, Eigen::Dynamic, 1 > &y, Eigen::Matrix< double, Eigen::Dynamic, 1 > &ydot) |
| Update the residual of the system.
|
|
void | update_jacobian (double time_coeff_ydot, double time_coeff_y) |
| Update the jacobian of the system.
|
|
void | solve () |
| Solve the system.
|
|
void | clean () |
| Delete dynamically allocated memory (class member Eigen::SparseLU<Eigen::SparseMatrix> *solver)
|
|
|
Eigen::SparseMatrix< double > | F |
| System matrix F.
|
|
Eigen::SparseMatrix< double > | E |
| System matrix E.
|
|
Eigen::SparseMatrix< double > | dC_dy |
| System matrix dC/dy.
|
|
Eigen::SparseMatrix< double > | dC_dydot |
| System matrix dC/dydot.
|
|
Eigen::Matrix< double, Eigen::Dynamic, 1 > | C |
| System vector C.
|
|
Eigen::SparseMatrix< double > | jacobian |
| Jacobian of the system.
|
|
Eigen::Matrix< double, Eigen::Dynamic, 1 > | residual |
| Residual of the system.
|
|
Eigen::Matrix< double, Eigen::Dynamic, 1 > | dydot |
| Solution increment of the system.
|
|
std::shared_ptr< Eigen::SparseLU< Eigen::SparseMatrix< double > > > | solver |
|
Sparse system.
This class contains all attributes and methods to create, modify, and solve sparse systems.
Mathematical details related to setting up the governing system of equations are available on the SimVascular documentation.
◆ SparseSystem() [1/2]
SparseSystem::SparseSystem |
( |
| ) |
|
Construct a new Sparse System object.
◆ SparseSystem() [2/2]
SparseSystem::SparseSystem |
( |
int | n | ) |
|
Construct a new Sparse System object.
- Parameters
-
◆ ~SparseSystem()
SparseSystem::~SparseSystem |
( |
| ) |
|
Destroy the Sparse System object.
◆ clean()
void SparseSystem::clean |
( |
| ) |
|
Delete dynamically allocated memory (class member Eigen::SparseLU<Eigen::SparseMatrix> *solver)
◆ reserve()
void SparseSystem::reserve |
( |
Model * | model | ) |
|
Reserve memory in system matrices based on number of triplets.
- Parameters
-
model | The model to reserve space for in the system |
◆ solve()
void SparseSystem::solve |
( |
| ) |
|
◆ update_jacobian()
void SparseSystem::update_jacobian |
( |
double | time_coeff_ydot, |
|
|
double | time_coeff_y ) |
Update the jacobian of the system.
- Parameters
-
time_coeff_ydot | Coefficent ydot-dependent part of jacobian |
time_coeff_y | Coefficent ydot-dependent part of jacobian |
◆ update_residual()
void SparseSystem::update_residual |
( |
Eigen::Matrix< double, Eigen::Dynamic, 1 > & | y, |
|
|
Eigen::Matrix< double, Eigen::Dynamic, 1 > & | ydot ) |
Update the residual of the system.
- Parameters
-
y | Vector of current solution quantities |
ydot | Derivate of y |
Eigen::Matrix<double, Eigen::Dynamic, 1> SparseSystem::C |
◆ dC_dy
Eigen::SparseMatrix<double> SparseSystem::dC_dy |
◆ dC_dydot
Eigen::SparseMatrix<double> SparseSystem::dC_dydot |
◆ dydot
Eigen::Matrix<double, Eigen::Dynamic, 1> SparseSystem::dydot |
Solution increment of the system.
Eigen::SparseMatrix<double> SparseSystem::E |
Eigen::SparseMatrix<double> SparseSystem::F |
◆ jacobian
Eigen::SparseMatrix<double> SparseSystem::jacobian |
◆ residual
Eigen::Matrix<double, Eigen::Dynamic, 1> SparseSystem::residual |
◆ solver
std::shared_ptr<Eigen::SparseLU<Eigen::SparseMatrix<double> > > SparseSystem::solver |
Initial value:=
std::shared_ptr<Eigen::SparseLU<Eigen::SparseMatrix<double>>>(
new Eigen::SparseLU<Eigen::SparseMatrix<double>>())
Linear solver
The documentation for this class was generated from the following files: