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:
@ -56,7 +56,7 @@ bool Foam::solvers::isothermalFilm::initFilmMesh()
|
||||
// Search for film wall patches
|
||||
|
||||
label nWallFaces = 0;
|
||||
DynamicList<label> wallPatchIDs_;
|
||||
DynamicList<label> wallPatchIndices_;
|
||||
|
||||
const polyBoundaryMesh& bm = mesh.boundaryMesh();
|
||||
|
||||
@ -66,7 +66,7 @@ bool Foam::solvers::isothermalFilm::initFilmMesh()
|
||||
|
||||
if (isA<filmWallPolyPatch>(p))
|
||||
{
|
||||
wallPatchIDs_.append(patchi);
|
||||
wallPatchIndices_.append(patchi);
|
||||
nWallFaces += p.faceCells().size();
|
||||
}
|
||||
}
|
||||
@ -88,7 +88,7 @@ bool Foam::solvers::isothermalFilm::initFilmMesh()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
wallPatchIDs.transfer(wallPatchIDs_);
|
||||
wallPatchIDs.transfer(wallPatchIndices_);
|
||||
|
||||
|
||||
// Search for film surface patch
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,16 +94,16 @@ bool Foam::starMesh::starEqualFace
|
||||
void Foam::starMesh::markBoundaryFaces()
|
||||
{
|
||||
// set size of mark lists for the boundary
|
||||
boundaryCellIDs_.setSize(boundary_.size());
|
||||
boundaryCellFaceIDs_.setSize(boundary_.size());
|
||||
boundaryCellIndices_.setSize(boundary_.size());
|
||||
boundaryCellFaceIndices_.setSize(boundary_.size());
|
||||
|
||||
forAll(boundary_, patchi)
|
||||
{
|
||||
const faceList& patchFaces = boundary_[patchi];
|
||||
|
||||
// set size of patch lists
|
||||
labelList& curBoundaryCellIDs = boundaryCellIDs_[patchi];
|
||||
labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchi];
|
||||
labelList& curBoundaryCellIDs = boundaryCellIndices_[patchi];
|
||||
labelList& curBoundaryCellFaceIDs = boundaryCellFaceIndices_[patchi];
|
||||
|
||||
curBoundaryCellIDs.setSize(patchFaces.size());
|
||||
curBoundaryCellFaceIDs.setSize(patchFaces.size());
|
||||
@ -183,8 +183,9 @@ void Foam::starMesh::collectBoundaryFaces()
|
||||
faceList& patchFaces = boundary_[patchi];
|
||||
|
||||
// set size of patch lists
|
||||
const labelList& curBoundaryCellIDs = boundaryCellIDs_[patchi];
|
||||
const labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchi];
|
||||
const labelList& curBoundaryCellIDs = boundaryCellIndices_[patchi];
|
||||
const labelList& curBoundaryCellFaceIDs =
|
||||
boundaryCellFaceIndices_[patchi];
|
||||
|
||||
forAll(curBoundaryCellIDs, facei)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -216,8 +216,8 @@ void Foam::starMesh::clearExtraStorage()
|
||||
starCellLabelLookup_.setSize(0);
|
||||
starCellPermutation_.setSize(0);
|
||||
cellFaces_.setSize(0);
|
||||
boundaryCellIDs_.setSize(0);
|
||||
boundaryCellFaceIDs_.setSize(0);
|
||||
boundaryCellIndices_.setSize(0);
|
||||
boundaryCellFaceIndices_.setSize(0);
|
||||
couples_.clear();
|
||||
|
||||
deleteDemandDrivenData(pointCellsPtr_);
|
||||
@ -249,8 +249,8 @@ Foam::starMesh::starMesh
|
||||
starCellLabelLookup_(0),
|
||||
starCellPermutation_(0),
|
||||
cellFaces_(0),
|
||||
boundaryCellIDs_(0),
|
||||
boundaryCellFaceIDs_(0),
|
||||
boundaryCellIndices_(0),
|
||||
boundaryCellFaceIndices_(0),
|
||||
meshFaces_(0),
|
||||
cellPolys_(0),
|
||||
nInternalFaces_(0),
|
||||
|
||||
@ -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
|
||||
@ -119,11 +119,11 @@ class starMesh
|
||||
|
||||
//- Cell ID for every boundary face. Used in two-tier boundary
|
||||
// reconstruction
|
||||
labelListList boundaryCellIDs_;
|
||||
labelListList boundaryCellIndices_;
|
||||
|
||||
//- Cell face ID for every boundary face. Used in two-tier boundary
|
||||
// reconstruction
|
||||
labelListList boundaryCellFaceIDs_;
|
||||
labelListList boundaryCellFaceIndices_;
|
||||
|
||||
//- Global face list for polyMesh
|
||||
faceList meshFaces_;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -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) \
|
||||
|
||||
@ -262,7 +262,7 @@ Foam::label Foam::UPstream::allocateCommunicator
|
||||
index = parentCommunicator_.size();
|
||||
|
||||
myProcNo_.append(-1);
|
||||
procIDs_.append(List<int>(0));
|
||||
procIndices_.append(List<int>(0));
|
||||
parentCommunicator_.append(-1);
|
||||
linearCommunication_.append(List<commsStruct>(0));
|
||||
treeCommunication_.append(List<commsStruct>(0));
|
||||
@ -280,10 +280,10 @@ Foam::label Foam::UPstream::allocateCommunicator
|
||||
myProcNo_[index] = 0;
|
||||
|
||||
// Convert from label to int
|
||||
procIDs_[index].setSize(subRanks.size());
|
||||
forAll(procIDs_[index], i)
|
||||
procIndices_[index].setSize(subRanks.size());
|
||||
forAll(procIndices_[index], i)
|
||||
{
|
||||
procIDs_[index][i] = subRanks[i];
|
||||
procIndices_[index][i] = subRanks[i];
|
||||
|
||||
// Enforce incremental order (so index is rank in next communicator)
|
||||
if (i >= 1 && subRanks[i] <= subRanks[i-1])
|
||||
@ -297,8 +297,8 @@ Foam::label Foam::UPstream::allocateCommunicator
|
||||
}
|
||||
parentCommunicator_[index] = parentIndex;
|
||||
|
||||
linearCommunication_[index] = calcLinearComm(procIDs_[index].size());
|
||||
treeCommunication_[index] = calcTreeComm(procIDs_[index].size());
|
||||
linearCommunication_[index] = calcLinearComm(procIndices_[index].size());
|
||||
treeCommunication_[index] = calcTreeComm(procIndices_[index].size());
|
||||
|
||||
|
||||
if (doPstream && parRun())
|
||||
@ -329,7 +329,7 @@ void Foam::UPstream::freeCommunicator
|
||||
freePstreamCommunicator(communicator);
|
||||
}
|
||||
myProcNo_[communicator] = -1;
|
||||
// procIDs_[communicator].clear();
|
||||
// procIndices_[communicator].clear();
|
||||
parentCommunicator_[communicator] = -1;
|
||||
linearCommunication_[communicator].clear();
|
||||
treeCommunication_[communicator].clear();
|
||||
@ -405,7 +405,7 @@ Foam::LIFOStack<Foam::label> Foam::UPstream::freeComms_;
|
||||
|
||||
Foam::DynamicList<int> Foam::UPstream::myProcNo_(10);
|
||||
|
||||
Foam::DynamicList<Foam::List<int>> Foam::UPstream::procIDs_(10);
|
||||
Foam::DynamicList<Foam::List<int>> Foam::UPstream::procIndices_(10);
|
||||
|
||||
Foam::DynamicList<Foam::label> Foam::UPstream::parentCommunicator_(10);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -199,7 +199,7 @@ private:
|
||||
static DynamicList<int> myProcNo_;
|
||||
|
||||
//- List of process IDs
|
||||
static DynamicList<List<int>> procIDs_;
|
||||
static DynamicList<List<int>> procIndices_;
|
||||
|
||||
//- Parent communicator
|
||||
static DynamicList<label> parentCommunicator_;
|
||||
@ -411,7 +411,7 @@ public:
|
||||
//- Number of processes in parallel run
|
||||
static label nProcs(const label communicator = 0)
|
||||
{
|
||||
return procIDs_[communicator].size();
|
||||
return procIndices_[communicator].size();
|
||||
}
|
||||
|
||||
//- Process index of the master
|
||||
@ -440,7 +440,7 @@ public:
|
||||
//- Process ID of given process index
|
||||
static List<int>& procID(label communicator)
|
||||
{
|
||||
return procIDs_[communicator];
|
||||
return procIndices_[communicator];
|
||||
}
|
||||
|
||||
//- Process index of first slave
|
||||
|
||||
@ -367,7 +367,7 @@ void Foam::GAMGAgglomeration::procAgglomerateLduAddressing
|
||||
|
||||
|
||||
procAgglomMap_.set(levelIndex, new labelList(procAgglomMap));
|
||||
agglomProcIDs_.set(levelIndex, new labelList(procIDs));
|
||||
agglomProcIndices_.set(levelIndex, new labelList(procIDs));
|
||||
procCommunicator_[levelIndex] = allMeshComm;
|
||||
|
||||
// These could only be set on the master procs but it is
|
||||
|
||||
@ -61,7 +61,7 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
||||
if (processorAgglomerate())
|
||||
{
|
||||
procAgglomMap_.setSize(nCreatedLevels);
|
||||
agglomProcIDs_.setSize(nCreatedLevels);
|
||||
agglomProcIndices_.setSize(nCreatedLevels);
|
||||
procCellOffsets_.setSize(nCreatedLevels);
|
||||
procFaceMap_.setSize(nCreatedLevels);
|
||||
procBoundaryMap_.setSize(nCreatedLevels);
|
||||
@ -274,7 +274,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration
|
||||
if (processorAgglomerate())
|
||||
{
|
||||
procAgglomMap_.setSize(maxLevels_);
|
||||
agglomProcIDs_.setSize(maxLevels_);
|
||||
agglomProcIndices_.setSize(maxLevels_);
|
||||
procCellOffsets_.setSize(maxLevels_);
|
||||
procFaceMap_.setSize(maxLevels_);
|
||||
procBoundaryMap_.setSize(maxLevels_);
|
||||
@ -523,7 +523,7 @@ const Foam::labelList& Foam::GAMGAgglomeration::agglomProcIDs
|
||||
const label leveli
|
||||
) const
|
||||
{
|
||||
return agglomProcIDs_[leveli];
|
||||
return agglomProcIndices_[leveli];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ protected:
|
||||
|
||||
//- Per level the set of processors to agglomerate. Element 0 is
|
||||
// the 'master' of the cluster.
|
||||
mutable PtrList<labelList> agglomProcIDs_;
|
||||
mutable PtrList<labelList> agglomProcIndices_;
|
||||
|
||||
//- Communicator for given level
|
||||
mutable labelList procCommunicator_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -103,7 +103,7 @@ void Foam::GAMGProcAgglomeration::printStats
|
||||
<< nl
|
||||
<< " procAgglomMap:" << agglom.procAgglomMap_[levelI]
|
||||
<< nl
|
||||
<< " procIDs:" << agglom.agglomProcIDs_[levelI]
|
||||
<< " procIDs:" << agglom.agglomProcIndices_[levelI]
|
||||
<< nl
|
||||
<< " comm:" << agglom.procCommunicator_[levelI]
|
||||
<< endl;
|
||||
|
||||
@ -615,11 +615,11 @@ void Foam::UPstream::allocatePstreamCommunicator
|
||||
int numProcs;
|
||||
MPI_Comm_size(PstreamGlobals::MPICommunicators_[index], &numProcs);
|
||||
|
||||
// procIDs_[index] = identityMap(numProcs);
|
||||
procIDs_[index].setSize(numProcs);
|
||||
forAll(procIDs_[index], i)
|
||||
// procIndices_[index] = identityMap(numProcs);
|
||||
procIndices_[index].setSize(numProcs);
|
||||
forAll(procIndices_[index], i)
|
||||
{
|
||||
procIDs_[index][i] = i;
|
||||
procIndices_[index][i] = i;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -628,8 +628,8 @@ void Foam::UPstream::allocatePstreamCommunicator
|
||||
MPI_Group_incl
|
||||
(
|
||||
PstreamGlobals::MPIGroups_[parentIndex],
|
||||
procIDs_[index].size(),
|
||||
procIDs_[index].begin(),
|
||||
procIndices_[index].size(),
|
||||
procIndices_[index].begin(),
|
||||
&PstreamGlobals::MPIGroups_[index]
|
||||
);
|
||||
|
||||
@ -659,7 +659,7 @@ void Foam::UPstream::allocatePstreamCommunicator
|
||||
FatalErrorInFunction
|
||||
<< "Problem :"
|
||||
<< " when allocating communicator at " << index
|
||||
<< " from ranks " << procIDs_[index]
|
||||
<< " from ranks " << procIndices_[index]
|
||||
<< " of parent " << parentIndex
|
||||
<< " cannot find my own rank"
|
||||
<< Foam::exit(FatalError);
|
||||
|
||||
@ -249,9 +249,9 @@ void Foam::externalCoupledMixedFvPatchField<Type>::startWait() const
|
||||
const typename VolField<Type>::Boundary& bf =
|
||||
cvf.boundaryField();
|
||||
|
||||
forAll(coupledPatchIDs_, i)
|
||||
forAll(coupledPatchIndices_, i)
|
||||
{
|
||||
label patchi = coupledPatchIDs_[i];
|
||||
label patchi = coupledPatchIndices_[i];
|
||||
|
||||
const externalCoupledMixedFvPatchField<Type>& pf =
|
||||
refCast<const externalCoupledMixedFvPatchField<Type>>(bf[patchi]);
|
||||
@ -414,9 +414,9 @@ void Foam::externalCoupledMixedFvPatchField<Type>::writeData
|
||||
const typename VolField<Type>::Boundary& bf =
|
||||
cvf.boundaryField();
|
||||
|
||||
forAll(coupledPatchIDs_, i)
|
||||
forAll(coupledPatchIndices_, i)
|
||||
{
|
||||
label patchi = coupledPatchIDs_[i];
|
||||
label patchi = coupledPatchIndices_[i];
|
||||
|
||||
const externalCoupledMixedFvPatchField<Type>& pf =
|
||||
refCast<const externalCoupledMixedFvPatchField<Type>>(bf[patchi]);
|
||||
@ -458,7 +458,7 @@ externalCoupledMixedFvPatchField
|
||||
master_(true),
|
||||
offsets_(),
|
||||
initialised_(false),
|
||||
coupledPatchIDs_()
|
||||
coupledPatchIndices_()
|
||||
{
|
||||
if (dict.found("value"))
|
||||
{
|
||||
@ -512,7 +512,7 @@ externalCoupledMixedFvPatchField
|
||||
master_(ptf.master_),
|
||||
offsets_(ptf.offsets_),
|
||||
initialised_(ptf.initialised_),
|
||||
coupledPatchIDs_(ptf.coupledPatchIDs_)
|
||||
coupledPatchIndices_(ptf.coupledPatchIndices_)
|
||||
{}
|
||||
|
||||
|
||||
@ -535,7 +535,7 @@ externalCoupledMixedFvPatchField
|
||||
master_(ecmpf.master_),
|
||||
offsets_(ecmpf.offsets_),
|
||||
initialised_(ecmpf.initialised_),
|
||||
coupledPatchIDs_(ecmpf.coupledPatchIDs_)
|
||||
coupledPatchIndices_(ecmpf.coupledPatchIndices_)
|
||||
{}
|
||||
|
||||
|
||||
@ -580,7 +580,7 @@ void Foam::externalCoupledMixedFvPatchField<Type>::initialise
|
||||
}
|
||||
}
|
||||
|
||||
coupledPatchIDs_.transfer(coupledPatchIDs);
|
||||
coupledPatchIndices_.transfer(coupledPatchIDs);
|
||||
|
||||
|
||||
// initialise by external solver, or just set the master patch
|
||||
@ -589,14 +589,14 @@ void Foam::externalCoupledMixedFvPatchField<Type>::initialise
|
||||
// remove lock file, signalling external source to execute
|
||||
// removeLockFile();
|
||||
|
||||
forAll(coupledPatchIDs_, i)
|
||||
forAll(coupledPatchIndices_, i)
|
||||
{
|
||||
label patchi = coupledPatchIDs_[i];
|
||||
label patchi = coupledPatchIndices_[i];
|
||||
|
||||
externalCoupledMixedFvPatchField<Type>& pf =
|
||||
refCast<externalCoupledMixedFvPatchField<Type>>(bf[patchi]);
|
||||
|
||||
pf.setMaster(coupledPatchIDs_);
|
||||
pf.setMaster(coupledPatchIndices_);
|
||||
}
|
||||
|
||||
|
||||
@ -606,9 +606,9 @@ void Foam::externalCoupledMixedFvPatchField<Type>::initialise
|
||||
// read the initial data
|
||||
if (master_)
|
||||
{
|
||||
forAll(coupledPatchIDs_, i)
|
||||
forAll(coupledPatchIndices_, i)
|
||||
{
|
||||
label patchi = coupledPatchIDs_[i];
|
||||
label patchi = coupledPatchIndices_[i];
|
||||
|
||||
externalCoupledMixedFvPatchField<Type>& pf =
|
||||
refCast<externalCoupledMixedFvPatchField<Type>>(bf[patchi]);
|
||||
@ -619,7 +619,7 @@ void Foam::externalCoupledMixedFvPatchField<Type>::initialise
|
||||
}
|
||||
else
|
||||
{
|
||||
setMaster(coupledPatchIDs_);
|
||||
setMaster(coupledPatchIndices_);
|
||||
}
|
||||
|
||||
initialised_ = true;
|
||||
|
||||
@ -168,7 +168,7 @@ class externalCoupledMixedFvPatchField
|
||||
bool initialised_;
|
||||
|
||||
//- List of coupled patch IDs
|
||||
List<label> coupledPatchIDs_;
|
||||
List<label> coupledPatchIndices_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -60,7 +60,7 @@ void Foam::conformedFvsPatchField<Type>::conform
|
||||
const fvBoundaryMesh& fvbm = iF.mesh().boundary();
|
||||
|
||||
const labelList origPatchIDs =
|
||||
nonConformalBoundary::New(iF.mesh()).allOrigPatchIDs();
|
||||
nonConformalBoundary::New(iF.mesh()).allOrigPatchIndices();
|
||||
|
||||
// Evaluate the conformed orig and non-conformal boundary fields
|
||||
const typename SurfaceField<Type>::Boundary origBf
|
||||
@ -115,7 +115,7 @@ void Foam::conformedFvsPatchField<Type>::unconform
|
||||
const fvBoundaryMesh& fvbm = iF.mesh().boundary();
|
||||
|
||||
const labelList origPatchIDs =
|
||||
nonConformalBoundary::New(iF.mesh()).allOrigPatchIDs();
|
||||
nonConformalBoundary::New(iF.mesh()).allOrigPatchIndices();
|
||||
|
||||
// Extract the conformed orig and non-conformal boundary fields from
|
||||
// the stored conformed patch fields
|
||||
|
||||
@ -606,7 +606,7 @@ void Foam::fvMeshStitcher::applyOwnerOrigBoundaryEdgeParts
|
||||
const polyBoundaryMesh& pbMesh = mesh_.boundaryMesh();
|
||||
|
||||
const nonConformalBoundary& ncb = nonConformalBoundary::New(mesh_);
|
||||
const labelList ownerOrigPatchIDs = ncb.ownerOrigPatchIDs();
|
||||
const labelList ownerOrigPatchIDs = ncb.ownerOrigPatchIndices();
|
||||
const labelList& ownerOrigBoundaryEdgeMeshEdge =
|
||||
ncb.ownerOrigBoundaryEdgeMeshEdge();
|
||||
const edgeList& ownerOrigBoundaryMeshEdges =
|
||||
@ -845,7 +845,7 @@ void Foam::fvMeshStitcher::stabiliseOrigPatchFaces
|
||||
) const
|
||||
{
|
||||
const nonConformalBoundary& ncb = nonConformalBoundary::New(mesh_);
|
||||
const labelList allOrigPatchIDs = ncb.allOrigPatchIDs();
|
||||
const labelList allOrigPatchIDs = ncb.allOrigPatchIndices();
|
||||
|
||||
forAll(allOrigPatchIDs, i)
|
||||
{
|
||||
@ -899,7 +899,7 @@ void Foam::fvMeshStitcher::intersectNonConformalCyclics
|
||||
const polyBoundaryMesh& pbMesh = mesh_.boundaryMesh();
|
||||
|
||||
const nonConformalBoundary& ncb = nonConformalBoundary::New(mesh_);
|
||||
const labelList ownerOrigPatchIDs = ncb.ownerOrigPatchIDs();
|
||||
const labelList ownerOrigPatchIDs = ncb.ownerOrigPatchIndices();
|
||||
|
||||
// Alias the boundary geometry fields
|
||||
surfaceVectorField::Boundary& SfBf = SfSf.boundaryFieldRef();
|
||||
|
||||
@ -127,7 +127,7 @@ Foam::fvMeshStitcherTools::conformedNcBoundaryField
|
||||
);
|
||||
|
||||
const labelList origPatchIDs =
|
||||
nonConformalBoundary::New(fvbm.mesh()).allOrigPatchIDs();
|
||||
nonConformalBoundary::New(fvbm.mesh()).allOrigPatchIndices();
|
||||
|
||||
// Accumulate the non-conformal parts of the field into the original faces
|
||||
forAll(fvbm, ncPatchi)
|
||||
@ -215,7 +215,7 @@ Foam::fvMeshStitcherTools::conformedOrigBoundaryField
|
||||
);
|
||||
|
||||
const labelList origPatchIDs =
|
||||
nonConformalBoundary::New(fvbm.mesh()).allOrigPatchIDs();
|
||||
nonConformalBoundary::New(fvbm.mesh()).allOrigPatchIndices();
|
||||
|
||||
// Scale or average as appropriate
|
||||
forAll(origPatchIDs, i)
|
||||
@ -291,7 +291,7 @@ Foam::fvMeshStitcherTools::unconformedBoundaryField
|
||||
}
|
||||
|
||||
const labelList origPatchIDs =
|
||||
nonConformalBoundary::New(fvbm.mesh()).allOrigPatchIDs();
|
||||
nonConformalBoundary::New(fvbm.mesh()).allOrigPatchIndices();
|
||||
|
||||
// If a flux then scale down to the part face area
|
||||
if (isFluxField)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -106,13 +106,13 @@ bool Foam::patchDistMethods::advectionDiffusion::correct
|
||||
),
|
||||
mesh_,
|
||||
dimensionedVector(dimless, Zero),
|
||||
patchTypes<vector>(mesh_, patchIDs_)
|
||||
patchTypes<vector>(mesh_, patchIndices_)
|
||||
);
|
||||
|
||||
const fvPatchList& patches = mesh_.boundary();
|
||||
volVectorField::Boundary& nybf = ny.boundaryFieldRef();
|
||||
|
||||
forAllConstIter(labelHashSet, patchIDs_, iter)
|
||||
forAllConstIter(labelHashSet, patchIndices_, iter)
|
||||
{
|
||||
label patchi = iter.key();
|
||||
nybf[patchi] == -patches[patchi].nf();
|
||||
|
||||
@ -80,7 +80,7 @@ bool Foam::patchDistMethods::meshWave::correct(volScalarField& y)
|
||||
fvPatchDistWave::calculateAndCorrect
|
||||
(
|
||||
mesh_,
|
||||
patchIDs_,
|
||||
patchIndices_,
|
||||
minFaceFraction_,
|
||||
nCorrectors_,
|
||||
y
|
||||
@ -105,7 +105,7 @@ bool Foam::patchDistMethods::meshWave::correct
|
||||
fvPatchDistWave::calculateAndCorrect
|
||||
(
|
||||
mesh_,
|
||||
patchIDs_,
|
||||
patchIndices_,
|
||||
minFaceFraction_,
|
||||
nCorrectors_,
|
||||
y,
|
||||
|
||||
@ -43,7 +43,7 @@ Foam::patchDistMethod::patchDistMethod
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
patchIDs_(patchIDs)
|
||||
patchIndices_(patchIDs)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,7 +65,7 @@ protected:
|
||||
const fvMesh& mesh_;
|
||||
|
||||
//- Set of patch IDs
|
||||
const labelHashSet patchIDs_;
|
||||
const labelHashSet patchIndices_;
|
||||
|
||||
|
||||
public:
|
||||
@ -132,9 +132,9 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return the patchIDs
|
||||
const labelHashSet& patchIDs() const
|
||||
const labelHashSet& patchIndices() const
|
||||
{
|
||||
return patchIDs_;
|
||||
return patchIndices_;
|
||||
}
|
||||
|
||||
//- Update cached geometry when the mesh moves
|
||||
|
||||
@ -48,14 +48,14 @@ void Foam::wallDist::constructn() const
|
||||
),
|
||||
mesh(),
|
||||
dimensionedVector(dimless, Zero),
|
||||
patchDistMethod::patchTypes<vector>(mesh(), patchIDs_)
|
||||
patchDistMethod::patchTypes<vector>(mesh(), patchIndices_)
|
||||
);
|
||||
|
||||
const fvPatchList& patches = mesh().boundary();
|
||||
|
||||
volVectorField::Boundary& nbf = n_->boundaryFieldRef();
|
||||
|
||||
forAllConstIter(labelHashSet, patchIDs_, iter)
|
||||
forAllConstIter(labelHashSet, patchIndices_, iter)
|
||||
{
|
||||
label patchi = iter.key();
|
||||
nbf[patchi] == patches[patchi].nf();
|
||||
@ -68,7 +68,7 @@ void Foam::wallDist::constructn() const
|
||||
Foam::wallDist::wallDist(const fvMesh& mesh, const word& patchTypeName)
|
||||
:
|
||||
DemandDrivenMeshObject<fvMesh, DeletableMeshObject, wallDist>(mesh),
|
||||
patchIDs_(mesh.boundaryMesh().findIndices<wallPolyPatch>()),
|
||||
patchIndices_(mesh.boundaryMesh().findIndices<wallPolyPatch>()),
|
||||
patchTypeName_(patchTypeName),
|
||||
pdm_
|
||||
(
|
||||
@ -77,7 +77,7 @@ Foam::wallDist::wallDist(const fvMesh& mesh, const word& patchTypeName)
|
||||
static_cast<const fvSchemes&>(mesh)
|
||||
.subDict(patchTypeName_ & "Dist"),
|
||||
mesh,
|
||||
patchIDs_
|
||||
patchIndices_
|
||||
)
|
||||
),
|
||||
y_
|
||||
@ -90,7 +90,7 @@ Foam::wallDist::wallDist(const fvMesh& mesh, const word& patchTypeName)
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("y" & patchTypeName_, dimLength, small),
|
||||
patchDistMethod::patchTypes<scalar>(mesh, patchIDs_)
|
||||
patchDistMethod::patchTypes<scalar>(mesh, patchIndices_)
|
||||
),
|
||||
nRequired_
|
||||
(
|
||||
@ -118,7 +118,7 @@ Foam::wallDist::wallDist
|
||||
)
|
||||
:
|
||||
DemandDrivenMeshObject<fvMesh, DeletableMeshObject, wallDist>(mesh),
|
||||
patchIDs_(patchIDs),
|
||||
patchIndices_(patchIDs),
|
||||
patchTypeName_(patchTypeName),
|
||||
pdm_
|
||||
(
|
||||
@ -127,7 +127,7 @@ Foam::wallDist::wallDist
|
||||
static_cast<const fvSchemes&>(mesh)
|
||||
.subDict(patchTypeName_ & "Dist"),
|
||||
mesh,
|
||||
patchIDs_
|
||||
patchIndices_
|
||||
)
|
||||
),
|
||||
y_
|
||||
@ -140,7 +140,7 @@ Foam::wallDist::wallDist
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("y" & patchTypeName_, dimLength, small),
|
||||
patchDistMethod::patchTypes<scalar>(mesh, patchIDs_)
|
||||
patchDistMethod::patchTypes<scalar>(mesh, patchIndices_)
|
||||
),
|
||||
nRequired_
|
||||
(
|
||||
|
||||
@ -73,7 +73,7 @@ class wallDist
|
||||
// Private Data
|
||||
|
||||
//- Set of patch IDs
|
||||
const labelHashSet patchIDs_;
|
||||
const labelHashSet patchIndices_;
|
||||
|
||||
//- Name for the patch set, e.g. "wall"
|
||||
const word patchTypeName_;
|
||||
@ -143,9 +143,9 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return the patchIDs
|
||||
const labelHashSet& patchIDs() const
|
||||
const labelHashSet& patchIndices() const
|
||||
{
|
||||
return patchIDs_;
|
||||
return patchIndices_;
|
||||
}
|
||||
|
||||
//- Return reference to cached distance-to-wall field
|
||||
|
||||
@ -125,10 +125,10 @@ Foam::tmp<Foam::VolField<Type>> Foam::fvMeshToFvMesh::srcToTgt
|
||||
// Construct target patch fields as copies of source patch fields, but do
|
||||
// not map values yet
|
||||
PtrList<fvPatchField<Type>> tgtPatchFields(tgtMesh.boundary().size());
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
const label srcPatchi = patchIDs()[i].first();
|
||||
const label tgtPatchi = patchIDs()[i].second();
|
||||
const label srcPatchi = patchIndices()[i].first();
|
||||
const label tgtPatchi = patchIndices()[i].second();
|
||||
|
||||
if (!tgtPatchFields.set(tgtPatchi))
|
||||
{
|
||||
@ -185,10 +185,10 @@ Foam::tmp<Foam::VolField<Type>> Foam::fvMeshToFvMesh::srcToTgt
|
||||
ttgtFld.ref().boundaryFieldRef();
|
||||
|
||||
// Mapped patches
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
const label srcPatchi = patchIDs()[i].first();
|
||||
const label tgtPatchi = patchIDs()[i].second();
|
||||
const label srcPatchi = patchIndices()[i].first();
|
||||
const label tgtPatchi = patchIndices()[i].second();
|
||||
|
||||
tgtBfld[tgtPatchi].map
|
||||
(
|
||||
@ -238,10 +238,10 @@ Foam::tmp<Foam::VolField<Type>> Foam::fvMeshToFvMesh::srcToTgt
|
||||
ttgtFld.ref().boundaryFieldRef();
|
||||
|
||||
// Mapped patches
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
const label srcPatchi = patchIDs()[i].first();
|
||||
const label tgtPatchi = patchIDs()[i].second();
|
||||
const label srcPatchi = patchIndices()[i].first();
|
||||
const label tgtPatchi = patchIndices()[i].second();
|
||||
|
||||
tgtBfld[tgtPatchi].map
|
||||
(
|
||||
@ -320,10 +320,10 @@ Foam::fvMeshToFvMesh::srcToTgt
|
||||
|
||||
// Map all patch fields
|
||||
PtrList<fvsPatchField<Type>> tgtPatchFields(tgtMesh.boundary().size());
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
const label srcPatchi = patchIDs()[i].first();
|
||||
const label tgtPatchi = patchIDs()[i].second();
|
||||
const label srcPatchi = patchIndices()[i].first();
|
||||
const label tgtPatchi = patchIndices()[i].second();
|
||||
|
||||
if (!tgtPatchFields.set(tgtPatchi))
|
||||
{
|
||||
|
||||
@ -55,18 +55,18 @@ void Foam::functionObjects::layerAverage::calcLayers()
|
||||
// Initialise the faces from which the layers extrude
|
||||
DynamicList<label> startFaces;
|
||||
DynamicList<layerInfo> startFacesInfo;
|
||||
forAll(patchIDs_, i)
|
||||
forAll(patchIndices_, i)
|
||||
{
|
||||
const polyPatch& pp = mesh_.boundaryMesh()[patchIDs_[i]];
|
||||
const polyPatch& pp = mesh_.boundaryMesh()[patchIndices_[i]];
|
||||
forAll(pp, j)
|
||||
{
|
||||
startFaces.append(pp.start() + j);
|
||||
startFacesInfo.append(layerInfo(0, -1));
|
||||
}
|
||||
}
|
||||
forAll(zoneIDs_, i)
|
||||
forAll(zoneIndices_, i)
|
||||
{
|
||||
const faceZone& fz = mesh_.faceZones()[zoneIDs_[i]];
|
||||
const faceZone& fz = mesh_.faceZones()[zoneIndices_[i]];
|
||||
forAll(fz, j)
|
||||
{
|
||||
startFaces.append(fz[j]);
|
||||
@ -240,20 +240,20 @@ bool Foam::functionObjects::layerAverage::read(const dictionary& dict)
|
||||
{
|
||||
Info<< type() << " " << name() << ":" << nl;
|
||||
|
||||
patchIDs_ =
|
||||
patchIndices_ =
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
dict.lookupOrDefault<wordReList>("patches", wordReList())
|
||||
).toc();
|
||||
|
||||
zoneIDs_ =
|
||||
zoneIndices_ =
|
||||
findStrings
|
||||
(
|
||||
dict.lookupOrDefault<wordReList>("zones", wordReList()),
|
||||
mesh_.faceZones().names()
|
||||
);
|
||||
|
||||
if (patchIDs_.empty() && zoneIDs_.empty())
|
||||
if (patchIndices_.empty() && zoneIndices_.empty())
|
||||
{
|
||||
WarningInFunction
|
||||
<< "No patches or zones specified" << endl;
|
||||
|
||||
@ -96,13 +96,13 @@ class layerAverage
|
||||
// Private Data
|
||||
|
||||
//- Patches which form the start of the layers
|
||||
labelList patchIDs_;
|
||||
labelList patchIndices_;
|
||||
|
||||
//- Zones which form the start of the layers
|
||||
labelList zoneIDs_;
|
||||
labelList zoneIndices_;
|
||||
|
||||
//- Zones on which the layers are considered to end
|
||||
labelList endZoneIDs_;
|
||||
labelList endZoneIndices_;
|
||||
|
||||
//- Is the case symmetric?
|
||||
bool symmetric_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -205,7 +205,7 @@ Foam::scalar Foam::engineValve::curVelocity() const
|
||||
}
|
||||
|
||||
|
||||
Foam::labelList Foam::engineValve::movingPatchIDs() const
|
||||
Foam::labelList Foam::engineValve::movingPatchIndices() const
|
||||
{
|
||||
labelList mpIDs(2);
|
||||
label nMpIDs = 0;
|
||||
|
||||
@ -288,7 +288,7 @@ public:
|
||||
|
||||
//- Return list of active patch labels for the valve head
|
||||
// (stem is excluded)
|
||||
labelList movingPatchIDs() const;
|
||||
labelList movingPatchIndices() const;
|
||||
|
||||
|
||||
//- Write dictionary
|
||||
|
||||
@ -174,8 +174,8 @@ void Foam::fvMeshStitchers::moving::createNonConformalCorrectMeshPhiGeometry
|
||||
)
|
||||
{
|
||||
const nonConformalBoundary& ncb = nonConformalBoundary::New(mesh());
|
||||
const labelList origPatchIDs = ncb.allOrigPatchIDs();
|
||||
const labelList errorPatchIDs = ncb.allErrorPatchIDs();
|
||||
const labelList origPatchIDs = ncb.allOrigPatchIndices();
|
||||
const labelList errorPatchIDs = ncb.allErrorPatchIndices();
|
||||
|
||||
forAll(origPatchIDs, i)
|
||||
{
|
||||
@ -856,8 +856,8 @@ void Foam::fvMeshStitchers::moving::unconformErrorFaceCorrectMeshPhi
|
||||
)
|
||||
{
|
||||
const nonConformalBoundary& ncb = nonConformalBoundary::New(mesh());
|
||||
const labelList origPatchIDs = ncb.allOrigPatchIDs();
|
||||
const labelList errorPatchIDs = ncb.allErrorPatchIDs();
|
||||
const labelList origPatchIDs = ncb.allOrigPatchIndices();
|
||||
const labelList errorPatchIDs = ncb.allErrorPatchIndices();
|
||||
|
||||
// Synchronise the mesh fluxes on both sides of coupled patches. Store
|
||||
// the change made to the mesh flux as an error.
|
||||
|
||||
@ -91,7 +91,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
const scalar alpha = (totalTime_ - timeElapsed)/totalTime_;
|
||||
const scalar beta = timeElapsed/totalTime_;
|
||||
|
||||
forAll(faceZoneIDs_, zoneI)
|
||||
forAll(faceZoneIndices_, zoneI)
|
||||
{
|
||||
massFlowRate_[zoneI] =
|
||||
alpha*massFlowRate_[zoneI] + beta*mass_[zoneI]/timeElapsed;
|
||||
@ -104,9 +104,9 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
|
||||
List<scalarField> zoneMassTotal(mass_.size());
|
||||
List<scalarField> zoneMassFlowRate(massFlowRate_.size());
|
||||
forAll(faceZoneIDs_, zoneI)
|
||||
forAll(faceZoneIndices_, zoneI)
|
||||
{
|
||||
const word& zoneName = mfz[faceZoneIDs_[zoneI]].name();
|
||||
const word& zoneName = mfz[faceZoneIndices_[zoneI]].name();
|
||||
|
||||
scalarListList allProcMass(Pstream::nProcs());
|
||||
allProcMass[proci] = massTotal_[zoneI];
|
||||
@ -146,9 +146,9 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
|
||||
if (surfaceFormat_ != "none")
|
||||
{
|
||||
forAll(faceZoneIDs_, zoneI)
|
||||
forAll(faceZoneIndices_, zoneI)
|
||||
{
|
||||
const faceZone& fZone = mfz[faceZoneIDs_[zoneI]];
|
||||
const faceZone& fZone = mfz[faceZoneIndices_[zoneI]];
|
||||
|
||||
labelList pointToGlobal;
|
||||
labelList uniqueMeshPointLabels;
|
||||
@ -217,7 +217,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
|
||||
if (resetOnWrite_)
|
||||
{
|
||||
forAll(faceZoneIDs_, zoneI)
|
||||
forAll(faceZoneIndices_, zoneI)
|
||||
{
|
||||
massFlowRate_[zoneI] = 0.0;
|
||||
}
|
||||
@ -245,7 +245,7 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing
|
||||
)
|
||||
:
|
||||
CloudFunctionObject<CloudType>(dict, owner, modelName, typeName),
|
||||
faceZoneIDs_(),
|
||||
faceZoneIndices_(),
|
||||
surfaceFormat_(this->coeffDict().lookup("surfaceFormat")),
|
||||
resetOnWrite_(this->coeffDict().lookup("resetOnWrite")),
|
||||
totalTime_(0.0),
|
||||
@ -313,7 +313,7 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing
|
||||
}
|
||||
}
|
||||
|
||||
faceZoneIDs_.transfer(zoneIDs);
|
||||
faceZoneIndices_.transfer(zoneIDs);
|
||||
|
||||
// readProperties(); AND initialise mass... fields
|
||||
}
|
||||
@ -326,7 +326,7 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing
|
||||
)
|
||||
:
|
||||
CloudFunctionObject<CloudType>(pff),
|
||||
faceZoneIDs_(pff.faceZoneIDs_),
|
||||
faceZoneIndices_(pff.faceZoneIndices_),
|
||||
surfaceFormat_(pff.surfaceFormat_),
|
||||
resetOnWrite_(pff.resetOnWrite_),
|
||||
totalTime_(pff.totalTime_),
|
||||
@ -359,9 +359,9 @@ void Foam::FacePostProcessing<CloudType>::preFace(const parcelType& p)
|
||||
{
|
||||
const meshFaceZones& mfz = this->owner().mesh().faceZones();
|
||||
|
||||
forAll(faceZoneIDs_, i)
|
||||
forAll(faceZoneIndices_, i)
|
||||
{
|
||||
const faceZone& fz = mfz[faceZoneIDs_[i]];
|
||||
const faceZone& fz = mfz[faceZoneIndices_[i]];
|
||||
|
||||
label faceId = -1;
|
||||
forAll(fz, j)
|
||||
|
||||
@ -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
|
||||
@ -65,7 +65,7 @@ class FacePostProcessing
|
||||
|
||||
|
||||
//- Face zone IDs
|
||||
labelList faceZoneIDs_;
|
||||
labelList faceZoneIndices_;
|
||||
|
||||
//- Surface output format
|
||||
const word surfaceFormat_;
|
||||
|
||||
@ -321,7 +321,7 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
||||
// Add to the list of hits
|
||||
if (inside)
|
||||
{
|
||||
hitFaceIDs_.append(facei);
|
||||
hitFaceIndices_.append(facei);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -377,7 +377,7 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
|
||||
|
||||
if (secI != -1)
|
||||
{
|
||||
hitFaceIDs_.append(secI);
|
||||
hitFaceIndices_.append(secI);
|
||||
}
|
||||
}
|
||||
|
||||
@ -530,7 +530,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
|
||||
log_(this->coeffDict().lookup("log")),
|
||||
outputFilePtr_(),
|
||||
timeOld_(owner.mesh().time().value()),
|
||||
hitFaceIDs_()
|
||||
hitFaceIndices_()
|
||||
{
|
||||
normal_ /= mag(normal_);
|
||||
|
||||
@ -612,7 +612,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
|
||||
log_(pc.log_),
|
||||
outputFilePtr_(),
|
||||
timeOld_(0.0),
|
||||
hitFaceIDs_()
|
||||
hitFaceIndices_()
|
||||
{}
|
||||
|
||||
|
||||
@ -639,7 +639,7 @@ void Foam::ParticleCollector<CloudType>::postMove
|
||||
return;
|
||||
}
|
||||
|
||||
hitFaceIDs_.clear();
|
||||
hitFaceIndices_.clear();
|
||||
|
||||
switch (mode_)
|
||||
{
|
||||
@ -665,9 +665,9 @@ void Foam::ParticleCollector<CloudType>::postMove
|
||||
{}
|
||||
}
|
||||
|
||||
forAll(hitFaceIDs_, i)
|
||||
forAll(hitFaceIndices_, i)
|
||||
{
|
||||
label facei = hitFaceIDs_[i];
|
||||
label facei = hitFaceIndices_[i];
|
||||
scalar m = p.nParticle()*p.mass();
|
||||
|
||||
if (negateParcelsOppositeNormal_)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -193,7 +193,7 @@ private:
|
||||
scalar timeOld_;
|
||||
|
||||
//- Work list to store which faces are hit
|
||||
mutable DynamicList<label> hitFaceIDs_;
|
||||
mutable DynamicList<label> hitFaceIndices_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -36,9 +36,9 @@ Foam::label Foam::ParticleErosion<CloudType>::applyToPatch
|
||||
const label globalPatchi
|
||||
) const
|
||||
{
|
||||
forAll(patchIDs_, i)
|
||||
forAll(patchIndices_, i)
|
||||
{
|
||||
if (patchIDs_[i] == globalPatchi)
|
||||
if (patchIndices_[i] == globalPatchi)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
@ -75,7 +75,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion
|
||||
:
|
||||
CloudFunctionObject<CloudType>(dict, owner, modelName, typeName),
|
||||
QPtr_(nullptr),
|
||||
patchIDs_(),
|
||||
patchIndices_(),
|
||||
p_(this->coeffDict().template lookup<scalar>("p")),
|
||||
psi_(this->coeffDict().template lookupOrDefault<scalar>("psi", 2.0)),
|
||||
K_(this->coeffDict().template lookupOrDefault<scalar>("K", 2.0))
|
||||
@ -98,7 +98,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion
|
||||
uniquePatchIDs.insert(patchIDs);
|
||||
}
|
||||
|
||||
patchIDs_ = uniquePatchIDs.toc();
|
||||
patchIndices_ = uniquePatchIDs.toc();
|
||||
|
||||
// Trigger creation of the Q field
|
||||
preEvolve();
|
||||
@ -113,7 +113,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion
|
||||
:
|
||||
CloudFunctionObject<CloudType>(pe),
|
||||
QPtr_(nullptr),
|
||||
patchIDs_(pe.patchIDs_),
|
||||
patchIndices_(pe.patchIndices_),
|
||||
p_(pe.p_),
|
||||
psi_(pe.psi_),
|
||||
K_(pe.K_)
|
||||
|
||||
@ -106,7 +106,7 @@ class ParticleErosion
|
||||
autoPtr<volScalarField> QPtr_;
|
||||
|
||||
//- List of patch indices to post-process
|
||||
labelList patchIDs_;
|
||||
labelList patchIndices_;
|
||||
|
||||
//- Plastic flow stress
|
||||
scalar p_;
|
||||
|
||||
@ -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
|
||||
@ -38,9 +38,9 @@ Foam::label Foam::PatchPostProcessing<CloudType>::applyToPatch
|
||||
const label globalPatchi
|
||||
) const
|
||||
{
|
||||
forAll(patchIDs_, i)
|
||||
forAll(patchIndices_, i)
|
||||
{
|
||||
if (patchIDs_[i] == globalPatchi)
|
||||
if (patchIndices_[i] == globalPatchi)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
@ -72,7 +72,8 @@ void Foam::PatchPostProcessing<CloudType>::write()
|
||||
// Create directory if it doesn't exist
|
||||
mkDir(this->writeTimeDir());
|
||||
|
||||
const word& patchName = mesh.boundaryMesh()[patchIDs_[i]].name();
|
||||
const word& patchName =
|
||||
mesh.boundaryMesh()[patchIndices_[i]].name();
|
||||
|
||||
OFstream patchOutFile
|
||||
(
|
||||
@ -134,7 +135,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
||||
(
|
||||
this->coeffDict().template lookup<scalar>("maxStoredParcels")
|
||||
),
|
||||
patchIDs_(),
|
||||
patchIndices_(),
|
||||
times_(),
|
||||
patchData_()
|
||||
{
|
||||
@ -156,20 +157,20 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
||||
uniquePatchIDs.insert(patchIDs);
|
||||
}
|
||||
|
||||
patchIDs_ = uniquePatchIDs.toc();
|
||||
patchIndices_ = uniquePatchIDs.toc();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
forAll(patchIDs_, i)
|
||||
forAll(patchIndices_, i)
|
||||
{
|
||||
const label patchi = patchIDs_[i];
|
||||
const label patchi = patchIndices_[i];
|
||||
const word& patchName = owner.mesh().boundaryMesh()[patchi].name();
|
||||
Info<< "Post-process patch " << patchName << endl;
|
||||
}
|
||||
}
|
||||
|
||||
patchData_.setSize(patchIDs_.size());
|
||||
times_.setSize(patchIDs_.size());
|
||||
patchData_.setSize(patchIndices_.size());
|
||||
times_.setSize(patchIndices_.size());
|
||||
}
|
||||
|
||||
|
||||
@ -181,7 +182,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
||||
:
|
||||
CloudFunctionObject<CloudType>(ppm),
|
||||
maxStoredParcels_(ppm.maxStoredParcels_),
|
||||
patchIDs_(ppm.patchIDs_),
|
||||
patchIndices_(ppm.patchIndices_),
|
||||
times_(ppm.times_),
|
||||
patchData_(ppm.patchData_)
|
||||
{}
|
||||
|
||||
@ -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
|
||||
@ -59,7 +59,7 @@ class PatchPostProcessing
|
||||
scalar maxStoredParcels_;
|
||||
|
||||
//- List of patch indices to post-process
|
||||
labelList patchIDs_;
|
||||
labelList patchIndices_;
|
||||
|
||||
//- List of time for each data record
|
||||
List<DynamicList<scalar>> times_;
|
||||
@ -123,7 +123,7 @@ public:
|
||||
inline label maxStoredParcels() const;
|
||||
|
||||
//- Return const mapping from local to global patch ids
|
||||
inline const labelList& patchIDs() const;
|
||||
inline const labelList& patchIndices() const;
|
||||
|
||||
|
||||
// Evaluation
|
||||
|
||||
@ -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
|
||||
@ -31,9 +31,10 @@ Foam::label Foam::PatchPostProcessing<CloudType>::maxStoredParcels() const
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::labelList& Foam::PatchPostProcessing<CloudType>::patchIDs() const
|
||||
const Foam::labelList&
|
||||
Foam::PatchPostProcessing<CloudType>::patchIndices() const
|
||||
{
|
||||
return patchIDs_;
|
||||
return patchIndices_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -626,7 +626,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
|
||||
// 2. Seed non-adapt patches
|
||||
const polyBoundaryMesh& patches = mesh().boundaryMesh();
|
||||
|
||||
labelHashSet adaptPatches(adaptPatchIDs_);
|
||||
labelHashSet adaptPatches(adaptPatchIndices_);
|
||||
|
||||
|
||||
forAll(patches, patchi)
|
||||
@ -1526,8 +1526,8 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
|
||||
)
|
||||
:
|
||||
externalDisplacementMeshMover(dict, baffles, pointDisplacement),
|
||||
adaptPatchIDs_(getFixedValueBCs(pointDisplacement)),
|
||||
adaptPatchPtr_(getPatch(mesh(), adaptPatchIDs_)),
|
||||
adaptPatchIndices_(getFixedValueBCs(pointDisplacement)),
|
||||
adaptPatchPtr_(getPatch(mesh(), adaptPatchIndices_)),
|
||||
scale_
|
||||
(
|
||||
IOobject
|
||||
@ -1550,7 +1550,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
|
||||
pointDisplacement,
|
||||
scale_,
|
||||
oldPoints_,
|
||||
adaptPatchIDs_,
|
||||
adaptPatchIndices_,
|
||||
dict
|
||||
),
|
||||
dispVec_
|
||||
|
||||
@ -62,7 +62,7 @@ class medialAxisMeshMover
|
||||
{
|
||||
// Private Data
|
||||
|
||||
const labelList adaptPatchIDs_;
|
||||
const labelList adaptPatchIndices_;
|
||||
|
||||
autoPtr<indirectPrimitivePatch> adaptPatchPtr_;
|
||||
|
||||
|
||||
@ -365,7 +365,7 @@ Foam::motionSmootherAlgo::motionSmootherAlgo
|
||||
displacement_(displacement),
|
||||
scale_(scale),
|
||||
oldPoints_(oldPoints),
|
||||
adaptPatchIDs_(adaptPatchIDs),
|
||||
adaptPatchIndices_(adaptPatchIDs),
|
||||
paramDict_(paramDict),
|
||||
isInternalPoint_(mesh_.nPoints(), 1)
|
||||
{
|
||||
@ -399,9 +399,9 @@ const Foam::indirectPrimitivePatch& Foam::motionSmootherAlgo::patch() const
|
||||
}
|
||||
|
||||
|
||||
const Foam::labelList& Foam::motionSmootherAlgo::adaptPatchIDs() const
|
||||
const Foam::labelList& Foam::motionSmootherAlgo::adaptPatchIndices() const
|
||||
{
|
||||
return adaptPatchIDs_;
|
||||
return adaptPatchIndices_;
|
||||
}
|
||||
|
||||
|
||||
@ -488,7 +488,7 @@ void Foam::motionSmootherAlgo::setDisplacementPatchFields
|
||||
|
||||
void Foam::motionSmootherAlgo::setDisplacementPatchFields()
|
||||
{
|
||||
setDisplacementPatchFields(adaptPatchIDs_, displacement_);
|
||||
setDisplacementPatchFields(adaptPatchIndices_, displacement_);
|
||||
}
|
||||
|
||||
|
||||
@ -571,7 +571,7 @@ void Foam::motionSmootherAlgo::setDisplacement
|
||||
|
||||
void Foam::motionSmootherAlgo::setDisplacement(pointField& patchDisp)
|
||||
{
|
||||
setDisplacement(adaptPatchIDs_, pp_, patchDisp, displacement_);
|
||||
setDisplacement(adaptPatchIndices_, pp_, patchDisp, displacement_);
|
||||
}
|
||||
|
||||
|
||||
@ -581,7 +581,7 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
|
||||
pointVectorField& displacement
|
||||
) const
|
||||
{
|
||||
labelHashSet adaptPatchSet(adaptPatchIDs_);
|
||||
labelHashSet adaptPatchSet(adaptPatchIndices_);
|
||||
|
||||
const lduSchedule& patchSchedule = mesh_.globalData().patchSchedule();
|
||||
|
||||
@ -838,7 +838,7 @@ bool Foam::motionSmootherAlgo::scaleMesh
|
||||
const label nAllowableErrors
|
||||
)
|
||||
{
|
||||
if (!smoothMesh && adaptPatchIDs_.empty())
|
||||
if (!smoothMesh && adaptPatchIndices_.empty())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "You specified both no movement on the internal mesh points"
|
||||
@ -980,7 +980,7 @@ bool Foam::motionSmootherAlgo::scaleMesh
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (adaptPatchIDs_.size())
|
||||
if (adaptPatchIndices_.size())
|
||||
{
|
||||
// Scale conflicting patch points
|
||||
scaleField(pp_.meshPoints(), usedPoints, errorReduction, scale_);
|
||||
@ -997,7 +997,7 @@ bool Foam::motionSmootherAlgo::scaleMesh
|
||||
|
||||
for (label i = 0; i < nSmoothScale; i++)
|
||||
{
|
||||
if (adaptPatchIDs_.size())
|
||||
if (adaptPatchIndices_.size())
|
||||
{
|
||||
// Smooth patch values
|
||||
pointScalarField oldScale(scale_);
|
||||
@ -1047,9 +1047,9 @@ void Foam::motionSmootherAlgo::topoChange()
|
||||
const pointBoundaryMesh& patches = pMesh_.boundary();
|
||||
|
||||
// Check whether displacement has fixed value b.c. on adaptPatchID
|
||||
forAll(adaptPatchIDs_, i)
|
||||
forAll(adaptPatchIndices_, i)
|
||||
{
|
||||
label patchi = adaptPatchIDs_[i];
|
||||
label patchi = adaptPatchIndices_[i];
|
||||
|
||||
if
|
||||
(
|
||||
|
||||
@ -153,7 +153,7 @@ class motionSmootherAlgo
|
||||
|
||||
//- Indices of fixedValue patches that we're allowed to modify the
|
||||
// displacement on.
|
||||
const labelList adaptPatchIDs_;
|
||||
const labelList adaptPatchIndices_;
|
||||
|
||||
// Smoothing and checking parameters
|
||||
dictionary paramDict_;
|
||||
@ -324,7 +324,7 @@ public:
|
||||
const indirectPrimitivePatch& patch() const;
|
||||
|
||||
//- Patch labels that are being adapted
|
||||
const labelList& adaptPatchIDs() const;
|
||||
const labelList& adaptPatchIndices() const;
|
||||
|
||||
const dictionary& paramDict() const;
|
||||
|
||||
|
||||
@ -1111,7 +1111,7 @@ void Foam::snappyLayerDriver::medialAxisSmoothingInfo
|
||||
// 2. Seed non-adapt patches
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
labelHashSet adaptPatches(meshMover.adaptPatchIDs());
|
||||
labelHashSet adaptPatches(meshMover.adaptPatchIndices());
|
||||
|
||||
|
||||
forAll(patches, patchi)
|
||||
|
||||
@ -38,7 +38,7 @@ Foam::patchPatchDist::patchPatchDist
|
||||
)
|
||||
:
|
||||
patch_(patch),
|
||||
nbrPatchIDs_(nbrPatchIDs),
|
||||
nbrPatchIndices_(nbrPatchIDs),
|
||||
nUnset_(0)
|
||||
{
|
||||
patchPatchDist::correct();
|
||||
@ -57,7 +57,7 @@ void Foam::patchPatchDist::correct()
|
||||
{
|
||||
// Mark all edge connected to a nbrPatch.
|
||||
label nBnd = 0;
|
||||
forAllConstIter(labelHashSet, nbrPatchIDs_, iter)
|
||||
forAllConstIter(labelHashSet, nbrPatchIndices_, iter)
|
||||
{
|
||||
label nbrPatchi = iter.key();
|
||||
const polyPatch& nbrPatch = patch_.boundaryMesh()[nbrPatchi];
|
||||
@ -68,7 +68,7 @@ void Foam::patchPatchDist::correct()
|
||||
// functionality for these.
|
||||
EdgeMap<label> nbrEdges(2*nBnd);
|
||||
|
||||
forAllConstIter(labelHashSet, nbrPatchIDs_, iter)
|
||||
forAllConstIter(labelHashSet, nbrPatchIndices_, iter)
|
||||
{
|
||||
label nbrPatchi = iter.key();
|
||||
const polyPatch& nbrPatch = patch_.boundaryMesh()[nbrPatchi];
|
||||
|
||||
@ -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
|
||||
@ -61,7 +61,7 @@ class patchPatchDist
|
||||
const polyPatch& patch_;
|
||||
|
||||
//- Patches to determine the distance to
|
||||
const labelHashSet nbrPatchIDs_;
|
||||
const labelHashSet nbrPatchIndices_;
|
||||
|
||||
//- Number of unset faces.
|
||||
label nUnset_;
|
||||
|
||||
@ -52,7 +52,7 @@ Foam::meshToMesh::meshToMesh
|
||||
cellsInterpolation_(),
|
||||
srcCellsStabilisation_(),
|
||||
tgtCellsStabilisation_(),
|
||||
patchIDs_(),
|
||||
patchIndices_(),
|
||||
patchInterpolations_(),
|
||||
srcPatchStabilisations_(),
|
||||
tgtPatchStabilisations_()
|
||||
@ -97,13 +97,13 @@ Foam::meshToMesh::meshToMesh
|
||||
}
|
||||
}
|
||||
|
||||
patchIDs_.transfer(patchIDs);
|
||||
patchIndices_.transfer(patchIDs);
|
||||
}
|
||||
|
||||
// If a patch mas was supplied then convert it to pairs of patch indices
|
||||
else
|
||||
{
|
||||
patchIDs_.setSize(patchMap.size());
|
||||
patchIndices_.setSize(patchMap.size());
|
||||
label i = 0;
|
||||
forAllConstIter(HashTable<word>, patchMap, iter)
|
||||
{
|
||||
@ -134,7 +134,7 @@ Foam::meshToMesh::meshToMesh
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
patchIDs_[i ++] = labelPair(srcPatchi, tgtPatchi);
|
||||
patchIndices_[i ++] = labelPair(srcPatchi, tgtPatchi);
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,13 +152,13 @@ Foam::meshToMesh::meshToMesh
|
||||
Info<< decrIndent;
|
||||
|
||||
// Calculate patch addressing and weights
|
||||
patchInterpolations_.setSize(patchIDs_.size());
|
||||
srcPatchStabilisations_.setSize(patchIDs_.size());
|
||||
tgtPatchStabilisations_.setSize(patchIDs_.size());
|
||||
forAll(patchIDs_, i)
|
||||
patchInterpolations_.setSize(patchIndices_.size());
|
||||
srcPatchStabilisations_.setSize(patchIndices_.size());
|
||||
tgtPatchStabilisations_.setSize(patchIndices_.size());
|
||||
forAll(patchIndices_, i)
|
||||
{
|
||||
const label srcPatchi = patchIDs_[i].first();
|
||||
const label tgtPatchi = patchIDs_[i].second();
|
||||
const label srcPatchi = patchIndices_[i].first();
|
||||
const label tgtPatchi = patchIndices_[i].second();
|
||||
|
||||
const polyPatch& srcPp = srcMesh_.boundaryMesh()[srcPatchi];
|
||||
const polyPatch& tgtPp = tgtMesh_.boundaryMesh()[tgtPatchi];
|
||||
@ -199,10 +199,10 @@ bool Foam::meshToMesh::consistent() const
|
||||
boolList tgtPatchIsMapped(tgtMesh_.boundaryMesh().size(), false);
|
||||
|
||||
// Mark anything paired as mapped
|
||||
forAll(patchIDs_, i)
|
||||
forAll(patchIndices_, i)
|
||||
{
|
||||
const label srcPatchi = patchIDs_[i].first();
|
||||
const label tgtPatchi = patchIDs_[i].second();
|
||||
const label srcPatchi = patchIndices_[i].first();
|
||||
const label tgtPatchi = patchIndices_[i].second();
|
||||
|
||||
srcPatchIsMapped[srcPatchi] = true;
|
||||
tgtPatchIsMapped[tgtPatchi] = true;
|
||||
|
||||
@ -71,7 +71,7 @@ class meshToMesh
|
||||
mutable autoPtr<cellsToCellsStabilisation> tgtCellsStabilisation_;
|
||||
|
||||
//- List of corresponding source and target patch indices
|
||||
List<labelPair> patchIDs_;
|
||||
List<labelPair> patchIndices_;
|
||||
|
||||
//- List of interpolation engines between source and target patches
|
||||
PtrList<patchToPatch> patchInterpolations_;
|
||||
@ -101,7 +101,7 @@ protected:
|
||||
tgtCellsStabilisation() const;
|
||||
|
||||
//- Return the list of corresponding source and target patch indices
|
||||
inline const List<labelPair>& patchIDs() const;
|
||||
inline const List<labelPair>& patchIndices() const;
|
||||
|
||||
//- Return the interpolation engine between a source and a target
|
||||
// patch
|
||||
|
||||
@ -67,9 +67,9 @@ Foam::meshToMesh::tgtCellsStabilisation() const
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::List<Foam::labelPair>& Foam::meshToMesh::patchIDs() const
|
||||
inline const Foam::List<Foam::labelPair>& Foam::meshToMesh::patchIndices() const
|
||||
{
|
||||
return patchIDs_;
|
||||
return patchIndices_;
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ Foam::meshToMesh::srcPatchStabilisation(const label i) const
|
||||
{
|
||||
if (!srcPatchStabilisations_.set(i))
|
||||
{
|
||||
const label srcPatchi = patchIDs_[i].first();
|
||||
const label srcPatchi = patchIndices_[i].first();
|
||||
const polyPatch& srcPp = srcMesh_.boundaryMesh()[srcPatchi];
|
||||
|
||||
srcPatchStabilisations_.set(i, new patchToPatchStabilisation());
|
||||
@ -107,7 +107,7 @@ Foam::meshToMesh::tgtPatchStabilisation(const label i) const
|
||||
{
|
||||
if (!tgtPatchStabilisations_.set(i))
|
||||
{
|
||||
const label tgtPatchi = patchIDs_[i].first();
|
||||
const label tgtPatchi = patchIndices_[i].first();
|
||||
const polyPatch& tgtPp = tgtMesh_.boundaryMesh()[tgtPatchi];
|
||||
|
||||
tgtPatchStabilisations_.set(i, new patchToPatchStabilisation());
|
||||
|
||||
@ -186,7 +186,7 @@ Foam::nonConformalBoundary::nonConformalBoundary(const polyMesh& mesh)
|
||||
MoveableMeshObject,
|
||||
nonConformalBoundary
|
||||
>(mesh),
|
||||
ownerOrigBoundary_(boundary(ownerOrigPatchIDs())),
|
||||
ownerOrigBoundary_(boundary(ownerOrigPatchIndices())),
|
||||
meshPointOwnerOrigBoundaryPointPtr_(nullptr),
|
||||
ownerOrigBoundaryPointMeshPointPtr_(nullptr),
|
||||
ownerOrigBoundaryEdgeMeshEdgePtr_(nullptr),
|
||||
@ -254,28 +254,28 @@ Foam::labelList Foam::nonConformalBoundary::nonConformalNonCoupledPatchIDs
|
||||
}
|
||||
|
||||
|
||||
Foam::labelList Foam::nonConformalBoundary::allOrigPatchIDs() const
|
||||
Foam::labelList Foam::nonConformalBoundary::allOrigPatchIndices() const
|
||||
{
|
||||
auto method = &nonConformalCoupledPolyPatch::origPatchID;
|
||||
return nonConformalNonCoupledPatchIDs(0, method);
|
||||
}
|
||||
|
||||
|
||||
Foam::labelList Foam::nonConformalBoundary::allErrorPatchIDs() const
|
||||
Foam::labelList Foam::nonConformalBoundary::allErrorPatchIndices() const
|
||||
{
|
||||
auto method = &nonConformalCoupledPolyPatch::errorPatchID;
|
||||
return nonConformalNonCoupledPatchIDs(0, method);
|
||||
}
|
||||
|
||||
|
||||
Foam::labelList Foam::nonConformalBoundary::ownerOrigPatchIDs() const
|
||||
Foam::labelList Foam::nonConformalBoundary::ownerOrigPatchIndices() const
|
||||
{
|
||||
auto method = &nonConformalCoupledPolyPatch::origPatchID;
|
||||
return nonConformalNonCoupledPatchIDs(1, method);
|
||||
}
|
||||
|
||||
|
||||
Foam::labelList Foam::nonConformalBoundary::ownerErrorPatchIDs() const
|
||||
Foam::labelList Foam::nonConformalBoundary::ownerErrorPatchIndices() const
|
||||
{
|
||||
auto method = &nonConformalCoupledPolyPatch::errorPatchID;
|
||||
return nonConformalNonCoupledPatchIDs(1, method);
|
||||
@ -339,7 +339,7 @@ Foam::nonConformalBoundary::ownerOrigBoundaryEdgeMeshEdge() const
|
||||
if (!ownerOrigBoundaryEdgeMeshEdgePtr_.valid())
|
||||
{
|
||||
// Create boundary of all owner-orig and proc patches
|
||||
labelList ownerOrigAndProcPatchIDs = this->ownerOrigPatchIDs();
|
||||
labelList ownerOrigAndProcPatchIDs = this->ownerOrigPatchIndices();
|
||||
forAll(mesh().boundaryMesh(), patchi)
|
||||
{
|
||||
if (isA<processorPolyPatch>(mesh().boundaryMesh()[patchi]))
|
||||
|
||||
@ -153,16 +153,16 @@ public:
|
||||
) const;
|
||||
|
||||
//- Return a list of the orig patch indices
|
||||
labelList allOrigPatchIDs() const;
|
||||
labelList allOrigPatchIndices() const;
|
||||
|
||||
//- Return a list of the error patch indices
|
||||
labelList allErrorPatchIDs() const;
|
||||
labelList allErrorPatchIndices() const;
|
||||
|
||||
//- Return a list of the owner-orig patch indices
|
||||
labelList ownerOrigPatchIDs() const;
|
||||
labelList ownerOrigPatchIndices() const;
|
||||
|
||||
//- Return a list of the owner error patch indices
|
||||
labelList ownerErrorPatchIDs() const;
|
||||
labelList ownerErrorPatchIndices() const;
|
||||
|
||||
//- Get a map from owner-orig boundary point to mesh point
|
||||
const labelList& ownerOrigBoundaryPointMeshPoint() const;
|
||||
|
||||
@ -49,7 +49,7 @@ Foam::pointDist::pointDist
|
||||
dimensionedScalar(dimLength, great)
|
||||
),
|
||||
points_(points),
|
||||
patchIDs_(patchIDs),
|
||||
patchIndices_(patchIDs),
|
||||
nUnset_(0)
|
||||
{
|
||||
correct();
|
||||
@ -76,8 +76,8 @@ Foam::pointDist::pointDist
|
||||
dimensionedScalar(dimLength, great)
|
||||
),
|
||||
points_(points),
|
||||
patchIDs_(patchIDs),
|
||||
zoneIDs_(zoneIDs),
|
||||
patchIndices_(patchIDs),
|
||||
zoneIndices_(zoneIDs),
|
||||
nUnset_(0)
|
||||
{
|
||||
correct();
|
||||
@ -98,13 +98,13 @@ void Foam::pointDist::correct()
|
||||
|
||||
label nPatchPoints = 0;
|
||||
|
||||
forAllConstIter(labelHashSet, patchIDs_, iter)
|
||||
forAllConstIter(labelHashSet, patchIndices_, iter)
|
||||
{
|
||||
const label patchi = iter.key();
|
||||
nPatchPoints += pbm[patchi].meshPoints().size();
|
||||
}
|
||||
|
||||
forAllConstIter(labelHashSet, zoneIDs_, iter)
|
||||
forAllConstIter(labelHashSet, zoneIndices_, iter)
|
||||
{
|
||||
const label zonei = iter.key();
|
||||
nPatchPoints += mesh()().pointZones()[zonei].size();
|
||||
@ -118,7 +118,7 @@ void Foam::pointDist::correct()
|
||||
nPatchPoints = 0;
|
||||
|
||||
// Add the patch points to the patchPointsInfo
|
||||
forAllConstIter(labelHashSet, patchIDs_, iter)
|
||||
forAllConstIter(labelHashSet, patchIndices_, iter)
|
||||
{
|
||||
const label patchi = iter.key();
|
||||
const labelList& mp = pbm[patchi].meshPoints();
|
||||
@ -137,7 +137,7 @@ void Foam::pointDist::correct()
|
||||
}
|
||||
|
||||
// Add the zone points to the patchPointsInfo
|
||||
forAllConstIter(labelHashSet, zoneIDs_, iter)
|
||||
forAllConstIter(labelHashSet, zoneIndices_, iter)
|
||||
{
|
||||
const label zonei = iter.key();
|
||||
const labelList& zonePoints = mesh()().pointZones()[zonei];
|
||||
@ -191,7 +191,7 @@ void Foam::pointDist::correct()
|
||||
}
|
||||
}
|
||||
|
||||
forAllConstIter(labelHashSet, zoneIDs_, iter)
|
||||
forAllConstIter(labelHashSet, zoneIndices_, iter)
|
||||
{
|
||||
const label zonei = iter.key();
|
||||
const labelList& zonePoints = mesh()().pointZones()[zonei];
|
||||
|
||||
@ -59,10 +59,10 @@ class pointDist
|
||||
const pointField& points_;
|
||||
|
||||
//- Set of patch IDs
|
||||
const labelHashSet patchIDs_;
|
||||
const labelHashSet patchIndices_;
|
||||
|
||||
//- Set of pointZone IDs for which the distance is 0
|
||||
const labelHashSet zoneIDs_;
|
||||
const labelHashSet zoneIndices_;
|
||||
|
||||
//- Number of unset points
|
||||
label nUnset_;
|
||||
|
||||
@ -55,18 +55,18 @@ Foam::multiSolidBodyMotionSolver::multiSolidBodyMotionSolver
|
||||
:
|
||||
points0MotionSolver(name, mesh, dict, typeName)
|
||||
{
|
||||
zoneIDs_.setSize(coeffDict().size());
|
||||
zoneIndices_.setSize(coeffDict().size());
|
||||
SBMFs_.setSize(coeffDict().size());
|
||||
pointIDs_.setSize(coeffDict().size());
|
||||
pointIndices_.setSize(coeffDict().size());
|
||||
label zonei = 0;
|
||||
|
||||
forAllConstIter(dictionary, coeffDict(), iter)
|
||||
{
|
||||
if (iter().isDict())
|
||||
{
|
||||
zoneIDs_[zonei] = mesh.cellZones().findIndex(iter().keyword());
|
||||
zoneIndices_[zonei] = mesh.cellZones().findIndex(iter().keyword());
|
||||
|
||||
if (zoneIDs_[zonei] == -1)
|
||||
if (zoneIndices_[zonei] == -1)
|
||||
{
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
@ -85,7 +85,7 @@ Foam::multiSolidBodyMotionSolver::multiSolidBodyMotionSolver
|
||||
);
|
||||
|
||||
// Collect points of cell zone.
|
||||
const cellZone& cz = mesh.cellZones()[zoneIDs_[zonei]];
|
||||
const cellZone& cz = mesh.cellZones()[zoneIndices_[zonei]];
|
||||
|
||||
boolList movePts(mesh.nPoints(), false);
|
||||
|
||||
@ -115,18 +115,19 @@ Foam::multiSolidBodyMotionSolver::multiSolidBodyMotionSolver
|
||||
}
|
||||
}
|
||||
|
||||
pointIDs_[zonei].transfer(ptIDs);
|
||||
pointIndices_[zonei].transfer(ptIDs);
|
||||
|
||||
Info<< "Applying solid body motion " << SBMFs_[zonei].type()
|
||||
<< " to " << pointIDs_[zonei].size() << " points of cellZone "
|
||||
<< iter().keyword() << endl;
|
||||
<< " to " << pointIndices_[zonei].size()
|
||||
<< " points of cellZone " << iter().keyword()
|
||||
<< endl;
|
||||
|
||||
zonei++;
|
||||
}
|
||||
}
|
||||
zoneIDs_.setSize(zonei);
|
||||
zoneIndices_.setSize(zonei);
|
||||
SBMFs_.setSize(zonei);
|
||||
pointIDs_.setSize(zonei);
|
||||
pointIndices_.setSize(zonei);
|
||||
}
|
||||
|
||||
|
||||
@ -143,9 +144,9 @@ Foam::tmp<Foam::pointField> Foam::multiSolidBodyMotionSolver::curPoints() const
|
||||
tmp<pointField> ttransformedPts(new pointField(mesh().points()));
|
||||
pointField& transformedPts = ttransformedPts.ref();
|
||||
|
||||
forAll(zoneIDs_, i)
|
||||
forAll(zoneIndices_, i)
|
||||
{
|
||||
const labelList& zonePoints = pointIDs_[i];
|
||||
const labelList& zonePoints = pointIndices_[i];
|
||||
|
||||
UIndirectList<point>(transformedPts, zonePoints) = transformPoints
|
||||
(
|
||||
|
||||
@ -58,10 +58,10 @@ class multiSolidBodyMotionSolver
|
||||
PtrList<solidBodyMotionFunction> SBMFs_;
|
||||
|
||||
//- Specified cellZones
|
||||
labelList zoneIDs_;
|
||||
labelList zoneIndices_;
|
||||
|
||||
//- Points to move per cellZone
|
||||
labelListList pointIDs_;
|
||||
labelListList pointIndices_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -46,11 +46,11 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::solidBodyMotionSolver::updateSetPointIDs()
|
||||
void Foam::solidBodyMotionSolver::updateSetPointIndices()
|
||||
{
|
||||
if (set_.selectionType() == polyCellSet::selectionTypes::all)
|
||||
{
|
||||
setPointIDs_.clear();
|
||||
setPointIndices_.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -71,14 +71,14 @@ void Foam::solidBodyMotionSolver::updateSetPointIDs()
|
||||
|
||||
syncTools::syncPointList(mesh(), pointInSet, orEqOp<bool>(), false);
|
||||
|
||||
setPointIDs_.resize(count(pointInSet, true));
|
||||
setPointIndices_.resize(count(pointInSet, true));
|
||||
|
||||
label setPointi = 0;
|
||||
forAll(pointInSet, pointi)
|
||||
{
|
||||
if (pointInSet[pointi])
|
||||
{
|
||||
setPointIDs_[setPointi ++] = pointi;
|
||||
setPointIndices_[setPointi ++] = pointi;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,7 +96,7 @@ Foam::solidBodyMotionSolver::solidBodyMotionSolver
|
||||
points0MotionSolver(name, mesh, dict, typeName),
|
||||
SBMFPtr_(solidBodyMotionFunction::New(coeffDict(), mesh.time())),
|
||||
set_(mesh, dict),
|
||||
setPointIDs_(),
|
||||
setPointIndices_(),
|
||||
transform_(SBMFPtr_().transformation())
|
||||
{
|
||||
if (set_.selectionType() == polyCellSet::selectionTypes::all)
|
||||
@ -104,7 +104,7 @@ Foam::solidBodyMotionSolver::solidBodyMotionSolver
|
||||
Info<< "Applying solid body motion to entire mesh" << endl;
|
||||
}
|
||||
|
||||
updateSetPointIDs();
|
||||
updateSetPointIndices();
|
||||
}
|
||||
|
||||
|
||||
@ -129,10 +129,10 @@ Foam::tmp<Foam::pointField> Foam::solidBodyMotionSolver::curPoints() const
|
||||
tmp<pointField> ttransformedPts(new pointField(mesh().points()));
|
||||
pointField& transformedPts = ttransformedPts.ref();
|
||||
|
||||
UIndirectList<point>(transformedPts, setPointIDs_) = transformPoints
|
||||
UIndirectList<point>(transformedPts, setPointIndices_) = transformPoints
|
||||
(
|
||||
transform_,
|
||||
pointField(points0_, setPointIDs_)
|
||||
pointField(points0_, setPointIndices_)
|
||||
);
|
||||
|
||||
return ttransformedPts;
|
||||
@ -143,14 +143,14 @@ Foam::tmp<Foam::pointField> Foam::solidBodyMotionSolver::curPoints() const
|
||||
void Foam::solidBodyMotionSolver::topoChange(const polyTopoChangeMap& map)
|
||||
{
|
||||
set_.topoChange(map);
|
||||
updateSetPointIDs();
|
||||
updateSetPointIndices();
|
||||
|
||||
boolList pointInSet
|
||||
(
|
||||
mesh().nPoints(),
|
||||
set_.selectionType() == polyCellSet::selectionTypes::all
|
||||
);
|
||||
UIndirectList<bool>(pointInSet, setPointIDs_) = true;
|
||||
UIndirectList<bool>(pointInSet, setPointIndices_) = true;
|
||||
|
||||
// pointMesh already updates pointFields
|
||||
|
||||
@ -203,7 +203,7 @@ void Foam::solidBodyMotionSolver::distribute(const polyDistributionMap& map)
|
||||
points0MotionSolver::distribute(map);
|
||||
|
||||
set_.distribute(map);
|
||||
updateSetPointIDs();
|
||||
updateSetPointIndices();
|
||||
}
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ void Foam::solidBodyMotionSolver::mapMesh(const polyMeshMap& map)
|
||||
points0MotionSolver::mapMesh(map);
|
||||
|
||||
set_.mapMesh(map);
|
||||
updateSetPointIDs();
|
||||
updateSetPointIndices();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ class solidBodyMotionSolver
|
||||
polyCellSet set_;
|
||||
|
||||
//- Points to move when cell zone is supplied
|
||||
labelList setPointIDs_;
|
||||
labelList setPointIndices_;
|
||||
|
||||
//- Cache the current transform for topoChange
|
||||
mutable septernion transform_;
|
||||
@ -71,7 +71,7 @@ class solidBodyMotionSolver
|
||||
// Private Member Functions
|
||||
|
||||
//- Re-calculate the set point ID-s from the set, following mesh change
|
||||
void updateSetPointIDs();
|
||||
void updateSetPointIndices();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,7 @@ void Foam::RBD::rigidBodyModel::initialiseRootBody()
|
||||
{
|
||||
bodies_.append(new masslessBody("root"));
|
||||
lambda_.append(0);
|
||||
bodyIDs_.insert("root", 0);
|
||||
bodyIndices_.insert("root", 0);
|
||||
joints_.append(new joints::null(*this));
|
||||
XT_.append(spatialTransform());
|
||||
|
||||
@ -128,7 +128,7 @@ Foam::label Foam::RBD::rigidBodyModel::join_
|
||||
const rigidBody& body = bodyPtr();
|
||||
bodies_.append(bodyPtr);
|
||||
const label bodyID = nBodies()-1;
|
||||
bodyIDs_.insert(body.name(), bodyID);
|
||||
bodyIndices_.insert(body.name(), bodyID);
|
||||
|
||||
// If the parentID refers to a merged body find the parent into which it has
|
||||
// been merged and set lambda and XT accordingly
|
||||
@ -361,7 +361,7 @@ Foam::label Foam::RBD::rigidBodyModel::merge
|
||||
bodies_[sBody.masterID()].merge(sBody);
|
||||
|
||||
const label sBodyID = mergedBodyID(mergedBodies_.size() - 1);
|
||||
bodyIDs_.insert(sBody.name(), sBodyID);
|
||||
bodyIndices_.insert(sBody.name(), sBodyID);
|
||||
|
||||
return sBodyID;
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -108,7 +108,7 @@ protected:
|
||||
PtrList<subBody> mergedBodies_;
|
||||
|
||||
//- Lookup-table of the IDs of the bodies
|
||||
HashTable<label, word> bodyIDs_;
|
||||
HashTable<label, word> bodyIndices_;
|
||||
|
||||
//- List of indices of the parent of each body
|
||||
DynamicList<label> lambda_;
|
||||
|
||||
@ -155,7 +155,7 @@ Foam::RBD::rigidBodyModel::mergedBody(label mergedBodyID) const
|
||||
|
||||
inline Foam::label Foam::RBD::rigidBodyModel::bodyID(const word& name) const
|
||||
{
|
||||
return bodyIDs_[name];
|
||||
return bodyIndices_[name];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,17 +78,17 @@ Foam::sampledSurfaces::patch::~patch()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::labelList& Foam::sampledSurfaces::patch::patchIDs() const
|
||||
const Foam::labelList& Foam::sampledSurfaces::patch::patchIndices() const
|
||||
{
|
||||
if (patchIDs_.empty())
|
||||
if (patchIndices_.empty())
|
||||
{
|
||||
patchIDs_ = mesh().boundaryMesh().patchSet
|
||||
patchIndices_ = mesh().boundaryMesh().patchSet
|
||||
(
|
||||
patchNames_,
|
||||
false
|
||||
).sortedToc();
|
||||
}
|
||||
return patchIDs_;
|
||||
return patchIndices_;
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ bool Foam::sampledSurfaces::patch::expire()
|
||||
|
||||
sampledSurface::clearGeom();
|
||||
MeshStorage::clear();
|
||||
patchIDs_.clear();
|
||||
patchIndices_.clear();
|
||||
patchIndex_.clear();
|
||||
patchFaceLabels_.clear();
|
||||
patchStart_.clear();
|
||||
@ -126,9 +126,9 @@ bool Foam::sampledSurfaces::patch::update()
|
||||
}
|
||||
|
||||
label sz = 0;
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
label patchi = patchIDs()[i];
|
||||
label patchi = patchIndices()[i];
|
||||
const polyPatch& pp = mesh().boundaryMesh()[patchi];
|
||||
|
||||
if (isA<emptyPolyPatch>(pp))
|
||||
@ -145,14 +145,14 @@ bool Foam::sampledSurfaces::patch::update()
|
||||
// patch.
|
||||
patchIndex_.setSize(sz);
|
||||
patchFaceLabels_.setSize(sz);
|
||||
patchStart_.setSize(patchIDs().size());
|
||||
patchStart_.setSize(patchIndices().size());
|
||||
labelList meshFaceLabels(sz);
|
||||
|
||||
sz = 0;
|
||||
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
label patchi = patchIDs()[i];
|
||||
label patchi = patchIndices()[i];
|
||||
|
||||
patchStart_[i] = sz;
|
||||
|
||||
|
||||
@ -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
|
||||
@ -83,7 +83,7 @@ class patch
|
||||
const wordReList patchNames_;
|
||||
|
||||
//- Corresponding patchIDs
|
||||
mutable labelList patchIDs_;
|
||||
mutable labelList patchIndices_;
|
||||
|
||||
//- Triangulated faces or keep faces as is
|
||||
bool triangulate_;
|
||||
@ -131,7 +131,7 @@ protected:
|
||||
return patchNames_;
|
||||
}
|
||||
|
||||
const labelList& patchIDs() const;
|
||||
const labelList& patchIndices() const;
|
||||
|
||||
const labelList& patchStart() const
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -39,7 +39,7 @@ Foam::sampledSurfaces::patch::sampleField
|
||||
Field<Type>& values = tvalues.ref();
|
||||
forAll(patchFaceLabels_, i)
|
||||
{
|
||||
label patchi = patchIDs_[patchIndex_[i]];
|
||||
label patchi = patchIndices_[patchIndex_[i]];
|
||||
const Field<Type>& bField = vField.boundaryField()[patchi];
|
||||
values[i] = bField[patchFaceLabels_[i]];
|
||||
}
|
||||
@ -61,7 +61,7 @@ Foam::sampledSurfaces::patch::sampleField
|
||||
|
||||
forAll(patchFaceLabels_, i)
|
||||
{
|
||||
label patchi = patchIDs_[patchIndex_[i]];
|
||||
label patchi = patchIndices_[patchIndex_[i]];
|
||||
values[i] = sField.boundaryField()[patchi][patchFaceLabels_[i]];
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ Foam::sampledSurfaces::patch::interpolateField
|
||||
|
||||
forAll(faces(), cutFacei)
|
||||
{
|
||||
label patchi = patchIDs_[patchIndex_[cutFacei]];
|
||||
label patchi = patchIndices_[patchIndex_[cutFacei]];
|
||||
const polyPatch& pp = mesh().boundaryMesh()[patchi];
|
||||
label patchFacei = patchFaceLabels()[cutFacei];
|
||||
const face& f = faces()[cutFacei];
|
||||
|
||||
@ -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
|
||||
@ -48,7 +48,7 @@ Foam::sampledSurfaces::patchInternalField::patchInternalField
|
||||
)
|
||||
:
|
||||
patch(name, mesh, dict),
|
||||
mappers_(patchIDs().size())
|
||||
mappers_(patchIndices().size())
|
||||
{
|
||||
// Negate the distance so that we sample cells inside the patch
|
||||
dictionary mappersDict(dict);
|
||||
@ -57,14 +57,14 @@ Foam::sampledSurfaces::patchInternalField::patchInternalField
|
||||
mappersDict.set("distance", -mappersDict.lookup<scalar>("distance"));
|
||||
}
|
||||
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
mappers_.set
|
||||
(
|
||||
i,
|
||||
new mappedInternalPatchBase
|
||||
(
|
||||
mesh.boundaryMesh()[patchIDs()[i]],
|
||||
mesh.boundaryMesh()[patchIndices()[i]],
|
||||
mappersDict
|
||||
)
|
||||
);
|
||||
|
||||
@ -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
|
||||
@ -72,15 +72,15 @@ Foam::sampledSurfaces::patchInternalField::interpolateField
|
||||
) const
|
||||
{
|
||||
label sz = 0;
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
sz += mesh().boundaryMesh()[patchIDs()[i]].size();
|
||||
sz += mesh().boundaryMesh()[patchIndices()[i]].size();
|
||||
}
|
||||
|
||||
Field<Type> allPatchVals(sz);
|
||||
sz = 0;
|
||||
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
// Cells on which samples are generated
|
||||
const labelList& sampleCells = mappers_[i].cellIndices();
|
||||
@ -115,9 +115,9 @@ Foam::sampledSurfaces::patchInternalField::interpolateField
|
||||
|
||||
labelList meshFaceLabels(allPatchVals.size());
|
||||
sz = 0;
|
||||
forAll(patchIDs(), i)
|
||||
forAll(patchIndices(), i)
|
||||
{
|
||||
const polyPatch& pp = mesh().boundaryMesh()[patchIDs()[i]];
|
||||
const polyPatch& pp = mesh().boundaryMesh()[patchIndices()[i]];
|
||||
forAll(pp, i)
|
||||
{
|
||||
meshFaceLabels[sz++] = pp.start()+i;
|
||||
|
||||
Reference in New Issue
Block a user