Commit ab368b7b authored by Chris Cantwell's avatar Chris Cantwell

Fix library gcc warnings from gcc 5.4.0 ubuntu 16.

parent 95f7bcd0
......@@ -37,6 +37,8 @@
#include <iostream>
#include <boost/core/ignore_unused.hpp>
#include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#ifdef NEKTAR_USE_MPI
......@@ -183,6 +185,7 @@ static inline gs_data *Init(const Nektar::Array<OneD, long> pId,
MPI_Comm_free(&vComm.c);
return result;
#else
boost::ignore_unused(pId, pComm, verbose);
return 0;
#endif
}
......@@ -212,6 +215,8 @@ static inline void Unique(const Nektar::Array<OneD, long> pId,
vComm.id = vCommMpi->GetRank();
vComm.np = vCommMpi->GetSize();
nektar_gs_unique(pId.get(), pId.num_elements(), &vComm);
#else
boost::ignore_unused(pId, pComm);
#endif
}
......@@ -227,6 +232,8 @@ static inline void Finalise(gs_data *pGsh)
{
nektar_gs_free(pGsh);
}
#else
boost::ignore_unused(pGsh);
#endif
}
......@@ -255,6 +262,8 @@ static inline void Gather(
buf.n = pBuffer.num_elements();
nektar_gs(pU.get(), gs_double, pOp, false, pGsh, &buf);
}
#else
boost::ignore_unused(pU, pOp, pGsh, pBuffer);
#endif
}
}
......
......@@ -43,6 +43,11 @@ namespace Nektar
{
namespace LibUtilities
{
bool BLPoints::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPoints), BLPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPointsRev), BLPoints::Create)
};
void BLPoints::CalculatePoints()
{
// Allocate the storage for points.
......
......@@ -117,6 +117,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
/// Default constructor should not be called except by Create
/// method.
BLPoints();
......
......@@ -44,6 +44,9 @@ namespace Nektar
{
namespace LibUtilities
{
bool Basis::initBasisManager[] = {
BasisManager().RegisterGlobalCreator(Basis::Create)
};
bool operator<(const BasisKey &lhs, const BasisKey &rhs)
{
......
......@@ -335,6 +335,8 @@ namespace Nektar
m_InterpManager;
private:
static bool initBasisManager[];
/// Private constructor with BasisKey.
Basis(const BasisKey &bkey);
......
......@@ -44,6 +44,9 @@ namespace Nektar
{
namespace LibUtilities
{
bool FourierPoints::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eFourierEvenlySpaced), FourierPoints::Create)
};
void FourierPoints::CalculatePoints()
{
......
......@@ -93,6 +93,7 @@ namespace Nektar
}
private:
static bool initPointsManager[];
/// Default constructor should not be called except by Create method.
FourierPoints();
......
......@@ -43,6 +43,9 @@ namespace Nektar
{
namespace LibUtilities
{
bool FourierSingleModePoints::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eFourierSingleModeSpaced), FourierSingleModePoints::Create)
};
void FourierSingleModePoints::CalculatePoints()
{
......
......@@ -94,6 +94,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
/// Default constructor should not be called except by Create method.
FourierSingleModePoints();
......
......@@ -46,7 +46,26 @@
namespace Nektar
{
namespace LibUtilities
{
{
bool GaussPoints::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eGaussGaussLegendre), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMLegendre), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPLegendre), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoLegendre), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussGaussChebyshev), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMChebyshev), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPChebyshev), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoChebyshev), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta1), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta2), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha1Beta0), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha2Beta0), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussKronrodLegendre), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMLegendre), GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMAlpha1Beta0),GaussPoints::Create),
PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoKronrodLegendre), GaussPoints::Create)
};
void GaussPoints::CalculatePoints()
{
// Allocate the storage for points and weights
......
......@@ -152,6 +152,8 @@ namespace Nektar
private:
static bool initPointsManager[];
/// These should not be called. All creation is done
/// using the constructor requiring the key, declared
/// above.
......
......@@ -32,79 +32,12 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <LibUtilities/Foundations/GaussPoints.h>
#include <LibUtilities/Foundations/FourierPoints.h>
#include <LibUtilities/Foundations/FourierSingleModePoints.h>
#include <LibUtilities/Foundations/BLPoints.h>
#include <LibUtilities/Foundations/PolyEPoints.h>
#include <LibUtilities/Foundations/NodalTriElec.h>
#include <LibUtilities/Foundations/NodalTetElec.h>
#include <LibUtilities/Foundations/NodalTriFekete.h>
#include <LibUtilities/Foundations/NodalTriSPI.h>
#include <LibUtilities/Foundations/NodalTriEvenlySpaced.h>
#include <LibUtilities/Foundations/NodalTetEvenlySpaced.h>
#include <LibUtilities/Foundations/NodalTetSPI.h>
#include <LibUtilities/Foundations/NodalPrismSPI.h>
#include <LibUtilities/Foundations/NodalPrismEvenlySpaced.h>
#include <LibUtilities/Foundations/NodalPrismElec.h>
#include <LibUtilities/Foundations/NodalQuadElec.h>
#include <LibUtilities/Foundations/NodalHexElec.h>
#include <LibUtilities/Foundations/Basis.h>
#include <LibUtilities/Foundations/Foundations.hpp>
#include <LibUtilities/Foundations/ManagerAccess.h>
namespace Nektar
{
namespace LibUtilities
{
// Register all points and basis creators.
namespace
{
const bool gaussInited1 = PointsManager().RegisterCreator(PointsKey(0, eGaussGaussLegendre), GaussPoints::Create);
const bool gaussInited2 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMLegendre), GaussPoints::Create);
const bool gaussInited3 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPLegendre), GaussPoints::Create);
const bool gaussInited4 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoLegendre), GaussPoints::Create);
const bool gaussInited5 = PointsManager().RegisterCreator(PointsKey(0, eGaussGaussChebyshev), GaussPoints::Create);
const bool gaussInited6 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMChebyshev), GaussPoints::Create);
const bool gaussInited7 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPChebyshev), GaussPoints::Create);
const bool gaussInited8 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoChebyshev), GaussPoints::Create);
const bool gaussInited9 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta1), GaussPoints::Create);
const bool gaussInited10 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta2), GaussPoints::Create);
const bool gaussInited11 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha1Beta0), GaussPoints::Create);
const bool gaussInited12 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha2Beta0), GaussPoints::Create);
const bool gaussInited13 = PointsManager().RegisterCreator(PointsKey(0, eGaussKronrodLegendre), GaussPoints::Create);
const bool gaussInited14 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMLegendre), GaussPoints::Create);
const bool gaussInited15 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMAlpha1Beta0),GaussPoints::Create);
const bool gaussInited16 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoKronrodLegendre), GaussPoints::Create);
const bool fourierInited1 = PointsManager().RegisterCreator(PointsKey(0, eFourierEvenlySpaced), FourierPoints::Create);
const bool fourierInited2 = PointsManager().RegisterCreator(PointsKey(0, eFourierSingleModeSpaced), FourierSingleModePoints::Create);
const bool BLInited1 = PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPoints), BLPoints::Create);
const bool BLInited2 = PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPointsRev), BLPoints::Create);
const bool polyeInited1 = PointsManager().RegisterCreator(PointsKey(0, ePolyEvenlySpaced), PolyEPoints::Create);
const bool NodalTriInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriElec), NodalTriElec::Create);
const bool NodalTriInited2 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriFekete), NodalTriFekete::Create);
const bool NodalTriInited3 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriSPI), NodalTriSPI::Create);
const bool NodalTriInited4 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriEvenlySpaced), NodalTriEvenlySpaced::Create);
const bool NodalQuadInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalQuadElec), NodalQuadElec::Create);
const bool NodalTetInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalTetElec), NodalTetElec::Create);
const bool NodalTetInited2 = PointsManager().RegisterCreator(PointsKey(0, eNodalTetSPI), NodalTetSPI::Create);
const bool NodalTetInited3 = PointsManager().RegisterCreator(PointsKey(0, eNodalTetEvenlySpaced), NodalTetEvenlySpaced::Create);
const bool NodalPrismInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismEvenlySpaced), NodalPrismEvenlySpaced::Create);
const bool NodalPrismInited2 = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismElec), NodalPrismElec::Create);
const bool NodalPrismInited3 = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismSPI), NodalPrismSPI::Create);
const bool NodalHexInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalHexElec), NodalHexElec::Create);
const bool Basis_Inited = BasisManager().RegisterGlobalCreator(Basis::Create);
}
PointsManagerT &PointsManager(void)
{
static PointsManagerT instance;
......
......@@ -43,6 +43,10 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalHexElec::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalHexElec), NodalHexElec::Create)
};
void NodalHexElec::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -63,6 +63,8 @@ public:
}
private:
static bool initPointsManager[];
NodalHexElec() : PointsBaseType(NullPointsKey)
{
}
......
......@@ -44,6 +44,11 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalPrismElec::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalPrismElec), NodalPrismElec::Create)
};
namespace
{
bool isVertex(int t, int y, int npts)
......
......@@ -88,6 +88,8 @@ public:
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilPrism> m_util;
/// Default constructor should not be called except by Create matrix
......
......@@ -44,6 +44,10 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalPrismEvenlySpaced::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalPrismEvenlySpaced), NodalPrismEvenlySpaced::Create)
};
namespace
{
bool isVertex(int x, int y, int z, int npts)
......
......@@ -92,6 +92,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilPrism> m_util;
/// Default constructor should not be called except by Create matrix
......
......@@ -43,6 +43,10 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalPrismSPI::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalPrismSPI), NodalPrismSPI::Create)
};
void NodalPrismSPI::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -62,6 +62,8 @@ public:
}
private:
static bool initPointsManager[];
NodalPrismSPI() : PointsBaseType(NullPointsKey)
{
}
......
......@@ -43,6 +43,11 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalQuadElec::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalQuadElec), NodalQuadElec::Create)
};
void NodalQuadElec::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -62,6 +62,8 @@ public:
}
private:
static bool initPointsManager[];
NodalQuadElec() : PointsBaseType(NullPointsKey)
{
}
......
......@@ -43,6 +43,9 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTetElec::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTetElec), NodalTetElec::Create)
};
// ////////////////////////////////////////////////////////
// Coordinate the nodal tetrahedron electrostatic points
......
......@@ -90,6 +90,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilTetrahedron> m_util;
NodalTetElec():PointsBaseType(NullPointsKey)
......
......@@ -47,6 +47,10 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTetEvenlySpaced::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTetEvenlySpaced), NodalTetEvenlySpaced::Create)
};
namespace
{
// construct the geometory and set the coordinate of tetrahedron
......
......@@ -93,6 +93,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilTetrahedron> m_util;
/// Default constructor should not be called except by Create matrix
......
......@@ -44,6 +44,11 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTetSPI::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTetSPI), NodalTetSPI::Create)
};
void NodalTetSPI::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -62,6 +62,8 @@ public:
}
private:
static bool initPointsManager[];
NodalTetSPI() : PointsBaseType(NullPointsKey)
{
}
......
......@@ -44,6 +44,9 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTriElec::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTriElec), NodalTriElec::Create)
};
void NodalTriElec::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -89,6 +89,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilTriangle> m_util;
NodalTriElec():PointsBaseType(NullPointsKey)
......
......@@ -48,6 +48,10 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTriEvenlySpaced::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTriEvenlySpaced), NodalTriEvenlySpaced::Create)
};
namespace
{
// construct the geometory and set the coordinate of triangle
......
......@@ -90,6 +90,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilTriangle> m_util;
/// Deafult constructor should not be called except by Create matrix
......
......@@ -47,7 +47,9 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTriFekete::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTriFekete), NodalTriFekete::Create)
};
// ////////////////////////////////////////////////////////
// Coordinate the nodal trianlge Fekete points
......
......@@ -91,6 +91,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
std::shared_ptr<NodalUtilTriangle> m_util;
NodalTriFekete():PointsBaseType(NullPointsKey)
......
......@@ -44,6 +44,11 @@ namespace Nektar
{
namespace LibUtilities
{
bool NodalTriSPI::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, eNodalTriSPI), NodalTriSPI::Create)
};
void NodalTriSPI::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -63,6 +63,8 @@ public:
}
private:
static bool initPointsManager[];
NodalTriSPI() : PointsBaseType(NullPointsKey)
{
}
......
......@@ -42,6 +42,10 @@ namespace Nektar
{
namespace LibUtilities
{
bool PolyEPoints::initPointsManager[] = {
PointsManager().RegisterCreator(PointsKey(0, ePolyEvenlySpaced), PolyEPoints::Create)
};
void PolyEPoints::CalculatePoints()
{
// Allocate the storage for points
......
......@@ -70,6 +70,8 @@ namespace Nektar
}
private:
static bool initPointsManager[];
/// Default constructor should not be called except by Create method.
PolyEPoints():PointsBaseType(NullPointsKey)
{
......
......@@ -265,7 +265,12 @@ int main(int argc, char *argv[])
if (std::string("@NEKTAR_TEST_USE_HOSTFILE@") == "ON")
{
command += " -hostfile hostfile ";
system("echo 'localhost slots=12' > hostfile");
if (system("echo 'localhost slots=12' > hostfile"))
{
cerr << "Unable to write 'hostfile' in path '"
<< fs::current_path() << endl;
status = 1;
}
}
}
......
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