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
parcelType* pPtr = new parcelType(p);
pPtr->origId() = pPtr->getNewParticleID();
pPtr->origId() = pPtr->getNewParticleIndex();
pPtr->origProc() = Pstream::myProcNo();

View File

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

View File

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

View File

@ -156,9 +156,13 @@ void Foam::starMesh::markBoundaryFaces()
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
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -59,7 +59,7 @@ enum {
XF_RF_DATA_MASS_FLUX_M1=47,
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_RECON_I=51,
@ -182,7 +182,7 @@ enum {
/* dynamic mesh */
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

View File

@ -39,7 +39,6 @@ Description
#include "viscosityModel.H"
#include "incompressibleMomentumTransportModels.H"
#include "wallDist.H"
#include "bound.H"
#include "fvcFlux.H"
using namespace Foam;
@ -191,9 +190,6 @@ int main(int argc, char *argv[])
{
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));
// 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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ void Foam::ParSortableList<Type>::copyInto
tagVal.value() = values[elemI];
tagVal.index() = indices[elemI];
tagVal.procID() = fromProcNo;
tagVal.procIndex() = fromProcNo;
destI++;
}
@ -338,7 +338,7 @@ void Foam::ParSortableList<Type>::sort()
{
this->operator[](elemI) = combinedValues[elemI].value();
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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,7 +95,7 @@ class ParSortableList
label index_;
//- Proc
label procID_;
label procIndex_;
public:
@ -127,14 +127,14 @@ class ParSortableList
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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -245,7 +245,7 @@ void Foam::LUscalarMatrix::convert
const cyclicLduInterface& cycInterface =
refCast<const cyclicLduInterface>(interface);
label nbrInt = cycInterface.nbrPatchID();
label nbrInt = cycInterface.nbrPatchIndex();
const label* __restrict__ uPtr =
interfaces[nbrInt].interface().faceCells().begin();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -144,7 +144,7 @@ Foam::cyclicFvPatchField<Type>::nbrPatchField() const
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
(
new Field<Type>(gf.boundaryField()[cp.nbrPatchID()])
new Field<Type>(gf.boundaryField()[cp.nbrPatchIndex()])
);
cp.transform().transform(tresult.ref(), tresult.ref());

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
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
refCast<const nonConformalErrorFvPatch>
(
patch_.boundaryMesh()[errorPatchID()]
patch_.boundaryMesh()[errorPatchIndex()]
);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -89,7 +89,7 @@ void Foam::bladeModel::interpolateWeights
Foam::bladeModel::bladeModel(const dictionary& dict)
:
profileName_(),
profileID_(),
profileIndex_(),
radius_(),
twist_(),
chord_(),
@ -109,7 +109,7 @@ Foam::bladeModel::bladeModel(const dictionary& dict)
if (data.size() > 0)
{
profileName_.setSize(data.size());
profileID_.setSize(data.size());
profileIndex_.setSize(data.size());
radius_.setSize(data.size());
twist_.setSize(data.size());
chord_.setSize(data.size());
@ -117,7 +117,7 @@ Foam::bladeModel::bladeModel(const dictionary& dict)
forAll(data, i)
{
profileName_[i] = data[i].first();
profileID_[i] = -1;
profileIndex_[i] = -1;
radius_[i] = data[i].second()[0];
twist_[i] = degToRad(data[i].second()[1]);
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_;
//- Corresponding profile ID per section
List<label> profileID_;
List<label> profileIndex_;
//- Radius [m]
List<scalar> radius_;
@ -122,7 +122,7 @@ public:
const List<word>& profileName() const;
//- 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
const List<scalar>& radius() const;
@ -137,7 +137,7 @@ public:
// Edit
//- Return non-const access to the profile ID list
List<label>& profileID();
List<label>& profileIndex();
// Evaluation

View File

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

View File

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

View File

@ -151,7 +151,7 @@ Foam::labelListList Foam::Cloud<ParticleType>::patchNonConformalCyclicPatches
const nonConformalCyclicPolyPatch& nccPp =
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),
nTracksBehind_(0),
origProc_(Pstream::myProcNo()),
origId_(getNewParticleID())
origId_(getNewParticleIndex())
{}
@ -411,7 +411,7 @@ Foam::particle::particle
stepFractionBehind_(0),
nTracksBehind_(0),
origProc_(Pstream::myProcNo()),
origId_(getNewParticleID())
origId_(getNewParticleIndex())
{
if (!locate(mesh, position, celli))
{

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -126,7 +126,7 @@ findSelfIntersectOp::findSelfIntersectOp
)
:
tree_(tree),
edgeID_(edgeID)
edgeIndex_(edgeID)
{}
@ -581,7 +581,7 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator()
point& intersectionPoint
) const
{
if (edgeID_ == -1)
if (edgeIndex_ == -1)
{
FatalErrorInFunction
<< "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 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)
{

View File

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

View File

@ -241,9 +241,9 @@ Foam::labelList Foam::nonConformalBoundary::nonConformalNonCoupledPatchIDs
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)());
}
}
@ -256,28 +256,28 @@ Foam::labelList Foam::nonConformalBoundary::nonConformalNonCoupledPatchIDs
Foam::labelList Foam::nonConformalBoundary::allOrigPatchIndices() const
{
auto method = &nonConformalCoupledPolyPatch::origPatchID;
auto method = &nonConformalCoupledPolyPatch::origPatchIndex;
return nonConformalNonCoupledPatchIDs(0, method);
}
Foam::labelList Foam::nonConformalBoundary::allErrorPatchIndices() const
{
auto method = &nonConformalCoupledPolyPatch::errorPatchID;
auto method = &nonConformalCoupledPolyPatch::errorPatchIndex;
return nonConformalNonCoupledPatchIDs(0, method);
}
Foam::labelList Foam::nonConformalBoundary::ownerOrigPatchIndices() const
{
auto method = &nonConformalCoupledPolyPatch::origPatchID;
auto method = &nonConformalCoupledPolyPatch::origPatchIndex;
return nonConformalNonCoupledPatchIDs(1, method);
}
Foam::labelList Foam::nonConformalBoundary::ownerErrorPatchIndices() const
{
auto method = &nonConformalCoupledPolyPatch::errorPatchID;
auto method = &nonConformalCoupledPolyPatch::errorPatchIndex;
return nonConformalNonCoupledPatchIDs(1, method);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -51,10 +51,10 @@ class polyRemovePoint
// Private Data
//- Point ID
label pointID_;
label pointIndex_;
//- Merge point ID or -1
label mergePointID_;
label mergePointIndex_;
public:
@ -70,15 +70,15 @@ public:
//- Construct null. Used for constructing lists
polyRemovePoint()
:
pointID_(-1),
mergePointID_(-1)
pointIndex_(-1),
mergePointIndex_(-1)
{}
//- Construct from components
polyRemovePoint(const label pointID, const label mergePointID = -1)
:
pointID_(pointID),
mergePointID_(mergePointID)
pointIndex_(pointID),
mergePointIndex_(mergePointID)
{}
//- Construct and return a clone
@ -94,14 +94,14 @@ public:
// Member Functions
//- 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),
faceZoneID_(mesh.faceZones().findIndex(faceZoneName)),
masterPatchID_(mesh.boundaryMesh().findIndex(masterPatchName)),
slavePatchID_(mesh.boundaryMesh().findIndex(slavePatchName))
faceZoneIndex_(mesh.faceZones().findIndex(faceZoneName)),
masterPatchIndex_(mesh.boundaryMesh().findIndex(masterPatchName)),
slavePatchIndex_(mesh.boundaryMesh().findIndex(slavePatchName))
{}
@ -306,7 +306,7 @@ void Foam::perfectInterface::setRefinement
// comment above about patch1 and patch0 never sharing points) and
// becoming internal.
const boolList& mfFlip =
mesh.faceZones()[faceZoneID_].flipMap();
mesh.faceZones()[faceZoneIndex_].flipMap();
forAll(pp0, i)
{
@ -334,7 +334,7 @@ void Foam::perfectInterface::setRefinement
nbr, // neighbour
false, // face flip
-1, // patch for face
faceZoneID_, // zone for face
faceZoneIndex_, // zone for face
mfFlip[i] // face flip in zone
);
}
@ -348,7 +348,7 @@ void Foam::perfectInterface::setRefinement
own, // neighbour
true, // face flip
-1, // patch for face
faceZoneID_, // zone for face
faceZoneIndex_, // zone for face
!mfFlip[i] // face flip in zone
);
}
@ -362,16 +362,16 @@ void Foam::perfectInterface::setRefinement(polyTopoChange& ref) const
{
Pout<< "bool perfectInterface::setRefinement(polyTopoChange&) const : "
<< "for object " << name() << " : "
<< "masterPatchID_:" << masterPatchID_
<< " slavePatchID_:" << slavePatchID_
<< " faceZoneID_:" << faceZoneID_ << endl;
<< "masterPatchIndex_:" << masterPatchIndex_
<< " slavePatchIndex_:" << slavePatchIndex_
<< " faceZoneIndex_:" << faceZoneIndex_ << endl;
}
const polyMesh& mesh = this->mesh();
const polyBoundaryMesh& patches = mesh.boundaryMesh();
const polyPatch& patch0 = patches[masterPatchID_];
const polyPatch& patch1 = patches[slavePatchID_];
const polyPatch& patch0 = patches[masterPatchIndex_];
const polyPatch& patch1 = patches[slavePatchIndex_];
labelList pp0Labels(identityMap(patch0.size())+patch0.start());
indirectPrimitivePatch pp0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ inline Foam::RBD::subBody::subBody
:
body_(bodyPtr),
masterName_(masterName),
masterID_(masterID),
masterIndex_(masterID),
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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,7 +93,7 @@ void Foam::RBD::restraints::externalForce::restrain
}
// 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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,14 +81,14 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain
vector refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 1, 0);
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)
{
// Directions close to the axis, changing reference
refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 0, 1);
oldDir = refQ_ & refDir;
newDir = model_.X0(bodyID_).E() & refDir;
newDir = model_.X0(masterBodyIndex_).E() & refDir;
}
// Removing axis component from oldDir and newDir and normalising
@ -122,7 +122,7 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain
(
-(
stiffness_*theta
+ damping_*(model_.v(model_.master(bodyID_)).w() & a)
+ damping_*(model_.v(masterBodyIndex_).w() & a)
)*a
);
@ -134,7 +134,9 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain
}
// 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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ void Foam::RBD::restraints::linearDamper::restrain
const rigidBodyModelState& state
) const
{
vector force = -coeff_*model_.v(model_.master(bodyID_)).l();
vector force = -coeff_*model_.v(masterBodyIndex_).l();
if (model_.debug)
{
@ -86,7 +86,9 @@ void Foam::RBD::restraints::linearDamper::restrain
}
// 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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -110,7 +110,7 @@ void Foam::RBD::restraints::linearSpring::restrain
}
// 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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,8 +48,8 @@ Foam::RBD::restraint::restraint
)
:
name_(name),
bodyID_(model.bodyID(dict.lookup("body"))),
bodyIndex_(model.master(bodyID_)),
bodyIndex_(model.bodyIndex(dict.lookup("body"))),
masterBodyIndex_(model.master(bodyIndex_)),
coeffs_(dict),
model_(model)
{}
@ -79,7 +79,7 @@ bool Foam::RBD::restraint::read(const dictionary& dict)
void Foam::RBD::restraint::write(Ostream& os) const
{
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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,12 +74,12 @@ protected:
//- Name of the restraint
word name_;
//- ID of the body the restraint is applied to
label bodyID_;
//- Index of the body the force is applied to
//- Index of the body the restraint is applied to
label bodyIndex_;
//- Index of the master body the restraint is applied to
label masterBodyIndex_;
//- Restraint model specific coefficient dictionary
dictionary coeffs_;
@ -153,9 +153,9 @@ public:
return name_;
}
label bodyID() const
label bodyIndex() const
{
return bodyID_;
return bodyIndex_;
}
//- 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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ inline Foam::point Foam::RBD::restraint::bodyPoint
const point& p
) 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
{
return model_.v(bodyID_, p);
return model_.v(bodyIndex_, p);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ void Foam::RBD::restraints::sphericalAngularDamper::restrain
const rigidBodyModelState& state
) const
{
vector moment = -coeff_*model_.v(model_.master(bodyID_)).w();
vector moment = -coeff_*model_.v(masterBodyIndex_).w();
if (model_.debug)
{
@ -86,7 +86,9 @@ void Foam::RBD::restraints::sphericalAngularDamper::restrain
}
// 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))
{
const subBody& sBody = mergedBody(parentID);
lambda_.append(sBody.masterID());
lambda_.append(sBody.masterIndex());
XT_.append(XT & sBody.masterXT());
}
else
@ -187,7 +187,7 @@ Foam::RBD::rigidBodyModel::rigidBodyModel(const dictionary& dict)
{
merge
(
bodyID(bodyDict.lookup("mergeWith")),
bodyIndex(bodyDict.lookup("mergeWith")),
bodyDict.lookup("transform"),
rigidBody::New(iter().keyword(), bodyDict)
);
@ -196,7 +196,7 @@ Foam::RBD::rigidBodyModel::rigidBodyModel(const dictionary& dict)
{
join
(
bodyID(bodyDict.lookup("parent")),
bodyIndex(bodyDict.lookup("parent")),
bodyDict.lookup("transform"),
joint::New(*this, bodyDict.subDict("joint")),
rigidBody::New(iter().keyword(), bodyDict)
@ -325,15 +325,15 @@ Foam::label Foam::RBD::rigidBodyModel::merge
{
const subBody& sBody = mergedBody(parentID);
makeComposite(sBody.masterID());
makeComposite(sBody.masterIndex());
sBodyPtr.set
(
new subBody
(
bodyPtr,
bodies_[sBody.masterID()].name(),
sBody.masterID(),
bodies_[sBody.masterIndex()].name(),
sBody.masterIndex(),
XT & sBody.masterXT()
)
);
@ -358,7 +358,7 @@ Foam::label Foam::RBD::rigidBodyModel::merge
mergedBodies_.append(sBodyPtr);
// Merge the sub-body with the parent
bodies_[sBody.masterID()].merge(sBody);
bodies_[sBody.masterIndex()].merge(sBody);
const label sBodyID = mergedBodyID(mergedBodies_.size() - 1);
bodyIndices_.insert(sBody.name(), sBodyID);
@ -375,7 +375,7 @@ Foam::spatialTransform Foam::RBD::rigidBodyModel::X0
if (merged(bodyId))
{
const subBody& mBody = mergedBody(bodyId);
return mBody.masterXT() & X0_[mBody.masterID()];
return mBody.masterXT() & X0_[mBody.masterIndex()];
}
else
{

View File

@ -314,7 +314,7 @@ public:
inline const subBody& mergedBody(label mergedBodyID) const;
//- 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
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)
{
return mergedBody(bodyID).masterID();
return mergedBody(bodyID).masterIndex();
}
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];
}

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