Renamed ID() -> Index()

Index is a better name to describe a label index than ID which may be an
integer, word or other means of identification.
This commit is contained in:
Henry Weller
2023-12-20 18:39:55 +00:00
parent 7df07d2660
commit 20f5235ecf
112 changed files with 665 additions and 648 deletions

View File

@ -406,7 +406,7 @@ void Foam::CloudFilmTransfer<CloudType>::splashInteraction
// Create a new parcel by copying source parcel // Create a new parcel by copying source parcel
parcelType* pPtr = new parcelType(p); parcelType* pPtr = new parcelType(p);
pPtr->origId() = pPtr->getNewParticleID(); pPtr->origId() = pPtr->getNewParticleIndex();
pPtr->origProc() = Pstream::myProcNo(); pPtr->origProc() = Pstream::myProcNo();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,11 +40,11 @@ Foam::coupledFacePair::coupledFacePair
const label integral const label integral
) )
: :
coupleID_(coupleNo), coupleIndex_(coupleNo),
masterCellID_(mC), masterCellIndex_(mC),
masterFaceID_(mF), masterFaceIndex_(mF),
slaveCellID_(sC), slaveCellIndex_(sC),
slaveFaceID_(sF), slaveFaceIndex_(sF),
integralMatch_(integral == 1) integralMatch_(integral == 1)
{} {}
@ -53,10 +53,10 @@ Foam::coupledFacePair::coupledFacePair
Foam::Ostream& Foam::operator<<(Ostream& os, const coupledFacePair& c) Foam::Ostream& Foam::operator<<(Ostream& os, const coupledFacePair& c)
{ {
os << "Master cell: " << c.masterCellID_ os << "Master cell: " << c.masterCellIndex_
<< " face: " << c.masterFaceID_ << endl << " face: " << c.masterFaceIndex_ << endl
<< "Slave cell: " << c.slaveCellID_ << "Slave cell: " << c.slaveCellIndex_
<< " face: " << c.slaveFaceID_ << endl << " face: " << c.slaveFaceIndex_ << endl
<< "Integral: " << c.integralMatch_ << endl; << "Integral: " << c.integralMatch_ << endl;
return os; return os;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,19 +58,19 @@ class coupledFacePair
// Private Data // Private Data
//- STAR couple ID //- STAR couple ID
label coupleID_; label coupleIndex_;
//- Master cell (lower cell label) //- Master cell (lower cell label)
label masterCellID_; label masterCellIndex_;
//- Master face (lower cell label) //- Master face (lower cell label)
label masterFaceID_; label masterFaceIndex_;
//- Slave cell (higher cell label) //- Slave cell (higher cell label)
label slaveCellID_; label slaveCellIndex_;
//- Slave face (higher cell label) //- Slave face (higher cell label)
label slaveFaceID_; label slaveFaceIndex_;
//- Integral or arbitrary flag //- Integral or arbitrary flag
bool integralMatch_; bool integralMatch_;
@ -94,33 +94,33 @@ public:
// Member Functions // Member Functions
//- Return STAR couple ID //- Return STAR couple ID
label coupleID() const label coupleIndex() const
{ {
return coupleID_; return coupleIndex_;
} }
//- Return master cell //- Return master cell
label masterCell() const label masterCell() const
{ {
return masterCellID_; return masterCellIndex_;
} }
//- Return master face //- Return master face
label masterFace() const label masterFace() const
{ {
return masterFaceID_; return masterFaceIndex_;
} }
//- Return slave cell //- Return slave cell
label slaveCell() const label slaveCell() const
{ {
return slaveCellID_; return slaveCellIndex_;
} }
//- Return slave face //- Return slave face
label slaveFace() const label slaveFace() const
{ {
return slaveFaceID_; return slaveFaceIndex_;
} }
//- Is this an integral match? //- Is this an integral match?

View File

@ -156,9 +156,13 @@ void Foam::starMesh::markBoundaryFaces()
forAll(curFace, spI) forAll(curFace, spI)
{ {
if (curFace[spI] > -1 && curFace[spI] < starPointID_.size()) if
(
curFace[spI] > -1
&& curFace[spI] < starPointIndex_.size()
)
{ {
Info<< "," << starPointID_[curFace[spI]]; Info<< "," << starPointIndex_[curFace[spI]];
} }
else else
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,7 +67,7 @@ void Foam::starMesh::createCoupleMatches()
if (coupleI % infoJump == 0) if (coupleI % infoJump == 0)
{ {
Info<< "Doing couple " << coupleI << ". STAR couple ID: " Info<< "Doing couple " << coupleI << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl; << couples_[coupleI].coupleIndex() << endl;
} }
// Initialise cell edges for master and slave cells // Initialise cell edges for master and slave cells
@ -96,16 +96,16 @@ void Foam::starMesh::createCoupleMatches()
{ {
Info<< "Couple direction mismatch in the couple match " Info<< "Couple direction mismatch in the couple match "
<< coupleI << ". STAR couple ID: " << coupleI << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl << couples_[coupleI].coupleIndex() << endl
<< "The angle between face normals is " << "The angle between face normals is "
<< radToDeg(Foam::acos(faceAreaAngle)) << radToDeg(Foam::acos(faceAreaAngle))
<< " deg." << endl << " deg." << endl
<< "master cell: " << fp.masterCell() << "master cell: " << fp.masterCell()
<< " STAR number: " << starCellID_[fp.masterCell()] << " STAR number: " << starCellIndex_[fp.masterCell()]
<< " type: " << cellShapes_[fp.masterCell()].model().name() << " type: " << cellShapes_[fp.masterCell()].model().name()
<< " face: " << fp.masterFace() << endl << " face: " << fp.masterFace() << endl
<< "slave cell : " << fp.slaveCell() << "slave cell : " << fp.slaveCell()
<< " STAR number: " << starCellID_[fp.slaveCell()] << " STAR number: " << starCellIndex_[fp.slaveCell()]
<< " type: " << cellShapes_[fp.slaveCell()].model().name() << " type: " << cellShapes_[fp.slaveCell()].model().name()
<< " face: " << fp.slaveFace() << endl; << " face: " << fp.slaveFace() << endl;
} }
@ -1103,7 +1103,7 @@ void Foam::starMesh::createCoupleMatches()
<< endl << "error in face intersection: " << endl << "error in face intersection: "
<< "no edges to consider for closing the loop" << "no edges to consider for closing the loop"
<< coupleI << ". STAR couple ID: " << coupleI << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl << couples_[coupleI].coupleIndex() << endl
<< "Cut Master Face: " << newMasterFace << endl << "Cut Master Face: " << newMasterFace << endl
<< "points: " << newMasterFace.points(points_) << "points: " << newMasterFace.points(points_)
<< endl << endl
@ -1225,7 +1225,7 @@ void Foam::starMesh::createCoupleMatches()
<< endl << "error in intersected face: " << endl << "error in intersected face: "
<< "lost thread for intersection of couple " << "lost thread for intersection of couple "
<< coupleI << ". STAR couple ID: " << coupleI << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl << couples_[coupleI].coupleIndex() << endl
<< "Cut Master Face: " << newMasterFace << endl << "Cut Master Face: " << newMasterFace << endl
<< "points: " << newMasterFace.points(points_) << "points: " << newMasterFace.points(points_)
<< endl << endl
@ -1277,7 +1277,7 @@ void Foam::starMesh::createCoupleMatches()
<< "duplicate point in intersected face " << "duplicate point in intersected face "
<< "for couple no " << coupleI << "for couple no " << coupleI
<< ". STAR couple ID: " << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl << couples_[coupleI].coupleIndex() << endl
<< "Duplicate point label: " << "Duplicate point label: "
<< intersectedFace[checkI] << endl << intersectedFace[checkI] << endl
<< "Cut Master Face: " << newMasterFace << endl << "Cut Master Face: " << newMasterFace << endl
@ -1299,7 +1299,7 @@ void Foam::starMesh::createCoupleMatches()
<< "void starMesh::createCoupleMatches() : " << endl << "void starMesh::createCoupleMatches() : " << endl
<< "could not find start edge for intersection of couple " << "could not find start edge for intersection of couple "
<< coupleI << ". STAR couple ID: " << coupleI << ". STAR couple ID: "
<< couples_[coupleI].coupleID() << endl << couples_[coupleI].coupleIndex() << endl
<< "Cut Master Face: " << newMasterFace << endl << "Cut Master Face: " << newMasterFace << endl
<< "points: " << newMasterFace.points(points_) << endl << "points: " << newMasterFace.points(points_) << endl
<< "Cut Slave Face: " << newSlaveFace << endl << "Cut Slave Face: " << newSlaveFace << endl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -106,11 +106,11 @@ void Foam::starMesh::createPolyBoundary()
( (
curCellFaces[cellFacei][spI] > -1 curCellFaces[cellFacei][spI] > -1
&& curCellFaces[cellFacei][spI] && curCellFaces[cellFacei][spI]
< starPointID_.size() < starPointIndex_.size()
) )
{ {
Info<< "," Info<< ","
<< starPointID_ << starPointIndex_
[curCellFaces[cellFacei][spI]]; [curCellFaces[cellFacei][spI]];
} }
else else
@ -140,11 +140,11 @@ void Foam::starMesh::createPolyBoundary()
( (
curCellFaces[cellFacei][spI] > -1 curCellFaces[cellFacei][spI] > -1
&& curCellFaces[cellFacei][spI] && curCellFaces[cellFacei][spI]
< starPointID_.size() < starPointIndex_.size()
) )
{ {
Info<< "," Info<< ","
<< starPointID_ << starPointIndex_
[curCellFaces[cellFacei][spI]]; [curCellFaces[cellFacei][spI]];
} }
else else
@ -189,7 +189,7 @@ void Foam::starMesh::createPolyBoundary()
InfoInFunction InfoInFunction
<< "Missing face found in cell " << celli << "Missing face found in cell " << celli
<< ".\nType: " << cellShapes_[celli].model().name() << ".\nType: " << cellShapes_[celli].model().name()
<< ". STAR cell number: " << starCellID_[celli] << ". STAR cell number: " << starCellIndex_[celli]
<< ". Face: " << missingFace << endl; << ". Face: " << missingFace << endl;
nMissingFaceFound++; nMissingFaceFound++;
@ -201,10 +201,10 @@ void Foam::starMesh::createPolyBoundary()
if if
( (
missingFace[spI] > -1 missingFace[spI] > -1
&& missingFace[spI] < starPointID_.size() && missingFace[spI] < starPointIndex_.size()
) )
{ {
Info<< "," << starPointID_[missingFace[spI]]; Info<< "," << starPointIndex_[missingFace[spI]];
} }
else else
{ {
@ -265,10 +265,10 @@ void Foam::starMesh::createPolyBoundary()
if if
( (
problemFace[spI] > -1 problemFace[spI] > -1
&& problemFace[spI] < starPointID_.size() && problemFace[spI] < starPointIndex_.size()
) )
{ {
Info<< "," << starPointID_[problemFace[spI]]; Info<< "," << starPointIndex_[problemFace[spI]];
} }
else else
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -308,10 +308,10 @@ void Foam::starMesh::mergeCoupleFacePoints()
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Error in point merging for cell " << "Error in point merging for cell "
<< celli << ". STAR index: " << starCellID_[celli] << celli << ". STAR index: " << starCellIndex_[celli]
<< ". " << endl << ". " << endl
<< "Point index: " << curLabels[pointi] << " STAR index " << "Point index: " << curLabels[pointi] << " STAR index "
<< starPointID_[curLabels[pointi]] << endl << starPointIndex_[curLabels[pointi]] << endl
<< "Please check the geometry for the cell." << endl; << "Please check the geometry for the cell." << endl;
} }
} }
@ -387,10 +387,10 @@ void Foam::starMesh::mergeCoupleFacePoints()
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Error in point renumbering for cell " << "Error in point renumbering for cell "
<< celli << ". STAR index: " << starCellID_[celli] << celli << ". STAR index: " << starCellIndex_[celli]
<< ". " << endl << ". " << endl
<< "Point index: " << curLabels[pointi] << " STAR index " << "Point index: " << curLabels[pointi] << " STAR index "
<< starPointID_[curLabels[pointi]] << " returns invalid " << starPointIndex_[curLabels[pointi]] << " returns invalid "
<< "renumbering index: " << "renumbering index: "
<< renumberPoints[curLabels[pointi]] << "." << endl << renumberPoints[curLabels[pointi]] << "." << endl
<< "Old cellShape: " << oldLabels << endl << "Old cellShape: " << oldLabels << endl
@ -403,15 +403,15 @@ void Foam::starMesh::mergeCoupleFacePoints()
Info<< "Renumbering STAR point lookup" << endl; Info<< "Renumbering STAR point lookup" << endl;
labelList oldStarPointID = starPointID_; labelList oldStarPointID = starPointIndex_;
starPointID_ = -1; starPointIndex_ = -1;
forAll(starPointID_, pointi) forAll(starPointIndex_, pointi)
{ {
if (renumberPoints[pointi] > -1) if (renumberPoints[pointi] > -1)
{ {
starPointID_[renumberPoints[pointi]] = oldStarPointID[pointi]; starPointIndex_[renumberPoints[pointi]] = oldStarPointID[pointi];
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -251,7 +251,7 @@ void Foam::starMesh::readCells()
Info<< "Number of cells = " << nCells << endl << endl; Info<< "Number of cells = " << nCells << endl << endl;
cellShapes_.setSize(nCells); cellShapes_.setSize(nCells);
starCellID_.setSize(nCells); starCellIndex_.setSize(nCells);
starCellPermutation_.setSize(nCells); starCellPermutation_.setSize(nCells);
// reset permutation to invalid value // reset permutation to invalid value
@ -346,7 +346,7 @@ void Foam::starMesh::readCells()
} while (addOnToCell >= 0); } while (addOnToCell >= 0);
// Record STAR cell number (used for debugging) // Record STAR cell number (used for debugging)
starCellID_[celli] = lineLabel; starCellIndex_[celli] = lineLabel;
// insert STAR lookup addressing // insert STAR lookup addressing
starCellLabelLookup_[lineLabel] = celli; starCellLabelLookup_[lineLabel] = celli;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -118,10 +118,10 @@ void Foam::starMesh::readPoints(const scalar scaleFactor)
points_.setSize(nPoints); points_.setSize(nPoints);
#ifdef starMesh_H #ifdef starMesh_H
starPointID_.setSize(nPoints); starPointIndex_.setSize(nPoints);
// Reset STAR point ID, just in case // Reset STAR point ID, just in case
starPointID_ = -1; starPointIndex_ = -1;
#endif #endif
starPointLabelLookup_.setSize(maxLabel+1); starPointLabelLookup_.setSize(maxLabel+1);
@ -147,7 +147,7 @@ void Foam::starMesh::readPoints(const scalar scaleFactor)
readToNl(pointsFile); readToNl(pointsFile);
#ifdef starMesh_H #ifdef starMesh_H
starPointID_[p] = pointLabel; starPointIndex_[p] = pointLabel;
#endif #endif
starPointLabelLookup_[pointLabel] = p; starPointLabelLookup_[pointLabel] = p;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,10 +67,10 @@ void Foam::starMesh::readPoints(const scalar scaleFactor)
Info<< "Number of points = " << nPoints << endl << endl; Info<< "Number of points = " << nPoints << endl << endl;
points_.setSize(nPoints); points_.setSize(nPoints);
starPointID_.setSize(nPoints); starPointIndex_.setSize(nPoints);
// Reset STAR point ID, just in case // Reset STAR point ID, just in case
starPointID_ = -1; starPointIndex_ = -1;
starPointLabelLookup_.setSize(maxLabel+1); starPointLabelLookup_.setSize(maxLabel+1);
@ -93,7 +93,7 @@ void Foam::starMesh::readPoints(const scalar scaleFactor)
>> points_[p].y() >> points_[p].y()
>> points_[p].z(); >> points_[p].z();
starPointID_[p] = pointLabel; starPointIndex_[p] = pointLabel;
starPointLabelLookup_[pointLabel] = p; starPointLabelLookup_[pointLabel] = p;
} }

View File

@ -211,8 +211,8 @@ void Foam::starMesh::clearExtraStorage()
Info<< "Clearing extra storage" << endl; Info<< "Clearing extra storage" << endl;
starPointLabelLookup_.setSize(0); starPointLabelLookup_.setSize(0);
starPointID_.setSize(0); starPointIndex_.setSize(0);
starCellID_.setSize(0); starCellIndex_.setSize(0);
starCellLabelLookup_.setSize(0); starCellLabelLookup_.setSize(0);
starCellPermutation_.setSize(0); starCellPermutation_.setSize(0);
cellFaces_.setSize(0); cellFaces_.setSize(0);
@ -244,8 +244,8 @@ Foam::starMesh::starMesh
patchNames_(0), patchNames_(0),
patchPhysicalTypes_(0), patchPhysicalTypes_(0),
starPointLabelLookup_(0), starPointLabelLookup_(0),
starPointID_(0), starPointIndex_(0),
starCellID_(0), starCellIndex_(0),
starCellLabelLookup_(0), starCellLabelLookup_(0),
starCellPermutation_(0), starCellPermutation_(0),
cellFaces_(0), cellFaces_(0),

View File

@ -103,10 +103,10 @@ class starMesh
labelList starPointLabelLookup_; labelList starPointLabelLookup_;
//- STAR point number for a given vertex //- STAR point number for a given vertex
labelList starPointID_; labelList starPointIndex_;
//- STAR Cell number for a given cell //- STAR Cell number for a given cell
labelList starCellID_; labelList starCellIndex_;
//- Cell labels (STAR cell numbering is not necessarily contiguous) //- Cell labels (STAR cell numbering is not necessarily contiguous)
labelList starCellLabelLookup_; labelList starCellLabelLookup_;

View File

@ -41,7 +41,9 @@ Foam::label Foam::fvFieldDecomposer::completePatchID
} }
else if (isA<processorCyclicFvPatch>(procPatch)) else if (isA<processorCyclicFvPatch>(procPatch))
{ {
return refCast<const processorCyclicFvPatch>(procPatch).referPatchID(); return
refCast<const processorCyclicFvPatch>(procPatch)
.referPatchIndex();
} }
else else
{ {

View File

@ -250,7 +250,7 @@ Foam::fvFieldDecomposer::decomposeVolField
const label nbrCompletePatchi = const label nbrCompletePatchi =
refCast<const processorCyclicFvPatch>(procPatch) refCast<const processorCyclicFvPatch>(procPatch)
.referPatch().nbrPatchID(); .referPatch().nbrPatchIndex();
// Use `fvPatchField<Type>::New` rather than // Use `fvPatchField<Type>::New` rather than
// `new processorCyclicFvPatchField<Type>` so that derivations // `new processorCyclicFvPatchField<Type>` so that derivations

View File

@ -42,7 +42,9 @@ Foam::label Foam::fvFieldReconstructor::completePatchID
} }
else if (isA<processorCyclicFvPatch>(procPatch)) else if (isA<processorCyclicFvPatch>(procPatch))
{ {
return refCast<const processorCyclicFvPatch>(procPatch).referPatchID(); return
refCast<const processorCyclicFvPatch>(procPatch)
.referPatchIndex();
} }
else else
{ {

View File

@ -59,7 +59,7 @@ enum {
XF_RF_DATA_MASS_FLUX_M1=47, XF_RF_DATA_MASS_FLUX_M1=47,
XF_RF_DATA_MASS_FLUX_M2=48, XF_RF_DATA_MASS_FLUX_M2=48,
XF_RF_DATA_GRID_FLUX=49, XF_RF_DATA_GRIndex_FLUX=49,
XF_RF_DATA_DO_I=50, XF_RF_DATA_DO_I=50,
XF_RF_DATA_DO_RECON_I=51, XF_RF_DATA_DO_RECON_I=51,
@ -182,7 +182,7 @@ enum {
/* dynamic mesh */ /* dynamic mesh */
XF_RF_DATA_VOLUME_M2 = 180 , XF_RF_DATA_VOLUME_M2 = 180 ,
XF_RF_DATA_WALL_GRID_VELOCITY = 181 , XF_RF_DATA_WALL_GRIndex_VELOCITY = 181 ,
XF_RF_DATA_SV_T_AUX = 190 , /* auxiliary temperature XF_RF_DATA_SV_T_AUX = 190 , /* auxiliary temperature

View File

@ -39,7 +39,6 @@ Description
#include "viscosityModel.H" #include "viscosityModel.H"
#include "incompressibleMomentumTransportModels.H" #include "incompressibleMomentumTransportModels.H"
#include "wallDist.H" #include "wallDist.H"
#include "bound.H"
#include "fvcFlux.H" #include "fvcFlux.H"
using namespace Foam; using namespace Foam;
@ -191,9 +190,6 @@ int main(int argc, char *argv[])
{ {
volScalarField omega(omegaHeader, mesh); volScalarField omega(omegaHeader, mesh);
const incompressible::RASModel& rasModel =
refCast<const incompressible::RASModel>(turbulence());
omega = (1 - mask)*omega + mask*ce0*sqrt(k)/(Cmu*min(y, ybl)); omega = (1 - mask)*omega + mask*ce0*sqrt(k)/(Cmu*min(y, ybl));
// Do not correct BC - G set by the wall-functions is not available // Do not correct BC - G set by the wall-functions is not available

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,7 +64,7 @@ void Foam::ParSortableList<Type>::copyInto
tagVal.value() = values[elemI]; tagVal.value() = values[elemI];
tagVal.index() = indices[elemI]; tagVal.index() = indices[elemI];
tagVal.procID() = fromProcNo; tagVal.procIndex() = fromProcNo;
destI++; destI++;
} }
@ -338,7 +338,7 @@ void Foam::ParSortableList<Type>::sort()
{ {
this->operator[](elemI) = combinedValues[elemI].value(); this->operator[](elemI) = combinedValues[elemI].value();
indices_[elemI] = combinedValues[elemI].index(); indices_[elemI] = combinedValues[elemI].index();
procs_[elemI] = combinedValues[elemI].procID(); procs_[elemI] = combinedValues[elemI].procIndex();
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -95,7 +95,7 @@ class ParSortableList
label index_; label index_;
//- Proc //- Proc
label procID_; label procIndex_;
public: public:
@ -127,14 +127,14 @@ class ParSortableList
return index_; return index_;
} }
label procID() const label procIndex() const
{ {
return procID_; return procIndex_;
} }
label& procID() label& procIndex()
{ {
return procID_; return procIndex_;
} }
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -245,7 +245,7 @@ void Foam::LUscalarMatrix::convert
const cyclicLduInterface& cycInterface = const cyclicLduInterface& cycInterface =
refCast<const cyclicLduInterface>(interface); refCast<const cyclicLduInterface>(interface);
label nbrInt = cycInterface.nbrPatchID(); label nbrInt = cycInterface.nbrPatchIndex();
const label* __restrict__ uPtr = const label* __restrict__ uPtr =
interfaces[nbrInt].interface().faceCells().begin(); interfaces[nbrInt].interface().faceCells().begin();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,7 +67,7 @@ public:
// Access // Access
//- Return neighbour //- Return neighbour
virtual label nbrPatchID() const = 0; virtual label nbrPatchIndex() const = 0;
virtual bool owner() const = 0; virtual bool owner() const = 0;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,9 +94,9 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
) )
: :
GAMGInterface(index, coarseInterfaces), GAMGInterface(index, coarseInterfaces),
nbrPatchID_ nbrPatchIndex_
( (
refCast<const cyclicLduInterface>(fineInterface).nbrPatchID() refCast<const cyclicLduInterface>(fineInterface).nbrPatchIndex()
), ),
owner_(refCast<const cyclicLduInterface>(fineInterface).owner()), owner_(refCast<const cyclicLduInterface>(fineInterface).owner()),
transform_(refCast<const cyclicLduInterface>(fineInterface).transform()) transform_(refCast<const cyclicLduInterface>(fineInterface).transform())
@ -171,7 +171,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
) )
: :
GAMGInterface(index, coarseInterfaces, is), GAMGInterface(index, coarseInterfaces, is),
nbrPatchID_(readLabel(is)), nbrPatchIndex_(readLabel(is)),
owner_(readBool(is)), owner_(readBool(is)),
transform_(is) transform_(is)
{} {}
@ -209,7 +209,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
void Foam::cyclicGAMGInterface::write(Ostream& os) const void Foam::cyclicGAMGInterface::write(Ostream& os) const
{ {
GAMGInterface::write(os); GAMGInterface::write(os);
os << token::SPACE << nbrPatchID_ os << token::SPACE << nbrPatchIndex_
<< token::SPACE << owner_ << token::SPACE << owner_
<< token::SPACE << transform_; << token::SPACE << transform_;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,7 +55,7 @@ class cyclicGAMGInterface
// Private Data // Private Data
//- Neighbour patch number //- Neighbour patch number
label nbrPatchID_; label nbrPatchIndex_;
//- Am I owner? //- Am I owner?
bool owner_; bool owner_;
@ -116,9 +116,9 @@ public:
//- Cyclic interface functions //- Cyclic interface functions
//- Return neighbour processor number //- Return neighbour processor number
virtual label nbrPatchID() const virtual label nbrPatchIndex() const
{ {
return nbrPatchID_; return nbrPatchIndex_;
} }
virtual bool owner() const virtual bool owner() const
@ -130,7 +130,7 @@ public:
{ {
return dynamic_cast<const cyclicGAMGInterface&> return dynamic_cast<const cyclicGAMGInterface&>
( (
coarseInterfaces_[nbrPatchID()] coarseInterfaces_[nbrPatchIndex()]
); );
} }

View File

@ -115,7 +115,7 @@ public:
//- Return neighbour point patch //- Return neighbour point patch
const cyclicPointPatch& nbrPatch() const const cyclicPointPatch& nbrPatch() const
{ {
label patchi = cyclicPolyPatch_.nbrPatchID(); label patchi = cyclicPolyPatch_.nbrPatchIndex();
const pointPatch& pp = this->boundaryMesh()[patchi]; const pointPatch& pp = this->boundaryMesh()[patchi];
return refCast<const cyclicPointPatch>(pp); return refCast<const cyclicPointPatch>(pp);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -706,7 +706,7 @@ void Foam::globalPoints::receivePatchPoints
{ {
const labelPairList infoB = addSendTransform const labelPairList infoB = addSendTransform
( (
cycPatch.nbrPatchID(), cycPatch.nbrPatchIndex(),
procPoints_[procPointB()] procPoints_[procPointB()]
); );

View File

@ -127,9 +127,9 @@ void Foam::cyclicPolyPatch::rename(const wordList& newNames)
void Foam::cyclicPolyPatch::reorder(const labelUList& newToOldIndex) void Foam::cyclicPolyPatch::reorder(const labelUList& newToOldIndex)
{ {
polyPatch::reorder(newToOldIndex); polyPatch::reorder(newToOldIndex);
if (nbrPatchID_ != -1) if (nbrPatchIndex_ != -1)
{ {
nbrPatchID_ = findIndex(newToOldIndex, nbrPatchID_); nbrPatchIndex_ = findIndex(newToOldIndex, nbrPatchIndex_);
} }
} }
@ -149,7 +149,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
coupledPolyPatch(name, size, start, index, bm, patchType), coupledPolyPatch(name, size, start, index, bm, patchType),
cyclicTransform(false), cyclicTransform(false),
nbrPatchName_(word::null), nbrPatchName_(word::null),
nbrPatchID_(-1), nbrPatchIndex_(-1),
coupledPointsPtr_(nullptr), coupledPointsPtr_(nullptr),
coupledEdgesPtr_(nullptr), coupledEdgesPtr_(nullptr),
ownToNbrOrderDataPtr_(nullptr), ownToNbrOrderDataPtr_(nullptr),
@ -173,7 +173,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
coupledPolyPatch(name, size, start, index, bm, patchType), coupledPolyPatch(name, size, start, index, bm, patchType),
cyclicTransform(transform), cyclicTransform(transform),
nbrPatchName_(nbrPatchName), nbrPatchName_(nbrPatchName),
nbrPatchID_(-1), nbrPatchIndex_(-1),
coupledPointsPtr_(nullptr), coupledPointsPtr_(nullptr),
coupledEdgesPtr_(nullptr), coupledEdgesPtr_(nullptr),
ownToNbrOrderDataPtr_(nullptr), ownToNbrOrderDataPtr_(nullptr),
@ -196,7 +196,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
cyclicTransform(dict, cyclicTransformDefaultIsNone), cyclicTransform(dict, cyclicTransformDefaultIsNone),
nbrPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)), nbrPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
coupleGroup_(dict), coupleGroup_(dict),
nbrPatchID_(-1), nbrPatchIndex_(-1),
coupledPointsPtr_(nullptr), coupledPointsPtr_(nullptr),
coupledEdgesPtr_(nullptr), coupledEdgesPtr_(nullptr),
ownToNbrOrderDataPtr_(nullptr), ownToNbrOrderDataPtr_(nullptr),
@ -235,7 +235,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
cyclicTransform(pp), cyclicTransform(pp),
nbrPatchName_(pp.nbrPatchName_), nbrPatchName_(pp.nbrPatchName_),
coupleGroup_(pp.coupleGroup_), coupleGroup_(pp.coupleGroup_),
nbrPatchID_(-1), nbrPatchIndex_(-1),
coupledPointsPtr_(nullptr), coupledPointsPtr_(nullptr),
coupledEdgesPtr_(nullptr), coupledEdgesPtr_(nullptr),
ownToNbrOrderDataPtr_(nullptr), ownToNbrOrderDataPtr_(nullptr),
@ -261,7 +261,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
cyclicTransform(pp), cyclicTransform(pp),
nbrPatchName_(neiName), nbrPatchName_(neiName),
coupleGroup_(pp.coupleGroup_), coupleGroup_(pp.coupleGroup_),
nbrPatchID_(-1), nbrPatchIndex_(-1),
coupledPointsPtr_(nullptr), coupledPointsPtr_(nullptr),
coupledEdgesPtr_(nullptr), coupledEdgesPtr_(nullptr),
ownToNbrOrderDataPtr_(nullptr), ownToNbrOrderDataPtr_(nullptr),
@ -305,13 +305,13 @@ const Foam::word& Foam::cyclicPolyPatch::nbrPatchName() const
} }
Foam::label Foam::cyclicPolyPatch::nbrPatchID() const Foam::label Foam::cyclicPolyPatch::nbrPatchIndex() const
{ {
if (nbrPatchID_ == -1) if (nbrPatchIndex_ == -1)
{ {
nbrPatchID_ = this->boundaryMesh().findIndex(nbrPatchName()); nbrPatchIndex_ = this->boundaryMesh().findIndex(nbrPatchName());
if (nbrPatchID_ == -1) if (nbrPatchIndex_ == -1)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Illegal neighbourPatch name " << nbrPatchName() << "Illegal neighbourPatch name " << nbrPatchName()
@ -323,7 +323,7 @@ Foam::label Foam::cyclicPolyPatch::nbrPatchID() const
// Check that it is a cyclic // Check that it is a cyclic
const cyclicPolyPatch& nbrPatch = refCast<const cyclicPolyPatch> const cyclicPolyPatch& nbrPatch = refCast<const cyclicPolyPatch>
( (
this->boundaryMesh()[nbrPatchID_] this->boundaryMesh()[nbrPatchIndex_]
); );
if (nbrPatch.nbrPatchName() != name()) if (nbrPatch.nbrPatchName() != name())
@ -336,7 +336,7 @@ Foam::label Foam::cyclicPolyPatch::nbrPatchID() const
<< endl; << endl;
} }
} }
return nbrPatchID_; return nbrPatchIndex_;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -86,7 +86,7 @@ class cyclicPolyPatch
const coupleGroupIdentifier coupleGroup_; const coupleGroupIdentifier coupleGroup_;
//- Index of cyclic neighbour patch //- Index of cyclic neighbour patch
mutable label nbrPatchID_; mutable label nbrPatchIndex_;
//- List of edges formed from connected points. e[0] is the point on //- List of edges formed from connected points. e[0] is the point on
// this patch, e[1] the corresponding point on the cyclic neighbour. // this patch, e[1] the corresponding point on the cyclic neighbour.
@ -247,11 +247,11 @@ public:
const word& nbrPatchName() const; const word& nbrPatchName() const;
//- Neighbour patchID //- Neighbour patchID
virtual label nbrPatchID() const; virtual label nbrPatchIndex() const;
virtual bool owner() const virtual bool owner() const
{ {
return index() < nbrPatchID(); return index() < nbrPatchIndex();
} }
virtual bool neighbour() const virtual bool neighbour() const
@ -261,7 +261,7 @@ public:
const cyclicPolyPatch& nbrPatch() const const cyclicPolyPatch& nbrPatch() const
{ {
const polyPatch& pp = this->boundaryMesh()[nbrPatchID()]; const polyPatch& pp = this->boundaryMesh()[nbrPatchIndex()];
return refCast<const cyclicPolyPatch>(pp); return refCast<const cyclicPolyPatch>(pp);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
), ),
referPatchName_(referPatchName), referPatchName_(referPatchName),
tag_(-1), tag_(-1),
referPatchID_(-1) referPatchIndex_(-1)
{} {}
@ -94,7 +94,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
), ),
referPatchName_(referPatchName), referPatchName_(referPatchName),
tag_(-1), tag_(-1),
referPatchID_(-1) referPatchIndex_(-1)
{} {}
@ -110,7 +110,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
processorPolyPatch(name, dict, index, bm, patchType), processorPolyPatch(name, dict, index, bm, patchType),
referPatchName_(dict.lookup("referPatch")), referPatchName_(dict.lookup("referPatch")),
tag_(dict.lookupOrDefault<int>("tag", -1)), tag_(dict.lookupOrDefault<int>("tag", -1)),
referPatchID_(-1) referPatchIndex_(-1)
{} {}
@ -123,7 +123,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
processorPolyPatch(pp, bm), processorPolyPatch(pp, bm),
referPatchName_(pp.referPatchName()), referPatchName_(pp.referPatchName()),
tag_(pp.tag()), tag_(pp.tag()),
referPatchID_(-1) referPatchIndex_(-1)
{} {}
@ -139,7 +139,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
processorPolyPatch(pp, bm, index, newSize, newStart), processorPolyPatch(pp, bm, index, newSize, newStart),
referPatchName_(pp.referPatchName_), referPatchName_(pp.referPatchName_),
tag_(pp.tag()), tag_(pp.tag()),
referPatchID_(-1) referPatchIndex_(-1)
{} {}
@ -260,7 +260,7 @@ void Foam::processorCyclicPolyPatch::initTopoChange(PstreamBuffers& pBufs)
void Foam::processorCyclicPolyPatch::topoChange(PstreamBuffers& pBufs) void Foam::processorCyclicPolyPatch::topoChange(PstreamBuffers& pBufs)
{ {
referPatchID_ = -1; referPatchIndex_ = -1;
processorPolyPatch::topoChange(pBufs); processorPolyPatch::topoChange(pBufs);
} }

View File

@ -62,7 +62,7 @@ class processorCyclicPolyPatch
mutable int tag_; mutable int tag_;
//- Index of originating patch //- Index of originating patch
mutable label referPatchID_; mutable label referPatchIndex_;
protected: protected:
@ -230,15 +230,15 @@ public:
); );
//- Return the referring patchID //- Return the referring patchID
label referPatchID() const label referPatchIndex() const
{ {
if (referPatchID_ == -1) if (referPatchIndex_ == -1)
{ {
referPatchID_ = this->boundaryMesh().findIndex referPatchIndex_ = this->boundaryMesh().findIndex
( (
referPatchName_ referPatchName_
); );
if (referPatchID_ == -1) if (referPatchIndex_ == -1)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Illegal referPatch name " << referPatchName_ << "Illegal referPatch name " << referPatchName_
@ -247,13 +247,13 @@ public:
<< exit(FatalError); << exit(FatalError);
} }
} }
return referPatchID_; return referPatchIndex_;
} }
//- Return a reference to the referring patch //- Return a reference to the referring patch
const cyclicPolyPatch& referPatch() const const cyclicPolyPatch& referPatch() const
{ {
const polyPatch& pp = this->boundaryMesh()[referPatchID()]; const polyPatch& pp = this->boundaryMesh()[referPatchIndex()];
return refCast<const cyclicPolyPatch>(pp); return refCast<const cyclicPolyPatch>(pp);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,7 +68,7 @@ class mapSubsetMesh
const labelList cellMap_; const labelList cellMap_;
//- Patch for exposed faces //- Patch for exposed faces
const label exposedPatchID_; const label exposedPatchIndex_;
//- List of the old patch sizes //- List of the old patch sizes
labelList oldPatchSizes_; labelList oldPatchSizes_;
@ -142,9 +142,9 @@ public:
} }
//- Patch that exposed faces were put into //- Patch that exposed faces were put into
label exposedPatchID() const label exposedPatchIndex() const
{ {
return exposedPatchID_; return exposedPatchIndex_;
} }
//- Old point map. //- Old point map.

View File

@ -144,7 +144,7 @@ Foam::cyclicFvPatchField<Type>::nbrPatchField() const
return refCast<const cyclicFvPatchField<Type>> return refCast<const cyclicFvPatchField<Type>>
( (
fld.boundaryField()[this->cyclicPatch().nbrPatchID()] fld.boundaryField()[this->cyclicPatch().nbrPatchIndex()]
); );
} }

View File

@ -116,7 +116,7 @@ Foam::cyclicFvsPatchField<Type>::patchNeighbourField
tmp<Field<Type>> tresult tmp<Field<Type>> tresult
( (
new Field<Type>(gf.boundaryField()[cp.nbrPatchID()]) new Field<Type>(gf.boundaryField()[cp.nbrPatchIndex()])
); );
cp.transform().transform(tresult.ref(), tresult.ref()); cp.transform().transform(tresult.ref(), tresult.ref());

View File

@ -103,11 +103,11 @@ void Foam::fvMeshStitcher::intersectNonConformalCyclic
const nonConformalProcessorCyclicFvPatch& ncpcFvp = const nonConformalProcessorCyclicFvPatch& ncpcFvp =
refCast<const nonConformalProcessorCyclicFvPatch>(fvp); refCast<const nonConformalProcessorCyclicFvPatch>(fvp);
if (ncpcFvp.referPatchID() == nccFvp.index()) if (ncpcFvp.referPatchIndex() == nccFvp.index())
{ {
patchis[ncpcFvp.neighbProcNo()] = patchj; patchis[ncpcFvp.neighbProcNo()] = patchj;
} }
if (ncpcFvp.referPatchID() == nbrNccFvp.index()) if (ncpcFvp.referPatchIndex() == nbrNccFvp.index())
{ {
nbrPatchis[ncpcFvp.neighbProcNo()] = patchj; nbrPatchis[ncpcFvp.neighbProcNo()] = patchj;
} }
@ -1011,7 +1011,7 @@ void Foam::fvMeshStitcher::intersectNonConformalCyclics
tOrigFacesNbrBf, tOrigFacesNbrBf,
tOrigSfNbrBf, tOrigSfNbrBf,
tOrigCfNbrBf, tOrigCfNbrBf,
patchEdgeParts[nccFvp.origPatchID()] patchEdgeParts[nccFvp.origPatchIndex()]
); );
} }
@ -1550,7 +1550,7 @@ bool Foam::fvMeshStitcher::connect
.index() .index()
: isA<nonConformalProcessorCyclicFvPatch>(fvp) : isA<nonConformalProcessorCyclicFvPatch>(fvp)
? refCast<const nonConformalProcessorCyclicFvPatch>(fvp) ? refCast<const nonConformalProcessorCyclicFvPatch>(fvp)
.referPatchID() .referPatchIndex()
: -1; : -1;
if (nccPatchi != -1) if (nccPatchi != -1)

View File

@ -61,7 +61,7 @@ Foam::fvMeshStitcherTools::origNcMagSfb(const fvMesh& mesh)
const nonConformalFvPatch& ncFvp = const nonConformalFvPatch& ncFvp =
refCast<const nonConformalFvPatch>(fvp); refCast<const nonConformalFvPatch>(fvp);
const label origPatchi = ncFvp.origPatchID(); const label origPatchi = ncFvp.origPatchIndex();
const fvPatch& origFvp = ncFvp.origPatch(); const fvPatch& origFvp = ncFvp.origPatch();
result[origPatchi] += result[origPatchi] +=

View File

@ -139,7 +139,7 @@ Foam::fvMeshStitcherTools::conformedNcBoundaryField
const nonConformalFvPatch& ncFvp = const nonConformalFvPatch& ncFvp =
refCast<const nonConformalFvPatch>(fvbm[ncPatchi]); refCast<const nonConformalFvPatch>(fvbm[ncPatchi]);
const label origPatchi = ncFvp.origPatchID(); const label origPatchi = ncFvp.origPatchIndex();
const fvPatch& origFvp = ncFvp.origPatch(); const fvPatch& origFvp = ncFvp.origPatch();
const scalarField& ncNcMagSf = ncFvp.patch().magSf(); const scalarField& ncNcMagSf = ncFvp.patch().magSf();
@ -278,7 +278,7 @@ Foam::fvMeshStitcherTools::unconformedBoundaryField
const nonConformalFvPatch& ncFvp = const nonConformalFvPatch& ncFvp =
refCast<const nonConformalFvPatch>(fvp); refCast<const nonConformalFvPatch>(fvp);
const label origPatchi = ncFvp.origPatchID(); const label origPatchi = ncFvp.origPatchIndex();
const fvPatch& origFvp = ncFvp.origPatch(); const fvPatch& origFvp = ncFvp.origPatch();
fieldb[ncPatchi] = fieldb[ncPatchi] =
@ -325,7 +325,7 @@ Foam::fvMeshStitcherTools::unconformedBoundaryField
const nonConformalFvPatch& ncFvp = const nonConformalFvPatch& ncFvp =
refCast<const nonConformalFvPatch>(fvp); refCast<const nonConformalFvPatch>(fvp);
const label origPatchi = ncFvp.origPatchID(); const label origPatchi = ncFvp.origPatchIndex();
const fvPatch& origFvp = ncFvp.origPatch(); const fvPatch& origFvp = ncFvp.origPatch();
const scalarField ncTotalMagSf const scalarField ncTotalMagSf
@ -352,7 +352,7 @@ Foam::fvMeshStitcherTools::unconformedBoundaryField
const nonConformalErrorFvPatch& errorFvp = const nonConformalErrorFvPatch& errorFvp =
refCast<const nonConformalErrorFvPatch>(fvp); refCast<const nonConformalErrorFvPatch>(fvp);
const label origPatchi = errorFvp.origPatchID(); const label origPatchi = errorFvp.origPatchIndex();
const fvPatch& origFvp = errorFvp.origPatch(); const fvPatch& origFvp = errorFvp.origPatch();
if (isFluxField) if (isFluxField)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,9 +94,9 @@ public:
} }
//- Return neighbour //- Return neighbour
virtual label nbrPatchID() const virtual label nbrPatchIndex() const
{ {
return cyclicPolyPatch_.nbrPatchID(); return cyclicPolyPatch_.nbrPatchIndex();
} }
virtual bool owner() const virtual bool owner() const
@ -109,7 +109,7 @@ public:
{ {
return refCast<const cyclicFvPatch> return refCast<const cyclicFvPatch>
( (
this->boundaryMesh()[cyclicPolyPatch_.nbrPatchID()] this->boundaryMesh()[cyclicPolyPatch_.nbrPatchIndex()]
); );
} }
@ -123,7 +123,7 @@ public:
{ {
return refCast<const cyclicFvPatch> return refCast<const cyclicFvPatch>
( (
this->boundaryMesh()[cyclicPolyPatch_.nbrPatchID()] this->boundaryMesh()[cyclicPolyPatch_.nbrPatchIndex()]
); );
} }

View File

@ -74,15 +74,15 @@ const Foam::word& Foam::nonConformalFvPatch::origPatchName() const
} }
Foam::label Foam::nonConformalFvPatch::origPatchID() const Foam::label Foam::nonConformalFvPatch::origPatchIndex() const
{ {
return nonConformalPolyPatch_.origPatchID(); return nonConformalPolyPatch_.origPatchIndex();
} }
const Foam::fvPatch& Foam::nonConformalFvPatch::origPatch() const const Foam::fvPatch& Foam::nonConformalFvPatch::origPatch() const
{ {
return patch_.boundaryMesh()[origPatchID()]; return patch_.boundaryMesh()[origPatchIndex()];
} }

View File

@ -98,7 +98,7 @@ public:
const word& origPatchName() const; const word& origPatchName() const;
//- Original patch ID //- Original patch ID
label origPatchID() const; label origPatchIndex() const;
//- Original patch //- Original patch
const fvPatch& origPatch() const; const fvPatch& origPatch() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -134,9 +134,9 @@ const Foam::word& Foam::nonConformalCoupledFvPatch::errorPatchName() const
} }
Foam::label Foam::nonConformalCoupledFvPatch::errorPatchID() const Foam::label Foam::nonConformalCoupledFvPatch::errorPatchIndex() const
{ {
return nonConformalCoupledPolyPatch_.errorPatchID(); return nonConformalCoupledPolyPatch_.errorPatchIndex();
} }
@ -146,7 +146,7 @@ Foam::nonConformalCoupledFvPatch::errorPatch() const
return return
refCast<const nonConformalErrorFvPatch> refCast<const nonConformalErrorFvPatch>
( (
patch_.boundaryMesh()[errorPatchID()] patch_.boundaryMesh()[errorPatchIndex()]
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -118,7 +118,7 @@ public:
const word& errorPatchName() const; const word& errorPatchName() const;
//- Error patch ID //- Error patch ID
label errorPatchID() const; label errorPatchIndex() const;
//- Error patch //- Error patch
const nonConformalErrorFvPatch& errorPatch() const; const nonConformalErrorFvPatch& errorPatch() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -82,15 +82,15 @@ public:
} }
//- Return the referring patch ID //- Return the referring patch ID
label referPatchID() const label referPatchIndex() const
{ {
return procPolyPatch_.referPatchID(); return procPolyPatch_.referPatchIndex();
} }
//- Return a reference to the referring patch //- Return a reference to the referring patch
const cyclicFvPatch& referPatch() const const cyclicFvPatch& referPatch() const
{ {
const fvPatch& fvp = this->boundaryMesh()[referPatchID()]; const fvPatch& fvp = this->boundaryMesh()[referPatchIndex()];
return refCast<const cyclicFvPatch>(fvp); return refCast<const cyclicFvPatch>(fvp);
} }

View File

@ -203,7 +203,8 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::setPatchFaces()
if if
( (
isA<processorCyclicFvPatch>(fvp) isA<processorCyclicFvPatch>(fvp)
&& refCast<const processorCyclicFvPatch>(fvp).referPatchID() == patchId && refCast<const processorCyclicFvPatch>(fvp).referPatchIndex()
== patchId
) )
{ {
faceId_.append(identityMap(fvp.size())); faceId_.append(identityMap(fvp.size()));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ Foam::enginePiston::enginePiston
) )
: :
meshMover_(refCast<const fvMeshMovers::engine>(meshMover)), meshMover_(refCast<const fvMeshMovers::engine>(meshMover)),
patchID_(pistonPatchName, meshMover_.mesh().boundaryMesh()), patchIndex_(pistonPatchName, meshMover_.mesh().boundaryMesh()),
csPtr_(pistonCS), csPtr_(pistonCS),
minLayer_(minLayer), minLayer_(minLayer),
maxLayer_(maxLayer) maxLayer_(maxLayer)
@ -51,7 +51,7 @@ Foam::enginePiston::enginePiston
) )
: :
meshMover_(refCast<const fvMeshMovers::engine>(meshMover)), meshMover_(refCast<const fvMeshMovers::engine>(meshMover)),
patchID_(dict.lookup("patch"), meshMover_.mesh().boundaryMesh()), patchIndex_(dict.lookup("patch"), meshMover_.mesh().boundaryMesh()),
csPtr_ csPtr_
( (
coordinateSystem::New coordinateSystem::New
@ -70,7 +70,7 @@ Foam::enginePiston::enginePiston
void Foam::enginePiston::writeDict(Ostream& os) const void Foam::enginePiston::writeDict(Ostream& os) const
{ {
os << nl << token::BEGIN_BLOCK os << nl << token::BEGIN_BLOCK
<< "patch " << patchID_.name() << token::END_STATEMENT << nl << "patch " << patchIndex_.name() << token::END_STATEMENT << nl
<< "minLayer " << minLayer_ << token::END_STATEMENT << nl << "minLayer " << minLayer_ << token::END_STATEMENT << nl
<< "maxLayer " << maxLayer_ << token::END_STATEMENT << nl << "maxLayer " << maxLayer_ << token::END_STATEMENT << nl
<< token::END_BLOCK << endl; << token::END_BLOCK << endl;

View File

@ -56,7 +56,7 @@ class enginePiston
const fvMeshMovers::engine& meshMover_; const fvMeshMovers::engine& meshMover_;
//- Piston patch //- Piston patch
polyPatchDynamicID patchID_; polyPatchDynamicID patchIndex_;
//- Coordinate system //- Coordinate system
autoPtr<coordinateSystem> csPtr_; autoPtr<coordinateSystem> csPtr_;
@ -106,9 +106,9 @@ public:
} }
//- Return ID of piston patch //- Return ID of piston patch
const polyPatchDynamicID& patchID() const const polyPatchDynamicID& patchIndex() const
{ {
return patchID_; return patchIndex_;
} }
// Piston layering thickness // Piston layering thickness

View File

@ -200,44 +200,44 @@ public:
// Valve patches // Valve patches
//- Return ID of bottom patch //- Return ID of bottom patch
const polyPatchDynamicID& bottomPatchID() const const polyPatchDynamicID& bottomPatchIndex() const
{ {
return bottomPatch_; return bottomPatch_;
} }
//- Return ID of poppet patch //- Return ID of poppet patch
const polyPatchDynamicID& poppetPatchID() const const polyPatchDynamicID& poppetPatchIndex() const
{ {
return poppetPatch_; return poppetPatch_;
} }
//- Return ID of stem patch //- Return ID of stem patch
const polyPatchDynamicID& stemPatchID() const const polyPatchDynamicID& stemPatchIndex() const
{ {
return stemPatch_; return stemPatch_;
} }
//- Return ID of curtain in cylinder patch //- Return ID of curtain in cylinder patch
const polyPatchDynamicID& curtainInCylinderPatchID() const const polyPatchDynamicID& curtainInCylinderPatchIndex() const
{ {
return curtainInCylinderPatch_; return curtainInCylinderPatch_;
} }
//- Return ID of curtain in port patch //- Return ID of curtain in port patch
const polyPatchDynamicID& curtainInPortPatchID() const const polyPatchDynamicID& curtainInPortPatchIndex() const
{ {
return curtainInPortPatch_; return curtainInPortPatch_;
} }
//- Return ID of detach in cylinder patch //- Return ID of detach in cylinder patch
const polyPatchDynamicID& detachInCylinderPatchID() const const polyPatchDynamicID& detachInCylinderPatchIndex() const
{ {
return detachInCylinderPatch_; return detachInCylinderPatch_;
} }
//- Return ID of detach in port patch //- Return ID of detach in port patch
const polyPatchDynamicID& detachInPortPatchID() const const polyPatchDynamicID& detachInPortPatchIndex() const
{ {
return detachInPortPatch_; return detachInPortPatch_;
} }

View File

@ -145,7 +145,7 @@ void Foam::fvMeshStitchers::moving::conformCorrectMeshPhi
const nonConformalFvPatch& ncFvp = const nonConformalFvPatch& ncFvp =
refCast<const nonConformalFvPatch>(phiBf[nccPatchi].patch()); refCast<const nonConformalFvPatch>(phiBf[nccPatchi].patch());
const label origPatchi = ncFvp.origPatchID(); const label origPatchi = ncFvp.origPatchIndex();
const fvPatch& origFvp = ncFvp.origPatch(); const fvPatch& origFvp = ncFvp.origPatch();
for (label i = 0; i <= phi.nOldTimes(false); ++ i) for (label i = 0; i <= phi.nOldTimes(false); ++ i)
@ -800,7 +800,7 @@ void Foam::fvMeshStitchers::moving::unconformInternalFaceCorrectMeshPhi
if (!nccFvp.owner()) continue; if (!nccFvp.owner()) continue;
const label origPatchi = nccFvp.origPatchID(); const label origPatchi = nccFvp.origPatchIndex();
const fvPatch& origFvp = nccFvp.origPatch(); const fvPatch& origFvp = nccFvp.origPatch();
forAll(nccFvp, nccPatchFacei) forAll(nccFvp, nccPatchFacei)
@ -830,7 +830,7 @@ void Foam::fvMeshStitchers::moving::unconformInternalFaceCorrectMeshPhi
if (!nccFvp.owner()) continue; if (!nccFvp.owner()) continue;
const label origPatchi = nccFvp.origPatchID(); const label origPatchi = nccFvp.origPatchIndex();
const fvPatch& origFvp = nccFvp.origPatch(); const fvPatch& origFvp = nccFvp.origPatch();
forAll(nccFvp, nccPatchFacei) forAll(nccFvp, nccPatchFacei)
@ -895,10 +895,10 @@ void Foam::fvMeshStitchers::moving::unconformErrorFaceCorrectMeshPhi
const nonConformalCoupledFvPatch& nccFvp = const nonConformalCoupledFvPatch& nccFvp =
refCast<const nonConformalCoupledFvPatch>(fvp); refCast<const nonConformalCoupledFvPatch>(fvp);
const label origPatchi = nccFvp.origPatchID(); const label origPatchi = nccFvp.origPatchIndex();
const polyPatch& origPp = mesh().boundaryMesh()[origPatchi]; const polyPatch& origPp = mesh().boundaryMesh()[origPatchi];
const label errorPatchi = nccFvp.errorPatchID(); const label errorPatchi = nccFvp.errorPatchIndex();
forAll(nccFvp, nccPatchFacei) forAll(nccFvp, nccPatchFacei)
{ {

View File

@ -69,8 +69,8 @@ void Foam::fv::effectivenessHeatExchanger::readCoeffs()
void Foam::fv::effectivenessHeatExchanger::setZone() void Foam::fv::effectivenessHeatExchanger::setZone()
{ {
zoneID_ = mesh().faceZones().findIndex(faceZoneName_); zoneIndex_ = mesh().faceZones().findIndex(faceZoneName_);
if (zoneID_ < 0) if (zoneIndex_ < 0)
{ {
FatalErrorInFunction FatalErrorInFunction
<< type() << " " << this->name() << ": " << type() << " " << this->name() << ": "
@ -79,7 +79,7 @@ void Foam::fv::effectivenessHeatExchanger::setZone()
<< nl << exit(FatalError); << nl << exit(FatalError);
} }
const faceZone& fZone = mesh().faceZones()[zoneID_]; const faceZone& fZone = mesh().faceZones()[zoneIndex_];
faceId_.setSize(fZone.size()); faceId_.setSize(fZone.size());
facePatchId_.setSize(fZone.size()); facePatchId_.setSize(fZone.size());
@ -188,7 +188,7 @@ Foam::fv::effectivenessHeatExchanger::effectivenessHeatExchanger
TName_(word::null), TName_(word::null),
phiName_(word::null), phiName_(word::null),
faceZoneName_(word::null), faceZoneName_(word::null),
zoneID_(-1), zoneIndex_(-1),
faceId_(), faceId_(),
facePatchId_(), facePatchId_(),
faceSign_(), faceSign_(),

View File

@ -143,7 +143,7 @@ class effectivenessHeatExchanger
word faceZoneName_; word faceZoneName_;
//- Id for the face zone //- Id for the face zone
label zoneID_; label zoneIndex_;
//- Local list of face IDs //- Local list of face IDs
labelList faceId_; labelList faceId_;

View File

@ -89,7 +89,7 @@ void Foam::bladeModel::interpolateWeights
Foam::bladeModel::bladeModel(const dictionary& dict) Foam::bladeModel::bladeModel(const dictionary& dict)
: :
profileName_(), profileName_(),
profileID_(), profileIndex_(),
radius_(), radius_(),
twist_(), twist_(),
chord_(), chord_(),
@ -109,7 +109,7 @@ Foam::bladeModel::bladeModel(const dictionary& dict)
if (data.size() > 0) if (data.size() > 0)
{ {
profileName_.setSize(data.size()); profileName_.setSize(data.size());
profileID_.setSize(data.size()); profileIndex_.setSize(data.size());
radius_.setSize(data.size()); radius_.setSize(data.size());
twist_.setSize(data.size()); twist_.setSize(data.size());
chord_.setSize(data.size()); chord_.setSize(data.size());
@ -117,7 +117,7 @@ Foam::bladeModel::bladeModel(const dictionary& dict)
forAll(data, i) forAll(data, i)
{ {
profileName_[i] = data[i].first(); profileName_[i] = data[i].first();
profileID_[i] = -1; profileIndex_[i] = -1;
radius_[i] = data[i].second()[0]; radius_[i] = data[i].second()[0];
twist_[i] = degToRad(data[i].second()[1]); twist_[i] = degToRad(data[i].second()[1]);
chord_[i] = data[i].second()[2]; chord_[i] = data[i].second()[2];
@ -144,9 +144,9 @@ const Foam::List<Foam::word>& Foam::bladeModel::profileName() const
} }
const Foam::List<Foam::label>& Foam::bladeModel::profileID() const const Foam::List<Foam::label>& Foam::bladeModel::profileIndex() const
{ {
return profileID_; return profileIndex_;
} }
@ -168,9 +168,9 @@ const Foam::List<Foam::scalar>& Foam::bladeModel::chord() const
} }
Foam::List<Foam::label>& Foam::bladeModel::profileID() Foam::List<Foam::label>& Foam::bladeModel::profileIndex()
{ {
return profileID_; return profileIndex_;
} }

View File

@ -73,7 +73,7 @@ protected:
List<word> profileName_; List<word> profileName_;
//- Corresponding profile ID per section //- Corresponding profile ID per section
List<label> profileID_; List<label> profileIndex_;
//- Radius [m] //- Radius [m]
List<scalar> radius_; List<scalar> radius_;
@ -122,7 +122,7 @@ public:
const List<word>& profileName() const; const List<word>& profileName() const;
//- Return const access to the profile ID list //- Return const access to the profile ID list
const List<label>& profileID() const; const List<label>& profileIndex() const;
//- Return const access to the radius list //- Return const access to the radius list
const List<scalar>& radius() const; const List<scalar>& radius() const;
@ -137,7 +137,7 @@ public:
// Edit // Edit
//- Return non-const access to the profile ID list //- Return non-const access to the profile ID list
List<label>& profileID(); List<label>& profileIndex();
// Evaluation // Evaluation

View File

@ -122,7 +122,11 @@ void Foam::fv::rotorDisk::checkData()
case fvCellSet::selectionTypes::all: case fvCellSet::selectionTypes::all:
{ {
// Set the profile ID for each blade section // Set the profile ID for each blade section
profiles_.connectBlades(blade_.profileName(), blade_.profileID()); profiles_.connectBlades
(
blade_.profileName(),
blade_.profileIndex()
);
switch (inletFlow_) switch (inletFlow_)
{ {
case inletFlowType::fixed: case inletFlowType::fixed:

View File

@ -96,8 +96,8 @@ void Foam::fv::rotorDisk::calculate
AOAmax = max(AOAmax, alphaEff); AOAmax = max(AOAmax, alphaEff);
// Determine profile data for this radius and angle of attack // Determine profile data for this radius and angle of attack
const label profile1 = blade_.profileID()[i1]; const label profile1 = blade_.profileIndex()[i1];
const label profile2 = blade_.profileID()[i2]; const label profile2 = blade_.profileIndex()[i2];
scalar Cd1 = 0; scalar Cd1 = 0;
scalar Cl1 = 0; scalar Cl1 = 0;

View File

@ -151,7 +151,7 @@ Foam::labelListList Foam::Cloud<ParticleType>::patchNonConformalCyclicPatches
const nonConformalCyclicPolyPatch& nccPp = const nonConformalCyclicPolyPatch& nccPp =
refCast<const nonConformalCyclicPolyPatch>(pbm[patchi]); refCast<const nonConformalCyclicPolyPatch>(pbm[patchi]);
result[nccPp.origPatchID()].append(patchi); result[nccPp.origPatchIndex()].append(patchi);
} }
} }

View File

@ -390,7 +390,7 @@ Foam::particle::particle
stepFractionBehind_(0), stepFractionBehind_(0),
nTracksBehind_(0), nTracksBehind_(0),
origProc_(Pstream::myProcNo()), origProc_(Pstream::myProcNo()),
origId_(getNewParticleID()) origId_(getNewParticleIndex())
{} {}
@ -411,7 +411,7 @@ Foam::particle::particle
stepFractionBehind_(0), stepFractionBehind_(0),
nTracksBehind_(0), nTracksBehind_(0),
origProc_(Pstream::myProcNo()), origProc_(Pstream::myProcNo()),
origId_(getNewParticleID()) origId_(getNewParticleIndex())
{ {
if (!locate(mesh, position, celli)) if (!locate(mesh, position, celli))
{ {

View File

@ -383,7 +383,7 @@ public:
// Access // Access
//- Get unique particle creation id //- Get unique particle creation id
inline label getNewParticleID() const; inline label getNewParticleIndex() const;
//- Return current particle coordinates //- Return current particle coordinates
inline const barycentric& coordinates() const; inline const barycentric& coordinates() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -111,7 +111,7 @@ inline Foam::Pair<Foam::barycentricTensor> Foam::particle::movingTetTransform
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::label Foam::particle::getNewParticleID() const inline Foam::label Foam::particle::getNewParticleIndex() const
{ {
label id = particleCount_++; label id = particleCount_++;

View File

@ -371,7 +371,7 @@ bool Foam::particle::hitNonConformalCyclicPatch
{ {
td.sendFromPatch = nccpp.index(); td.sendFromPatch = nccpp.index();
td.sendToProc = receiveProcFace.proci; td.sendToProc = receiveProcFace.proci;
td.sendToPatch = nccpp.nbrPatchID(); td.sendToPatch = nccpp.nbrPatchIndex();
td.sendToPatchFace = receiveProcFace.elementi; td.sendToPatchFace = receiveProcFace.elementi;
td.sendToPosition = receivePos; td.sendToPosition = receivePos;
@ -389,7 +389,7 @@ bool Foam::particle::hitNonConformalCyclicPatch
correctAfterNonConformalCyclicTransfer correctAfterNonConformalCyclicTransfer
( (
td.mesh, td.mesh,
nccpp.nbrPatchID(), nccpp.nbrPatchIndex(),
td.patchNLocateBoundaryHits td.patchNLocateBoundaryHits
); );

View File

@ -290,7 +290,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
// Add child parcel as copy of parent // Add child parcel as copy of parent
SprayParcel<ParcelType>* child = new SprayParcel<ParcelType>(*this); SprayParcel<ParcelType>* child = new SprayParcel<ParcelType>(*this);
child->origId() = this->getNewParticleID(); child->origId() = this->getNewParticleIndex();
child->d() = dChild; child->d() = dChild;
child->d0() = dChild; child->d0() = dChild;
const scalar massChild = child->mass(); const scalar massChild = child->mass();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -126,7 +126,7 @@ findSelfIntersectOp::findSelfIntersectOp
) )
: :
tree_(tree), tree_(tree),
edgeID_(edgeID) edgeIndex_(edgeID)
{} {}
@ -581,7 +581,7 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator()
point& intersectionPoint point& intersectionPoint
) const ) const
{ {
if (edgeID_ == -1) if (edgeIndex_ == -1)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "EdgeID not set. Please set edgeID to the index of" << "EdgeID not set. Please set edgeID to the index of"
@ -593,7 +593,7 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator()
const PatchType& patch = shape.patch(); const PatchType& patch = shape.patch();
const typename PatchType::FaceType& f = patch.localFaces()[index]; const typename PatchType::FaceType& f = patch.localFaces()[index];
const edge& e = patch.edges()[edgeID_]; const edge& e = patch.edges()[edgeIndex_];
if (findIndex(f, e[0]) == -1 && findIndex(f, e[1]) == -1) if (findIndex(f, e[0]) == -1 && findIndex(f, e[1]) == -1)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -173,7 +173,7 @@ public:
{ {
const indexedOctree<treeDataPrimitivePatch>& tree_; const indexedOctree<treeDataPrimitivePatch>& tree_;
const label edgeID_; const label edgeIndex_;
public: public:

View File

@ -241,9 +241,9 @@ Foam::labelList Foam::nonConformalBoundary::nonConformalNonCoupledPatchIDs
if (side == -1 && !nccPp.neighbour()) continue; if (side == -1 && !nccPp.neighbour()) continue;
if (origPatchIDTable.found(nccPp.origPatchID())) continue; if (origPatchIDTable.found(nccPp.origPatchIndex())) continue;
origPatchIDTable.insert(nccPp.origPatchID()); origPatchIDTable.insert(nccPp.origPatchIndex());
nonCoupledPatchIDs.append((nccPp.*method)()); nonCoupledPatchIDs.append((nccPp.*method)());
} }
} }
@ -256,28 +256,28 @@ Foam::labelList Foam::nonConformalBoundary::nonConformalNonCoupledPatchIDs
Foam::labelList Foam::nonConformalBoundary::allOrigPatchIndices() const Foam::labelList Foam::nonConformalBoundary::allOrigPatchIndices() const
{ {
auto method = &nonConformalCoupledPolyPatch::origPatchID; auto method = &nonConformalCoupledPolyPatch::origPatchIndex;
return nonConformalNonCoupledPatchIDs(0, method); return nonConformalNonCoupledPatchIDs(0, method);
} }
Foam::labelList Foam::nonConformalBoundary::allErrorPatchIndices() const Foam::labelList Foam::nonConformalBoundary::allErrorPatchIndices() const
{ {
auto method = &nonConformalCoupledPolyPatch::errorPatchID; auto method = &nonConformalCoupledPolyPatch::errorPatchIndex;
return nonConformalNonCoupledPatchIDs(0, method); return nonConformalNonCoupledPatchIDs(0, method);
} }
Foam::labelList Foam::nonConformalBoundary::ownerOrigPatchIndices() const Foam::labelList Foam::nonConformalBoundary::ownerOrigPatchIndices() const
{ {
auto method = &nonConformalCoupledPolyPatch::origPatchID; auto method = &nonConformalCoupledPolyPatch::origPatchIndex;
return nonConformalNonCoupledPatchIDs(1, method); return nonConformalNonCoupledPatchIDs(1, method);
} }
Foam::labelList Foam::nonConformalBoundary::ownerErrorPatchIndices() const Foam::labelList Foam::nonConformalBoundary::ownerErrorPatchIndices() const
{ {
auto method = &nonConformalCoupledPolyPatch::errorPatchID; auto method = &nonConformalCoupledPolyPatch::errorPatchIndex;
return nonConformalNonCoupledPatchIDs(1, method); return nonConformalNonCoupledPatchIDs(1, method);
} }

View File

@ -52,9 +52,9 @@ void Foam::nonConformalPolyPatch::validateSize() const
void Foam::nonConformalPolyPatch::rename(const wordList& newNames) void Foam::nonConformalPolyPatch::rename(const wordList& newNames)
{ {
if (origPatchID_ != -1) if (origPatchIndex_ != -1)
{ {
origPatchName_ = newNames[origPatchID_]; origPatchName_ = newNames[origPatchIndex_];
} }
else else
{ {
@ -68,9 +68,9 @@ void Foam::nonConformalPolyPatch::rename(const wordList& newNames)
void Foam::nonConformalPolyPatch::reorder(const labelUList& newToOldIndex) void Foam::nonConformalPolyPatch::reorder(const labelUList& newToOldIndex)
{ {
if (origPatchID_ != -1) if (origPatchIndex_ != -1)
{ {
origPatchID_ = findIndex(newToOldIndex, origPatchID_); origPatchIndex_ = findIndex(newToOldIndex, origPatchIndex_);
} }
} }
@ -81,7 +81,7 @@ Foam::nonConformalPolyPatch::nonConformalPolyPatch(const polyPatch& patch)
: :
patch_(patch), patch_(patch),
origPatchName_(word::null), origPatchName_(word::null),
origPatchID_(-1) origPatchIndex_(-1)
{ {
validateSize(); validateSize();
} }
@ -95,7 +95,7 @@ Foam::nonConformalPolyPatch::nonConformalPolyPatch
: :
patch_(patch), patch_(patch),
origPatchName_(origPatchName), origPatchName_(origPatchName),
origPatchID_(-1) origPatchIndex_(-1)
{ {
validateSize(); validateSize();
} }
@ -109,7 +109,7 @@ Foam::nonConformalPolyPatch::nonConformalPolyPatch
: :
patch_(patch), patch_(patch),
origPatchName_(dict.lookup<word>("originalPatch")), origPatchName_(dict.lookup<word>("originalPatch")),
origPatchID_(-1) origPatchIndex_(-1)
{ {
validateSize(); validateSize();
} }
@ -123,7 +123,7 @@ Foam::nonConformalPolyPatch::nonConformalPolyPatch
: :
patch_(patch), patch_(patch),
origPatchName_(ncPatch.origPatchName_), origPatchName_(ncPatch.origPatchName_),
origPatchID_(-1) origPatchIndex_(-1)
{ {
validateSize(); validateSize();
} }
@ -149,13 +149,13 @@ const Foam::word& Foam::nonConformalPolyPatch::origPatchName() const
} }
Foam::label Foam::nonConformalPolyPatch::origPatchID() const Foam::label Foam::nonConformalPolyPatch::origPatchIndex() const
{ {
if (origPatchID_ == -1) if (origPatchIndex_ == -1)
{ {
origPatchID_ = patch_.boundaryMesh().findIndex(origPatchName()); origPatchIndex_ = patch_.boundaryMesh().findIndex(origPatchName());
if (origPatchID_ == -1) if (origPatchIndex_ == -1)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Illegal neighbourPatch name " << origPatchName() << "Illegal neighbourPatch name " << origPatchName()
@ -164,7 +164,7 @@ Foam::label Foam::nonConformalPolyPatch::origPatchID() const
<< exit(FatalError); << exit(FatalError);
} }
const polyPatch& p = patch_.boundaryMesh()[origPatchID_]; const polyPatch& p = patch_.boundaryMesh()[origPatchIndex_];
if (isA<nonConformalPolyPatch>(p)) if (isA<nonConformalPolyPatch>(p))
{ {
@ -179,13 +179,13 @@ Foam::label Foam::nonConformalPolyPatch::origPatchID() const
} }
} }
return origPatchID_; return origPatchIndex_;
} }
const Foam::polyPatch& Foam::nonConformalPolyPatch::origPatch() const const Foam::polyPatch& Foam::nonConformalPolyPatch::origPatch() const
{ {
return patch_.boundaryMesh()[origPatchID()]; return patch_.boundaryMesh()[origPatchIndex()];
} }

View File

@ -62,7 +62,7 @@ private:
mutable word origPatchName_; mutable word origPatchName_;
//- Index of the patch from which this patch originates //- Index of the patch from which this patch originates
mutable label origPatchID_; mutable label origPatchIndex_;
// Private Member Functions // Private Member Functions
@ -128,7 +128,7 @@ public:
const word& origPatchName() const; const word& origPatchName() const;
//- Original patchID //- Original patchID
label origPatchID() const; label origPatchIndex() const;
//- Original patch //- Original patch
const polyPatch& origPatch() const; const polyPatch& origPatch() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,7 +42,7 @@ void Foam::nonConformalCoupledPolyPatch::rename(const wordList& newNames)
nonConformalPolyPatch::rename(newNames); nonConformalPolyPatch::rename(newNames);
errorPatchName_ = word::null; errorPatchName_ = word::null;
errorPatchID_ = -1; errorPatchIndex_ = -1;
} }
@ -54,7 +54,7 @@ void Foam::nonConformalCoupledPolyPatch::reorder
nonConformalPolyPatch::reorder(newToOldIndex); nonConformalPolyPatch::reorder(newToOldIndex);
errorPatchName_ = word::null; errorPatchName_ = word::null;
errorPatchID_ = -1; errorPatchIndex_ = -1;
} }
@ -68,7 +68,7 @@ Foam::nonConformalCoupledPolyPatch::nonConformalCoupledPolyPatch
nonConformalPolyPatch(patch), nonConformalPolyPatch(patch),
patch_(refCast<const coupledPolyPatch>(patch)), patch_(refCast<const coupledPolyPatch>(patch)),
errorPatchName_(word::null), errorPatchName_(word::null),
errorPatchID_(-1) errorPatchIndex_(-1)
{} {}
@ -81,7 +81,7 @@ Foam::nonConformalCoupledPolyPatch::nonConformalCoupledPolyPatch
nonConformalPolyPatch(patch, origPatchName), nonConformalPolyPatch(patch, origPatchName),
patch_(refCast<const coupledPolyPatch>(patch)), patch_(refCast<const coupledPolyPatch>(patch)),
errorPatchName_(word::null), errorPatchName_(word::null),
errorPatchID_(-1) errorPatchIndex_(-1)
{} {}
@ -94,7 +94,7 @@ Foam::nonConformalCoupledPolyPatch::nonConformalCoupledPolyPatch
nonConformalPolyPatch(patch, dict), nonConformalPolyPatch(patch, dict),
patch_(refCast<const coupledPolyPatch>(patch)), patch_(refCast<const coupledPolyPatch>(patch)),
errorPatchName_(word::null), errorPatchName_(word::null),
errorPatchID_(-1) errorPatchIndex_(-1)
{} {}
@ -107,7 +107,7 @@ Foam::nonConformalCoupledPolyPatch::nonConformalCoupledPolyPatch
nonConformalPolyPatch(patch, nccPatch), nonConformalPolyPatch(patch, nccPatch),
patch_(refCast<const coupledPolyPatch>(patch)), patch_(refCast<const coupledPolyPatch>(patch)),
errorPatchName_(word::null), errorPatchName_(word::null),
errorPatchID_(-1) errorPatchIndex_(-1)
{} {}
@ -139,13 +139,13 @@ const Foam::transformer& Foam::nonConformalCoupledPolyPatch::transform() const
const Foam::word& Foam::nonConformalCoupledPolyPatch::errorPatchName() const const Foam::word& Foam::nonConformalCoupledPolyPatch::errorPatchName() const
{ {
return patch_.boundaryMesh()[errorPatchID()].name(); return patch_.boundaryMesh()[errorPatchIndex()].name();
} }
Foam::label Foam::nonConformalCoupledPolyPatch::errorPatchID() const Foam::label Foam::nonConformalCoupledPolyPatch::errorPatchIndex() const
{ {
if (errorPatchID_ == -1) if (errorPatchIndex_ == -1)
{ {
forAll(patch_.boundaryMesh(), patchi) forAll(patch_.boundaryMesh(), patchi)
{ {
@ -154,17 +154,17 @@ Foam::label Foam::nonConformalCoupledPolyPatch::errorPatchID() const
if if
( (
isA<nonConformalErrorPolyPatch>(p) isA<nonConformalErrorPolyPatch>(p)
&& refCast<const nonConformalErrorPolyPatch>(p).origPatchID() && refCast<const nonConformalErrorPolyPatch>(p).origPatchIndex()
== origPatchID() == origPatchIndex()
) )
{ {
errorPatchID_ = patchi; errorPatchIndex_ = patchi;
break; break;
} }
} }
} }
if (errorPatchID_ == -1) if (errorPatchIndex_ == -1)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "No error patch of type " << "No error patch of type "
@ -173,7 +173,7 @@ Foam::label Foam::nonConformalCoupledPolyPatch::errorPatchID() const
<< exit(FatalError); << exit(FatalError);
} }
return errorPatchID_; return errorPatchIndex_;
} }
@ -183,7 +183,7 @@ Foam::nonConformalCoupledPolyPatch::errorPatch() const
return return
refCast<const nonConformalErrorPolyPatch> refCast<const nonConformalErrorPolyPatch>
( (
patch_.boundaryMesh()[errorPatchID()] patch_.boundaryMesh()[errorPatchIndex()]
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,7 +71,7 @@ private:
mutable word errorPatchName_; mutable word errorPatchName_;
//- Index of the error patch associated with this cyclic //- Index of the error patch associated with this cyclic
mutable label errorPatchID_; mutable label errorPatchIndex_;
protected: protected:
@ -137,7 +137,7 @@ public:
const word& errorPatchName() const; const word& errorPatchName() const;
//- Error patchID //- Error patchID
label errorPatchID() const; label errorPatchIndex() const;
//- Error patch //- Error patch
const nonConformalErrorPolyPatch& errorPatch() const; const nonConformalErrorPolyPatch& errorPatch() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -264,7 +264,7 @@ Foam::nonConformalCyclicPolyPatch::intersection() const
intersection_.update intersection_.update
( (
origPatch(), origPatch(),
ncb.patchPointNormals(origPatchID()), ncb.patchPointNormals(origPatchIndex()),
nbrPatch().origPatch(), nbrPatch().origPatch(),
transform() transform()
); );
@ -300,8 +300,8 @@ Foam::nonConformalCyclicPolyPatch::rays() const
mesh.points(), mesh.points(),
mesh.oldPoints() mesh.oldPoints()
), ),
ncb.patchPointNormals(origPatchID()), ncb.patchPointNormals(origPatchIndex()),
ncb.patchPointNormals0(origPatchID()), ncb.patchPointNormals0(origPatchIndex()),
primitiveOldTimePatch primitiveOldTimePatch
( (
nbrPatch().origPatch(), nbrPatch().origPatch(),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -159,7 +159,7 @@ public:
//- Get the referred patch //- Get the referred patch
const nonConformalCyclicPolyPatch& referPatch() const const nonConformalCyclicPolyPatch& referPatch() const
{ {
const polyPatch& pp = this->boundaryMesh()[referPatchID()]; const polyPatch& pp = this->boundaryMesh()[referPatchIndex()];
return refCast<const nonConformalCyclicPolyPatch>(pp); return refCast<const nonConformalCyclicPolyPatch>(pp);
} }

View File

@ -851,7 +851,7 @@ Foam::domainDecomposition::procFaceAddressingBf() const
{ {
const label completePatchi = const label completePatchi =
refCast<const processorCyclicFvPatch>(fvp) refCast<const processorCyclicFvPatch>(fvp)
.referPatchID(); .referPatchIndex();
procFaceAddressingBf_[proci][procPatchi] = procFaceAddressingBf_[proci][procPatchi] =
mag(fvp.patchSlice(procFaceAddressing_[proci])) mag(fvp.patchSlice(procFaceAddressing_[proci]))

View File

@ -182,7 +182,7 @@ Foam::domainDecomposition::nonConformalProcFaceAddressingBf() const
const processorCyclicFvPatch& pcFvp = const processorCyclicFvPatch& pcFvp =
refCast<const processorCyclicFvPatch>(fvp); refCast<const processorCyclicFvPatch>(fvp);
refPatchProcPatchTable[pcFvp.referPatchID()].insert refPatchProcPatchTable[pcFvp.referPatchIndex()].insert
( (
labelPair(proci, pcFvp.neighbProcNo()), labelPair(proci, pcFvp.neighbProcNo()),
procPatchi procPatchi
@ -224,7 +224,7 @@ Foam::domainDecomposition::nonConformalProcFaceAddressingBf() const
if (!nccFvp.owner()) continue; if (!nccFvp.owner()) continue;
const label nccNbrPatchi = nccFvp.nbrPatchID(); const label nccNbrPatchi = nccFvp.nbrPatchIndex();
forAll(polyFacesBf[nccPatchi], nccPatchFacei) forAll(polyFacesBf[nccPatchi], nccPatchFacei)
{ {
@ -283,7 +283,7 @@ Foam::domainDecomposition::nonConformalProcFaceAddressingBf() const
if (!nccFvp.owner()) continue; if (!nccFvp.owner()) continue;
const label nccNbrPatchi = nccFvp.nbrPatchID(); const label nccNbrPatchi = nccFvp.nbrPatchIndex();
label nccPatchFacei = 0; label nccPatchFacei = 0;
labelPairTable procNccPatchFaceis; labelPairTable procNccPatchFaceis;
@ -453,7 +453,7 @@ void Foam::domainDecomposition::unconformComplete()
const label completeNccPatchi = const label completeNccPatchi =
isA<processorCyclicFvPatch>(fvp) isA<processorCyclicFvPatch>(fvp)
? refCast<const processorCyclicFvPatch>(fvp) ? refCast<const processorCyclicFvPatch>(fvp)
.referPatchID() .referPatchIndex()
: procNccPatchi; : procNccPatchi;
const label size = const label size =
@ -512,7 +512,7 @@ void Foam::domainDecomposition::unconformComplete()
const label nbrNccPatchi = const label nbrNccPatchi =
refCast<const nonConformalCyclicFvPatch>(fvp) refCast<const nonConformalCyclicFvPatch>(fvp)
.nbrPatchID(); .nbrPatchIndex();
checkNonConformalCoupledPatchOrdering checkNonConformalCoupledPatchOrdering
( (
@ -583,7 +583,7 @@ void Foam::domainDecomposition::unconformProcs()
const label completeNccPatchi = const label completeNccPatchi =
isA<processorCyclicFvPatch>(fvp) isA<processorCyclicFvPatch>(fvp)
? refCast<const processorCyclicFvPatch>(fvp) ? refCast<const processorCyclicFvPatch>(fvp)
.referPatchID() .referPatchIndex()
: procNccPatchi; : procNccPatchi;
polyFacesBf[procNccPatchi] = polyFacesBf[procNccPatchi] =
@ -639,7 +639,7 @@ void Foam::domainDecomposition::unconformProcs()
{ {
nbrProci = proci; nbrProci = proci;
nbrNccPatchi = nbrNccPatchi =
refCast<const cyclicFvPatch>(fvp).nbrPatchID(); refCast<const cyclicFvPatch>(fvp).nbrPatchIndex();
} }
else if (isA<processorCyclicFvPatch>(fvp)) else if (isA<processorCyclicFvPatch>(fvp))
{ {
@ -666,8 +666,8 @@ void Foam::domainDecomposition::unconformProcs()
( (
nbrPcFvp.neighbProcNo() nbrPcFvp.neighbProcNo()
== proci == proci
&& nbrPcFvp.referPatchID() && nbrPcFvp.referPatchIndex()
== pcFvp.referPatch().nbrPatchID() == pcFvp.referPatch().nbrPatchIndex()
) )
{ {
nbrNccPatchi = nbrNccPatchj; nbrNccPatchi = nbrNccPatchj;

View File

@ -326,8 +326,8 @@ void Foam::domainDecomposition::reconstruct()
const label proci = pcpp.myProcNo(); const label proci = pcpp.myProcNo();
const label nbrProci = pcpp.neighbProcNo(); const label nbrProci = pcpp.neighbProcNo();
const label refPatchi = pcpp.referPatchID(); const label refPatchi = pcpp.referPatchIndex();
const label nbrRefPatchi = pcpp.referPatch().nbrPatchID(); const label nbrRefPatchi = pcpp.referPatch().nbrPatchIndex();
FixedList<label, 3> key({proci, nbrProci, refPatchi}); FixedList<label, 3> key({proci, nbrProci, refPatchi});
FixedList<label, 3> nbrKey({nbrProci, proci, nbrRefPatchi}); FixedList<label, 3> nbrKey({nbrProci, proci, nbrRefPatchi});

View File

@ -46,8 +46,8 @@ defineTypeNameAndDebug(fvMeshDistribute, 0);
class lessProcPatches class lessProcPatches
{ {
const labelList& nbrProc_; const labelList& nbrProc_;
const labelList& referPatchID_; const labelList& referPatchIndex_;
const labelList& referNbrPatchID_; const labelList& referNbrPatchIndex_;
public: public:
@ -59,8 +59,8 @@ public:
) )
: :
nbrProc_(nbrProc), nbrProc_(nbrProc),
referPatchID_(referPatchID), referPatchIndex_(referPatchID),
referNbrPatchID_(referNbrPatchID) referNbrPatchIndex_(referNbrPatchID)
{} {}
bool operator()(const label a, const label b) bool operator()(const label a, const label b)
@ -76,11 +76,11 @@ public:
} }
// Non-cyclics go next // Non-cyclics go next
else if (referPatchID_[a] == -1) else if (referPatchIndex_[a] == -1)
{ {
return true; return true;
} }
else if (referPatchID_[b] == -1) else if (referPatchIndex_[b] == -1)
{ {
return false; return false;
} }
@ -90,11 +90,11 @@ public:
// the neighbour // the neighbour
else if (Pstream::myProcNo() < nbrProc_[a]) else if (Pstream::myProcNo() < nbrProc_[a])
{ {
return referPatchID_[a] < referPatchID_[b]; return referPatchIndex_[a] < referPatchIndex_[b];
} }
else else
{ {
return referNbrPatchID_[a] < referNbrPatchID_[b]; return referNbrPatchIndex_[a] < referNbrPatchIndex_[b];
} }
} }
}; };
@ -900,10 +900,10 @@ void Foam::fvMeshDistribute::getCouplingData
{ {
patchi = patchi =
refCast<const processorCyclicPolyPatch>(pp) refCast<const processorCyclicPolyPatch>(pp)
.referPatchID(); .referPatchIndex();
nbrPatchi = nbrPatchi =
refCast<const cyclicPolyPatch>(patches[patchi]) refCast<const cyclicPolyPatch>(patches[patchi])
.nbrPatchID(); .nbrPatchIndex();
} }
@ -926,7 +926,7 @@ void Foam::fvMeshDistribute::getCouplingData
sourceFace[bndI] = pp.start()+i; sourceFace[bndI] = pp.start()+i;
sourceProc[bndI] = Pstream::myProcNo(); sourceProc[bndI] = Pstream::myProcNo();
sourcePatch[bndI] = patchi; sourcePatch[bndI] = patchi;
sourceNbrPatch[bndI] = cpp.nbrPatchID(); sourceNbrPatch[bndI] = cpp.nbrPatchIndex();
sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI]; sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI];
} }
} }
@ -938,7 +938,7 @@ void Foam::fvMeshDistribute::getCouplingData
sourceFace[bndI] = nbrFaces[bndI]; sourceFace[bndI] = nbrFaces[bndI];
sourceProc[bndI] = Pstream::myProcNo(); sourceProc[bndI] = Pstream::myProcNo();
sourcePatch[bndI] = patchi; sourcePatch[bndI] = patchi;
sourceNbrPatch[bndI] = cpp.nbrPatchID(); sourceNbrPatch[bndI] = cpp.nbrPatchIndex();
sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI]; sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI];
} }
} }

View File

@ -65,22 +65,22 @@ class polyAddFace
label neighbour_; label neighbour_;
//- Master point ID for faces blown up from points //- Master point ID for faces blown up from points
label masterPointID_; label masterPointIndex_;
//- Master edge ID for faces blown up from edges //- Master edge ID for faces blown up from edges
label masterEdgeID_; label masterEdgeIndex_;
//- Master face ID for faces blown up from faces //- Master face ID for faces blown up from faces
label masterFaceID_; label masterFaceIndex_;
//- Does the face flux need to be flipped //- Does the face flux need to be flipped
bool flipFaceFlux_; bool flipFaceFlux_;
//- Boundary patch ID //- Boundary patch ID
label patchID_; label patchIndex_;
//- Face zone ID //- Face zone ID
label zoneID_; label zoneIndex_;
//- Face zone flip //- Face zone flip
bool zoneFlip_; bool zoneFlip_;
@ -102,12 +102,12 @@ public:
face_(0), face_(0),
owner_(-1), owner_(-1),
neighbour_(-1), neighbour_(-1),
masterPointID_(-1), masterPointIndex_(-1),
masterEdgeID_(-1), masterEdgeIndex_(-1),
masterFaceID_(-1), masterFaceIndex_(-1),
flipFaceFlux_(false), flipFaceFlux_(false),
patchID_(-1), patchIndex_(-1),
zoneID_(-1), zoneIndex_(-1),
zoneFlip_(false) zoneFlip_(false)
{} {}
@ -130,12 +130,12 @@ public:
face_(f), face_(f),
owner_(owner), owner_(owner),
neighbour_(neighbour), neighbour_(neighbour),
masterPointID_(masterPointID), masterPointIndex_(masterPointID),
masterEdgeID_(masterEdgeID), masterEdgeIndex_(masterEdgeID),
masterFaceID_(masterFaceID), masterFaceIndex_(masterFaceID),
flipFaceFlux_(flipFaceFlux), flipFaceFlux_(flipFaceFlux),
patchID_(patchID), patchIndex_(patchID),
zoneID_(zoneID), zoneIndex_(zoneID),
zoneFlip_(zoneFlip) zoneFlip_(zoneFlip)
{ {
if (face_.size() < 3) if (face_.size() < 3)
@ -143,10 +143,10 @@ public:
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " masterPointID:" << masterPointID_ << " masterPointID:" << masterPointIndex_
<< " masterEdgeID:" << masterEdgeID_ << " masterEdgeID:" << masterEdgeIndex_
<< " masterFaceID:" << masterFaceID_ << " masterFaceID:" << masterFaceIndex_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -157,10 +157,10 @@ public:
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " masterPointID:" << masterPointID_ << " masterPointID:" << masterPointIndex_
<< " masterEdgeID:" << masterEdgeID_ << " masterEdgeID:" << masterEdgeIndex_
<< " masterFaceID:" << masterFaceID_ << " masterFaceID:" << masterFaceIndex_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -171,10 +171,10 @@ public:
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " masterPointID:" << masterPointID_ << " masterPointID:" << masterPointIndex_
<< " masterEdgeID:" << masterEdgeID_ << " masterEdgeID:" << masterEdgeIndex_
<< " masterFaceID:" << masterFaceID_ << " masterFaceID:" << masterFaceIndex_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -185,10 +185,10 @@ public:
FatalErrorInFunction FatalErrorInFunction
<< ". This is not allowed.\n" << ". This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " masterPointID:" << masterPointID_ << " masterPointID:" << masterPointIndex_
<< " masterEdgeID:" << masterEdgeID_ << " masterEdgeID:" << masterEdgeIndex_
<< " masterFaceID:" << masterFaceID_ << " masterFaceID:" << masterFaceIndex_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -200,24 +200,24 @@ public:
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< "Face: " << face_ << "Face: " << face_
<< " masterPointID:" << masterPointID_ << " masterPointID:" << masterPointIndex_
<< " masterEdgeID:" << masterEdgeID_ << " masterEdgeID:" << masterEdgeIndex_
<< " masterFaceID:" << masterFaceID_ << " masterFaceID:" << masterFaceIndex_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
} }
if (zoneID_ == -1 && zoneFlip) if (zoneIndex_ == -1 && zoneFlip)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "belong to zone. This is not allowed.\n" << "belong to zone. This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " masterPointID:" << masterPointID_ << " masterPointID:" << masterPointIndex_
<< " masterEdgeID:" << masterEdgeID_ << " masterEdgeID:" << masterEdgeIndex_
<< " masterFaceID:" << masterFaceID_ << " masterFaceID:" << masterFaceIndex_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -256,19 +256,19 @@ public:
//- Is the face mastered by a point //- Is the face mastered by a point
bool isPointMaster() const bool isPointMaster() const
{ {
return masterPointID_ >= 0; return masterPointIndex_ >= 0;
} }
//- Is the face mastered by an edge //- Is the face mastered by an edge
bool isEdgeMaster() const bool isEdgeMaster() const
{ {
return masterEdgeID_ >= 0; return masterEdgeIndex_ >= 0;
} }
//- Is the face mastered by another face //- Is the face mastered by another face
bool isFaceMaster() const bool isFaceMaster() const
{ {
return masterFaceID_ >= 0; return masterFaceIndex_ >= 0;
} }
//- Is the face appended with no master //- Is the face appended with no master
@ -278,21 +278,21 @@ public:
} }
//- Return master point ID //- Return master point ID
label masterPointID() const label masterPointIndex() const
{ {
return masterPointID_; return masterPointIndex_;
} }
//- Return master edge ID //- Return master edge ID
label masterEdgeID() const label masterEdgeIndex() const
{ {
return masterEdgeID_; return masterEdgeIndex_;
} }
//- Return master face ID //- Return master face ID
label masterFaceID() const label masterFaceIndex() const
{ {
return masterFaceID_; return masterFaceIndex_;
} }
//- Does the face flux need to be flipped //- Does the face flux need to be flipped
@ -304,31 +304,31 @@ public:
//- Does the face belong to a boundary patch? //- Does the face belong to a boundary patch?
bool isInPatch() const bool isInPatch() const
{ {
return patchID_ >= 0; return patchIndex_ >= 0;
} }
//- Boundary patch ID //- Boundary patch ID
label patchID() const label patchIndex() const
{ {
return patchID_; return patchIndex_;
} }
//- Does the face belong to a zone? //- Does the face belong to a zone?
bool isInZone() const bool isInZone() const
{ {
return zoneID_ >= 0; return zoneIndex_ >= 0;
} }
//- Is the face only a zone face (i.e. not belonging to a cell) //- Is the face only a zone face (i.e. not belonging to a cell)
bool onlyInZone() const bool onlyInZone() const
{ {
return zoneID_ >= 0 && owner_ < 0 && neighbour_ < 0; return zoneIndex_ >= 0 && owner_ < 0 && neighbour_ < 0;
} }
//- Face zone ID //- Face zone ID
label zoneID() const label zoneIndex() const
{ {
return zoneID_; return zoneIndex_;
} }
//- Face zone flip //- Face zone flip

View File

@ -55,10 +55,10 @@ class polyAddPoint
point p_; point p_;
//- Master point //- Master point
label masterPointID_; label masterPointIndex_;
//- Point zone ID //- Point zone ID
label zoneID_; label zoneIndex_;
//- Does the point support a cell //- Does the point support a cell
bool inCell_; bool inCell_;
@ -78,8 +78,8 @@ public:
polyAddPoint() polyAddPoint()
: :
p_(Zero), p_(Zero),
masterPointID_(-1), masterPointIndex_(-1),
zoneID_(-1), zoneIndex_(-1),
inCell_(false) inCell_(false)
{} {}
@ -93,17 +93,17 @@ public:
) )
: :
p_(p), p_(p),
masterPointID_(masterPointID), masterPointIndex_(masterPointID),
zoneID_(zoneID), zoneIndex_(zoneID),
inCell_(inCell) inCell_(inCell)
{ {
if (zoneID_ < 0 && !inCell) if (zoneIndex_ < 0 && !inCell)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "point: " << p << "point: " << p
<< " master: " << masterPointID_ << " master: " << masterPointIndex_
<< " zone: " << zoneID_ << " zone: " << zoneIndex_
<< abort(FatalError); << abort(FatalError);
} }
@ -128,27 +128,27 @@ public:
} }
//- Master point label //- Master point label
label masterPointID() const label masterPointIndex() const
{ {
return masterPointID_; return masterPointIndex_;
} }
//- Is the point appended with no master //- Is the point appended with no master
bool appended() const bool appended() const
{ {
return masterPointID_ < 0; return masterPointIndex_ < 0;
} }
//- Does the point belong to a zone? //- Does the point belong to a zone?
bool isInZone() const bool isInZone() const
{ {
return zoneID_ >= 0; return zoneIndex_ >= 0;
} }
//- Point zone ID //- Point zone ID
label zoneID() const label zoneIndex() const
{ {
return zoneID_; return zoneIndex_;
} }
//- Does the point support a cell //- Does the point support a cell

View File

@ -56,7 +56,7 @@ class polyModifyFace
face face_; face face_;
//- Master face ID //- Master face ID
label faceID_; label faceIndex_;
//- Face owner //- Face owner
label owner_; label owner_;
@ -68,13 +68,13 @@ class polyModifyFace
bool flipFaceFlux_; bool flipFaceFlux_;
//- Boundary patch ID //- Boundary patch ID
label patchID_; label patchIndex_;
//- Remove from current zone //- Remove from current zone
bool removeFromZone_; bool removeFromZone_;
//- Face zone ID //- Face zone ID
label zoneID_; label zoneIndex_;
//- Face zone flip //- Face zone flip
bool zoneFlip_; bool zoneFlip_;
@ -94,13 +94,13 @@ public:
polyModifyFace() polyModifyFace()
: :
face_(0), face_(0),
faceID_(-1), faceIndex_(-1),
owner_(-1), owner_(-1),
neighbour_(-1), neighbour_(-1),
flipFaceFlux_(false), flipFaceFlux_(false),
patchID_(-1), patchIndex_(-1),
removeFromZone_(false), removeFromZone_(false),
zoneID_(-1), zoneIndex_(-1),
zoneFlip_(false) zoneFlip_(false)
{} {}
@ -119,13 +119,13 @@ public:
) )
: :
face_(f), face_(f),
faceID_(faceID), faceIndex_(faceID),
owner_(owner), owner_(owner),
neighbour_(neighbour), neighbour_(neighbour),
flipFaceFlux_(flipFaceFlux), flipFaceFlux_(flipFaceFlux),
patchID_(patchID), patchIndex_(patchID),
removeFromZone_(removeFromZone), removeFromZone_(removeFromZone),
zoneID_(zoneID), zoneIndex_(zoneID),
zoneFlip_(zoneFlip) zoneFlip_(zoneFlip)
{ {
if (face_.size() < 3) if (face_.size() < 3)
@ -133,7 +133,7 @@ public:
FatalErrorInFunction FatalErrorInFunction
<< "Invalid face: less than 3 points. This is not allowed\n" << "Invalid face: less than 3 points. This is not allowed\n"
<< "Face: " << face_ << "Face: " << face_
<< " faceID:" << faceID_ << " faceID:" << faceIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -143,7 +143,7 @@ public:
{ {
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< " faceID:" << faceID_ << " faceID:" << faceIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -154,30 +154,30 @@ public:
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " faceID:" << faceID_ << " faceID:" << faceIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
} }
if (neighbour_ >= 0 && patchID_ >= 0) if (neighbour_ >= 0 && patchIndex_ >= 0)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "This is not allowed.\n" << "This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " faceID:" << faceID_ << " faceID:" << faceIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< " patchID:" << patchID_ << " patchID:" << patchIndex_
<< abort(FatalError); << abort(FatalError);
} }
if (zoneID_ < 0 && zoneFlip ) if (zoneIndex_ < 0 && zoneFlip )
{ {
FatalErrorInFunction FatalErrorInFunction
<< "belong to zone. This is not allowed.\n" << "belong to zone. This is not allowed.\n"
<< "Face: " << face_ << "Face: " << face_
<< " faceID:" << faceID_ << " faceID:" << faceIndex_
<< " owner:" << owner_ << " owner:" << owner_
<< " neighbour:" << neighbour_ << " neighbour:" << neighbour_
<< abort(FatalError); << abort(FatalError);
@ -202,9 +202,9 @@ public:
} }
//- Return master face ID //- Return master face ID
label faceID() const label faceIndex() const
{ {
return faceID_; return faceIndex_;
} }
//- Return owner cell ID //- Return owner cell ID
@ -228,25 +228,25 @@ public:
//- Does the face belong to a boundary patch? //- Does the face belong to a boundary patch?
bool isInPatch() const bool isInPatch() const
{ {
return patchID_ >= 0; return patchIndex_ >= 0;
} }
//- Boundary patch ID //- Boundary patch ID
label patchID() const label patchIndex() const
{ {
return patchID_; return patchIndex_;
} }
//- Does the face belong to a zone? //- Does the face belong to a zone?
bool isInZone() const bool isInZone() const
{ {
return zoneID_ >= 0; return zoneIndex_ >= 0;
} }
//- Is the face only a zone face (i.e. not belonging to a cell) //- Is the face only a zone face (i.e. not belonging to a cell)
bool onlyInZone() const bool onlyInZone() const
{ {
return zoneID_ >= 0 && owner_ < 0 && neighbour_ < 0; return zoneIndex_ >= 0 && owner_ < 0 && neighbour_ < 0;
} }
bool removeFromZone() const bool removeFromZone() const
@ -255,9 +255,9 @@ public:
} }
//- Face zone ID //- Face zone ID
label zoneID() const label zoneIndex() const
{ {
return zoneID_; return zoneIndex_;
} }
//- Face zone flip //- Face zone flip

View File

@ -52,7 +52,7 @@ class polyModifyPoint
// Private Data // Private Data
//- Point ID //- Point ID
label pointID_; label pointIndex_;
//- New point location //- New point location
point location_; point location_;
@ -61,7 +61,7 @@ class polyModifyPoint
bool removeFromZone_; bool removeFromZone_;
//- New zone ID //- New zone ID
label zoneID_; label zoneIndex_;
//- Does the point support a cell //- Does the point support a cell
bool inCell_; bool inCell_;
@ -80,10 +80,10 @@ public:
//- Construct null. Used only for list construction //- Construct null. Used only for list construction
polyModifyPoint() polyModifyPoint()
: :
pointID_(-1), pointIndex_(-1),
location_(Zero), location_(Zero),
removeFromZone_(false), removeFromZone_(false),
zoneID_(-1), zoneIndex_(-1),
inCell_(false) inCell_(false)
{} {}
@ -97,10 +97,10 @@ public:
const bool inCell const bool inCell
) )
: :
pointID_(pointID), pointIndex_(pointID),
location_(newP), location_(newP),
removeFromZone_(removeFromZone), removeFromZone_(removeFromZone),
zoneID_(newZoneID), zoneIndex_(newZoneID),
inCell_(inCell) inCell_(inCell)
{} {}
@ -116,9 +116,9 @@ public:
// Member Functions // Member Functions
//- Point ID //- Point ID
label pointID() const label pointIndex() const
{ {
return pointID_; return pointIndex_;
} }
//- New point location //- New point location
@ -130,7 +130,7 @@ public:
//- Does the point belong to a zone? //- Does the point belong to a zone?
bool isInZone() const bool isInZone() const
{ {
return zoneID_ >= 0; return zoneIndex_ >= 0;
} }
//- Should the point be removed from current zone //- Should the point be removed from current zone
@ -140,9 +140,9 @@ public:
} }
//- Point zone ID //- Point zone ID
label zoneID() const label zoneIndex() const
{ {
return zoneID_; return zoneIndex_;
} }
//- Does the point support a cell //- Does the point support a cell

View File

@ -2499,8 +2499,8 @@ Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
return addPoint return addPoint
( (
pap.newPoint(), pap.newPoint(),
pap.masterPointID(), pap.masterPointIndex(),
pap.zoneID(), pap.zoneIndex(),
pap.inCell() pap.inCell()
); );
} }
@ -2510,9 +2510,9 @@ Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
modifyPoint modifyPoint
( (
pmp.pointID(), pmp.pointIndex(),
pmp.newPoint(), pmp.newPoint(),
pmp.zoneID(), pmp.zoneIndex(),
pmp.inCell() pmp.inCell()
); );
@ -2522,7 +2522,7 @@ Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
{ {
const polyRemovePoint& prp = refCast<const polyRemovePoint>(action); const polyRemovePoint& prp = refCast<const polyRemovePoint>(action);
removePoint(prp.pointID(), prp.mergePointID()); removePoint(prp.pointIndex(), prp.mergePointIndex());
return -1; return -1;
} }
@ -2535,12 +2535,12 @@ Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
paf.newFace(), paf.newFace(),
paf.owner(), paf.owner(),
paf.neighbour(), paf.neighbour(),
paf.masterPointID(), paf.masterPointIndex(),
paf.masterEdgeID(), paf.masterEdgeIndex(),
paf.masterFaceID(), paf.masterFaceIndex(),
paf.flipFaceFlux(), paf.flipFaceFlux(),
paf.patchID(), paf.patchIndex(),
paf.zoneID(), paf.zoneIndex(),
paf.zoneFlip() paf.zoneFlip()
); );
} }
@ -2551,12 +2551,12 @@ Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
modifyFace modifyFace
( (
pmf.newFace(), pmf.newFace(),
pmf.faceID(), pmf.faceIndex(),
pmf.owner(), pmf.owner(),
pmf.neighbour(), pmf.neighbour(),
pmf.flipFaceFlux(), pmf.flipFaceFlux(),
pmf.patchID(), pmf.patchIndex(),
pmf.zoneID(), pmf.zoneIndex(),
pmf.zoneFlip() pmf.zoneFlip()
); );
@ -2566,7 +2566,7 @@ Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
{ {
const polyRemoveFace& prf = refCast<const polyRemoveFace>(action); const polyRemoveFace& prf = refCast<const polyRemoveFace>(action);
removeFace(prf.faceID(), prf.mergeFaceID()); removeFace(prf.faceIndex(), prf.mergeFaceIndex());
return -1; return -1;
} }

View File

@ -51,10 +51,10 @@ class polyRemoveFace
// Private Data // Private Data
//- Face ID //- Face ID
label faceID_; label faceIndex_;
//- Merge faceID or -1 //- Merge faceID or -1
label mergeFaceID_; label mergeFaceIndex_;
public: public:
@ -69,15 +69,15 @@ public:
//- Construct null. Used for constructing lists //- Construct null. Used for constructing lists
polyRemoveFace() polyRemoveFace()
: :
faceID_(-1), faceIndex_(-1),
mergeFaceID_(-1) mergeFaceIndex_(-1)
{} {}
//- Construct from components //- Construct from components
polyRemoveFace(const label faceID, const label mergeFaceID = -1) polyRemoveFace(const label faceID, const label mergeFaceID = -1)
: :
faceID_(faceID), faceIndex_(faceID),
mergeFaceID_(mergeFaceID) mergeFaceIndex_(mergeFaceID)
{} {}
//- Construct and return a clone //- Construct and return a clone
@ -93,15 +93,15 @@ public:
// Member Functions // Member Functions
//- Return face ID //- Return face ID
label faceID() const label faceIndex() const
{ {
return faceID_; return faceIndex_;
} }
//- Return merge face ID //- Return merge face ID
label mergeFaceID() const label mergeFaceIndex() const
{ {
return mergeFaceID_; return mergeFaceIndex_;
} }
}; };

View File

@ -51,10 +51,10 @@ class polyRemovePoint
// Private Data // Private Data
//- Point ID //- Point ID
label pointID_; label pointIndex_;
//- Merge point ID or -1 //- Merge point ID or -1
label mergePointID_; label mergePointIndex_;
public: public:
@ -70,15 +70,15 @@ public:
//- Construct null. Used for constructing lists //- Construct null. Used for constructing lists
polyRemovePoint() polyRemovePoint()
: :
pointID_(-1), pointIndex_(-1),
mergePointID_(-1) mergePointIndex_(-1)
{} {}
//- Construct from components //- Construct from components
polyRemovePoint(const label pointID, const label mergePointID = -1) polyRemovePoint(const label pointID, const label mergePointID = -1)
: :
pointID_(pointID), pointIndex_(pointID),
mergePointID_(mergePointID) mergePointIndex_(mergePointID)
{} {}
//- Construct and return a clone //- Construct and return a clone
@ -94,14 +94,14 @@ public:
// Member Functions // Member Functions
//- Return point ID //- Return point ID
label pointID() const label pointIndex() const
{ {
return pointID_; return pointIndex_;
} }
label mergePointID() const label mergePointIndex() const
{ {
return mergePointID_; return mergePointIndex_;
} }
}; };

View File

@ -75,9 +75,9 @@ Foam::perfectInterface::perfectInterface
) )
: :
polyMeshModifier(name, mesh), polyMeshModifier(name, mesh),
faceZoneID_(mesh.faceZones().findIndex(faceZoneName)), faceZoneIndex_(mesh.faceZones().findIndex(faceZoneName)),
masterPatchID_(mesh.boundaryMesh().findIndex(masterPatchName)), masterPatchIndex_(mesh.boundaryMesh().findIndex(masterPatchName)),
slavePatchID_(mesh.boundaryMesh().findIndex(slavePatchName)) slavePatchIndex_(mesh.boundaryMesh().findIndex(slavePatchName))
{} {}
@ -306,7 +306,7 @@ void Foam::perfectInterface::setRefinement
// comment above about patch1 and patch0 never sharing points) and // comment above about patch1 and patch0 never sharing points) and
// becoming internal. // becoming internal.
const boolList& mfFlip = const boolList& mfFlip =
mesh.faceZones()[faceZoneID_].flipMap(); mesh.faceZones()[faceZoneIndex_].flipMap();
forAll(pp0, i) forAll(pp0, i)
{ {
@ -334,7 +334,7 @@ void Foam::perfectInterface::setRefinement
nbr, // neighbour nbr, // neighbour
false, // face flip false, // face flip
-1, // patch for face -1, // patch for face
faceZoneID_, // zone for face faceZoneIndex_, // zone for face
mfFlip[i] // face flip in zone mfFlip[i] // face flip in zone
); );
} }
@ -348,7 +348,7 @@ void Foam::perfectInterface::setRefinement
own, // neighbour own, // neighbour
true, // face flip true, // face flip
-1, // patch for face -1, // patch for face
faceZoneID_, // zone for face faceZoneIndex_, // zone for face
!mfFlip[i] // face flip in zone !mfFlip[i] // face flip in zone
); );
} }
@ -362,16 +362,16 @@ void Foam::perfectInterface::setRefinement(polyTopoChange& ref) const
{ {
Pout<< "bool perfectInterface::setRefinement(polyTopoChange&) const : " Pout<< "bool perfectInterface::setRefinement(polyTopoChange&) const : "
<< "for object " << name() << " : " << "for object " << name() << " : "
<< "masterPatchID_:" << masterPatchID_ << "masterPatchIndex_:" << masterPatchIndex_
<< " slavePatchID_:" << slavePatchID_ << " slavePatchIndex_:" << slavePatchIndex_
<< " faceZoneID_:" << faceZoneID_ << endl; << " faceZoneIndex_:" << faceZoneIndex_ << endl;
} }
const polyMesh& mesh = this->mesh(); const polyMesh& mesh = this->mesh();
const polyBoundaryMesh& patches = mesh.boundaryMesh(); const polyBoundaryMesh& patches = mesh.boundaryMesh();
const polyPatch& patch0 = patches[masterPatchID_]; const polyPatch& patch0 = patches[masterPatchIndex_];
const polyPatch& patch1 = patches[slavePatchID_]; const polyPatch& patch1 = patches[slavePatchIndex_];
labelList pp0Labels(identityMap(patch0.size())+patch0.start()); labelList pp0Labels(identityMap(patch0.size())+patch0.start());
indirectPrimitivePatch pp0 indirectPrimitivePatch pp0

View File

@ -55,13 +55,13 @@ class perfectInterface
// Private Data // Private Data
//- Master face zone ID //- Master face zone ID
label faceZoneID_; label faceZoneIndex_;
//- Master patch ID //- Master patch ID
label masterPatchID_; label masterPatchIndex_;
//- Slave patch ID //- Slave patch ID
label slavePatchID_; label slavePatchIndex_;
//- Tolerance used for distance comparison //- Tolerance used for distance comparison
// (fraction of minimum edge length) // (fraction of minimum edge length)

View File

@ -83,20 +83,20 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
const meshFaceZones& faceZones = mesh.faceZones(); const meshFaceZones& faceZones = mesh.faceZones();
const primitiveFacePatch& masterPatch = const primitiveFacePatch& masterPatch =
faceZones[masterFaceZoneID_.index()](); faceZones[masterFaceZoneIndex_.index()]();
const labelList& masterPatchAddr = faceZones[masterFaceZoneID_.index()]; const labelList& masterPatchAddr = faceZones[masterFaceZoneIndex_.index()];
const boolList& masterPatchFlip = const boolList& masterPatchFlip =
faceZones[masterFaceZoneID_.index()].flipMap(); faceZones[masterFaceZoneIndex_.index()].flipMap();
const primitiveFacePatch& slavePatch = const primitiveFacePatch& slavePatch =
faceZones[slaveFaceZoneID_.index()](); faceZones[slaveFaceZoneIndex_.index()]();
const labelList& slavePatchAddr = faceZones[slaveFaceZoneID_.index()]; const labelList& slavePatchAddr = faceZones[slaveFaceZoneIndex_.index()];
const boolList& slavePatchFlip = const boolList& slavePatchFlip =
faceZones[slaveFaceZoneID_.index()].flipMap(); faceZones[slaveFaceZoneIndex_.index()].flipMap();
const edgeList& masterEdges = masterPatch.edges(); const edgeList& masterEdges = masterPatch.edges();
const labelListList& masterPointEdges = masterPatch.pointEdges(); const labelListList& masterPointEdges = masterPatch.pointEdges();
@ -261,7 +261,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
( (
edgeCutPoint, // point edgeCutPoint, // point
slaveMeshPoints[pointi], // master point slaveMeshPoints[pointi], // master point
cutPointZoneID_.index(), // zone for point cutPointZoneIndex_.index(), // zone for point
true // supports a cell true // supports a cell
) )
); );
@ -318,7 +318,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
( (
projectedSlavePoints[pointi], // point projectedSlavePoints[pointi], // point
slaveMeshPoints[pointi], // master point slaveMeshPoints[pointi], // master point
cutPointZoneID_.index(), // zone for point cutPointZoneIndex_.index(), // zone for point
true // supports a cell true // supports a cell
) )
); );
@ -703,7 +703,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
( (
masterCutPoint, // point masterCutPoint, // point
masterMeshPoints[cme.start()],// m p masterMeshPoints[cme.start()],// m p
cutPointZoneID_.index(), // zone cutPointZoneIndex_.index(), // zone
true // active true // active
) )
); );
@ -887,7 +887,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
false, // flux flip false, // flux flip
-1, // patch ID -1, // patch ID
false, // remove from zone false, // remove from zone
masterFaceZoneID_.index(), // zone ID masterFaceZoneIndex_.index(), // zone ID
masterPatchFlip[curMaster] // zone flip masterPatchFlip[curMaster] // zone flip
) )
); );
@ -913,7 +913,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
true, // flux flip true, // flux flip
-1, // patch ID -1, // patch ID
false, // remove from zone false, // remove from zone
masterFaceZoneID_.index(), // zone ID masterFaceZoneIndex_.index(), // zone ID
!masterPatchFlip[curMaster] // zone flip !masterPatchFlip[curMaster] // zone flip
) )
); );
@ -934,9 +934,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
masterFc[curMaster], // owner masterFc[curMaster], // owner
-1, // neighbour -1, // neighbour
false, // flux flip false, // flux flip
masterPatchID_.index(), // patch ID masterPatchIndex_.index(), // patch ID
false, // remove from zone false, // remove from zone
masterFaceZoneID_.index(), // zone ID masterFaceZoneIndex_.index(), // zone ID
masterPatchFlip[curMaster] // zone flip masterPatchFlip[curMaster] // zone flip
) )
); );
@ -983,7 +983,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
true, // flux flip true, // flux flip
-1, // patch ID -1, // patch ID
false, // remove from zone false, // remove from zone
slaveFaceZoneID_.index(), // zone ID slaveFaceZoneIndex_.index(), // zone ID
!slavePatchFlip[curMaster] // zone flip !slavePatchFlip[curMaster] // zone flip
) )
); );
@ -1004,7 +1004,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
false, // flux flip false, // flux flip
-1, // patch ID -1, // patch ID
false, // remove from zone false, // remove from zone
slaveFaceZoneID_.index(), // zone ID slaveFaceZoneIndex_.index(), // zone ID
slavePatchFlip[curSlave] // zone flip slavePatchFlip[curSlave] // zone flip
) )
); );
@ -1025,9 +1025,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
slaveFc[curSlave], // owner slaveFc[curSlave], // owner
-1, // neighbour -1, // neighbour
false, // flux flip false, // flux flip
slavePatchID_.index(), // patch ID slavePatchIndex_.index(), // patch ID
false, // remove from zone false, // remove from zone
slaveFaceZoneID_.index(), // zone ID slaveFaceZoneIndex_.index(), // zone ID
slavePatchFlip[curSlave] // zone flip slavePatchFlip[curSlave] // zone flip
) )
); );
@ -1075,7 +1075,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
masterPatchAddr[curMaster], // master face id masterPatchAddr[curMaster], // master face id
false, // flux flip false, // flux flip
-1, // patch ID -1, // patch ID
cutFaceZoneID_.index(), // zone ID cutFaceZoneIndex_.index(), // zone ID
false // zone flip false // zone flip
) )
); );
@ -1095,7 +1095,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
masterPatchAddr[curMaster], // master face id masterPatchAddr[curMaster], // master face id
true, // flux flip true, // flux flip
-1, // patch ID -1, // patch ID
cutFaceZoneID_.index(), // zone ID cutFaceZoneIndex_.index(), // zone ID
true // zone flip true // zone flip
) )
); );
@ -1123,8 +1123,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
-1, // master edge -1, // master edge
masterPatchAddr[curMaster], // master face index masterPatchAddr[curMaster], // master face index
false, // flux flip false, // flux flip
masterPatchID_.index(), // patch ID masterPatchIndex_.index(), // patch ID
cutFaceZoneID_.index(), // zone ID cutFaceZoneIndex_.index(), // zone ID
false // zone flip false // zone flip
) )
); );
@ -1152,8 +1152,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
-1, // master edge -1, // master edge
slavePatchAddr[curSlave], // master face index slavePatchAddr[curSlave], // master face index
false, // flux flip false, // flux flip
slavePatchID_.index(), // patch ID slavePatchIndex_.index(), // patch ID
cutFaceZoneID_.index(), // zone ID cutFaceZoneIndex_.index(), // zone ID
false // zone flip false // zone flip
) )
); );
@ -1195,7 +1195,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
// false, // flux flip // false, // flux flip
// -1, // patch ID // -1, // patch ID
// false, // remove from zone // false, // remove from zone
// masterFaceZoneID_.index(), // zone ID // masterFaceZoneIndex_.index(), // zone ID
// false // zone flip // false // zone flip
// ) // )
//); //);
@ -1226,7 +1226,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
// false, // flux flip // false, // flux flip
// -1, // patch ID // -1, // patch ID
// false, // remove from zone // false, // remove from zone
// slaveFaceZoneID_.index(), // zone ID // slaveFaceZoneIndex_.index(), // zone ID
// false // zone flip // false // zone flip
// ) // )
//); //);

View File

@ -69,13 +69,13 @@ void Foam::slidingInterface::decoupleInterface
// Master side // Master side
const primitiveFacePatch& masterPatch = const primitiveFacePatch& masterPatch =
mesh.faceZones()[masterFaceZoneID_.index()](); mesh.faceZones()[masterFaceZoneIndex_.index()]();
const labelList& masterPatchAddr = const labelList& masterPatchAddr =
mesh.faceZones()[masterFaceZoneID_.index()]; mesh.faceZones()[masterFaceZoneIndex_.index()];
const boolList& masterPatchFlip = const boolList& masterPatchFlip =
mesh.faceZones()[masterFaceZoneID_.index()].flipMap(); mesh.faceZones()[masterFaceZoneIndex_.index()].flipMap();
const labelList& masterFc = masterFaceCells(); const labelList& masterFc = masterFaceCells();
@ -100,9 +100,9 @@ void Foam::slidingInterface::decoupleInterface
masterFc[facei], // owner masterFc[facei], // owner
-1, // neighbour -1, // neighbour
false, // flux flip false, // flux flip
masterPatchID_.index(), // patch ID masterPatchIndex_.index(), // patch ID
false, // remove from zone false, // remove from zone
masterFaceZoneID_.index(), // zone ID masterFaceZoneIndex_.index(), // zone ID
false // zone flip. Face corrected false // zone flip. Face corrected
) )
); );
@ -118,13 +118,13 @@ void Foam::slidingInterface::decoupleInterface
// Slave side // Slave side
const primitiveFacePatch& slavePatch = const primitiveFacePatch& slavePatch =
mesh.faceZones()[slaveFaceZoneID_.index()](); mesh.faceZones()[slaveFaceZoneIndex_.index()]();
const labelList& slavePatchAddr = const labelList& slavePatchAddr =
mesh.faceZones()[slaveFaceZoneID_.index()]; mesh.faceZones()[slaveFaceZoneIndex_.index()];
const boolList& slavePatchFlip = const boolList& slavePatchFlip =
mesh.faceZones()[slaveFaceZoneID_.index()].flipMap(); mesh.faceZones()[slaveFaceZoneIndex_.index()].flipMap();
const labelList& slaveFc = slaveFaceCells(); const labelList& slaveFc = slaveFaceCells();
@ -167,9 +167,9 @@ void Foam::slidingInterface::decoupleInterface
slaveFc[facei], // owner slaveFc[facei], // owner
-1, // neighbour -1, // neighbour
false, // flux flip false, // flux flip
slavePatchID_.index(), // patch ID slavePatchIndex_.index(), // patch ID
false, // remove from zone false, // remove from zone
slaveFaceZoneID_.index(), // zone ID slaveFaceZoneIndex_.index(), // zone ID
false // zone flip. Face corrected false // zone flip. Face corrected
) )
); );
@ -275,7 +275,7 @@ void Foam::slidingInterface::decoupleInterface
if if
( (
mesh.faceZones().whichZone(curFaces[facei]) mesh.faceZones().whichZone(curFaces[facei])
!= slaveFaceZoneID_.index() != slaveFaceZoneIndex_.index()
&& !ref.faceRemoved(curFaces[facei]) && !ref.faceRemoved(curFaces[facei])
) )
@ -388,7 +388,7 @@ void Foam::slidingInterface::decoupleInterface
const pointField& points = mesh.points(); const pointField& points = mesh.points();
const labelList& slaveMeshPoints = const labelList& slaveMeshPoints =
mesh.faceZones()[slaveFaceZoneID_.index()]().meshPoints(); mesh.faceZones()[slaveFaceZoneIndex_.index()]().meshPoints();
forAll(slaveMeshPoints, pointi) forAll(slaveMeshPoints, pointi)
{ {

View File

@ -64,12 +64,12 @@ void Foam::slidingInterface::checkDefinition()
if if
( (
!masterFaceZoneID_.active() !masterFaceZoneIndex_.active()
|| !slaveFaceZoneID_.active() || !slaveFaceZoneIndex_.active()
|| !cutPointZoneID_.active() || !cutPointZoneIndex_.active()
|| !cutFaceZoneID_.active() || !cutFaceZoneIndex_.active()
|| !masterPatchID_.active() || !masterPatchIndex_.active()
|| !slavePatchID_.active() || !slavePatchIndex_.active()
) )
{ {
FatalErrorInFunction FatalErrorInFunction
@ -81,8 +81,8 @@ void Foam::slidingInterface::checkDefinition()
// Check the sizes and set up state // Check the sizes and set up state
if if
( (
mesh.faceZones()[masterFaceZoneID_.index()].empty() mesh.faceZones()[masterFaceZoneIndex_.index()].empty()
|| mesh.faceZones()[slaveFaceZoneID_.index()].empty() || mesh.faceZones()[slaveFaceZoneIndex_.index()].empty()
) )
{ {
FatalErrorInFunction FatalErrorInFunction
@ -93,8 +93,8 @@ void Foam::slidingInterface::checkDefinition()
if (debug) if (debug)
{ {
Pout<< "Sliding interface object " << name() << " :" << nl Pout<< "Sliding interface object " << name() << " :" << nl
<< " master face zone: " << masterFaceZoneID_.index() << nl << " master face zone: " << masterFaceZoneIndex_.index() << nl
<< " slave face zone: " << slaveFaceZoneID_.index() << endl; << " slave face zone: " << slaveFaceZoneIndex_.index() << endl;
} }
} }
@ -125,32 +125,32 @@ Foam::slidingInterface::slidingInterface
) )
: :
polyMeshModifier(name, mesh), polyMeshModifier(name, mesh),
masterFaceZoneID_ masterFaceZoneIndex_
( (
masterFaceZoneName, masterFaceZoneName,
mesh.faceZones() mesh.faceZones()
), ),
slaveFaceZoneID_ slaveFaceZoneIndex_
( (
slaveFaceZoneName, slaveFaceZoneName,
mesh.faceZones() mesh.faceZones()
), ),
cutPointZoneID_ cutPointZoneIndex_
( (
cutPointZoneName, cutPointZoneName,
mesh.pointZones() mesh.pointZones()
), ),
cutFaceZoneID_ cutFaceZoneIndex_
( (
cutFaceZoneName, cutFaceZoneName,
mesh.faceZones() mesh.faceZones()
), ),
masterPatchID_ masterPatchIndex_
( (
masterPatchName, masterPatchName,
mesh.boundaryMesh() mesh.boundaryMesh()
), ),
slavePatchID_ slavePatchIndex_
( (
slavePatchName, slavePatchName,
mesh.boundaryMesh() mesh.boundaryMesh()
@ -215,15 +215,17 @@ void Foam::slidingInterface::clearAddressing() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::faceZoneDynamicID& Foam::slidingInterface::masterFaceZoneID() const const Foam::faceZoneDynamicID&
Foam::slidingInterface::masterFaceZoneIndex() const
{ {
return masterFaceZoneID_; return masterFaceZoneIndex_;
} }
const Foam::faceZoneDynamicID& Foam::slidingInterface::slaveFaceZoneID() const const Foam::faceZoneDynamicID&
Foam::slidingInterface::slaveFaceZoneIndex() const
{ {
return slaveFaceZoneID_; return slaveFaceZoneIndex_;
} }
@ -313,7 +315,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
const polyMesh& mesh = this->mesh(); const polyMesh& mesh = this->mesh();
// Get point from the cut zone // Get point from the cut zone
const labelList& cutPoints = mesh.pointZones()[cutPointZoneID_.index()]; const labelList& cutPoints = mesh.pointZones()[cutPointZoneIndex_.index()];
if (cutPoints.size() && !projectedSlavePointsPtr_) if (cutPoints.size() && !projectedSlavePointsPtr_)
{ {
@ -328,15 +330,15 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
const Map<Pair<edge>>& cpepm = cutPointEdgePairMap(); const Map<Pair<edge>>& cpepm = cutPointEdgePairMap();
const Map<label>& slaveZonePointMap = const Map<label>& slaveZonePointMap =
mesh.faceZones()[slaveFaceZoneID_.index()]().meshPointMap(); mesh.faceZones()[slaveFaceZoneIndex_.index()]().meshPointMap();
const primitiveFacePatch& masterPatch = const primitiveFacePatch& masterPatch =
mesh.faceZones()[masterFaceZoneID_.index()](); mesh.faceZones()[masterFaceZoneIndex_.index()]();
const edgeList& masterEdges = masterPatch.edges(); const edgeList& masterEdges = masterPatch.edges();
const pointField& masterLocalPoints = masterPatch.localPoints(); const pointField& masterLocalPoints = masterPatch.localPoints();
const primitiveFacePatch& slavePatch = const primitiveFacePatch& slavePatch =
mesh.faceZones()[slaveFaceZoneID_.index()](); mesh.faceZones()[slaveFaceZoneIndex_.index()]();
const edgeList& slaveEdges = slavePatch.edges(); const edgeList& slaveEdges = slavePatch.edges();
const pointField& slaveLocalPoints = slavePatch.localPoints(); const pointField& slaveLocalPoints = slavePatch.localPoints();
const vectorField& slavePointNormals = slavePatch.pointNormals(); const vectorField& slavePointNormals = slavePatch.pointNormals();
@ -546,13 +548,13 @@ void Foam::slidingInterface::topoChange(const polyTopoChangeMap& m)
// Mesh has changed topologically. Update local topological data // Mesh has changed topologically. Update local topological data
const polyMesh& mesh = this->mesh(); const polyMesh& mesh = this->mesh();
masterFaceZoneID_.update(mesh.faceZones()); masterFaceZoneIndex_.update(mesh.faceZones());
slaveFaceZoneID_.update(mesh.faceZones()); slaveFaceZoneIndex_.update(mesh.faceZones());
cutPointZoneID_.update(mesh.pointZones()); cutPointZoneIndex_.update(mesh.pointZones());
cutFaceZoneID_.update(mesh.faceZones()); cutFaceZoneIndex_.update(mesh.faceZones());
masterPatchID_.update(mesh.boundaryMesh()); masterPatchIndex_.update(mesh.boundaryMesh());
slavePatchID_.update(mesh.boundaryMesh()); slavePatchIndex_.update(mesh.boundaryMesh());
//MJ:Disabled updating //MJ:Disabled updating
// if (!attached()) // if (!attached())

View File

@ -92,22 +92,22 @@ private:
// Private Data // Private Data
//- Master face zone ID //- Master face zone ID
faceZoneDynamicID masterFaceZoneID_; faceZoneDynamicID masterFaceZoneIndex_;
//- Slave face zone ID //- Slave face zone ID
faceZoneDynamicID slaveFaceZoneID_; faceZoneDynamicID slaveFaceZoneIndex_;
//- Cut point zone ID //- Cut point zone ID
pointZoneDynamicID cutPointZoneID_; pointZoneDynamicID cutPointZoneIndex_;
//- Cut face zone ID //- Cut face zone ID
faceZoneDynamicID cutFaceZoneID_; faceZoneDynamicID cutFaceZoneIndex_;
//- Master patch ID //- Master patch ID
polyPatchDynamicID masterPatchID_; polyPatchDynamicID masterPatchIndex_;
//- Slave patch ID //- Slave patch ID
polyPatchDynamicID slavePatchID_; polyPatchDynamicID slavePatchIndex_;
//- Type of match //- Type of match
const typeOfMatch matchType_; const typeOfMatch matchType_;
@ -333,10 +333,10 @@ public:
// Member Functions // Member Functions
//- Return master face zone ID //- Return master face zone ID
const faceZoneDynamicID& masterFaceZoneID() const; const faceZoneDynamicID& masterFaceZoneIndex() const;
//- Return slave face zone ID //- Return slave face zone ID
const faceZoneDynamicID& slaveFaceZoneID() const; const faceZoneDynamicID& slaveFaceZoneIndex() const;
//- Return true if attached //- Return true if attached
bool attached() const bool attached() const

View File

@ -52,13 +52,13 @@ void Foam::slidingInterface::calcAttachedAddressing() const
// Master side // Master side
const primitiveFacePatch& masterPatch = const primitiveFacePatch& masterPatch =
faceZones[masterFaceZoneID_.index()](); faceZones[masterFaceZoneIndex_.index()]();
const labelList& masterPatchFaces = const labelList& masterPatchFaces =
faceZones[masterFaceZoneID_.index()]; faceZones[masterFaceZoneIndex_.index()];
const boolList& masterFlip = const boolList& masterFlip =
faceZones[masterFaceZoneID_.index()].flipMap(); faceZones[masterFaceZoneIndex_.index()].flipMap();
masterFaceCellsPtr_ = new labelList(masterPatchFaces.size()); masterFaceCellsPtr_ = new labelList(masterPatchFaces.size());
labelList& mfc = *masterFaceCellsPtr_; labelList& mfc = *masterFaceCellsPtr_;
@ -78,13 +78,13 @@ void Foam::slidingInterface::calcAttachedAddressing() const
// Slave side // Slave side
const primitiveFacePatch& slavePatch = const primitiveFacePatch& slavePatch =
faceZones[slaveFaceZoneID_.index()](); faceZones[slaveFaceZoneIndex_.index()]();
const labelList& slavePatchFaces = const labelList& slavePatchFaces =
faceZones[slaveFaceZoneID_.index()]; faceZones[slaveFaceZoneIndex_.index()];
const boolList& slaveFlip = const boolList& slaveFlip =
faceZones[slaveFaceZoneID_.index()].flipMap(); faceZones[slaveFaceZoneIndex_.index()].flipMap();
slaveFaceCellsPtr_ = new labelList(slavePatchFaces.size()); slaveFaceCellsPtr_ = new labelList(slavePatchFaces.size());
labelList& sfc = *slaveFaceCellsPtr_; labelList& sfc = *slaveFaceCellsPtr_;
@ -158,7 +158,7 @@ void Foam::slidingInterface::calcAttachedAddressing() const
if if
( (
faceZones.whichZone(curFaces[facei]) faceZones.whichZone(curFaces[facei])
!= masterFaceZoneID_.index() != masterFaceZoneIndex_.index()
) )
{ {
masterStickOutFaceMap.insert(curFaces[facei]); masterStickOutFaceMap.insert(curFaces[facei]);
@ -187,7 +187,7 @@ void Foam::slidingInterface::calcAttachedAddressing() const
if if
( (
faceZones.whichZone(curFaces[facei]) faceZones.whichZone(curFaces[facei])
!= slaveFaceZoneID_.index() != slaveFaceZoneIndex_.index()
) )
{ {
slaveStickOutFaceMap.insert(curFaces[facei]); slaveStickOutFaceMap.insert(curFaces[facei]);
@ -203,7 +203,7 @@ void Foam::slidingInterface::calcAttachedAddressing() const
retiredPointMapPtr_ = retiredPointMapPtr_ =
new Map<label> new Map<label>
( (
2*faceZones[slaveFaceZoneID_.index()]().nPoints() 2*faceZones[slaveFaceZoneIndex_.index()]().nPoints()
); );
// Ditto for cut point edge map. This is a rough guess of its size // Ditto for cut point edge map. This is a rough guess of its size
@ -211,7 +211,7 @@ void Foam::slidingInterface::calcAttachedAddressing() const
cutPointEdgePairMapPtr_ = cutPointEdgePairMapPtr_ =
new Map<Pair<edge>> new Map<Pair<edge>>
( (
faceZones[slaveFaceZoneID_.index()]().nEdges() faceZones[slaveFaceZoneIndex_.index()]().nEdges()
); );
} }
else else
@ -262,7 +262,7 @@ void Foam::slidingInterface::renumberAttachedAddressing
labelList& newMfc = *newMfcPtr; labelList& newMfc = *newMfcPtr;
const labelList& mfzRenumber = const labelList& mfzRenumber =
m.faceZoneFaceMap()[masterFaceZoneID_.index()]; m.faceZoneFaceMap()[masterFaceZoneIndex_.index()];
forAll(mfc, facei) forAll(mfc, facei)
{ {
@ -279,7 +279,7 @@ void Foam::slidingInterface::renumberAttachedAddressing
labelList& newSfc = *newSfcPtr; labelList& newSfc = *newSfcPtr;
const labelList& sfzRenumber = const labelList& sfzRenumber =
m.faceZoneFaceMap()[slaveFaceZoneID_.index()]; m.faceZoneFaceMap()[slaveFaceZoneIndex_.index()];
forAll(sfc, facei) forAll(sfc, facei)
{ {
@ -441,7 +441,7 @@ void Foam::slidingInterface::renumberAttachedAddressing
pointField& newProjectedSlavePoints = *newProjectedSlavePointsPtr; pointField& newProjectedSlavePoints = *newProjectedSlavePointsPtr;
const labelList& sfzPointRenumber = const labelList& sfzPointRenumber =
m.faceZonePointMap()[slaveFaceZoneID_.index()]; m.faceZonePointMap()[slaveFaceZoneIndex_.index()];
forAll(newProjectedSlavePoints, pointi) forAll(newProjectedSlavePoints, pointi)
{ {

View File

@ -48,7 +48,7 @@ void Foam::slidingInterface::clearCouple
const polyMesh& mesh = this->mesh(); const polyMesh& mesh = this->mesh();
const labelList& cutPointZoneLabels = const labelList& cutPointZoneLabels =
mesh.pointZones()[cutPointZoneID_.index()]; mesh.pointZones()[cutPointZoneIndex_.index()];
forAll(cutPointZoneLabels, pointi) forAll(cutPointZoneLabels, pointi)
{ {
@ -57,7 +57,7 @@ void Foam::slidingInterface::clearCouple
// Remove all faces from the face zone // Remove all faces from the face zone
const labelList& cutFaceZoneLabels = const labelList& cutFaceZoneLabels =
mesh.faceZones()[cutFaceZoneID_.index()]; mesh.faceZones()[cutFaceZoneIndex_.index()];
forAll(cutFaceZoneLabels, facei) forAll(cutFaceZoneLabels, facei)
{ {

View File

@ -89,10 +89,10 @@ bool Foam::slidingInterface::projectPoints() const
const polyMesh& mesh = this->mesh(); const polyMesh& mesh = this->mesh();
const primitiveFacePatch& masterPatch = const primitiveFacePatch& masterPatch =
mesh.faceZones()[masterFaceZoneID_.index()](); mesh.faceZones()[masterFaceZoneIndex_.index()]();
const primitiveFacePatch& slavePatch = const primitiveFacePatch& slavePatch =
mesh.faceZones()[slaveFaceZoneID_.index()](); mesh.faceZones()[slaveFaceZoneIndex_.index()]();
// Get references to local points, local edges and local faces // Get references to local points, local edges and local faces
// for master and slave patch // for master and slave patch

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ class subBody
word masterName_; word masterName_;
//- Master body ID //- Master body ID
label masterID_; label masterIndex_;
//- Transform with respect to master body //- Transform with respect to master body
spatialTransform masterXT_; spatialTransform masterXT_;
@ -98,7 +98,7 @@ public:
inline const word& masterName() const; inline const word& masterName() const;
//- Return the master body Id //- Return the master body Id
inline label masterID() const; inline label masterIndex() const;
//- Return the transform with respect to the master body //- Return the transform with respect to the master body
inline const spatialTransform& masterXT() const; inline const spatialTransform& masterXT() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ inline Foam::RBD::subBody::subBody
: :
body_(bodyPtr), body_(bodyPtr),
masterName_(masterName), masterName_(masterName),
masterID_(masterID), masterIndex_(masterID),
masterXT_(masterXT) masterXT_(masterXT)
{} {}
@ -66,9 +66,9 @@ inline const Foam::word& Foam::RBD::subBody::masterName() const
} }
inline Foam::label Foam::RBD::subBody::masterID() const inline Foam::label Foam::RBD::subBody::masterIndex() const
{ {
return masterID_; return masterIndex_;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -93,7 +93,7 @@ void Foam::RBD::restraints::externalForce::restrain
} }
// Accumulate the force for the restrained body // Accumulate the force for the restrained body
fx[bodyIndex_] += spatialVector(moment, force); fx[masterBodyIndex_] += spatialVector(moment, force);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,14 +81,14 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain
vector refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 1, 0); vector refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 1, 0);
vector oldDir = refQ_ & refDir; vector oldDir = refQ_ & refDir;
vector newDir = model_.X0(bodyID_).E() & refDir; vector newDir = model_.X0(masterBodyIndex_).E() & refDir;
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95) if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
{ {
// Directions close to the axis, changing reference // Directions close to the axis, changing reference
refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 0, 1); refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 0, 1);
oldDir = refQ_ & refDir; oldDir = refQ_ & refDir;
newDir = model_.X0(bodyID_).E() & refDir; newDir = model_.X0(masterBodyIndex_).E() & refDir;
} }
// Removing axis component from oldDir and newDir and normalising // Removing axis component from oldDir and newDir and normalising
@ -122,7 +122,7 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain
( (
-( -(
stiffness_*theta stiffness_*theta
+ damping_*(model_.v(model_.master(bodyID_)).w() & a) + damping_*(model_.v(masterBodyIndex_).w() & a)
)*a )*a
); );
@ -134,7 +134,9 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain
} }
// Accumulate the force for the restrained body // Accumulate the force for the restrained body
fx[bodyIndex_] += model_.X0(bodyID_).T() & spatialVector(moment, Zero); fx[masterBodyIndex_] +=
model_.X0(masterBodyIndex_).T()
& spatialVector(moment, Zero);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,7 +78,7 @@ void Foam::RBD::restraints::linearDamper::restrain
const rigidBodyModelState& state const rigidBodyModelState& state
) const ) const
{ {
vector force = -coeff_*model_.v(model_.master(bodyID_)).l(); vector force = -coeff_*model_.v(masterBodyIndex_).l();
if (model_.debug) if (model_.debug)
{ {
@ -86,7 +86,9 @@ void Foam::RBD::restraints::linearDamper::restrain
} }
// Accumulate the force for the restrained body // Accumulate the force for the restrained body
fx[bodyIndex_] += model_.X0(bodyID_).T() & spatialVector(Zero, force); fx[masterBodyIndex_] +=
model_.X0(masterBodyIndex_).T()
& spatialVector(Zero, force);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -110,7 +110,7 @@ void Foam::RBD::restraints::linearSpring::restrain
} }
// Accumulate the force for the restrained body // Accumulate the force for the restrained body
fx[bodyIndex_] += spatialVector(moment, force); fx[masterBodyIndex_] += spatialVector(moment, force);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,8 +48,8 @@ Foam::RBD::restraint::restraint
) )
: :
name_(name), name_(name),
bodyID_(model.bodyID(dict.lookup("body"))), bodyIndex_(model.bodyIndex(dict.lookup("body"))),
bodyIndex_(model.master(bodyID_)), masterBodyIndex_(model.master(bodyIndex_)),
coeffs_(dict), coeffs_(dict),
model_(model) model_(model)
{} {}
@ -79,7 +79,7 @@ bool Foam::RBD::restraint::read(const dictionary& dict)
void Foam::RBD::restraint::write(Ostream& os) const void Foam::RBD::restraint::write(Ostream& os) const
{ {
writeEntry(os, "type", type()); writeEntry(os, "type", type());
writeEntry(os, "body", model_.name(bodyID_)); writeEntry(os, "body", model_.name(bodyIndex_));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,12 +74,12 @@ protected:
//- Name of the restraint //- Name of the restraint
word name_; word name_;
//- ID of the body the restraint is applied to //- Index of the body the restraint is applied to
label bodyID_;
//- Index of the body the force is applied to
label bodyIndex_; label bodyIndex_;
//- Index of the master body the restraint is applied to
label masterBodyIndex_;
//- Restraint model specific coefficient dictionary //- Restraint model specific coefficient dictionary
dictionary coeffs_; dictionary coeffs_;
@ -153,9 +153,9 @@ public:
return name_; return name_;
} }
label bodyID() const label bodyIndex() const
{ {
return bodyID_; return bodyIndex_;
} }
//- Accumulate the retraint internal joint forces into the tau field and //- Accumulate the retraint internal joint forces into the tau field and

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,7 +32,7 @@ inline Foam::point Foam::RBD::restraint::bodyPoint
const point& p const point& p
) const ) const
{ {
return model_.p(bodyID_, p); return model_.p(bodyIndex_, p);
} }
@ -41,7 +41,7 @@ inline Foam::spatialVector Foam::RBD::restraint::bodyPointVelocity
const point& p const point& p
) const ) const
{ {
return model_.v(bodyID_, p); return model_.v(bodyIndex_, p);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,7 +78,7 @@ void Foam::RBD::restraints::sphericalAngularDamper::restrain
const rigidBodyModelState& state const rigidBodyModelState& state
) const ) const
{ {
vector moment = -coeff_*model_.v(model_.master(bodyID_)).w(); vector moment = -coeff_*model_.v(masterBodyIndex_).w();
if (model_.debug) if (model_.debug)
{ {
@ -86,7 +86,9 @@ void Foam::RBD::restraints::sphericalAngularDamper::restrain
} }
// Accumulate the force for the restrained body // Accumulate the force for the restrained body
fx[bodyIndex_] += model_.X0(bodyID_).T() & spatialVector(moment, Zero); fx[masterBodyIndex_] +=
model_.X0(masterBodyIndex_).T()
& spatialVector(moment, Zero);
} }

View File

@ -135,7 +135,7 @@ Foam::label Foam::RBD::rigidBodyModel::join_
if (merged(parentID)) if (merged(parentID))
{ {
const subBody& sBody = mergedBody(parentID); const subBody& sBody = mergedBody(parentID);
lambda_.append(sBody.masterID()); lambda_.append(sBody.masterIndex());
XT_.append(XT & sBody.masterXT()); XT_.append(XT & sBody.masterXT());
} }
else else
@ -187,7 +187,7 @@ Foam::RBD::rigidBodyModel::rigidBodyModel(const dictionary& dict)
{ {
merge merge
( (
bodyID(bodyDict.lookup("mergeWith")), bodyIndex(bodyDict.lookup("mergeWith")),
bodyDict.lookup("transform"), bodyDict.lookup("transform"),
rigidBody::New(iter().keyword(), bodyDict) rigidBody::New(iter().keyword(), bodyDict)
); );
@ -196,7 +196,7 @@ Foam::RBD::rigidBodyModel::rigidBodyModel(const dictionary& dict)
{ {
join join
( (
bodyID(bodyDict.lookup("parent")), bodyIndex(bodyDict.lookup("parent")),
bodyDict.lookup("transform"), bodyDict.lookup("transform"),
joint::New(*this, bodyDict.subDict("joint")), joint::New(*this, bodyDict.subDict("joint")),
rigidBody::New(iter().keyword(), bodyDict) rigidBody::New(iter().keyword(), bodyDict)
@ -325,15 +325,15 @@ Foam::label Foam::RBD::rigidBodyModel::merge
{ {
const subBody& sBody = mergedBody(parentID); const subBody& sBody = mergedBody(parentID);
makeComposite(sBody.masterID()); makeComposite(sBody.masterIndex());
sBodyPtr.set sBodyPtr.set
( (
new subBody new subBody
( (
bodyPtr, bodyPtr,
bodies_[sBody.masterID()].name(), bodies_[sBody.masterIndex()].name(),
sBody.masterID(), sBody.masterIndex(),
XT & sBody.masterXT() XT & sBody.masterXT()
) )
); );
@ -358,7 +358,7 @@ Foam::label Foam::RBD::rigidBodyModel::merge
mergedBodies_.append(sBodyPtr); mergedBodies_.append(sBodyPtr);
// Merge the sub-body with the parent // Merge the sub-body with the parent
bodies_[sBody.masterID()].merge(sBody); bodies_[sBody.masterIndex()].merge(sBody);
const label sBodyID = mergedBodyID(mergedBodies_.size() - 1); const label sBodyID = mergedBodyID(mergedBodies_.size() - 1);
bodyIndices_.insert(sBody.name(), sBodyID); bodyIndices_.insert(sBody.name(), sBodyID);
@ -375,7 +375,7 @@ Foam::spatialTransform Foam::RBD::rigidBodyModel::X0
if (merged(bodyId)) if (merged(bodyId))
{ {
const subBody& mBody = mergedBody(bodyId); const subBody& mBody = mergedBody(bodyId);
return mBody.masterXT() & X0_[mBody.masterID()]; return mBody.masterXT() & X0_[mBody.masterIndex()];
} }
else else
{ {

View File

@ -314,7 +314,7 @@ public:
inline const subBody& mergedBody(label mergedBodyID) const; inline const subBody& mergedBody(label mergedBodyID) const;
//- Return the ID of the body with the given name //- Return the ID of the body with the given name
inline label bodyID(const word& name) const; inline label bodyIndex(const word& name) const;
//- Return the current transform to the global frame for the given body //- Return the current transform to the global frame for the given body
spatialTransform X0(const label bodyId) const; spatialTransform X0(const label bodyId) const;

View File

@ -116,7 +116,7 @@ inline Foam::label Foam::RBD::rigidBodyModel::master(label bodyID) const
{ {
if (bodyID < 0) if (bodyID < 0)
{ {
return mergedBody(bodyID).masterID(); return mergedBody(bodyID).masterIndex();
} }
else else
{ {
@ -153,7 +153,7 @@ Foam::RBD::rigidBodyModel::mergedBody(label mergedBodyID) const
} }
inline Foam::label Foam::RBD::rigidBodyModel::bodyID(const word& name) const inline Foam::label Foam::RBD::rigidBodyModel::bodyIndex(const word& name) const
{ {
return bodyIndices_[name]; return bodyIndices_[name];
} }

Some files were not shown because too many files have changed in this diff Show More