10#ifndef ADAPTIVEPRECONDITIONER_H
11#define ADAPTIVEPRECONDITIONER_H
29 const string type()
const override {
return "Adaptive"; }
30 void setup()
override;
32 void solve(
const size_t stateSize,
double* rhs_vector,
double* output)
override;
35 int info()
const override {
36 return static_cast<int>(
m_solver.info());
AdaptivePreconditioner a preconditioner designed for use with large mechanisms that leverages sparse ...
double threshold()
Get the threshold value for setting elements.
Eigen::IncompleteLUT< double > m_solver
Solver used in solving the linear system.
double ilutDropTol()
Get ILUT drop tolerance.
double m_fill_factor
ILUT fill factor.
void setIlutDropTol(double droptol)
Set drop tolerance for ILUT.
double m_drop_tol
ILUT drop tolerance.
void solve(const size_t stateSize, double *rhs_vector, double *output) override
Solve a linear system using the system matrix M
double m_prune_precon
Bool set whether to prune the matrix or not.
double m_threshold
Minimum value a non-diagonal element must be to be included in the preconditioner.
void factorize() override
Factorize the system matrix.
void initialize(size_t networkSize) override
Called during setup for any processes that need to be completed prior to setup functions used in sund...
void setIlutFillFactor(int fillFactor)
Set the fill factor for ILUT solver.
void setup() override
Perform preconditioner specific post-reactor setup operations such as factorize.
void stateAdjustment(vector< double > &state) override
Adjust the state vector based on the preconditioner, e.g., Adaptive preconditioning uses a strictly p...
const string type() const override
Derived type, corresponding to names registered with SystemJacobianFactory.
void prunePreconditioner()
Prune preconditioner elements.
void setThreshold(double threshold)
Set the threshold value to compare elements against.
int info() const override
Get latest status of linear solver.
double ilutFillFactor()
Get ILUT fill factor.
System Jacobians that use Eigen sparse matrices for storage.
Namespace for the Cantera kernel.