Cantera  4.0.0a1
Loading...
Searching...
No Matches
EigenSparseDirectJacobian.h
Go to the documentation of this file.
1//! @file EigenSparseDirectJacobian.h
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
6#ifndef EIGENSPARSEDIRECTJACOBIAN_H
7#define EIGENSPARSEDIRECTJACOBIAN_H
8
10
11namespace Cantera
12{
13
14//! A system matrix solver that uses Eigen's sparse direct (LU) algorithm
16{
17public:
18 EigenSparseDirectJacobian() = default;
19 const string type() const override { return "eigen-sparse-direct"; }
20 void factorize() override;
21 void solve(span<const double> rhs_vector, span<double> output) override;
22
23protected:
24 Eigen::SparseLU<Eigen::SparseMatrix<double>> m_solver;
25};
26
27}
28
29#endif
A system matrix solver that uses Eigen's sparse direct (LU) algorithm.
void factorize() override
Factorize the system matrix.
void solve(span< const double > rhs_vector, span< double > output) override
Solve a linear system using the system matrix M
const string type() const override
Derived type, corresponding to names registered with SystemJacobianFactory.
System Jacobians that use Eigen sparse matrices for storage.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595