Commit 2e643ff8 authored by Chris Cantwell's avatar Chris Cantwell

Further warning fixes.

parent bcb60f33
......@@ -24,7 +24,7 @@ EXTERNALPROJECT_ADD(
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_C_FLAGS:STRING=-fPIC
-DCMAKE_C_FLAGS:STRING=-fPIC\ -w
-DGKLIB_PATH:PATH=${TPSRC}/modmetis-5.1.0/GKlib
${TPSRC}/modmetis-5.1.0
)
......
......@@ -110,7 +110,6 @@ namespace Nektar
{
Array<OneD, NekDouble> tmpworkd;
bool random;
int nq = m_equ[0]->UpdateFields()[0]->GetNcoeffs(); // Number of points in the mesh
int n = m_nfields*nq; // Number of points in eigenvalue calculation
......
......@@ -268,8 +268,7 @@ void NonlinearPeregrine::DoOdeRhs(
const Array<OneD, const Array<OneD, NekDouble> >&inarray,
Array<OneD, Array<OneD, NekDouble> >&outarray, const NekDouble time)
{
int i, j;
int ndim = m_spacedim;
int i;
int nvariables = inarray.num_elements();
int ncoeffs = GetNcoeffs();
int nq = GetTotPoints();
......
......@@ -260,7 +260,6 @@ namespace Nektar
int ndim = m_spacedim;
int nvariables = inarray.num_elements();
int nq = GetTotPoints();
int ncoeffs = GetNcoeffs();
switch(m_projectionType)
......
......@@ -166,15 +166,14 @@ int main(int argc, char *argv[])
Array<OneD,MultiRegions::ExpListSharedPtr> &Exp,int nvariables)
{
// Setting parameteres for homogenous problems
NekDouble LhomX; ///< physical length in X direction (if homogeneous)
//NekDouble LhomX; ///< physical length in X direction (if homogeneous)
NekDouble LhomY; ///< physical length in Y direction (if homogeneous)
NekDouble LhomZ; ///< physical length in Z direction (if homogeneous)
bool DeclareCoeffPhysArrays = true;
int npointsX; ///< number of points in X direction (if homogeneous)
//int npointsX; ///< number of points in X direction (if homogeneous)
int npointsY; ///< number of points in Y direction (if homogeneous)
int npointsZ; ///< number of points in Z direction (if homogeneous)
int HomoDirec = 0;
bool useFFT = false;
bool deal = false;
///Parameter for homogeneous expansions
......@@ -199,7 +198,6 @@ int main(int argc, char *argv[])
HomogeneousType = eHomogeneous1D;
npointsZ = session->GetParameter("HomModesZ");
LhomZ = session->GetParameter("LZ");
HomoDirec = 1;
}
if((HomoStr == "HOMOGENEOUS2D")||(HomoStr == "Homogeneous2D")||
......@@ -210,20 +208,18 @@ int main(int argc, char *argv[])
LhomY = session->GetParameter("LY");
npointsZ = session->GetParameter("HomModesZ");
LhomZ = session->GetParameter("LZ");
HomoDirec = 2;
}
if((HomoStr == "HOMOGENEOUS3D")||(HomoStr == "Homogeneous3D")||
(HomoStr == "3D")||(HomoStr == "Homo3D"))
{
HomogeneousType = eHomogeneous3D;
npointsX = session->GetParameter("HomModesX");
LhomX = session->GetParameter("LX");
//npointsX = session->GetParameter("HomModesX");
//LhomX = session->GetParameter("LX");
npointsY = session->GetParameter("HomModesY");
LhomY = session->GetParameter("LY");
npointsZ = session->GetParameter("HomModesZ");
LhomZ = session->GetParameter("LZ");
HomoDirec = 3;
}
if(session->DefinesSolverInfo("USEFFT"))
......
......@@ -84,7 +84,7 @@ namespace Nektar
cout << "Processing input fld file" << endl;
}
int i;
int i,j;
string fldending;
//Determine appropriate field input
if(m_f->m_inputfiles.count("fld") != 0)
......@@ -180,7 +180,7 @@ namespace Nektar
vector<string> vars = m_f->m_session->GetVariables();
// declare other fields;
for (int i = 1; i < nfields; ++i)
for (i = 1; i < nfields; ++i)
{
if(i < vars.size())
{
......@@ -200,9 +200,9 @@ namespace Nektar
}
}
for (int j = 0; j < nfields; ++j)
for (j = 0; j < nfields; ++j)
{
for (int i = 0; i < m_f->m_data.size(); ++i)
for (i = 0; i < m_f->m_data.size(); ++i)
{
m_f->m_exp[j]->ExtractDataToCoeffs(m_f->m_fielddef[i],
m_f->m_data[i],
......@@ -221,7 +221,7 @@ namespace Nektar
= m_f->m_exp[0]->GetFieldDefinitions();
std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
for (int j = 0; j < nfields; ++j)
for (j = 0; j < nfields; ++j)
{
for (i = 0; i < FieldDef.size(); ++i)
{
......
......@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
Array<OneD, Array<OneD, MultiRegions::ExpListSharedPtr> > BndExp(nfields+addfields);
// Copy data from field file
for(int i = 0; i < fielddata.size(); ++i)
for(i = 0; i < fielddata.size(); ++i)
{
Exp[0]->ExtractDataToCoeffs(fielddef[i],
fielddata[i],
......
......@@ -14,7 +14,7 @@ using namespace Nektar;
int main(int argc, char *argv[])
{
int i,j;
int i,j,k;
int surfID, nfiles, nStart;
if(argc != 5)
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
filename3 << basename;
filename3 >> nStart;
for (int i = 0; i< nfiles; ++i)
for (i = 0; i< nfiles; ++i)
{
basename = argv[3];
string extension = ".fld";
......@@ -110,13 +110,13 @@ int main(int argc, char *argv[])
ASSERTL0(false,"Not implemented in 2D");
int i=0;
i=0;
MultiRegions::ContField2DSharedPtr cont2D;
cont2D = MemoryManager<MultiRegions::ContField2D>
::AllocateSharedPtr(vSession,graphShPt,vSession->GetVariable(i));
vel[0] = cont2D;
for(int i = 1; i < nfields; ++i)
for(i = 1; i < nfields; ++i)
{
vel[i] = MemoryManager<MultiRegions::ContField2D>
::AllocateSharedPtr(*cont2D);
......@@ -133,14 +133,14 @@ int main(int argc, char *argv[])
m_locToGlobalMap = firstfield->GetLocalToGlobalMap();
vel[0] = firstfield;
for(int i = 1; i < nfields; ++i)
for(i = 1; i < nfields; ++i)
{
vel[i] = MemoryManager<MultiRegions::ContField3D>
::AllocateSharedPtr(*firstfield, graphShPt,
vSession->GetVariable(i));
}
for(int i = 0; i < addfields; ++i)
for(i = 0; i < addfields; ++i)
{
shear[i] = MemoryManager<MultiRegions::ContField3D>
::AllocateSharedPtr(*firstfield, graphShPt,
......@@ -179,9 +179,9 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Copy data from field file
for(int j = 0; j < nfields; ++j)
for(j = 0; j < nfields; ++j)
{
for(int i = 0; i < fielddata.size(); ++i)
for(i = 0; i < fielddata.size(); ++i)
{
vel[j]->ExtractDataToCoeffs(fielddef[i],
fielddata[i],
......@@ -192,9 +192,9 @@ int main(int argc, char *argv[])
vel[j]->BwdTrans(vel[j]->GetCoeffs(),vel[j]->UpdatePhys());
}
for(int j = 0; j < addfields; ++j)
for(j = 0; j < addfields; ++j)
{
for(int i = 0; i < fielddata.size(); ++i)
for(i = 0; i < fielddata.size(); ++i)
{
shear[j]->ExtractDataToCoeffs(fielddef[i],
fielddata[i],
......@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
nt = shear[0]->GetNpoints();
Array<OneD, const NekDouble> U(nt),V(nt),W(nt);
for(int j = 0; j < addfields; ++j)
for(j = 0; j < addfields; ++j)
{
values[j] = Array<OneD, NekDouble>(nt);
}
......@@ -223,7 +223,7 @@ int main(int argc, char *argv[])
shear[0]->GetBoundaryToElmtMap(BoundarytoElmtID,BoundarytoTraceID);
//get boundary expansions for each field
for(int j = 0; j < addfields; ++j)
for(j = 0; j < addfields; ++j)
{
BndExp[j] = shear[j]->GetBndCondExpansions();
}
......@@ -234,7 +234,7 @@ int main(int argc, char *argv[])
// identify boundary which the user wanted
if(n == surfID)
{
for(int i = 0; i < BndExp[0][n]->GetExpSize(); ++i, cnt++)
for(i = 0; i < BndExp[0][n]->GetExpSize(); ++i, cnt++)
{
// find element and face of this expansion.
elmtid = BoundarytoElmtID[cnt];
......@@ -244,12 +244,12 @@ int main(int argc, char *argv[])
// Initialise local arrays for the velocity gradients, and stress components
// size of total number of quadrature points for each element (hence local).
for(int j = 0; j < nfields*nfields; ++j)
for(j = 0; j < nfields*nfields; ++j)
{
grad[j] = Array<OneD, NekDouble>(nq);
}
for(int j = 0; j < nstress; ++j)
for(j = 0; j < nstress; ++j)
{
stress[j] = Array<OneD, NekDouble>(nq);
}
......@@ -275,7 +275,7 @@ int main(int argc, char *argv[])
= elmt->GetFaceNormal(boundary);
// initialise arrays
for(int j = 0; j < nstress; ++j)
for(j = 0; j < nstress; ++j)
{
fstress[j] = Array<OneD, NekDouble>(nfq);
}
......@@ -315,7 +315,7 @@ int main(int argc, char *argv[])
}
//calcuate wss, and update velocity coefficients in the elemental boundary expansion
for (int j = 0; j< addfields; j++)
for (j = 0; j< addfields; j++)
{
values[j] = BndExp[j][n]->UpdateCoeffs() + BndExp[j][n]->GetCoeff_Offset(i);
}
......@@ -415,7 +415,7 @@ int main(int argc, char *argv[])
}
for(int j = 0; j < addfields; ++j)
for(j = 0; j < addfields; ++j)
{
int ncoeffs = shear[j]->GetNcoeffs();
Array<OneD, NekDouble> output(ncoeffs);
......@@ -430,12 +430,12 @@ int main(int argc, char *argv[])
const Array<OneD,const int>& map = m_locToGlobalMap->GetBndCondCoeffsToGlobalCoeffsMap();
NekDouble sign;
for(int i = 0; i < BndExp[j].num_elements(); ++i)
for(i = 0; i < BndExp[j].num_elements(); ++i)
{
if(i==surfID)
{
const Array<OneD,const NekDouble>& coeffs = BndExp[j][i]->GetCoeffs();
for(int k = 0; k < (BndExp[j][i])->GetNcoeffs(); ++k)
for(k = 0; k < (BndExp[j][i])->GetNcoeffs(); ++k)
{
sign = m_locToGlobalMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
outarray[map[bndcnt++]] = sign * coeffs[k];
......
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <LibUtilities/Communication/Comm.h>
#include <SpatialDomains/MeshGraph2D.h>
#include <MultiRegions/ExpList2D.h>
#include <LocalRegions/Expansion2D.h>
#include <vtkPolyDataReader.h>
#include <vtkPolyData.h>
#include <vtkPointData.h>
......@@ -14,9 +8,15 @@
#include <boost/unordered_set.hpp>
#include <boost/program_options.hpp>
namespace po = boost::program_options;
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <LibUtilities/Communication/Comm.h>
#include <SpatialDomains/MeshGraph2D.h>
#include <MultiRegions/ExpList2D.h>
#include <LocalRegions/Expansion2D.h>
/**
* @brief Represents a vertex in the mesh.
*
......
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