Renamed IDs() -> Indices()

Indices is a better name to describe label indices than IDs which may be an
integers, words or other means of identification.
This commit is contained in:
Henry Weller
2023-12-20 14:29:23 +00:00
parent 2057174b55
commit a99155d0f0
70 changed files with 328 additions and 320 deletions

View File

@ -761,7 +761,7 @@ int main(int argc, char *argv[])
);
// Write cellID field
writer.writeCellIDs();
writer.writeCellIndices();
// Write volFields::Internal
writer.write(visf);
@ -930,7 +930,7 @@ int main(int argc, char *argv[])
);
// Write patchID field
writer.writePatchIDs();
writer.writePatchIndices();
// Write volFields
writer.write(vsf);
@ -1003,7 +1003,7 @@ int main(int argc, char *argv[])
);
// Write patchID field
writer.writePatchIDs();
writer.writePatchIndices();
// Write volFields
writer.write(vsf);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -115,7 +115,7 @@ Foam::internalWriter::internalWriter
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::internalWriter::writeCellIDs()
void Foam::internalWriter::writeCellIndices()
{
const fvMesh& mesh = vMesh_.mesh();
const vtkTopo& topo = vMesh_.topo();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -86,7 +86,7 @@ public:
}
//- Write cellIDs
void writeCellIDs();
void writeCellIndices();
//- Write generic GeometricFields
template<class Type, class GeoMesh>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,16 +41,20 @@ Foam::patchWriter::patchWriter
binary_(binary),
nearCellValue_(nearCellValue),
fName_(fName),
patchIDs_(patchIDs),
patchIndices_(patchIDs),
os_(fName.c_str())
{
const fvMesh& mesh = vMesh_.mesh();
const polyBoundaryMesh& patches = mesh.boundaryMesh();
// Write header
if (patchIDs_.size() == 1)
if (patchIndices_.size() == 1)
{
vtkWriteOps::writeHeader(os_, binary_, patches[patchIDs_[0]].name());
vtkWriteOps::writeHeader
(
os_,
binary_, patches[patchIndices_[0]].name()
);
}
else
{
@ -63,9 +67,9 @@ Foam::patchWriter::patchWriter
nFaces_ = 0;
label nFaceVerts = 0;
forAll(patchIDs_, i)
forAll(patchIndices_, i)
{
const polyPatch& pp = patches[patchIDs_[i]];
const polyPatch& pp = patches[patchIndices_[i]];
nPoints_ += pp.nPoints();
nFaces_ += pp.size();
@ -80,9 +84,9 @@ Foam::patchWriter::patchWriter
DynamicList<floatScalar> ptField(3*nPoints_);
forAll(patchIDs_, i)
forAll(patchIndices_, i)
{
const polyPatch& pp = patches[patchIDs_[i]];
const polyPatch& pp = patches[patchIndices_[i]];
vtkWriteOps::insert(pp.localPoints(), ptField);
}
@ -94,9 +98,9 @@ Foam::patchWriter::patchWriter
label offset = 0;
forAll(patchIDs_, i)
forAll(patchIndices_, i)
{
const polyPatch& pp = patches[patchIDs_[i]];
const polyPatch& pp = patches[patchIndices_[i]];
forAll(pp, facei)
{
@ -113,7 +117,7 @@ Foam::patchWriter::patchWriter
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::patchWriter::writePatchIDs()
void Foam::patchWriter::writePatchIndices()
{
const fvMesh& mesh = vMesh_.mesh();
@ -121,9 +125,9 @@ void Foam::patchWriter::writePatchIDs()
os_ << "patchID 1 " << nFaces_ << " float" << std::endl;
forAll(patchIDs_, i)
forAll(patchIndices_, i)
{
label patchi = patchIDs_[i];
label patchi = patchIndices_[i];
const polyPatch& pp = mesh.boundaryMesh()[patchi];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,7 @@ class patchWriter
const fileName fName_;
const labelList patchIDs_;
const labelList patchIndices_;
std::ofstream os_;
@ -108,7 +108,7 @@ public:
}
//- Write cellIDs
void writePatchIDs();
void writePatchIndices();
//- Write volFields
template<class Type>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,9 +43,9 @@ void Foam::patchWriter::write
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nFaces_);
forAll(patchIDs_, j)
forAll(patchIndices_, j)
{
label patchi = patchIDs_[j];
label patchi = patchIndices_[j];
const fvPatchField<Type>& pfld = fld.boundaryField()[patchi];
@ -79,9 +79,9 @@ void Foam::patchWriter::write
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nPoints_);
forAll(patchIDs_, j)
forAll(patchIndices_, j)
{
label patchi = patchIDs_[j];
label patchi = patchIndices_[j];
const pointPatchField<Type>& pfld = fld.boundaryField()[patchi];
@ -108,9 +108,9 @@ void Foam::patchWriter::write
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nPoints_);
forAll(patchIDs_, j)
forAll(patchIndices_, j)
{
label patchi = patchIDs_[j];
label patchi = patchIndices_[j];
const fvPatchField<Type>& pfld = fld.boundaryField()[patchi];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -175,7 +175,7 @@ bool Foam::functionObjects::writeVTK::write()
);
// Write cellID field
writer.writeCellIDs();
writer.writeCellIndices();
// Write volFields
#define WriteTypeFields(Type, nullArg) \