mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Numerics] Update eigen_dense.h and introduce eigen_sparse.h
This commit is contained in:
committed by
Ray Speth
parent
594b5b9e24
commit
fa86de5895
@@ -1,12 +1,25 @@
|
||||
#include "cantera/base/ct_defs.h"
|
||||
// This file is part of Cantera. See License.txt in the top-level directory or
|
||||
// at https://cantera.org/license.txt for license and copyright information.
|
||||
|
||||
#ifndef CT_EIGEN_DENSE_H
|
||||
#define CT_EIGEN_DENSE_H
|
||||
|
||||
#include "cantera/base/config.h"
|
||||
#if CT_USE_SYSTEM_EIGEN
|
||||
#include <Eigen/Dense>
|
||||
#else
|
||||
#include "cantera/ext/Eigen/Dense"
|
||||
#endif
|
||||
|
||||
namespace Cantera {
|
||||
typedef Eigen::Map<Eigen::MatrixXd> MappedMatrix;
|
||||
typedef Eigen::Map<Eigen::VectorXd> MappedVector;
|
||||
typedef Eigen::Map<const Eigen::VectorXd> ConstMappedVector;
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
typedef Eigen::Map<Eigen::MatrixXd> MappedMatrix;
|
||||
typedef Eigen::Map<const Eigen::MatrixXd> ConstMappedMatrix;
|
||||
typedef Eigen::Map<Eigen::VectorXd> MappedVector;
|
||||
typedef Eigen::Map<const Eigen::VectorXd> ConstMappedVector;
|
||||
typedef Eigen::Map<Eigen::RowVectorXd> MappedRowVector;
|
||||
typedef Eigen::Map<const Eigen::RowVectorXd> ConstMappedRowVector;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
19
include/cantera/numerics/eigen_sparse.h
Normal file
19
include/cantera/numerics/eigen_sparse.h
Normal file
@@ -0,0 +1,19 @@
|
||||
// This file is part of Cantera. See License.txt in the top-level directory or
|
||||
// at https://cantera.org/license.txt for license and copyright information.
|
||||
|
||||
#ifndef CT_EIGEN_SPARSE_H
|
||||
#define CT_EIGEN_SPARSE_H
|
||||
|
||||
#include "cantera/base/config.h"
|
||||
#if CT_USE_SYSTEM_EIGEN
|
||||
#include <Eigen/Sparse>
|
||||
#else
|
||||
#include "cantera/ext/Eigen/Sparse"
|
||||
#endif
|
||||
|
||||
namespace Cantera
|
||||
{
|
||||
typedef std::vector<Eigen::Triplet<double>> SparseTriplets;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user