Bicubic coefficients are calculated in all cells

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2015-02-26 20:54:30 -07:00
parent 52a123437c
commit 6eaea3e642
5 changed files with 153 additions and 11 deletions

View File

@@ -15,6 +15,7 @@
#include "Backends/Incompressible/IncompressibleBackend.h"
#include "Backends/Helmholtz/Fluids/FluidLibrary.h"
#include "Backends/Tabular/TTSEBackend.h"
#include "Backends/Tabular/BicubicBackend.h"
namespace CoolProp {
@@ -51,6 +52,13 @@ AbstractState * AbstractState::factory(const std::string &backend, const std::ve
shared_ptr<AbstractState> AS(factory(backend.substr(5), fluid_names[0]));
return new TTSEBackend(AS);
}
else if (backend.find("BICUBIC&") == 0)
{
if (fluid_names.size() != 1){throw ValueError(format("For backend [%s], name vector must be one element long", backend.c_str()));}
// Will throw if there is a problem with this backend
shared_ptr<AbstractState> AS(factory(backend.substr(8), fluid_names[0]));
return new BicubicBackend(AS);
}
else if (!backend.compare("TREND"))
{
throw ValueError("TREND backend not yet implemented");