Commit 9806c49d authored by Dave Moxey's avatar Dave Moxey

Fix some compiler warnings and error if memory pools disabled

parent 158e1f18
......@@ -7,14 +7,18 @@ PROJECT(Nektar++ C CXX)
# Nektar++ requires C++11. Try to infer this for older CMake versions (less than
# 3.1.0)
IF ("${CMAKE_VERSION}" VERSION_LESS "3.1" AND NOT MSVC)
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSE()
MESSAGE(STATUS "Nektar++ requires a compiler with C++11 support.")
IF ("${CMAKE_VERSION}" VERSION_LESS "3.1")
IF (NOT MSVC)
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSE()
MESSAGE(FATAL_ERROR "Nektar++ requires a compiler with C++11 support.")
ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
MESSAGE(FATAL_ERROR "Nektar++ requires full C++11 support: please upgrade to Visual Studio 2013 or later")
ENDIF()
ELSE()
SET(CMAKE_CXX_STANDARD 11)
......
......@@ -25,7 +25,7 @@ IF( NEKTAR_USE_MPI )
IF (NOT "${HAVE_MPI_H}" OR NOT "${HAVE_MPI_SEND}")
FIND_PACKAGE(MPI REQUIRED)
INCLUDE_DIRECTORIES( ${MPI_CXX_INCLUDE_PATH} )
INCLUDE_DIRECTORIES(SYSTEM ${MPI_CXX_INCLUDE_PATH} )
MESSAGE(STATUS "Found MPI: ${MPI_CXX_LIBRARIES}")
ELSE()
SET(MPI_BUILTIN ON)
......
......@@ -177,6 +177,7 @@ public:
///
/// The allocated object must be returned to the memory pool
/// via Deallocate.
template<typename... Args>
static DataType* Allocate(const Args &...args)
{
return new DataType(args...);
......
......@@ -120,7 +120,7 @@ namespace Nektar
DNekScalBlkMatSharedPtr loc_mat;
DNekScalMatSharedPtr bnd_mat;
int nel, i, j, k, n, cnt, gId;
int i, j, k, n, cnt, gId;
int meshVertId, meshEdgeId, meshFaceId;
const int nExp = expList->GetExpSize();
......
......@@ -62,7 +62,7 @@ public:
m_type = CADType::eCurve;
}
~CADCurve()
virtual ~CADCurve()
{
}
......
......@@ -66,7 +66,7 @@ public:
m_orientation = CADOrientation::eForwards;
}
~CADSurf()
virtual ~CADSurf()
{
}
......
......@@ -66,7 +66,9 @@ public:
m_type = CADType::eVert;
}
~CADVert(){};
virtual ~CADVert()
{
}
/**
* @brief Get x,y,z location of the vertex
......
......@@ -59,7 +59,7 @@ public:
{
}
~CADCurveOCE()
virtual ~CADCurveOCE()
{
}
......
......@@ -89,9 +89,9 @@ Array<OneD, NekDouble> CADSurfOCE::locuv(Array<OneD, NekDouble> p)
uvr[0] = p2.X();
uvr[1] = p2.Y();
gp_Pnt p3 = m_sas->Value(p2);
WARNINGL2(p3.Distance(loc) < 1e-3, "large locuv distance " +
boost::lexical_cast<string>(p3.Distance(loc)/1000.0) + " " +
WARNINGL2(m_sas->Value(p2).Distance(loc) < 1e-3, "large locuv distance " +
boost::lexical_cast<string>(
m_sas->Value(p2).Distance(loc)/1000.0) + " " +
boost::lexical_cast<string>(m_id));
// if the uv returned is slightly off the surface
......
......@@ -59,7 +59,7 @@ public:
{
}
~CADSurfOCE()
virtual ~CADSurfOCE()
{
}
......
......@@ -59,7 +59,9 @@ public:
* @brief Default constructor.
*/
CADSystemOCE(std::string name) : CADSystem(name) {}
~CADSystemOCE(){};
virtual ~CADSystemOCE()
{
}
bool LoadCAD();
......
......@@ -62,7 +62,7 @@ public:
{
}
~CADVertOCE()
virtual ~CADVertOCE()
{
}
......
......@@ -196,7 +196,7 @@ void FilterFieldConvert::v_Initialise(
fld->Import(m_restartFile, fieldDef, fieldData, fieldMetaData);
// Extract fields to output
int nfield,k;
int nfield = -1, k;
for (int j = 0; j < m_variables.size(); ++j)
{
// see if m_variables is part of pFields definition and if
......@@ -210,7 +210,7 @@ void FilterFieldConvert::v_Initialise(
break;
}
}
if(k == pFields.num_elements())
if(nfield == -1)
{
nfield = 0;
}
......
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