[Numerics] Update eigen_dense.h and introduce eigen_sparse.h

This commit is contained in:
Ingmar Schoegl
2021-08-01 22:44:47 -05:00
committed by Ray Speth
parent 594b5b9e24
commit fa86de5895
2 changed files with 37 additions and 5 deletions

View File

@@ -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

View 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