Commit 2ec16c79 authored by Pavel Burovskiy's avatar Pavel Burovskiy
Browse files

Few bug fixes allowing to compile with icc 12.0.0 (2011) and boost 1.49.0 on cx1

git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@3793 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 071d5b04
......@@ -43,7 +43,7 @@ long double derivativeFourierFunc(long double x, int N)
return M_PI*M_PI*(a*cos(a*z) - b*sin(b*z));
}
long double function(long double x, int N, PointsType type)
long double func(long double x, int N, PointsType type)
{
long double y = 0;
if( type == eFourierEvenlySpaced)
......@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
Array<OneD, NekDouble> y(nPts);
for(int i = 0; i < nPts; ++i)
{
y[i] = function( z[i], nPts, pointsType );
y[i] = func( z[i], nPts, pointsType );
}
......@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
cout << "\nexact = ";
for(int i = 0; i < nNodes; ++i)
{
cout << setw(6) << function(zNode[i], nPts, pointsType) << " ";
cout << setw(6) << func(zNode[i], nPts, pointsType) << " ";
}
// Display the pointwise error
......@@ -255,7 +255,7 @@ int main(int argc, char *argv[])
for(int i = 0; i < int(I.GetRows()); ++i)
{
//long double exact = function(zNode[i], nNodes, pointsType);
long double exact = function(zNode[i], nPts, pointsType);
long double exact = func(zNode[i], nPts, pointsType);
long double error = exact - u[i];
Linf = max(Linf, fabs(error));
RMS += error*error;
......
......@@ -68,7 +68,11 @@ namespace boost_spirit = boost::spirit;
#include <string>
#include <vector>
#include <map>
#if defined(__INTEL_COMPILER)
#include <mathimf.h>
#else
#include <cmath>
#endif
#include <errno.h>
#include <stdlib.h>
......
......@@ -47,7 +47,11 @@
#include <tinyxml/tinyxml.h>
#include <cstring>
#include <sstream>
#if defined(__INTEL_COMPILER)
#include <mathimf.h>
#else
#include <cmath>
#endif
#include <SpatialDomains/MeshGraph1D.h>
#include <SpatialDomains/MeshGraph2D.h>
......
......@@ -39,7 +39,11 @@
#include <cstdio>
#include <cstdlib>
#include <cmath>
#ifdef defined(__INTEL_COMPILER)
#include <mathimf.h>
#else
#include <cmath>
#endif
namespace Nektar
{
......@@ -2296,7 +2300,7 @@ namespace Nektar
#ifdef _MSC_VER
temp.real( ( a_n + d_n )*( a_n + d_n ) - 4.0*( a_n*d_n - m_b*m_c ));
#else
temp.real() = (a_n + d_n )*( a_n + d_n ) - 4.0*( a_n*d_n - m_b*m_c );
temp = std::complex<double>( (a_n + d_n )*( a_n + d_n ) - 4.0*( a_n*d_n - m_b*m_c ), temp.imag() ) ;
#endif
delta_n = 0.5*sqrt( temp );
......
......@@ -24,6 +24,10 @@
#include <boost/math/special_functions/fpclassify.hpp>
#ifdef __INTEL_COMPILER
#include <mathimf.h>
#endif
using namespace Nektar;
int main(int argc, char *argv[])
......@@ -498,7 +502,12 @@ cout<<variables[0]<<endl;
offset = field0->GetPhys_Offset(elmtid);
field1->UpdatePhys()[r] = field0->GetExp(elmtid)->
PhysEvaluate(coords, field0->GetPhys() +offset);
#ifdef __INTEL_COMPILER
if( isnan(field1->UpdatePhys()[r]) )
#else
if( boost::math::isnan(field1->UpdatePhys()[r]) )
#endif
{
cout<<"x="<<x1[r]<<" y="<<y1[r]<<" offset="<<offset<<" elmtid="<<elmtid<<endl;
cout<<"new val="<<field1->UpdatePhys()[r]<<endl;
......
Supports Markdown
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