mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Change field loop index from "fieldI" to "fieldi"
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user