Clean up shared_ptr mess

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-06-03 21:34:26 +02:00
parent 1bd5088dab
commit a82160c4bf
5 changed files with 14 additions and 21 deletions

View File

@@ -80,7 +80,7 @@ public:
virtual double d2alphar_dTau2(double tau, double delta) = 0;
};
typedef std::tr1::shared_ptr<DepartureFunction> DepartureFunctionPointer;
typedef shared_ptr<DepartureFunction> DepartureFunctionPointer;
class ExcessTerm
{

View File

@@ -1049,7 +1049,6 @@ long double ResidualHelmholtzNonAnalytic::dDelta2(const long double &tau, const
long double dDELTA_dDelta_over_delta_minus_1=(Ai*theta*2.0/betai*pow(pow(delta-1.0,2),1.0/(2.0*betai)-1.0)+2.0*Bi*ai*pow(pow(delta-1.0,2),ai-1.0));
long double dPSI2_dDelta2=(2.0*Ci*pow(delta-1.0,2)-1.0)*2.0*Ci*PSI;
<<<<<<< HEAD
if (fabs(delta-1) < 10*DBL_EPSILON){
dDELTA2_dDelta2 = 0;
@@ -1060,11 +1059,6 @@ long double ResidualHelmholtzNonAnalytic::dDelta2(const long double &tau, const
dDELTAbi2_dDelta2 = bi*(pow(DELTA,bi-1.0)*dDELTA2_dDelta2+(bi-1.0)*pow(DELTA,bi-2.0)*pow(dDELTA_dDelta,2));
}
=======
long double dDELTA2_dDelta2=1.0/(delta-1.0)*dDELTA_dDelta+pow(delta-1.0,2)*(4.0*Bi*ai*(ai-1.0)*pow(pow(delta-1.0,2),ai-2.0)+2.0*pow(Ai/betai,2)*pow(pow(pow(delta-1.0,2),1.0/(2.0*betai)-1.0),2)+Ai*theta*4.0/betai*(1.0/(2.0*betai)-1.0)*pow(pow(delta-1.0,2),1.0/(2.0*betai)-2.0));
long double dDELTAbi2_dDelta2=bi*(pow(DELTA,bi-1.0)*dDELTA2_dDelta2+(bi-1.0)*pow(DELTA,bi-2.0)*pow(dDELTA_dDelta,2));
>>>>>>> cb497b443cbbf60be06b3485369837a785fb34c9
// At critical point, DELTA is 0, and 1/0^n is undefined
if (fabs(DELTA) < 10*DBL_EPSILON)
{

View File

@@ -5,6 +5,7 @@ the build to avoid double declaration of the main function and
Catch clashing
*/
#include "Tests.h"
#include "time.h"
#if defined ENABLE_CATCH
#define CATCH_CONFIG_RUNNER

View File

@@ -65,14 +65,9 @@ int main()
for (std::size_t i = 0; i < sizeof(NBP_refs)/sizeof(NBP_refs[0]); ++i)
{
try{
<<<<<<< HEAD
set_reference_stateS(NBP_refs[i],"RESET");
HelmholtzEOSMixtureBackend HEOS(std::vector<std::string>(1,NBP_refs[i]));
=======
//set_reference_stateS(NBP_refs[i],"RESET");
std::vector<std::string> comps(1,NBP_refs[i]);
HelmholtzEOSMixtureBackend HEOS(comps);
>>>>>>> cb497b443cbbf60be06b3485369837a785fb34c9
HEOS.update(PQ_INPUTS, 101325, 0);
double delta_a1 = HEOS.smass()/(HEOS.gas_constant()/HEOS.molar_mass());
double delta_a2 = -HEOS.hmass()/(HEOS.gas_constant()/HEOS.molar_mass()*HEOS.get_reducing().T);
@@ -86,14 +81,9 @@ int main()
for (std::size_t i = 0; i < sizeof(IIR_refs)/sizeof(IIR_refs[0]); ++i)
{
try{
<<<<<<< HEAD
set_reference_stateS(IIR_refs[i],"RESET");
HelmholtzEOSMixtureBackend HEOS(std::vector<std::string>(1,IIR_refs[i]));
=======
//set_reference_stateS(IIR_refs[i],"RESET");
std::vector<std::string> comps(1,IIR_refs[i]);
HelmholtzEOSMixtureBackend HEOS(comps);
>>>>>>> cb497b443cbbf60be06b3485369837a785fb34c9
HEOS.update(QT_INPUTS, 0, 273.15);
double delta_a1 = (HEOS.smass()-1000)/(HEOS.gas_constant()/HEOS.molar_mass());
double delta_a2 = -(HEOS.hmass()-200000)/(HEOS.gas_constant()/HEOS.molar_mass()*HEOS.get_reducing().T);
@@ -167,7 +157,7 @@ int main()
if (0)
{
double rrr0 = PropsSI("P","T",200,"Dmolar",14000,"REFPROP::R125");
double rrr2 = PropsSI("P","T",200,"Dmolar",14000,"R125");
double rrr2 = PropsSI("P","T",200,"Dmolar",14000,"R125");
double rrr =0 ;
}
if (0)
@@ -193,10 +183,12 @@ int main()
double rr0 = PropsSI("L","T",647.35,"Dmass",272,"Water");
#if ENABLE_CATCH
std::vector<std::string> tags;
tags.push_back("[transport]");
tags.push_back("[rp1485]");
//run_user_defined_tests(tags);
run_tests();
#endif
std::string fl = get_global_param_string("FluidsList");
double rr = PropsSI("D", "P", 3e5, "T", 300, "Nitrogen");