Commit 7b9539c6 authored by Dave Moxey's avatar Dave Moxey
Browse files

More fixes after FieldConvert improvements

parent b88dfa49
......@@ -109,7 +109,6 @@ void InputFld::Process(po::variables_map &vm)
}
Array<OneD, int> ElementGIDs(expansions.size());
SpatialDomains::ExpansionMap::const_iterator expIt;
i = 0;
for (auto &expIt : expansions)
......@@ -132,10 +131,9 @@ void InputFld::Process(po::variables_map &vm)
for(i = 0; i < m_f->m_fielddef[oldSize]->m_fields.size(); ++i)
{
// check for multiple fld files
vector<string>::iterator it =
find (m_f->m_variables.begin(),
m_f->m_variables.end(),
m_f->m_fielddef[oldSize]->m_fields[i]);
auto it = find (m_f->m_variables.begin(),
m_f->m_variables.end(),
m_f->m_fielddef[oldSize]->m_fields[i]);
if(it == m_f->m_variables.end())
{
......
......@@ -140,13 +140,11 @@ void OutputFileBase::Process(po::variables_map &vm)
exp[0]->GetGraph());
const SpatialDomains::BoundaryRegionCollection bregions =
bcs.GetBoundaryRegions();
SpatialDomains::BoundaryRegionCollection::const_iterator breg_it;
map<int, int> BndRegionMap;
int cnt = 0;
for (breg_it = bregions.begin(); breg_it != bregions.end();
++breg_it, ++cnt)
for (auto &breg_it : bregions)
{
BndRegionMap[breg_it->first] = cnt;
BndRegionMap[breg_it.first] = cnt++;
}
// find ending of output file and insert _b1, _b2
......
......@@ -101,12 +101,11 @@ void ProcessAddFld::Process(po::variables_map &vm)
}
Array<OneD, int> ElementGIDs(expansions.size());
SpatialDomains::ExpansionMap::const_iterator expIt;
int i = 0;
for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
for (auto &expIt : expansions)
{
ElementGIDs[i++] = expIt->second->m_geomShPtr->GetGlobalID();
ElementGIDs[i++] = expIt.second->m_geomShPtr->GetGlobalID();
}
m_f->FieldIOForFile(fromfld)->Import(
fromfld, fromFieldDef, fromFieldData,
......@@ -173,10 +172,9 @@ void ProcessAddFld::Process(po::variables_map &vm)
Vmath::Vcopy(ncoeffs, m_f->m_exp[j]->GetCoeffs(), 1, SaveFld, 1);
// Check if new field has this variable
vector<string>::iterator it =
find (fromFieldDef[0]->m_fields.begin(),
fromFieldDef[0]->m_fields.end(),
m_f->m_variables[j]);
auto it = find (fromFieldDef[0]->m_fields.begin(),
fromFieldDef[0]->m_fields.end(),
m_f->m_variables[j]);
ASSERTL0(it != fromFieldDef[0]->m_fields.end(),
"Could not find field " + m_f->m_variables[j] + " in from field");
......
......@@ -241,10 +241,9 @@ void ProcessCreateExp::Process(po::variables_map &vm)
int n = i * nstrips + s;
// In case of multiple flds, we might not have a
// variable in this m_data[n] -> skip in this case
vector<string>::iterator it =
find (m_f->m_fielddef[n]->m_fields.begin(),
m_f->m_fielddef[n]->m_fields.end(),
m_f->m_variables[j]);
auto it = find (m_f->m_fielddef[n]->m_fields.begin(),
m_f->m_fielddef[n]->m_fields.end(),
m_f->m_variables[j]);
if(it !=m_f->m_fielddef[n]->m_fields.end())
{
m_f->m_exp[s * nfields + j]->ExtractDataToCoeffs(
......
......@@ -96,7 +96,6 @@ void ProcessNumModes::Process(po::variables_map &vm)
outfield[i] = Array<OneD, NekDouble>(npoints);
}
vector<MultiRegions::ExpListSharedPtr>::iterator it;
MultiRegions::ExpListSharedPtr Exp;
int nExp, nq, offset;
......@@ -123,7 +122,8 @@ void ProcessNumModes::Process(po::variables_map &vm)
Vmath::Vcopy(npoints, outfield[i], 1, Exp->UpdatePhys(), 1);
Exp->FwdTrans_IterPerExp(outfield[i], Exp->UpdateCoeffs());
it = m_f->m_exp.begin() + s * (nfields + addfields) + nfields + i;
auto it =
m_f->m_exp.begin() + s * (nfields + addfields) + nfields + i;
m_f->m_exp.insert(it, Exp);
}
}
......
......@@ -100,7 +100,6 @@ void ProcessQCriterion::Process(po::variables_map &vm)
grad[i] = Array<OneD, NekDouble>(npoints);
}
vector<MultiRegions::ExpListSharedPtr>::iterator it;
MultiRegions::ExpListSharedPtr Exp;
for (s = 0; s < nstrips; ++s) // homogeneous strip varient
......@@ -188,7 +187,7 @@ void ProcessQCriterion::Process(po::variables_map &vm)
Vmath::Vcopy(npoints, outfield, 1, Exp->UpdatePhys(), 1);
Exp->FwdTrans_IterPerExp(outfield, Exp->UpdateCoeffs());
it = m_f->m_exp.begin() + s * (nfields + 1) + nfields;
auto it = m_f->m_exp.begin() + s * (nfields + 1) + nfields;
m_f->m_exp.insert(it, Exp);
}
}
......
......@@ -1538,7 +1538,7 @@ namespace Nektar
vVertices[id] = m_meshVertices[id];
}
// Compile list of edges (for curved information)
id = vIt->second.id;
id = vIt.second.id;
vEdges[id] = m_meshEdges[id];
}
}
......@@ -1947,7 +1947,7 @@ namespace Nektar
for (auto &vItCurve : m_meshCurved)
{
MeshCurved c = vItCurve->second;
MeshCurved c = vItCurve.second;
bool IsEdge = boost::iequals(c.entitytype,"E");
bool IsFace = boost::iequals(c.entitytype,"F");
......
......@@ -444,7 +444,7 @@ int main(int argc, char* argv[])
int rank = p;
f->ClearField();
partComm = boost::shared_ptr<FieldConvertComm>(
partComm = std::shared_ptr<FieldConvertComm>(
new FieldConvertComm(argc, argv, nParts,rank));
}
......
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