Merge branch 'develop' into feature/REFPROP-headers

This commit is contained in:
Jorrit Wronski
2014-12-19 10:22:39 +01:00
2 changed files with 14 additions and 1 deletions

View File

@@ -5,6 +5,14 @@
%ignore CoolProp::set_config_json(rapidjson::Document &);
%ignore CoolProp::get_config_as_json(rapidjson::Document &);
#ifdef SWIGMATLAB
%ignore configuration_keys;
%ignore CoolProp::ConfigurationItem::ConfigurationDataTypes;
%ignore CoolProp::SsatSimpleState::SsatSimpleStateEnum;
%ignore CoolProp::composition_types;
%ignore CoolProp::fluid_types;
#endif
%include "std_string.i" // This %include allows the use of std::string natively
%include "std_vector.i" // This allows for the use of STL vectors natively(ish)
%include "exception.i" //

View File

@@ -2,6 +2,8 @@
#define _CRTDBG_MAP_ALLOC
#define _CRT_SECURE_NO_WARNINGS
#include <crtdbg.h>
#else
#include <fenv.h>
#endif
#include "CoolPropLib.h"
@@ -16,10 +18,13 @@
// In Microsoft Excel, they seem to check the FPU exception bits and error out because of it.
// By calling the _clearfp(), we can reset these bits, and not get the error
// See also http://stackoverflow.com/questions/11685441/floating-point-error-when-calling-dll-function-from-vba/27336496#27336496
// See also http://stackoverflow.com/questions/16849009/in-linux-do-there-exist-functions-similar-to-clearfp-and-statusfp for linux and OSX
void reset_fpu()
{
#if defined(_MSC_VER)
_clearfp(); // For MSVC in excel, clear the floating point error flags
_clearfp(); // For MSVC, clear the floating point error flags
#elif defined(FE_ALL_EXCEPT)
feclearexcept(FE_ALL_EXCEPT);
#endif
}
double convert_from_kSI_to_SI(long iInput, double value)