Implemented generalized second derivative, seems to work, implemented at PropsSI level too

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-24 17:26:46 +02:00
parent 4b082029c4
commit 799422fe40
7 changed files with 296 additions and 243 deletions

View File

@@ -405,10 +405,16 @@ double _PropsSI(const std::string &Output, const std::string &Name1, double Prop
// Return the value
return val;
}
else{// if is_valid_second_derivative(Output, iOf1, iWrt1, iConstant1, iWrt2, iConstant2){
return _HUGE;
};
else if (is_valid_second_derivative(Output, iOf1, iWrt1, iConstant1, iWrt2, iConstant2)){
// Return the desired output
double val = State->second_partial_deriv(iOf1, iWrt1, iConstant1, iWrt2, iConstant2);
// Return the value
return val;
}
else{
throw ValueError(format("Output [%s] is not a parameter or a string representation of a derivative",Output.c_str()).c_str());
}
}
double PropsSI(const std::string &Output, const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &Ref, const std::vector<double> &z)
{