Commit 046aa777 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Fixed more compiler warnings.

parent f8ee4da5
......@@ -1147,8 +1147,8 @@ namespace Nektar
const DNekScalMatSharedPtr &r_bnd,
const StdRegions::MatrixType matrixType)
{
int nVerts, nEdges, nFaces;
int eid, fid, vid, cnt, n, i;
int nVerts, nEdges;
int eid, fid, vid, n, i;
int nBndCoeffs = NumBndryCoeffs();
......@@ -1157,7 +1157,6 @@ namespace Nektar
// Get geometric information about this element
nVerts = GetNverts();
nEdges = GetNedges();
nFaces = GetNfaces();
/*************************************/
/* Vetex-edge & vertex-face matrices */
......@@ -1423,7 +1422,7 @@ namespace Nektar
// Build the edge/face transform matrix: This matrix is constructed
// from the submatrices corresponding to the couping between a
// specific edge and the two attached faces.
for (cnt = eid = 0; eid < nEdges; ++eid)
for (eid = 0; eid < nEdges; ++eid)
{
// Row and column size of the vertex-edge/face matrix
efCol = GetFaceIntNcoeffs(geom->GetEdgeFaceMap(eid, 0)) +
......
......@@ -2293,10 +2293,10 @@ namespace Nektar
ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry,nint};
int nblks = 2;
unsigned int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks,nblks,exp_size,exp_size); //Really need a constructor which takes Arrays
NekDouble factor = 1.0;
......
......@@ -887,10 +887,10 @@ namespace Nektar
ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry,nint};
int nblks = 2;
unsigned int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks,nblks,exp_size,exp_size); //Really need a constructor which takes Arrays
NekDouble factor = 1.0;
......
......@@ -1786,13 +1786,12 @@ namespace Nektar
ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
NekDouble factor = 1.0;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry, nint};
int nblks=2;
unsigned int nblks=2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks, nblks, exp_size, exp_size);
NekDouble factor = 1.0;
switch(mkey.GetMatrixType())
{
......
......@@ -680,10 +680,10 @@ namespace Nektar
ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry, nint};
int nblks = 2;
unsigned int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks, nblks, exp_size, exp_size); //Really need a constructor which takes Arrays
NekDouble factor = 1.0;
......
......@@ -2244,10 +2244,10 @@ namespace Nektar
"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry,nint};
int nblks = 2;
unsigned int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::
AllocateSharedPtr(nblks,nblks,exp_size,exp_size);
//Really need a constructor which takes Arrays
......
......@@ -1759,11 +1759,10 @@ namespace Nektar
ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry, nint};
int nblks = 2;
unsigned int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks, nblks, exp_size, exp_size);
NekDouble factor = 1.0;
......
......@@ -1569,10 +1569,10 @@ namespace Nektar
ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
// set up block matrix system
int nbdry = NumBndryCoeffs();
int nint = m_ncoeffs - nbdry;
unsigned int nbdry = NumBndryCoeffs();
unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
unsigned int exp_size[] = {nbdry,nint};
int nblks = 2;
unsigned int nblks = 2;
returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks,nblks,exp_size,exp_size); //Really need a constructor which takes Arrays
NekDouble factor = 1.0;
......
......@@ -396,8 +396,8 @@ namespace Nektar
int scLevel = m_locToGloMap->GetStaticCondLevel();
DNekScalBlkMatSharedPtr sc = scLevel == 0 ? m_S1Blk : m_schurCompl;
DNekScalMatSharedPtr localMat = sc->GetBlock(n,n);
int nbdry = localMat->GetRows();
int nblks = 1;
unsigned int nbdry = localMat->GetRows();
unsigned int nblks = 1;
unsigned int esize[1] = {nbdry};
schurComplBlock = MemoryManager<DNekScalBlkMat>
......@@ -687,41 +687,6 @@ namespace Nektar
m_sparseSchurCompl = MemoryManager<DNekSmvBsrDiagBlkMat>::
AllocateSharedPtr(sparseStorage);
size_t matBytes, bsruBlockBytes;
matBytes = m_sparseSchurCompl->GetMemoryFootprint();
bsruBlockBytes = m_sparseSchurCompl->GetMemoryFootprint(0);
#if 0 // Is this just a debugging leftover?
if (verbose)
{
cout << "Local matrix memory, bytes = " << matBytes;
if (matBytes/(1024*1024) > 0)
{
std::cout << " ("<< matBytes/(1024*1024) << " MB)"
<< std::endl;
}
else
{
std::cout << " ("<< matBytes/1024 << " KB)"
<< std::endl;
}
std::cout << "First BSRU submatrix memory, bytes = "
<< bsruBlockBytes;
if (bsruBlockBytes/(1024*1024) > 0)
{
std::cout << " ("<< bsruBlockBytes/(1024*1024)
<< " MB)" << std::endl;
}
else
{
std::cout << " ("<< bsruBlockBytes/1024
<< " KB)" << std::endl;
}
}
#endif
break;
}
default:
......
......@@ -127,7 +127,7 @@ namespace Nektar
int vMap1, vMap2, sign1, sign2;
int m, v, eMap1, eMap2;
int offset, globalrow, globalcol, nCoeffs;
int offset, globalrow, globalcol;
//matrix storage
MatrixStorage storage = eFULL;
......@@ -246,7 +246,6 @@ namespace Nektar
int edgematrixoffset=0;
int vGlobal;
int nbndCoeffs=0;
for(n=0; n < n_exp; ++n)
{
......@@ -277,7 +276,6 @@ namespace Nektar
edgematrixoffset+=nedgemodes*nedgemodes;
}
}
nbndCoeffs=+locExpansion->NumBndryCoeffs();
}
edgematrixoffset=0;
......@@ -299,7 +297,6 @@ namespace Nektar
nel = expList->GetOffset_Elmt_Id(n);
locExpansion = expList->GetExp(nel);
nCoeffs=locExpansion->NumBndryCoeffs();
nVerts=locExpansion->GetGeom()->GetNumVerts();
nEdges=locExpansion->GetGeom()->GetNumEdges();
......@@ -482,7 +479,7 @@ namespace Nektar
int vMap1, vMap2, sign1, sign2;
int m, v, eMap1, eMap2, fMap1, fMap2;
int offset, globalrow, globalcol, nCoeffs;
int offset, globalrow, globalcol;
//matrix storage
MatrixStorage storage = eFULL;
......@@ -668,7 +665,6 @@ namespace Nektar
int edgematrixoffset=0;
int facematrixoffset=0;
int vGlobal;
int nbndCoeffs=0;
for(n=0; n < n_exp; ++n)
{
......@@ -724,7 +720,6 @@ namespace Nektar
facematrixoffset+=nfacemodes*nfacemodes;
}
}
nbndCoeffs=+locExpansion->NumBndryCoeffs();
}
edgematrixoffset=0;
......@@ -747,7 +742,6 @@ namespace Nektar
nel = expList->GetOffset_Elmt_Id(n);
locExpansion = expList->GetExp(nel);
nCoeffs=locExpansion->NumBndryCoeffs();
nVerts=locExpansion->GetGeom()->GetNumVerts();
nEdges=locExpansion->GetGeom()->GetNumEdges();
......
......@@ -328,7 +328,6 @@ namespace Nektar
int edgematrixoffset=0;
int facematrixoffset=0;
int vGlobal;
int nbndCoeffs=0;
for(n=0; n < n_exp; ++n)
{
......@@ -384,7 +383,6 @@ namespace Nektar
facematrixoffset+=nfacemodes*nfacemodes;
}
}
nbndCoeffs=+locExpansion->NumBndryCoeffs();
}
edgematrixoffset=0;
......@@ -1014,9 +1012,9 @@ namespace Nektar
StdRegions::StdExpansionSharedPtr locExpansion;
locExpansion = expList->GetExp(offset);
int nbnd=locExpansion->NumBndryCoeffs();
int ncoeffs=locExpansion->GetNcoeffs();
int nint=ncoeffs-nbnd;
unsigned int nbnd=locExpansion->NumBndryCoeffs();
unsigned int ncoeffs=locExpansion->GetNcoeffs();
unsigned int nint=ncoeffs-nbnd;
//This is the SC elemental matrix in the orginal basis (S1)
//DNekScalBlkMatSharedPtr loc_mat = (m_linsys.lock())->GetStaticCondBlock(expList->GetOffset_Elmt_Id(offset));
......@@ -1060,7 +1058,7 @@ namespace Nektar
DNekScalBlkMatSharedPtr returnval;
DNekScalMatSharedPtr tmp_mat;
unsigned int exp_size[] = {nbnd, nint};
int nblks = 1;
unsigned int nblks = 1;
returnval = MemoryManager<DNekScalBlkMat>::
AllocateSharedPtr(nblks, nblks, exp_size, exp_size);
......
......@@ -532,7 +532,7 @@ namespace Nektar
int cnt = 0;
int nBndEdges, nBndEdgePts;
int i, e;
int id1, id2;
int id2;
int nTracePts = fields[0]->GetTrace()->GetTotPoints();
int nBndRegions = fields[var]->GetBndCondExpansions().num_elements();
......@@ -556,9 +556,6 @@ namespace Nektar
nBndEdgePts = fields[var]->
GetBndCondExpansions()[i]->GetExp(e)->GetNumPoints(0);
id1 = fields[var]->
GetBndCondExpansions()[i]->GetPhys_Offset(e);
id2 = fields[0]->GetTrace()->
GetPhys_Offset(fields[0]->GetTraceMap()->
GetBndCondTraceToGlobalTraceMap(cnt++));
......
......@@ -1528,7 +1528,7 @@ namespace Nektar
int cnt = 0;
int nBndEdges, nBndEdgePts;
int i, e;
int id1, id2;
int id2;
int nTracePts = fields[0]->GetTrace()->GetTotPoints();
int nBndRegions = fields[var]->GetBndCondExpansions().num_elements();
......@@ -1552,9 +1552,6 @@ namespace Nektar
nBndEdgePts = fields[var]->
GetBndCondExpansions()[i]->GetExp(e)->GetNumPoints(0);
id1 = fields[var]->
GetBndCondExpansions()[i]->GetPhys_Offset(e);
id2 = fields[0]->GetTrace()->
GetPhys_Offset(fields[0]->GetTraceMap()->
GetBndCondTraceToGlobalTraceMap(cnt++));
......
......@@ -215,10 +215,8 @@ namespace Nektar
LibUtilities::TimeIntegrationWrapperSharedPtr IntScheme;
LibUtilities::TimeIntegrationSolutionSharedPtr u;
int numMultiSteps;
IntScheme = LibUtilities::GetTimeIntegrationWrapperFactory().CreateInstance(LibUtilities::TimeIntegrationMethodMap[m_timeIntMethod]);
numMultiSteps = IntScheme->GetIntegrationSteps();
u = IntScheme->InitializeScheme(m_timestep, fields, m_time, m_ode);
std::vector<FilterSharedPtr>::iterator x;
......
......@@ -844,7 +844,7 @@ namespace Nektar
std::vector< boost::shared_ptr<M2> > scaledMatrices;
for(unsigned int i = 0; i < 36; ++i)
{
double values[] = {i*4, i*4+1, i*4+2, i*4+3};
double values[] = {i*4.0, i*4.0+1.0, i*4.0+2.0, i*4.0+3.0};
boost::shared_ptr<M1> matrix(new M1(2,2, values));
boost::shared_ptr<M2> scaled(new M2(1.0, matrix));
scaledMatrices.push_back(scaled);
......
......@@ -627,6 +627,7 @@ namespace Nektar
case 18: return "K_i";
case 19: return "Ca_rel";
case 20: return "Ca_up";
default: return "unknown";
}
}
......
......@@ -337,10 +337,10 @@ namespace Nektar
NekDouble *u_new = &outarray[0][0];
NekDouble *v_new = &outarray[1][0];
NekDouble *w_new = &outarray[2][0];
NekDouble *y_new = isCF3 ? &outarray[3][0] : 0;
//NekDouble *y_new = isCF3 ? &outarray[3][0] : 0;
NekDouble *v_tau = &m_gates_tau[0][0];
NekDouble *w_tau = &m_gates_tau[1][0];
NekDouble *y_tau = isCF3 ? &m_gates_tau[2][0] : 0;
//NekDouble *y_tau = isCF3 ? &m_gates_tau[2][0] : 0;
// Temporary variables
NekDouble J_fi, J_so, J_si, h1, h2, h3, alpha, beta;
......@@ -416,6 +416,7 @@ namespace Nektar
case 1: return "v";
case 2: return "w";
case 3: return "y";
default: return "unknown";
}
}
}
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