mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Single-phase HmolarP_INPUTS are working with TTSE
This commit is contained in:
@@ -82,27 +82,27 @@ TEST_CASE("Internal consistency checks and example use cases for MatrixMath.h","
|
||||
SECTION("std::vector to Eigen::Matrix and back") {
|
||||
std::vector<std::vector<double> > vec2D(cHeat2D);
|
||||
Eigen::MatrixXd matrix = CoolProp::vec_to_eigen(vec2D);
|
||||
for (size_t i = 0; i < matrix.cols(); ++i) {
|
||||
for (size_t j = 0; j < matrix.rows(); ++j) {
|
||||
for (size_t i = 0; i < static_cast<size_t>(matrix.cols()); ++i) {
|
||||
for (size_t j = 0; j < static_cast<size_t>(matrix.rows()); ++j) {
|
||||
CHECK( std::abs(matrix(j,i)-vec2D[j][i]) <= 1e-10 );
|
||||
}
|
||||
}
|
||||
vec2D = CoolProp::eigen_to_vec(matrix);
|
||||
for (size_t i = 0; i < matrix.cols(); ++i) {
|
||||
for (size_t j = 0; j < matrix.rows(); ++j) {
|
||||
for (size_t i = 0; i < static_cast<size_t>(matrix.cols()); ++i) {
|
||||
for (size_t j = 0; j < static_cast<size_t>(matrix.rows()); ++j) {
|
||||
CHECK( std::abs(matrix(j,i)-vec2D[j][i]) <= 1e-10 );
|
||||
}
|
||||
}
|
||||
std::vector<double> vec1D(cHeat);
|
||||
matrix = CoolProp::vec_to_eigen(vec1D);
|
||||
for (size_t i = 0; i < matrix.cols(); ++i) {
|
||||
for (size_t j = 0; j < matrix.rows(); ++j) {
|
||||
for (size_t i = 0; i < static_cast<size_t>(matrix.cols()); ++i) {
|
||||
for (size_t j = 0; j < static_cast<size_t>(matrix.rows()); ++j) {
|
||||
CHECK( std::abs(matrix(j,i)-vec1D[j]) <= 1e-10 );
|
||||
}
|
||||
}
|
||||
vec1D = CoolProp::eigen_to_vec1D(matrix);
|
||||
for (size_t i = 0; i < matrix.cols(); ++i) {
|
||||
for (size_t j = 0; j < matrix.rows(); ++j) {
|
||||
for (size_t i = 0; i < static_cast<size_t>(matrix.cols()); ++i) {
|
||||
for (size_t j = 0; j < static_cast<size_t>(matrix.rows()); ++j) {
|
||||
CHECK( std::abs(matrix(j,i)-vec1D[j]) <= 1e-10 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user