Single-phase HmolarP_INPUTS are working with TTSE

This commit is contained in:
Ian Bell
2015-02-22 21:08:32 -07:00
parent 58519d5fbf
commit a43693de58
14 changed files with 555 additions and 208 deletions

View File

@@ -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 );
}
}