Commit f8b3aca2 authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Possible fixes for VS2013.

Possible workaround for issue #16 with VS2013.

Suppress warning in sparse.cpp with VS2013.

Fixed abs -> fabs in ADMFD example.
parent 7b6e4ef8
...@@ -270,9 +270,9 @@ int main(int argc,char ** argv) ...@@ -270,9 +270,9 @@ int main(int argc,char ** argv)
for(int j = 0; j < NF; ++j) if( i != j ) for(int j = 0; j < NF; ++j) if( i != j )
{ {
s += vW(i,j)*faces[j].Area(); s += vW(i,j)*faces[j].Area();
phi += (vW(i,j)+abs(vW(i,j)))*(vW(i,j)+abs(vW(i,j))); phi += (vW(i,j)+fabs(vW(i,j)))*(vW(i,j)+fabs(vW(i,j)));
} }
phi += (s - abs(s))*(s - abs(s)); phi += (s - fabs(s))*(s - fabs(s));
} }
//std::cout << "[" << iter << "] phi: " << get_value(phi) << "\r" << std::endl; //std::cout << "[" << iter << "] phi: " << get_value(phi) << "\r" << std::endl;
Sparse::Row & der = phi.GetRow(); //row of derivatives Sparse::Row & der = phi.GetRow(); //row of derivatives
......
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
#include <istream> #include <istream>
#include <vector> #include <vector>
#include <stdint.h> #include <stdint.h>
#if _MSC_VER == 1800
#if !defined(UINT64_MAX)
#define UINT64_MAX 0xffffffffffffffffU
typedef unsigned long long uint64_t;
#endif // UINT64_MAX
#if !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffff
typedef unsigned int uint32_t;
#endif // UINT32_MAX
#endif
namespace INMOST namespace INMOST
{ {
......
...@@ -557,7 +557,7 @@ namespace INMOST ...@@ -557,7 +557,7 @@ namespace INMOST
mtx.precision(15); mtx.precision(15);
for(iterator it = Begin(); it != End(); ++it) for(iterator it = Begin(); it != End(); ++it)
{ {
if( !text.empty() ) mtx << "% " << Annotation(it-Begin()).c_str() << "\n"; if( !text.empty() ) mtx << "% " << Annotation((INMOST_DATA_ENUM_TYPE)(it-Begin())).c_str() << "\n";
for(Row::iterator jt = it->Begin(); jt != it->End(); ++jt) for(Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{ {
mtx << row << " " << jt->first+1 << " " << jt->second << "\n"; mtx << row << " " << jt->first+1 << " " << jt->second << "\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment