Loading [MathJax]/extensions/tex2jax.js
Cantera  3.2.0a1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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(const size_t stateSize, double* rhs_vector, 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 solve(const size_t stateSize, double *rhs_vector, double *output) override
Solve a linear system using the system matrix M
void factorize() override
Factorize the system matrix.
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