Commit 3cd9b4f5 authored by Henry Weller's avatar Henry Weller
Browse files

Change field loop index from "fieldI" to "fieldi"

parent f83975a7
......@@ -33,7 +33,7 @@ void Foam::addToFieldList
(
PtrList<GeoField>& fieldList,
const IOobject& obj,
const label fieldI,
const label fieldi,
const typename GeoField::Mesh& mesh
)
{
......@@ -41,7 +41,7 @@ void Foam::addToFieldList
{
fieldList.set
(
fieldI,
fieldi,
new GeoField(obj, mesh)
);
Info<< " " << GeoField::typeName << tab << obj.name() << endl;
......@@ -56,14 +56,14 @@ void Foam::outputFieldList
const label patchi
)
{
forAll(fieldList, fieldI)
forAll(fieldList, fieldi)
{
if (fieldList.set(fieldI))
if (fieldList.set(fieldi))
{
Info<< " " << pTraits<typename GeoField::value_type>::typeName
<< tab << tab
<< fieldList[fieldI].name() << tab << tab
<< fieldList[fieldI].boundaryField()[patchi].type() << nl;
<< fieldList[fieldi].name() << tab << tab
<< fieldList[fieldi].boundaryField()[patchi].type() << nl;
}
}
}
......@@ -77,14 +77,14 @@ void Foam::collectFieldList
HashTable<word>& fieldToType
)
{
forAll(fieldList, fieldI)
forAll(fieldList, fieldi)
{
if (fieldList.set(fieldI))
if (fieldList.set(fieldi))
{
fieldToType.insert
(
fieldList[fieldI].name(),
fieldList[fieldI].boundaryField()[patchi].type()
fieldList[fieldi].name(),
fieldList[fieldi].boundaryField()[patchi].type()
);
}
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -38,7 +38,7 @@ namespace Foam
(
PtrList<GeoField>& fieldList,
const IOobject& obj,
const label fieldI,
const label fieldi,
const typename GeoField::Mesh& mesh
);
......
......@@ -65,9 +65,9 @@ void Foam::dimFieldDecomposer::decomposeFields
const PtrList<GeoField>& fields
) const
{
forAll(fields, fieldI)
forAll(fields, fieldi)
{
decomposeField(fields[fieldI])().write();
decomposeField(fields[fieldi])().write();
}
}
......
......@@ -190,9 +190,9 @@ void Foam::lagrangianFieldDecomposer::decomposeFields
{
if (particleIndices_.size())
{
forAll(fields, fieldI)
forAll(fields, fieldi)
{
decomposeField(cloudName, fields[fieldI])().write();
decomposeField(cloudName, fields[fieldi])().write();
}
}
}
......@@ -207,9 +207,9 @@ void Foam::lagrangianFieldDecomposer::decomposeFieldFields
{
if (particleIndices_.size())
{
forAll(fields, fieldI)
forAll(fields, fieldi)
{
decomposeFieldField(cloudName, fields[fieldI])().write();
decomposeFieldField(cloudName, fields[fieldi])().write();
}
}
}
......
......@@ -101,9 +101,9 @@ void Foam::pointFieldDecomposer::decomposeFields
const PtrList<GeoField>& fields
) const
{
forAll(fields, fieldI)
forAll(fields, fieldi)
{
decomposeField(fields[fieldI])().write();
decomposeField(fields[fieldi])().write();
}
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -48,12 +48,12 @@ void Foam::readFields
// Construct the fields
fields.setSize(fieldObjects.size());
label fieldI = 0;
label fieldi = 0;
forAllIter(IOobjectList, fieldObjects, iter)
{
fields.set
(
fieldI++,
fieldi++,
new GeoField(*iter(), mesh)
);
}
......
......@@ -34,9 +34,9 @@ void Foam::patchWriter::write
const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
)
{
forAll(flds, fieldI)
forAll(flds, fieldi)
{
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldI];
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldi];
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nFaces_ << " float" << std::endl;
......@@ -69,10 +69,10 @@ void Foam::patchWriter::write
const PtrList<GeometricField<Type, pointPatchField, pointMesh>>& flds
)
{
forAll(flds, fieldI)
forAll(flds, fieldi)
{
const GeometricField<Type, pointPatchField, pointMesh>& fld =
flds[fieldI];
flds[fieldi];
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nPoints_ << " float" << std::endl;
......@@ -99,9 +99,9 @@ void Foam::patchWriter::write
const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
)
{
forAll(flds, fieldI)
forAll(flds, fieldi)
{
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldI];
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldi];
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nPoints_ << " float" << std::endl;
......
......@@ -66,10 +66,10 @@ void Foam::surfaceMeshWriter::write
const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& sflds
)
{
forAll(sflds, fieldI)
forAll(sflds, fieldi)
{
const GeometricField<Type, fvsPatchField, surfaceMesh>& fld =
sflds[fieldI];
sflds[fieldi];
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< pp_.size() << " float" << std::endl;
......
......@@ -75,9 +75,9 @@ void writeSurfFields
<< "FIELD attributes " << surfVectorFields.size() << std::endl;
// surfVectorFields
forAll(surfVectorFields, fieldI)
forAll(surfVectorFields, fieldi)
{
const surfaceVectorField& svf = surfVectorFields[fieldI];
const surfaceVectorField& svf = surfVectorFields[fieldi];
str << svf.name() << " 3 "
<< mesh.nFaces() << " float" << std::endl;
......
......@@ -116,17 +116,17 @@ void writeVTKFields
{
label step = max(floor(8/pTraits<Type>::nComponents), 1);
forAll(values, fieldI)
forAll(values, fieldi)
{
Info<< " writing field " << fieldNames[fieldI] << endl;
os << nl << fieldNames[fieldI] << ' ' << pTraits<Type>::nComponents
<< ' ' << values[fieldI].size() << " float" << nl;
Info<< " writing field " << fieldNames[fieldi] << endl;
os << nl << fieldNames[fieldi] << ' ' << pTraits<Type>::nComponents
<< ' ' << values[fieldi].size() << " float" << nl;
label offset = 0;
forAll(addr, trackI)
{
const List<label> ids(addr[trackI]);
List<Type> data(UIndirectList<Type>(values[fieldI], ids));
List<Type> data(UIndirectList<Type>(values[fieldi], ids));
label nData = data.size() - 1;
forAll(data, i)
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -147,7 +147,7 @@ void ${typeName}FvOption${SourceType}::correct
void ${typeName}FvOption${SourceType}::addSup
(
fvMatrix<${TemplateType}>& eqn,
const label fieldI
const label fieldi
)
{
if (${verbose:-false})
......@@ -165,7 +165,7 @@ void ${typeName}FvOption${SourceType}::addSup
(
const volScalarField& rho,
fvMatrix<${TemplateType}>& eqn,
const label fieldI
const label fieldi
)
{
if (${verbose:-false})
......@@ -182,7 +182,7 @@ void ${typeName}FvOption${SourceType}::addSup
void ${typeName}FvOption${SourceType}::setValue
(
fvMatrix<${TemplateType}>& eqn,
const label fieldI
const label fieldi
)
{
if (${verbose:-false})
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -33,13 +33,13 @@ Description
codeAddSup
(
fvMatrix<Type}>& eqn,
const label fieldI
const label fieldi
)
setValue
(
fvMatrix<Type}>& eqn,
const label fieldI
const label fieldi
)
where :
......@@ -159,7 +159,7 @@ public:
virtual void addSup
(
fvMatrix<${TemplateType}>& eqn,
const label fieldI
const label fieldi
);
//- Explicit and implicit matrix contributions for compressible
......@@ -168,14 +168,14 @@ public:
(
const volScalarField& rho,
fvMatrix<${TemplateType}>& eqn,
const label fieldI
const label fieldi
);
//- Set value
virtual void setValue
(
fvMatrix<${TemplateType}>& eqn,
const label fieldI
const label fieldi
);
};
......
......@@ -103,7 +103,7 @@ Foam::tmp<GeoField> Foam::uniformInterpolate
(
times[i]
);
const GeoField& fieldI = timeIFields.lookupObject
const GeoField& fieldi = timeIFields.lookupObject
<
const GeoField
>
......@@ -111,7 +111,7 @@ Foam::tmp<GeoField> Foam::uniformInterpolate
fieldName
);
fld += weights[i]*fieldI;
fld += weights[i]*fieldi;
}
return tfld;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -45,12 +45,12 @@ void Foam::jplotGraph::write(const graph& g, Ostream& os) const
os << "# JPlot file" << nl
<< "# column 1: " << g.xName() << endl;
label fieldI = 0;
label fieldi = 0;
forAllConstIter(graph, g, iter)
{
os << "# column " << fieldI + 2 << ": " << (*iter()).name() << endl;
fieldI++;
os << "# column " << fieldi + 2 << ": " << (*iter()).name() << endl;
fieldi++;
}
g.writeTable(os);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -46,20 +46,20 @@ void Foam::xmgrGraph::write(const graph& g, Ostream& os) const
<< "@xaxis label " << g.xName() << nl
<< "@yaxis label " << g.yName() << endl;
label fieldI = 0;
label fieldi = 0;
forAllConstIter(graph, g, iter)
{
os << "@s" << fieldI << " legend "
os << "@s" << fieldi << " legend "
<< iter()->name() << nl
<< "@target G0.S" << fieldI << nl
<< "@target G0.S" << fieldi << nl
<< "@type xy" << endl;
writeXY(g.x(), *iter(), os);
os << endl;
fieldI++;
fieldi++;
}
}
......
......@@ -108,7 +108,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
<< abort(FatalError);
}
label fieldI = 0;
label fieldi = 0;
forAllIter(typename HashTable<fldType*>, flds, iter)
{
......@@ -116,7 +116,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
typename fldType::Boundary& bfld =
fld.boundaryFieldRef();
const FieldField<fvsPatchField, T>& oldBfld = oldBflds[fieldI++];
const FieldField<fvsPatchField, T>& oldBfld = oldBflds[fieldi++];
// Pull from old boundary field into bfld.
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -126,7 +126,7 @@ void Foam::fv::option::checkApplied() const
void Foam::fv::option::addSup
(
fvMatrix<scalar>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -134,7 +134,7 @@ void Foam::fv::option::addSup
void Foam::fv::option::addSup
(
fvMatrix<vector>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -142,7 +142,7 @@ void Foam::fv::option::addSup
void Foam::fv::option::addSup
(
fvMatrix<sphericalTensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -150,7 +150,7 @@ void Foam::fv::option::addSup
void Foam::fv::option::addSup
(
fvMatrix<symmTensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -158,7 +158,7 @@ void Foam::fv::option::addSup
void Foam::fv::option::addSup
(
fvMatrix<tensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -167,7 +167,7 @@ void Foam::fv::option::addSup
(
const volScalarField& rho,
fvMatrix<scalar>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -176,7 +176,7 @@ void Foam::fv::option::addSup
(
const volScalarField& rho,
fvMatrix<vector>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -185,7 +185,7 @@ void Foam::fv::option::addSup
(
const volScalarField& rho,
fvMatrix<sphericalTensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -194,7 +194,7 @@ void Foam::fv::option::addSup
(
const volScalarField& rho,
fvMatrix<symmTensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -203,7 +203,7 @@ void Foam::fv::option::addSup
(
const volScalarField& rho,
fvMatrix<tensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -213,10 +213,10 @@ void Foam::fv::option::addSup
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<scalar>& eqn,
const label fieldI
const label fieldi
)
{
addSup(alpha*rho, eqn, fieldI);
addSup(alpha*rho, eqn, fieldi);
}
......@@ -225,10 +225,10 @@ void Foam::fv::option::addSup
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<vector>& eqn,
const label fieldI
const label fieldi
)
{
addSup(alpha*rho, eqn, fieldI);
addSup(alpha*rho, eqn, fieldi);
}
......@@ -237,10 +237,10 @@ void Foam::fv::option::addSup
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<sphericalTensor>& eqn,
const label fieldI
const label fieldi
)
{
addSup(alpha*rho, eqn, fieldI);
addSup(alpha*rho, eqn, fieldi);
}
......@@ -249,10 +249,10 @@ void Foam::fv::option::addSup
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<symmTensor>& eqn,
const label fieldI
const label fieldi
)
{
addSup(alpha*rho, eqn, fieldI);
addSup(alpha*rho, eqn, fieldi);
}
......@@ -261,25 +261,25 @@ void Foam::fv::option::addSup
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<tensor>& eqn,
const label fieldI
const label fieldi
)
{
addSup(alpha*rho, eqn, fieldI);
addSup(alpha*rho, eqn, fieldi);
}
void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldI)
void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldi)
{}
void Foam::fv::option::constrain(fvMatrix<vector>& eqn, const label fieldI)
void Foam::fv::option::constrain(fvMatrix<vector>& eqn, const label fieldi)
{}
void Foam::fv::option::constrain
(
fvMatrix<sphericalTensor>& eqn,
const label fieldI
const label fieldi
)
{}
......@@ -287,12 +287,12 @@ void Foam::fv::option::constrain
void Foam::fv::option::constrain
(
fvMatrix<symmTensor>& eqn,