mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Capitalised templated InteractionList classes, moved to basic.
Using basic sending and receiving referral lists in molecule.
This commit is contained in:
@ -24,13 +24,13 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "directInteractionList.H"
|
||||
#include "interactionLists.H"
|
||||
#include "DirectInteractionList.H"
|
||||
#include "InteractionLists.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
void Foam::DirectInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
bool pointPointListBuild
|
||||
)
|
||||
@ -39,7 +39,7 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
|
||||
const polyMesh& mesh(il_.mesh());
|
||||
|
||||
List<DynamicList<label> > directInteractionList(mesh.nCells());
|
||||
List<DynamicList<label> > DirectInteractionList(mesh.nCells());
|
||||
|
||||
if (pointPointListBuild)
|
||||
{
|
||||
@ -82,13 +82,13 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellI],
|
||||
DirectInteractionList[cellI],
|
||||
cellJ
|
||||
)
|
||||
== -1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellI].append(cellJ);
|
||||
DirectInteractionList[cellI].append(cellJ);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,14 +98,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellJ],
|
||||
DirectInteractionList[cellJ],
|
||||
cellI
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellJ].append(cellI);
|
||||
DirectInteractionList[cellJ].append(cellI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -141,14 +141,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellI],
|
||||
DirectInteractionList[cellI],
|
||||
cellO
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellI].append(cellO);
|
||||
DirectInteractionList[cellI].append(cellO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,14 +158,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellO],
|
||||
DirectInteractionList[cellO],
|
||||
cellI
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellO].append(cellI);
|
||||
DirectInteractionList[cellO].append(cellI);
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,14 +182,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellI],
|
||||
DirectInteractionList[cellI],
|
||||
cellN
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellI].append(cellN);
|
||||
DirectInteractionList[cellI].append(cellN);
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,14 +199,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellN],
|
||||
DirectInteractionList[cellN],
|
||||
cellI
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellN].append(cellI);
|
||||
DirectInteractionList[cellN].append(cellI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -250,14 +250,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellI],
|
||||
DirectInteractionList[cellI],
|
||||
cellJ
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellI].append(cellJ);
|
||||
DirectInteractionList[cellI].append(cellJ);
|
||||
}
|
||||
}
|
||||
|
||||
@ -267,14 +267,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
(
|
||||
findIndex
|
||||
(
|
||||
directInteractionList[cellJ],
|
||||
DirectInteractionList[cellJ],
|
||||
cellI
|
||||
)
|
||||
==
|
||||
-1
|
||||
)
|
||||
{
|
||||
directInteractionList[cellJ].append(cellI);
|
||||
DirectInteractionList[cellJ].append(cellI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -284,11 +284,11 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
}
|
||||
}
|
||||
|
||||
forAll(directInteractionList, transDIL)
|
||||
forAll(DirectInteractionList, transDIL)
|
||||
{
|
||||
(*this)[transDIL].transfer
|
||||
(
|
||||
directInteractionList[transDIL].shrink()
|
||||
DirectInteractionList[transDIL].shrink()
|
||||
);
|
||||
}
|
||||
|
||||
@ -304,9 +304,9 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::directInteractionList<ParticleType>::directInteractionList
|
||||
Foam::DirectInteractionList<ParticleType>::DirectInteractionList
|
||||
(
|
||||
const interactionLists<ParticleType>& il,
|
||||
const InteractionLists<ParticleType>& il,
|
||||
bool pointPointListBuild
|
||||
)
|
||||
:
|
||||
@ -329,22 +329,22 @@ Foam::directInteractionList<ParticleType>::directInteractionList
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::directInteractionList<ParticleType>::directInteractionList
|
||||
Foam::DirectInteractionList<ParticleType>::DirectInteractionList
|
||||
(
|
||||
const interactionLists<ParticleType>& il
|
||||
const InteractionLists<ParticleType>& il
|
||||
)
|
||||
:
|
||||
labelListList(il.mesh().nCells()),
|
||||
il_(il)
|
||||
{
|
||||
Info<< "Read directInteractionList from disk not implemented" << endl;
|
||||
Info<< "Read DirectInteractionList from disk not implemented" << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::directInteractionList<ParticleType>::~directInteractionList()
|
||||
Foam::DirectInteractionList<ParticleType>::~DirectInteractionList()
|
||||
{}
|
||||
|
||||
|
||||
@ -23,18 +23,18 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::directInteractionList
|
||||
Foam::DirectInteractionList
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
directInteractionListI.H
|
||||
directInteractionList.C
|
||||
DirectInteractionListI.H
|
||||
DirectInteractionList.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef directInteractionList_H
|
||||
#define directInteractionList_H
|
||||
#ifndef DirectInteractionList_H
|
||||
#define DirectInteractionList_H
|
||||
|
||||
#include "polyMesh.H"
|
||||
#include "List.H"
|
||||
@ -46,20 +46,20 @@ namespace Foam
|
||||
|
||||
// Forward declaration of classes
|
||||
template<class ParticleType>
|
||||
class interactionLists;
|
||||
class InteractionLists;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class directInteractionList Declaration
|
||||
Class DirectInteractionList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParticleType>
|
||||
class directInteractionList
|
||||
class DirectInteractionList
|
||||
:
|
||||
public labelListList
|
||||
{
|
||||
// Private data
|
||||
|
||||
const interactionLists<ParticleType>& il_;
|
||||
const InteractionLists<ParticleType>& il_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -70,10 +70,10 @@ class directInteractionList
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
directInteractionList(const directInteractionList&);
|
||||
DirectInteractionList(const DirectInteractionList&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const directInteractionList&);
|
||||
void operator=(const DirectInteractionList&);
|
||||
|
||||
|
||||
public:
|
||||
@ -81,29 +81,29 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct lists by searching the mesh
|
||||
directInteractionList
|
||||
DirectInteractionList
|
||||
(
|
||||
const interactionLists<ParticleType>& il,
|
||||
const InteractionLists<ParticleType>& il,
|
||||
bool pointPointListBuild
|
||||
);
|
||||
|
||||
//- Construct from file
|
||||
directInteractionList
|
||||
DirectInteractionList
|
||||
(
|
||||
const interactionLists<ParticleType>& il
|
||||
const InteractionLists<ParticleType>& il
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~directInteractionList();
|
||||
~DirectInteractionList();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
inline const interactionLists<ParticleType>& il() const;
|
||||
inline const InteractionLists<ParticleType>& il() const;
|
||||
};
|
||||
|
||||
|
||||
@ -113,12 +113,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "directInteractionListI.H"
|
||||
#include "DirectInteractionListI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "directInteractionList.C"
|
||||
# include "DirectInteractionList.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -27,8 +27,8 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::interactionLists<ParticleType>&
|
||||
Foam::directInteractionList<ParticleType>::il() const
|
||||
inline const Foam::InteractionLists<ParticleType>&
|
||||
Foam::DirectInteractionList<ParticleType>::il() const
|
||||
{
|
||||
return il_;
|
||||
}
|
||||
@ -24,30 +24,30 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "interactionLists.H"
|
||||
#include "InteractionLists.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::scalar Foam::interactionLists<ParticleType>::transTol = 1e-12;
|
||||
Foam::scalar Foam::InteractionLists<ParticleType>::transTol = 1e-12;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::interactionLists<ParticleType>::buildCellReferralLists()
|
||||
void Foam::InteractionLists<ParticleType>::buildCellReferralLists()
|
||||
{
|
||||
Info<< nl << "Determining particle referring schedule" << endl;
|
||||
|
||||
const referredCellList<ParticleType>& refIntL(ril());
|
||||
const ReferredCellList<ParticleType>& refIntL(ril());
|
||||
|
||||
DynamicList<label> referralProcs;
|
||||
|
||||
// Run through all referredCells to build list of interacting processors
|
||||
// Run through all ReferredCells to build list of interacting processors
|
||||
|
||||
forAll(refIntL, rIL)
|
||||
{
|
||||
const referredCell<ParticleType>& rC(refIntL[rIL]);
|
||||
const ReferredCell<ParticleType>& rC(refIntL[rIL]);
|
||||
|
||||
if (findIndex(referralProcs, rC.sourceProc()) == -1)
|
||||
{
|
||||
@ -64,11 +64,11 @@ void Foam::interactionLists<ParticleType>::buildCellReferralLists()
|
||||
List<DynamicList<DynamicList<label> > >
|
||||
cellReceivingReferralLists(referralProcs.size());
|
||||
|
||||
// Run through all referredCells again building up send and receive info
|
||||
// Run through all ReferredCells again building up send and receive info
|
||||
|
||||
forAll(refIntL, rIL)
|
||||
{
|
||||
const referredCell<ParticleType>& rC(refIntL[rIL]);
|
||||
const ReferredCell<ParticleType>& rC(refIntL[rIL]);
|
||||
|
||||
label rPI = findIndex(referralProcs, rC.sourceProc());
|
||||
|
||||
@ -197,7 +197,7 @@ void Foam::interactionLists<ParticleType>::buildCellReferralLists()
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::interactionLists<ParticleType>::interactionLists
|
||||
Foam::InteractionLists<ParticleType>::InteractionLists
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
scalar maxDistanceSqr,
|
||||
@ -216,7 +216,7 @@ Foam::interactionLists<ParticleType>::interactionLists
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::interactionLists<ParticleType>::interactionLists(const polyMesh& mesh)
|
||||
Foam::InteractionLists<ParticleType>::InteractionLists(const polyMesh& mesh)
|
||||
:
|
||||
mesh_(mesh),
|
||||
dil_(*this),
|
||||
@ -227,14 +227,14 @@ Foam::interactionLists<ParticleType>::interactionLists(const polyMesh& mesh)
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::interactionLists<ParticleType>::~interactionLists()
|
||||
Foam::InteractionLists<ParticleType>::~InteractionLists()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testPointPointDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testPointPointDistance
|
||||
(
|
||||
const label ptI,
|
||||
const label ptJ
|
||||
@ -245,7 +245,7 @@ bool Foam::interactionLists<ParticleType>::testPointPointDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testEdgeEdgeDistance
|
||||
(
|
||||
const edge& eI,
|
||||
const edge& eJ
|
||||
@ -259,7 +259,7 @@ bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||
(
|
||||
const label p,
|
||||
const label faceNo
|
||||
@ -272,10 +272,10 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||
(
|
||||
const label p,
|
||||
const referredCell<ParticleType>& refCell
|
||||
const ReferredCell<ParticleType>& refCell
|
||||
) const
|
||||
{
|
||||
const vector& pointPosition(mesh_.points()[p]);
|
||||
@ -303,7 +303,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||
(
|
||||
const vectorList& pointsToTest,
|
||||
const label faceNo
|
||||
@ -328,7 +328,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||
(
|
||||
const vector& p,
|
||||
const label faceNo
|
||||
@ -354,7 +354,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||
(
|
||||
const vector& p,
|
||||
const labelList& faceToTest,
|
||||
@ -461,7 +461,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
// if the algorithm hasn't returned anything by now then something has
|
||||
// gone wrong.
|
||||
|
||||
FatalErrorIn("interactionLists.C") << nl
|
||||
FatalErrorIn("InteractionLists.C") << nl
|
||||
<< "point " << p << " to face " << faceToTest
|
||||
<< " comparison did not find a nearest point"
|
||||
<< " to be inside or outside face."
|
||||
@ -472,7 +472,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
||||
bool Foam::InteractionLists<ParticleType>::testEdgeEdgeDistance
|
||||
(
|
||||
const edge& eI,
|
||||
const vector& eJs,
|
||||
@ -517,7 +517,7 @@ bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelList
|
||||
Foam::interactionLists<ParticleType>::realCellsInRangeOfSegment
|
||||
Foam::InteractionLists<ParticleType>::realCellsInRangeOfSegment
|
||||
(
|
||||
const labelList& segmentFaces,
|
||||
const labelList& segmentEdges,
|
||||
@ -610,15 +610,15 @@ Foam::interactionLists<ParticleType>::realCellsInRangeOfSegment
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelList
|
||||
Foam::interactionLists<ParticleType>::referredCellsInRangeOfSegment
|
||||
Foam::InteractionLists<ParticleType>::ReferredCellsInRangeOfSegment
|
||||
(
|
||||
const List<referredCell<ParticleType> >& referredInteractionList,
|
||||
const List<ReferredCell<ParticleType> >& referredInteractionList,
|
||||
const labelList& segmentFaces,
|
||||
const labelList& segmentEdges,
|
||||
const labelList& segmentPoints
|
||||
) const
|
||||
{
|
||||
DynamicList<label> referredCellsFoundInRange;
|
||||
DynamicList<label> ReferredCellsFoundInRange;
|
||||
|
||||
forAll(segmentFaces, sF)
|
||||
{
|
||||
@ -631,9 +631,9 @@ Foam::interactionLists<ParticleType>::referredCellsInRangeOfSegment
|
||||
|
||||
if (testPointFaceDistance(refCellPoints, f))
|
||||
{
|
||||
if (findIndex(referredCellsFoundInRange, rIL) == -1)
|
||||
if (findIndex(ReferredCellsFoundInRange, rIL) == -1)
|
||||
{
|
||||
referredCellsFoundInRange.append(rIL);
|
||||
ReferredCellsFoundInRange.append(rIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -645,14 +645,14 @@ Foam::interactionLists<ParticleType>::referredCellsInRangeOfSegment
|
||||
|
||||
forAll(referredInteractionList, rIL)
|
||||
{
|
||||
const referredCell<ParticleType>&
|
||||
const ReferredCell<ParticleType>&
|
||||
refCell(referredInteractionList[rIL]);
|
||||
|
||||
if (testPointFaceDistance(p, refCell))
|
||||
{
|
||||
if (findIndex(referredCellsFoundInRange, rIL) == -1)
|
||||
if (findIndex(ReferredCellsFoundInRange, rIL) == -1)
|
||||
{
|
||||
referredCellsFoundInRange.append(rIL);
|
||||
ReferredCellsFoundInRange.append(rIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -684,16 +684,16 @@ Foam::interactionLists<ParticleType>::referredCellsInRangeOfSegment
|
||||
)
|
||||
)
|
||||
{
|
||||
if(findIndex(referredCellsFoundInRange, rIL) == -1)
|
||||
if(findIndex(ReferredCellsFoundInRange, rIL) == -1)
|
||||
{
|
||||
referredCellsFoundInRange.append(rIL);
|
||||
ReferredCellsFoundInRange.append(rIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return referredCellsFoundInRange.shrink();
|
||||
return ReferredCellsFoundInRange.shrink();
|
||||
}
|
||||
|
||||
|
||||
@ -23,25 +23,25 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::interactionLists
|
||||
Foam::InteractionLists
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
interactionListsI.H
|
||||
interactionLists.C
|
||||
interactionListsIO.C
|
||||
InteractionListsI.H
|
||||
InteractionLists.C
|
||||
InteractionListsIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef interactionLists_H
|
||||
#define interactionLists_H
|
||||
#ifndef InteractionLists_H
|
||||
#define InteractionLists_H
|
||||
|
||||
#include "polyMesh.H"
|
||||
#include "vector2D.H"
|
||||
#include "directInteractionList.H"
|
||||
#include "referredCell.H"
|
||||
#include "referredCellList.H"
|
||||
#include "DirectInteractionList.H"
|
||||
#include "ReferredCell.H"
|
||||
#include "ReferredCellList.H"
|
||||
#include "sendingReferralList.H"
|
||||
#include "receivingReferralList.H"
|
||||
|
||||
@ -52,11 +52,11 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class interactionLists Declaration
|
||||
Class InteractionLists Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParticleType>
|
||||
class interactionLists
|
||||
class InteractionLists
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -64,9 +64,9 @@ class interactionLists
|
||||
|
||||
scalar maxDistanceSqr_;
|
||||
|
||||
directInteractionList<ParticleType> dil_;
|
||||
DirectInteractionList<ParticleType> dil_;
|
||||
|
||||
referredCellList<ParticleType> ril_;
|
||||
ReferredCellList<ParticleType> ril_;
|
||||
|
||||
List<sendingReferralList> cellSendingReferralLists_;
|
||||
|
||||
@ -76,14 +76,14 @@ class interactionLists
|
||||
// Private Member Functions
|
||||
|
||||
//- Build referralLists which define how to send information
|
||||
// to referredCells to source cells
|
||||
// to ReferredCells to source cells
|
||||
void buildCellReferralLists();
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
interactionLists(const interactionLists&);
|
||||
InteractionLists(const InteractionLists&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const interactionLists&);
|
||||
void operator=(const InteractionLists&);
|
||||
|
||||
|
||||
public:
|
||||
@ -97,7 +97,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct and create all information from the mesh
|
||||
interactionLists
|
||||
InteractionLists
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
scalar maxDistanceSqr,
|
||||
@ -105,12 +105,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct from file
|
||||
interactionLists(const polyMesh& mesh);
|
||||
InteractionLists(const polyMesh& mesh);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~interactionLists();
|
||||
~InteractionLists();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -130,7 +130,7 @@ public:
|
||||
bool testPointFaceDistance
|
||||
(
|
||||
const label p,
|
||||
const referredCell<ParticleType>& refCell
|
||||
const ReferredCell<ParticleType>& refCell
|
||||
) const;
|
||||
|
||||
bool testPointFaceDistance
|
||||
@ -174,9 +174,9 @@ public:
|
||||
const labelList& segmentPoints
|
||||
) const;
|
||||
|
||||
const labelList referredCellsInRangeOfSegment
|
||||
const labelList ReferredCellsInRangeOfSegment
|
||||
(
|
||||
const List<referredCell<ParticleType> >&
|
||||
const List<ReferredCell<ParticleType> >&
|
||||
referredInteractionList,
|
||||
const labelList& segmentFaces,
|
||||
const labelList& segmentEdges,
|
||||
@ -188,10 +188,10 @@ public:
|
||||
|
||||
inline const polyMesh& mesh() const;
|
||||
|
||||
inline const directInteractionList<ParticleType>& dil() const;
|
||||
inline const DirectInteractionList<ParticleType>& dil() const;
|
||||
|
||||
inline const referredCellList<ParticleType>& ril() const;
|
||||
inline referredCellList<ParticleType>& ril();
|
||||
inline const ReferredCellList<ParticleType>& ril() const;
|
||||
inline ReferredCellList<ParticleType>& ril();
|
||||
|
||||
inline const List<sendingReferralList>&
|
||||
cellSendingReferralLists() const;
|
||||
@ -209,12 +209,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "interactionListsI.H"
|
||||
#include "InteractionListsI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "interactionLists.C"
|
||||
# include "InteractionLists.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -29,31 +29,31 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::polyMesh& Foam::interactionLists<ParticleType>::mesh() const
|
||||
const Foam::polyMesh& Foam::InteractionLists<ParticleType>::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::directInteractionList<ParticleType>&
|
||||
Foam::interactionLists<ParticleType>::dil() const
|
||||
const Foam::DirectInteractionList<ParticleType>&
|
||||
Foam::InteractionLists<ParticleType>::dil() const
|
||||
{
|
||||
return dil_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::referredCellList<ParticleType>&
|
||||
Foam::interactionLists<ParticleType>::ril() const
|
||||
inline const Foam::ReferredCellList<ParticleType>&
|
||||
Foam::InteractionLists<ParticleType>::ril() const
|
||||
{
|
||||
return ril_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::referredCellList<ParticleType>&
|
||||
Foam::interactionLists<ParticleType>::ril()
|
||||
inline Foam::ReferredCellList<ParticleType>&
|
||||
Foam::InteractionLists<ParticleType>::ril()
|
||||
{
|
||||
return ril_;
|
||||
}
|
||||
@ -61,7 +61,7 @@ Foam::interactionLists<ParticleType>::ril()
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::List<Foam::sendingReferralList>&
|
||||
Foam::interactionLists<ParticleType>::cellSendingReferralLists() const
|
||||
Foam::InteractionLists<ParticleType>::cellSendingReferralLists() const
|
||||
{
|
||||
return cellSendingReferralLists_;
|
||||
}
|
||||
@ -69,7 +69,7 @@ Foam::interactionLists<ParticleType>::cellSendingReferralLists() const
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::List<Foam::receivingReferralList>&
|
||||
Foam::interactionLists<ParticleType>::cellReceivingReferralLists() const
|
||||
Foam::InteractionLists<ParticleType>::cellReceivingReferralLists() const
|
||||
{
|
||||
return cellReceivingReferralLists_;
|
||||
}
|
||||
@ -77,7 +77,7 @@ Foam::interactionLists<ParticleType>::cellReceivingReferralLists() const
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::label
|
||||
Foam::interactionLists<ParticleType>::nInteractingProcs() const
|
||||
Foam::InteractionLists<ParticleType>::nInteractingProcs() const
|
||||
{
|
||||
return cellReceivingReferralLists_.size();
|
||||
}
|
||||
@ -24,13 +24,13 @@ License
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "referredCell.H"
|
||||
#include "interactionLists.H"
|
||||
#include "ReferredCell.H"
|
||||
#include "InteractionLists.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCell<ParticleType>::setConstructionData
|
||||
void Foam::ReferredCell<ParticleType>::setConstructionData
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label sourceCell
|
||||
@ -92,7 +92,7 @@ void Foam::referredCell<ParticleType>::setConstructionData
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCell<ParticleType>::locallyMapEdgeList
|
||||
void Foam::ReferredCell<ParticleType>::locallyMapEdgeList
|
||||
(
|
||||
const labelList& points,
|
||||
const edgeList& sourceCellEdges
|
||||
@ -114,7 +114,7 @@ void Foam::referredCell<ParticleType>::locallyMapEdgeList
|
||||
|| edges_[sCE].end() == -1
|
||||
)
|
||||
{
|
||||
FatalErrorIn("Foam::referredCell::locallyMapEdgeList")
|
||||
FatalErrorIn("Foam::ReferredCell::locallyMapEdgeList")
|
||||
<< "edgeList and points labelList for "
|
||||
<< "referred cell do not match: "
|
||||
<< nl << "points: " << points
|
||||
@ -126,7 +126,7 @@ void Foam::referredCell<ParticleType>::locallyMapEdgeList
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCell<ParticleType>::locallyMapFaceList
|
||||
void Foam::ReferredCell<ParticleType>::locallyMapFaceList
|
||||
(
|
||||
const labelList& points,
|
||||
const labelListList& sourceCellFaces
|
||||
@ -148,7 +148,7 @@ void Foam::referredCell<ParticleType>::locallyMapFaceList
|
||||
|
||||
if (localFace[p] == -1)
|
||||
{
|
||||
FatalErrorIn("Foam::referredCell::locallyMapEdgeList")
|
||||
FatalErrorIn("Foam::ReferredCell::locallyMapEdgeList")
|
||||
<< "edgeList and points labelList for "
|
||||
<< "referred cell do not match: "
|
||||
<< nl << "points: " << points
|
||||
@ -161,7 +161,7 @@ void Foam::referredCell<ParticleType>::locallyMapFaceList
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vector Foam::referredCell<ParticleType>::referPosition
|
||||
Foam::vector Foam::ReferredCell<ParticleType>::referPosition
|
||||
(
|
||||
const vector& positionToRefer
|
||||
)
|
||||
@ -172,7 +172,7 @@ Foam::vector Foam::referredCell<ParticleType>::referPosition
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vectorList
|
||||
Foam::referredCell<ParticleType>::referPositions
|
||||
Foam::ReferredCell<ParticleType>::referPositions
|
||||
(
|
||||
const vectorList& positionsToRefer
|
||||
)
|
||||
@ -183,7 +183,7 @@ Foam::referredCell<ParticleType>::referPositions
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vector
|
||||
Foam::referredCell<ParticleType>::rotateVector(const vector& vectorToRotate)
|
||||
Foam::ReferredCell<ParticleType>::rotateVector(const vector& vectorToRotate)
|
||||
{
|
||||
return rotation_ & vectorToRotate;
|
||||
}
|
||||
@ -191,7 +191,7 @@ Foam::referredCell<ParticleType>::rotateVector(const vector& vectorToRotate)
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vectorList
|
||||
Foam::referredCell<ParticleType>::rotateVectors
|
||||
Foam::ReferredCell<ParticleType>::rotateVectors
|
||||
(
|
||||
const vectorList& vectorsToRotate
|
||||
)
|
||||
@ -203,7 +203,7 @@ Foam::referredCell<ParticleType>::rotateVectors
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCell<ParticleType>::referredCell()
|
||||
Foam::ReferredCell<ParticleType>::ReferredCell()
|
||||
:
|
||||
IDLList<ParticleType>(),
|
||||
sourceProc_(-1),
|
||||
@ -216,7 +216,7 @@ Foam::referredCell<ParticleType>::referredCell()
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCell<ParticleType>::referredCell
|
||||
Foam::ReferredCell<ParticleType>::ReferredCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label sourceProc,
|
||||
@ -236,7 +236,7 @@ Foam::referredCell<ParticleType>::referredCell
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCell<ParticleType>::referredCell
|
||||
Foam::ReferredCell<ParticleType>::ReferredCell
|
||||
(
|
||||
const label sourceProc,
|
||||
const label sourceCell,
|
||||
@ -270,7 +270,7 @@ Foam::referredCell<ParticleType>::referredCell
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCell<ParticleType>::referredCell
|
||||
Foam::ReferredCell<ParticleType>::ReferredCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label sourceProc,
|
||||
@ -295,7 +295,7 @@ Foam::referredCell<ParticleType>::referredCell
|
||||
|
||||
offset_ = cD - (rotation_ & cS);
|
||||
|
||||
// Allow sourceCell = -1 to create a dummy referredCell
|
||||
// Allow sourceCell = -1 to create a dummy ReferredCell
|
||||
// to obtain the transformation
|
||||
|
||||
if(sourceCell >= 0)
|
||||
@ -308,14 +308,14 @@ Foam::referredCell<ParticleType>::referredCell
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCell<ParticleType>::~referredCell()
|
||||
Foam::ReferredCell<ParticleType>::~ReferredCell()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCell<ParticleType> Foam::referredCell<ParticleType>::reRefer
|
||||
Foam::ReferredCell<ParticleType> Foam::ReferredCell<ParticleType>::reRefer
|
||||
(
|
||||
const vector& cS,
|
||||
const vector& cD,
|
||||
@ -334,7 +334,7 @@ Foam::referredCell<ParticleType> Foam::referredCell<ParticleType>::reRefer
|
||||
|
||||
vector reReferredOffset = newOffset + (newRotation & offset_);
|
||||
|
||||
return referredCell
|
||||
return ReferredCell
|
||||
(
|
||||
sourceProc_,
|
||||
sourceCell_,
|
||||
@ -350,7 +350,7 @@ Foam::referredCell<ParticleType> Foam::referredCell<ParticleType>::reRefer
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vector Foam::referredCell<ParticleType>::referPosition
|
||||
Foam::vector Foam::ReferredCell<ParticleType>::referPosition
|
||||
(
|
||||
const vector& positionToRefer
|
||||
) const
|
||||
@ -360,7 +360,7 @@ Foam::vector Foam::referredCell<ParticleType>::referPosition
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vectorList Foam::referredCell<ParticleType>::referPosition
|
||||
Foam::vectorList Foam::ReferredCell<ParticleType>::referPosition
|
||||
(
|
||||
const vectorList& positionsToRefer
|
||||
) const
|
||||
@ -370,7 +370,7 @@ Foam::vectorList Foam::referredCell<ParticleType>::referPosition
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vector Foam::referredCell<ParticleType>::rotateVector
|
||||
Foam::vector Foam::ReferredCell<ParticleType>::rotateVector
|
||||
(
|
||||
const vector& vectorToRotate
|
||||
) const
|
||||
@ -380,7 +380,7 @@ Foam::vector Foam::referredCell<ParticleType>::rotateVector
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::vectorList Foam::referredCell<ParticleType>::rotateVectors
|
||||
Foam::vectorList Foam::ReferredCell<ParticleType>::rotateVectors
|
||||
(
|
||||
const vectorList& vectorsToRotate
|
||||
) const
|
||||
@ -390,7 +390,7 @@ Foam::vectorList Foam::referredCell<ParticleType>::rotateVectors
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCell<ParticleType>::referInParticle
|
||||
void Foam::ReferredCell<ParticleType>::referInParticle
|
||||
(
|
||||
ParticleType* incomingParticlePtr
|
||||
)
|
||||
@ -409,9 +409,9 @@ void Foam::referredCell<ParticleType>::referInParticle
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::referredCell<ParticleType>::duplicate
|
||||
bool Foam::ReferredCell<ParticleType>::duplicate
|
||||
(
|
||||
const referredCell<ParticleType>& refCellDupl
|
||||
const ReferredCell<ParticleType>& refCellDupl
|
||||
) const
|
||||
{
|
||||
return
|
||||
@ -419,13 +419,13 @@ bool Foam::referredCell<ParticleType>::duplicate
|
||||
sourceProc_ == refCellDupl.sourceProc()
|
||||
&& sourceCell_ == refCellDupl.sourceCell()
|
||||
&& mag(offset_ - refCellDupl.offset())
|
||||
< interactionLists<ParticleType>::transTol
|
||||
< InteractionLists<ParticleType>::transTol
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
bool Foam::referredCell<ParticleType>::duplicate
|
||||
bool Foam::ReferredCell<ParticleType>::duplicate
|
||||
(
|
||||
const label procNo,
|
||||
const label nCells
|
||||
@ -436,7 +436,7 @@ bool Foam::referredCell<ParticleType>::duplicate
|
||||
sourceProc_ == procNo
|
||||
&& sourceCell_ < nCells
|
||||
&& mag(offset_)
|
||||
< interactionLists<ParticleType>::transTol
|
||||
< InteractionLists<ParticleType>::transTol
|
||||
);
|
||||
}
|
||||
|
||||
@ -446,13 +446,13 @@ bool Foam::referredCell<ParticleType>::duplicate
|
||||
template<class ParticleType>
|
||||
bool Foam::operator==
|
||||
(
|
||||
const referredCell<ParticleType>& a,
|
||||
const referredCell<ParticleType>& b
|
||||
const ReferredCell<ParticleType>& a,
|
||||
const ReferredCell<ParticleType>& b
|
||||
)
|
||||
{
|
||||
return const_cast<referredCell<ParticleType>&>(a).duplicate
|
||||
return const_cast<ReferredCell<ParticleType>&>(a).duplicate
|
||||
(
|
||||
const_cast<const referredCell<ParticleType>&>(b)
|
||||
const_cast<const ReferredCell<ParticleType>&>(b)
|
||||
);
|
||||
}
|
||||
|
||||
@ -460,8 +460,8 @@ bool Foam::operator==
|
||||
template<class ParticleType>
|
||||
bool Foam::operator!=
|
||||
(
|
||||
const referredCell<ParticleType>& a,
|
||||
const referredCell<ParticleType>& b
|
||||
const ReferredCell<ParticleType>& a,
|
||||
const ReferredCell<ParticleType>& b
|
||||
)
|
||||
{
|
||||
return !(a == b);
|
||||
@ -469,7 +469,7 @@ bool Foam::operator!=
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::Istream& Foam::operator>>(Istream& is, referredCell<ParticleType>& rC)
|
||||
Foam::Istream& Foam::operator>>(Istream& is, ReferredCell<ParticleType>& rC)
|
||||
{
|
||||
|
||||
is >> rC.sourceProc_
|
||||
@ -484,7 +484,7 @@ Foam::Istream& Foam::operator>>(Istream& is, referredCell<ParticleType>& rC)
|
||||
|
||||
is.check
|
||||
(
|
||||
"Istream& operator<<(Istream& f, const referredCell<ParticleType>& rC"
|
||||
"Istream& operator<<(Istream& f, const ReferredCell<ParticleType>& rC"
|
||||
);
|
||||
|
||||
return is;
|
||||
@ -495,7 +495,7 @@ template<class ParticleType>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const referredCell<ParticleType>& rC
|
||||
const ReferredCell<ParticleType>& rC
|
||||
)
|
||||
{
|
||||
|
||||
@ -511,7 +511,7 @@ Foam::Ostream& Foam::operator<<
|
||||
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<(Ostream& f, const referredCell<ParticleType>& rC"
|
||||
"Ostream& operator<<(Ostream& f, const ReferredCell<ParticleType>& rC"
|
||||
);
|
||||
|
||||
return os;
|
||||
@ -23,18 +23,18 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::referredCell
|
||||
Foam::ReferredCell
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
referredCellI.H
|
||||
referredCell.C
|
||||
ReferredCellI.H
|
||||
ReferredCell.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef referredCell_H
|
||||
#define referredCell_H
|
||||
#ifndef ReferredCell_H
|
||||
#define ReferredCell_H
|
||||
|
||||
#include "vector.H"
|
||||
#include "vectorList.H"
|
||||
@ -54,43 +54,43 @@ namespace Foam
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
template<class ParticleType>
|
||||
class referredCell;
|
||||
class ReferredCell;
|
||||
|
||||
template<class ParticleType>
|
||||
bool operator==
|
||||
(
|
||||
const referredCell<ParticleType>& a,
|
||||
const referredCell<ParticleType>& b
|
||||
const ReferredCell<ParticleType>& a,
|
||||
const ReferredCell<ParticleType>& b
|
||||
);
|
||||
|
||||
template<class ParticleType>
|
||||
bool operator!=
|
||||
(
|
||||
const referredCell<ParticleType>& a,
|
||||
const referredCell<ParticleType>& b
|
||||
const ReferredCell<ParticleType>& a,
|
||||
const ReferredCell<ParticleType>& b
|
||||
);
|
||||
|
||||
template<class ParticleType>
|
||||
Istream& operator>>
|
||||
(
|
||||
Istream&,
|
||||
referredCell<ParticleType>&
|
||||
ReferredCell<ParticleType>&
|
||||
);
|
||||
|
||||
template<class ParticleType>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const referredCell<ParticleType>&
|
||||
const ReferredCell<ParticleType>&
|
||||
);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class referredCell Declaration
|
||||
Class ReferredCell Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParticleType>
|
||||
class referredCell
|
||||
class ReferredCell
|
||||
:
|
||||
public IDLList<ParticleType>
|
||||
{
|
||||
@ -153,10 +153,10 @@ public:
|
||||
|
||||
//- Construct null
|
||||
|
||||
referredCell();
|
||||
ReferredCell();
|
||||
|
||||
//- Construct from components with external edge information
|
||||
referredCell
|
||||
ReferredCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label sourceProc,
|
||||
@ -166,7 +166,7 @@ public:
|
||||
);
|
||||
|
||||
//- Construct from components with existing local edge information
|
||||
referredCell
|
||||
ReferredCell
|
||||
(
|
||||
const label sourceProc,
|
||||
const label sourceCell,
|
||||
@ -185,7 +185,7 @@ public:
|
||||
// Order of vectors important (S = source, D = Destination).
|
||||
// External edge information.
|
||||
|
||||
referredCell
|
||||
ReferredCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label sourceProc,
|
||||
@ -199,14 +199,14 @@ public:
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~referredCell();
|
||||
virtual ~ReferredCell();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Take this referredCell object that has already had it's transform
|
||||
//- Take this ReferredCell object that has already had it's transform
|
||||
// calculated and refer it on again, retaining same source info.
|
||||
referredCell reRefer
|
||||
ReferredCell reRefer
|
||||
(
|
||||
const vector& cS,
|
||||
const vector& cD,
|
||||
@ -234,16 +234,16 @@ public:
|
||||
void referInParticle(ParticleType* incomingParticlePtr);
|
||||
|
||||
//- duplicate() function to test whether a referred or real cell
|
||||
// supplied by arguement is a duplicate of this referredCell.
|
||||
// supplied by arguement is a duplicate of this ReferredCell.
|
||||
// Can be used bi-directionally - i.e. can be called on an existing
|
||||
// referred cell with a proposed referredCell as argument,
|
||||
// or vice versa. Can only be called by a proposed referredCell with
|
||||
// referred cell with a proposed ReferredCell as argument,
|
||||
// or vice versa. Can only be called by a proposed ReferredCell with
|
||||
// a real cell index as arguement to test to see if the proposed
|
||||
// referredCell is a duplicate.
|
||||
// ReferredCell is a duplicate.
|
||||
// A duplicate cell is defined as one which has the same source
|
||||
// processor, source cell, and an equal offset. Real cells have zero
|
||||
// offset by definition.
|
||||
bool duplicate(const referredCell& refCellDupl) const;
|
||||
bool duplicate(const ReferredCell& refCellDupl) const;
|
||||
|
||||
bool duplicate(const label procNo, const label nCells) const;
|
||||
|
||||
@ -277,14 +277,14 @@ public:
|
||||
|
||||
friend bool operator== <ParticleType>
|
||||
(
|
||||
const referredCell<ParticleType>& a,
|
||||
const referredCell<ParticleType>& b
|
||||
const ReferredCell<ParticleType>& a,
|
||||
const ReferredCell<ParticleType>& b
|
||||
);
|
||||
|
||||
friend bool operator!= <ParticleType>
|
||||
(
|
||||
const referredCell<ParticleType>& a,
|
||||
const referredCell<ParticleType>& b
|
||||
const ReferredCell<ParticleType>& a,
|
||||
const ReferredCell<ParticleType>& b
|
||||
);
|
||||
|
||||
|
||||
@ -293,13 +293,13 @@ public:
|
||||
friend Istream& operator>> <ParticleType>
|
||||
(
|
||||
Istream&,
|
||||
referredCell<ParticleType>&
|
||||
ReferredCell<ParticleType>&
|
||||
);
|
||||
|
||||
friend Ostream& operator<< <ParticleType>
|
||||
(
|
||||
Ostream&,
|
||||
const referredCell<ParticleType>&
|
||||
const ReferredCell<ParticleType>&
|
||||
);
|
||||
};
|
||||
|
||||
@ -310,12 +310,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "referredCellI.H"
|
||||
#include "ReferredCellI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "referredCell.C"
|
||||
# include "ReferredCell.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -27,28 +27,28 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::label Foam::referredCell<ParticleType>::sourceProc() const
|
||||
inline Foam::label Foam::ReferredCell<ParticleType>::sourceProc() const
|
||||
{
|
||||
return sourceProc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::label Foam::referredCell<ParticleType>::sourceCell() const
|
||||
inline Foam::label Foam::ReferredCell<ParticleType>::sourceCell() const
|
||||
{
|
||||
return sourceCell_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::vector& Foam::referredCell<ParticleType>::offset() const
|
||||
inline const Foam::vector& Foam::ReferredCell<ParticleType>::offset() const
|
||||
{
|
||||
return offset_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::tensor& Foam::referredCell<ParticleType>::rotation() const
|
||||
inline const Foam::tensor& Foam::ReferredCell<ParticleType>::rotation() const
|
||||
{
|
||||
return rotation_;
|
||||
}
|
||||
@ -56,14 +56,14 @@ inline const Foam::tensor& Foam::referredCell<ParticleType>::rotation() const
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::vectorList&
|
||||
Foam::referredCell<ParticleType>::vertexPositions() const
|
||||
Foam::ReferredCell<ParticleType>::vertexPositions() const
|
||||
{
|
||||
return vertexPositions_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::edgeList& Foam::referredCell<ParticleType>::edges() const
|
||||
inline const Foam::edgeList& Foam::ReferredCell<ParticleType>::edges() const
|
||||
{
|
||||
return edges_;
|
||||
}
|
||||
@ -71,7 +71,7 @@ inline const Foam::edgeList& Foam::referredCell<ParticleType>::edges() const
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::labelListList&
|
||||
Foam::referredCell<ParticleType>::faces() const
|
||||
Foam::ReferredCell<ParticleType>::faces() const
|
||||
{
|
||||
return faces_;
|
||||
}
|
||||
@ -79,7 +79,7 @@ Foam::referredCell<ParticleType>::faces() const
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::vectorList&
|
||||
Foam::referredCell<ParticleType>::faceCentres() const
|
||||
Foam::ReferredCell<ParticleType>::faceCentres() const
|
||||
{
|
||||
return faceCentres_;
|
||||
}
|
||||
@ -87,14 +87,14 @@ Foam::referredCell<ParticleType>::faceCentres() const
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::vectorList&
|
||||
Foam::referredCell<ParticleType>::faceAreas() const
|
||||
Foam::ReferredCell<ParticleType>::faceAreas() const
|
||||
{
|
||||
return faceAreas_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::labelList& Foam::referredCell<ParticleType>::realCells()
|
||||
inline Foam::labelList& Foam::ReferredCell<ParticleType>::realCells()
|
||||
{
|
||||
return realCellsForInteraction_;
|
||||
}
|
||||
@ -102,7 +102,7 @@ inline Foam::labelList& Foam::referredCell<ParticleType>::realCells()
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::labelList&
|
||||
Foam::referredCell<ParticleType>::realCellsForInteraction() const
|
||||
Foam::ReferredCell<ParticleType>::realCellsForInteraction() const
|
||||
{
|
||||
return realCellsForInteraction_;
|
||||
}
|
||||
@ -24,8 +24,8 @@ License
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "referredCellList.H"
|
||||
#include "interactionLists.H"
|
||||
#include "ReferredCellList.H"
|
||||
#include "InteractionLists.H"
|
||||
#include "polyBoundaryMeshEntries.H"
|
||||
#include "PstreamCombineReduceOps.H"
|
||||
#include "Time.H"
|
||||
@ -36,7 +36,7 @@ License
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
void Foam::ReferredCellList<ParticleType>::buildReferredCellList
|
||||
(
|
||||
bool pointPointListBuild
|
||||
)
|
||||
@ -45,7 +45,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
|
||||
const polyMesh& mesh(il_.mesh());
|
||||
|
||||
DynamicList<referredCell<ParticleType> > referredInteractionList;
|
||||
DynamicList<ReferredCell<ParticleType> > referredInteractionList;
|
||||
|
||||
// realCellsWithinRangeOfAnyReferringPatch
|
||||
DynamicList<label> rCellsWRRP;
|
||||
@ -122,7 +122,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn ("referredCellList.C")
|
||||
FatalErrorIn ("ReferredCellList.C")
|
||||
<< nl << "unable to read undecomposed boundary file from "
|
||||
<< "constant/polyMesh" << nl
|
||||
<< abort(FatalError);
|
||||
@ -302,7 +302,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
{
|
||||
if (processorPatchSegmentMapping[pP][faceI] == nUP)
|
||||
{
|
||||
referredCell<ParticleType> testRefCell
|
||||
ReferredCell<ParticleType> testRefCell
|
||||
(
|
||||
mesh,
|
||||
-1,
|
||||
@ -329,18 +329,18 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
if
|
||||
(
|
||||
sum(mag(refOff-refOff[0]))/refOff.size()
|
||||
> interactionLists<ParticleType>::transTol
|
||||
> InteractionLists<ParticleType>::transTol
|
||||
|| sum(mag(refTrans-refTrans[0]))/refTrans.size()
|
||||
> interactionLists<ParticleType>::transTol
|
||||
> InteractionLists<ParticleType>::transTol
|
||||
)
|
||||
{
|
||||
FatalErrorIn ("referredCellList.C")
|
||||
FatalErrorIn ("ReferredCellList.C")
|
||||
<< nl << "Face pairs on patch "
|
||||
<< patch.name()
|
||||
<< ", segment " << patchNames[nUP]
|
||||
<< " do not give the same referring "
|
||||
<< " transformations to within tolerance of "
|
||||
<< interactionLists<ParticleType>::transTol << nl
|
||||
<< InteractionLists<ParticleType>::transTol << nl
|
||||
<< " Referring offsets:" << refOff << nl
|
||||
<< " Average sum of mag difference: "
|
||||
<< sum(mag(refOff-refOff[0]))/refOff.size() << nl
|
||||
@ -400,7 +400,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
faceL++, faceM++
|
||||
)
|
||||
{
|
||||
referredCell<ParticleType> testRefCell
|
||||
ReferredCell<ParticleType> testRefCell
|
||||
(
|
||||
mesh,
|
||||
-1,
|
||||
@ -419,17 +419,17 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
if
|
||||
(
|
||||
sum(mag(refOff - refOff[0]))/(patch.size()/2)
|
||||
> interactionLists<ParticleType>::transTol
|
||||
> InteractionLists<ParticleType>::transTol
|
||||
|| sum(mag(refTrans - refTrans[0]))/(patch.size()/2)
|
||||
> interactionLists<ParticleType>::transTol
|
||||
> InteractionLists<ParticleType>::transTol
|
||||
)
|
||||
{
|
||||
FatalErrorIn ("referredCellList.C")
|
||||
FatalErrorIn ("ReferredCellList.C")
|
||||
<< nl << "Face pairs on patch "
|
||||
<< patch.name()
|
||||
<< " do not give the same referring "
|
||||
<< " transformations to within tolerance of "
|
||||
<< interactionLists<ParticleType>::transTol
|
||||
<< InteractionLists<ParticleType>::transTol
|
||||
<< nl << " Referring offsets:" << refOff << nl
|
||||
<< " Average sum of mag difference: "
|
||||
<< sum(mag(refOff - refOff[0]))/refOff.size()
|
||||
@ -534,7 +534,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
{
|
||||
const label realCell = realCellsFoundInRange[cFIR];
|
||||
|
||||
referredCell<ParticleType> cellToRefer
|
||||
ReferredCell<ParticleType> cellToRefer
|
||||
(
|
||||
mesh,
|
||||
Pstream::myProcNo(),
|
||||
@ -601,9 +601,9 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
|
||||
referredInteractionList.shrink();
|
||||
|
||||
labelList referredCellsFoundInRange
|
||||
labelList ReferredCellsFoundInRange
|
||||
(
|
||||
il_.referredCellsInRangeOfSegment
|
||||
il_.ReferredCellsInRangeOfSegment
|
||||
(
|
||||
referredInteractionList,
|
||||
meshFacesOnThisSegment,
|
||||
@ -612,15 +612,15 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
)
|
||||
);
|
||||
|
||||
forAll(referredCellsFoundInRange,cFIR)
|
||||
forAll(ReferredCellsFoundInRange,cFIR)
|
||||
{
|
||||
referredCell<ParticleType>& existingRefCell =
|
||||
ReferredCell<ParticleType>& existingRefCell =
|
||||
referredInteractionList
|
||||
[
|
||||
referredCellsFoundInRange[cFIR]
|
||||
ReferredCellsFoundInRange[cFIR]
|
||||
];
|
||||
|
||||
referredCell<ParticleType> cellToReRefer =
|
||||
ReferredCell<ParticleType> cellToReRefer =
|
||||
existingRefCell.reRefer
|
||||
(
|
||||
patch.faceCentres()[0],
|
||||
@ -766,7 +766,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
{
|
||||
const label realCell = realCellsFoundInRange[cFIR];
|
||||
|
||||
referredCell<ParticleType> cellToRefer
|
||||
ReferredCell<ParticleType> cellToRefer
|
||||
(
|
||||
mesh,
|
||||
Pstream::myProcNo(),
|
||||
@ -833,8 +833,8 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
|
||||
referredInteractionList.shrink();
|
||||
|
||||
referredCellsFoundInRange =
|
||||
il_.referredCellsInRangeOfSegment
|
||||
ReferredCellsFoundInRange =
|
||||
il_.ReferredCellsInRangeOfSegment
|
||||
(
|
||||
referredInteractionList,
|
||||
meshFacesOnThisSegment,
|
||||
@ -842,15 +842,15 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
meshPointsOnThisSegment
|
||||
);
|
||||
|
||||
forAll(referredCellsFoundInRange,cFIR)
|
||||
forAll(ReferredCellsFoundInRange,cFIR)
|
||||
{
|
||||
referredCell<ParticleType>& existingRefCell =
|
||||
ReferredCell<ParticleType>& existingRefCell =
|
||||
referredInteractionList
|
||||
[
|
||||
referredCellsFoundInRange[cFIR]
|
||||
ReferredCellsFoundInRange[cFIR]
|
||||
];
|
||||
|
||||
referredCell<ParticleType> cellToReRefer =
|
||||
ReferredCell<ParticleType> cellToReRefer =
|
||||
existingRefCell.reRefer
|
||||
(
|
||||
patch.faceCentres()[patch.size()/2],
|
||||
@ -919,7 +919,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
mesh.boundaryMesh()[procPatches[pP]]
|
||||
);
|
||||
|
||||
DynamicList<referredCell<ParticleType> > referredCellsToTransfer;
|
||||
DynamicList<ReferredCell<ParticleType> > ReferredCellsToTransfer;
|
||||
|
||||
const vectorList& neighbFaceCentres =
|
||||
allNeighbourFaceCentres[pP];
|
||||
@ -1023,7 +1023,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
{
|
||||
if (faceT == -1)
|
||||
{
|
||||
FatalErrorIn ("referredCellList.C")
|
||||
FatalErrorIn ("ReferredCellList.C")
|
||||
<< nl << "faceT == -1 encountered but "
|
||||
<< meshFacesOnThisSegment.size()
|
||||
<< " faces found on patch segment."
|
||||
@ -1051,7 +1051,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
const label realCell =
|
||||
realCellsFoundInRange[cFIR];
|
||||
|
||||
referredCell<ParticleType> cellToRefer
|
||||
ReferredCell<ParticleType> cellToRefer
|
||||
(
|
||||
mesh,
|
||||
Pstream::myProcNo(),
|
||||
@ -1063,7 +1063,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
/(mag(neighbFaceAreas[faceT]) + VSMALL)
|
||||
);
|
||||
|
||||
referredCellsToTransfer.append(cellToRefer);
|
||||
ReferredCellsToTransfer.append(cellToRefer);
|
||||
|
||||
// add real cells found in range of processor
|
||||
// patch to whole mesh list
|
||||
@ -1077,9 +1077,9 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
|
||||
referredInteractionList.shrink();
|
||||
|
||||
labelList referredCellsFoundInRange
|
||||
labelList ReferredCellsFoundInRange
|
||||
(
|
||||
il_.referredCellsInRangeOfSegment
|
||||
il_.ReferredCellsInRangeOfSegment
|
||||
(
|
||||
referredInteractionList,
|
||||
meshFacesOnThisSegment,
|
||||
@ -1088,15 +1088,15 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
)
|
||||
);
|
||||
|
||||
forAll(referredCellsFoundInRange,cFIR)
|
||||
forAll(ReferredCellsFoundInRange,cFIR)
|
||||
{
|
||||
referredCell<ParticleType>& existingRefCell =
|
||||
ReferredCell<ParticleType>& existingRefCell =
|
||||
referredInteractionList
|
||||
[
|
||||
referredCellsFoundInRange[cFIR]
|
||||
ReferredCellsFoundInRange[cFIR]
|
||||
];
|
||||
|
||||
referredCell<ParticleType> cellToReRefer =
|
||||
ReferredCell<ParticleType> cellToReRefer =
|
||||
existingRefCell.reRefer
|
||||
(
|
||||
patch.faceCentres()[faceT],
|
||||
@ -1106,12 +1106,12 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
/(mag(neighbFaceAreas[faceT]) + VSMALL)
|
||||
);
|
||||
|
||||
referredCellsToTransfer.append(cellToReRefer);
|
||||
ReferredCellsToTransfer.append(cellToReRefer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
referredCellsToTransfer.shrink();
|
||||
ReferredCellsToTransfer.shrink();
|
||||
|
||||
// Send these cells to the neighbouring processor.
|
||||
|
||||
@ -1122,7 +1122,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
patch.neighbProcNo()
|
||||
);
|
||||
|
||||
toNeighbProc << referredCellsToTransfer;
|
||||
toNeighbProc << ReferredCellsToTransfer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1136,8 +1136,8 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
|
||||
// Receive the cells from neighbour
|
||||
|
||||
List<referredCell<ParticleType> >
|
||||
referredCellsFromNeighbour(patch.size());
|
||||
List<ReferredCell<ParticleType> >
|
||||
ReferredCellsFromNeighbour(patch.size());
|
||||
|
||||
{
|
||||
IPstream fromNeighbProc
|
||||
@ -1146,16 +1146,16 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
patch.neighbProcNo()
|
||||
);
|
||||
|
||||
fromNeighbProc >> referredCellsFromNeighbour;
|
||||
fromNeighbProc >> ReferredCellsFromNeighbour;
|
||||
}
|
||||
|
||||
// Check to see if they are duplicates, if not append
|
||||
// them to the referredInteractionList
|
||||
|
||||
forAll(referredCellsFromNeighbour,rCFN)
|
||||
forAll(ReferredCellsFromNeighbour,rCFN)
|
||||
{
|
||||
referredCell<ParticleType>& cellToRefer =
|
||||
referredCellsFromNeighbour[rCFN];
|
||||
ReferredCell<ParticleType>& cellToRefer =
|
||||
ReferredCellsFromNeighbour[rCFN];
|
||||
|
||||
// Test all existing referred and real cells to check
|
||||
// duplicates are not being made or cells aren't being
|
||||
@ -1294,7 +1294,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
{
|
||||
const polyMesh& mesh(il_.mesh());
|
||||
|
||||
referredCell<ParticleType>& refCell = (*this)[rC];
|
||||
ReferredCell<ParticleType>& refCell = (*this)[rC];
|
||||
|
||||
DynamicList<label> realCellsFoundInRange;
|
||||
|
||||
@ -1422,7 +1422,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCellList<ParticleType>::storeParticles
|
||||
void Foam::ReferredCellList<ParticleType>::storeParticles
|
||||
(
|
||||
const receivingReferralList& rRL,
|
||||
const labelList& destinationReferredCell,
|
||||
@ -1445,7 +1445,7 @@ void Foam::referredCellList<ParticleType>::storeParticles
|
||||
|
||||
forAll(refCellsToReferTo, refCellI)
|
||||
{
|
||||
referredCell<ParticleType>& refCellToRefParticlesTo =
|
||||
ReferredCell<ParticleType>& refCellToRefParticlesTo =
|
||||
(*this)[refCellsToReferTo[refCellI]];
|
||||
|
||||
refCellToRefParticlesTo.referInParticle
|
||||
@ -1462,13 +1462,13 @@ void Foam::referredCellList<ParticleType>::storeParticles
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCellList<ParticleType>::referredCellList
|
||||
Foam::ReferredCellList<ParticleType>::ReferredCellList
|
||||
(
|
||||
interactionLists<ParticleType>& il,
|
||||
InteractionLists<ParticleType>& il,
|
||||
bool pointPointListBuild
|
||||
)
|
||||
:
|
||||
List<referredCell<ParticleType> >(),
|
||||
List<ReferredCell<ParticleType> >(),
|
||||
il_(il),
|
||||
cloud_(il_.mesh(), "referredParticleCloud", IDLList<ParticleType>())
|
||||
|
||||
@ -1478,30 +1478,30 @@ Foam::referredCellList<ParticleType>::referredCellList
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCellList<ParticleType>::referredCellList
|
||||
Foam::ReferredCellList<ParticleType>::ReferredCellList
|
||||
(
|
||||
interactionLists<ParticleType>& il
|
||||
InteractionLists<ParticleType>& il
|
||||
)
|
||||
:
|
||||
List<referredCell<ParticleType> >(),
|
||||
List<ReferredCell<ParticleType> >(),
|
||||
il_(il),
|
||||
cloud_(il_.mesh(), IDLList<ParticleType>())
|
||||
{
|
||||
Info<< "Read referredCellList from disk not implemented" << endl;
|
||||
Info<< "Read ReferredCellList from disk not implemented" << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::referredCellList<ParticleType>::~referredCellList()
|
||||
Foam::ReferredCellList<ParticleType>::~ReferredCellList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::referredCellList<ParticleType>::referParticles
|
||||
void Foam::ReferredCellList<ParticleType>::referParticles
|
||||
(
|
||||
const List<DynamicList<ParticleType*> >& cellOccupancy
|
||||
)
|
||||
@ -1572,8 +1572,8 @@ void Foam::referredCellList<ParticleType>::referParticles
|
||||
}
|
||||
}
|
||||
|
||||
// Receive referred particle lists to and distribute to referredCells
|
||||
// according to cellReceivingReferralLists, referredCells deal with the
|
||||
// Receive referred particle lists to and distribute to ReferredCells
|
||||
// according to cellReceivingReferralLists, ReferredCells deal with the
|
||||
// transformations themselves
|
||||
|
||||
forAll(il_.cellReceivingReferralLists(), cRRL)
|
||||
@ -1619,7 +1619,7 @@ void Foam::referredCellList<ParticleType>::referParticles
|
||||
|
||||
forAll(*this, refCellI)
|
||||
{
|
||||
referredCell<ParticleType>& refCell = (*this)[refCellI];
|
||||
ReferredCell<ParticleType>& refCell = (*this)[refCellI];
|
||||
|
||||
forAllIter
|
||||
(
|
||||
@ -23,20 +23,20 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::referredCellList
|
||||
Foam::ReferredCellList
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
referredCellListI.H
|
||||
referredCellList.C
|
||||
ReferredCellListI.H
|
||||
ReferredCellList.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef referredCellList_H
|
||||
#define referredCellList_H
|
||||
#ifndef ReferredCellList_H
|
||||
#define ReferredCellList_H
|
||||
|
||||
#include "referredCell.H"
|
||||
#include "ReferredCell.H"
|
||||
#include "sendingReferralList.H"
|
||||
#include "receivingReferralList.H"
|
||||
|
||||
@ -47,20 +47,20 @@ namespace Foam
|
||||
|
||||
// Forward declaration of classes
|
||||
template<class ParticleType>
|
||||
class interactionLists;
|
||||
class InteractionLists;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class referredCellList Declaration
|
||||
Class ReferredCellList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParticleType>
|
||||
class referredCellList
|
||||
class ReferredCellList
|
||||
:
|
||||
public List<referredCell<ParticleType> >
|
||||
public List<ReferredCell<ParticleType> >
|
||||
{
|
||||
// Private data
|
||||
|
||||
const interactionLists<ParticleType>& il_;
|
||||
const InteractionLists<ParticleType>& il_;
|
||||
|
||||
//- Dummy cloud to give to particles
|
||||
Cloud<ParticleType> cloud_;
|
||||
@ -87,19 +87,19 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct lists by searching the mesh
|
||||
referredCellList
|
||||
ReferredCellList
|
||||
(
|
||||
interactionLists<ParticleType>& il,
|
||||
InteractionLists<ParticleType>& il,
|
||||
bool pointPointListBuild
|
||||
);
|
||||
|
||||
//- Construct from file
|
||||
referredCellList (interactionLists<ParticleType>& il);
|
||||
ReferredCellList (InteractionLists<ParticleType>& il);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~referredCellList();
|
||||
~ReferredCellList();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -109,7 +109,7 @@ public:
|
||||
const List<DynamicList<ParticleType*> >& cellOccupancy
|
||||
);
|
||||
|
||||
inline const interactionLists<ParticleType>& il() const;
|
||||
inline const InteractionLists<ParticleType>& il() const;
|
||||
};
|
||||
|
||||
|
||||
@ -119,12 +119,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "referredCellListI.H"
|
||||
#include "ReferredCellListI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "referredCellList.C"
|
||||
# include "ReferredCellList.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -27,8 +27,8 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Foam::interactionLists<ParticleType>&
|
||||
Foam::referredCellList<ParticleType>::il() const
|
||||
inline const Foam::InteractionLists<ParticleType>&
|
||||
Foam::ReferredCellList<ParticleType>::il() const
|
||||
{
|
||||
return il_;
|
||||
}
|
||||
@ -1,9 +1,11 @@
|
||||
Cloud = Cloud
|
||||
particle = particle
|
||||
passiveParticle = passiveParticle
|
||||
indexedParticle = indexedParticle
|
||||
referralLists = InteractionLists/referralLists
|
||||
|
||||
$(passiveParticle)/passiveParticleCloud.C
|
||||
$(indexedParticle)/indexedParticleCloud.C
|
||||
|
||||
$(referralLists)/sendingReferralList.C
|
||||
$(referralLists)/receivingReferralList.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/liblagrangian
|
||||
|
||||
@ -84,9 +84,4 @@ phaseProperties/phaseProperties/phasePropertiesIO.C
|
||||
phaseProperties/phasePropertiesList/phasePropertiesList.C
|
||||
|
||||
|
||||
// /* interation lists */
|
||||
referralLists = interactionLists/referralLists
|
||||
$(referralLists)/sendingReferralList.C
|
||||
$(referralLists)/receivingReferralList.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate
|
||||
|
||||
@ -135,7 +135,7 @@ void Foam::DeterministicPairForce<CloudType>::collide()
|
||||
|
||||
buildCellOccupancy();
|
||||
|
||||
const directInteractionList<typename CloudType::parcelType>& dil(il_.dil());
|
||||
const DirectInteractionList<typename CloudType::parcelType>& dil(il_.dil());
|
||||
|
||||
typename CloudType::parcelType* pA_ptr = NULL;
|
||||
typename CloudType::parcelType* pB_ptr = NULL;
|
||||
@ -180,12 +180,12 @@ void Foam::DeterministicPairForce<CloudType>::collide()
|
||||
|
||||
// real-referred interactions
|
||||
|
||||
referredCellList<typename CloudType::parcelType>& ril(il_.ril());
|
||||
ReferredCellList<typename CloudType::parcelType>& ril(il_.ril());
|
||||
|
||||
// Loop over all referred cells
|
||||
forAll(ril, refCellI)
|
||||
{
|
||||
referredCell<typename CloudType::parcelType>& refCell =
|
||||
ReferredCell<typename CloudType::parcelType>& refCell =
|
||||
ril[refCellI];
|
||||
|
||||
const labelList& realCells = refCell.realCellsForInteraction();
|
||||
|
||||
@ -36,7 +36,7 @@ SourceFiles
|
||||
#define DeterministicPairForce_H
|
||||
|
||||
#include "CollisionModel.H"
|
||||
#include "interactionLists.H"
|
||||
#include "InteractionLists.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -59,7 +59,7 @@ class DeterministicPairForce
|
||||
|
||||
//- Interactions lists determining which cells are in
|
||||
// interaction range of each other
|
||||
interactionLists<typename CloudType::parcelType> il_;
|
||||
InteractionLists<typename CloudType::parcelType> il_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
@ -2,11 +2,8 @@ interactionLists = interactionLists
|
||||
referredMolecule = $(interactionLists)/referredMolecule
|
||||
referredCellList = $(interactionLists)/referredCellList
|
||||
referredCell = $(interactionLists)/referredCell
|
||||
referralLists = $(interactionLists)/referralLists
|
||||
directInteractionList = $(interactionLists)/directInteractionList
|
||||
|
||||
$(referralLists)/sendingReferralList.C
|
||||
$(referralLists)/receivingReferralList.C
|
||||
$(referredCellList)/referredCellList.C
|
||||
$(referredCell)/referredCell.C
|
||||
$(referredMolecule)/referredMolecule.C
|
||||
|
||||
@ -1,175 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "receivingReferralList.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::receivingReferralList::receivingReferralList()
|
||||
:
|
||||
labelListList(),
|
||||
sourceProc_(-1)
|
||||
{}
|
||||
|
||||
|
||||
Foam::receivingReferralList::receivingReferralList
|
||||
(
|
||||
const label sourceProc,
|
||||
const labelListList& refCellsToSendTo
|
||||
)
|
||||
:
|
||||
labelListList(refCellsToSendTo),
|
||||
sourceProc_(sourceProc)
|
||||
{}
|
||||
|
||||
|
||||
Foam::receivingReferralList::receivingReferralList
|
||||
(
|
||||
const receivingReferralList& rL
|
||||
)
|
||||
:
|
||||
labelListList(rL),
|
||||
sourceProc_(rL.sourceProc())
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::receivingReferralList::~receivingReferralList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::receivingReferralList::operator=(const receivingReferralList& rhs)
|
||||
{
|
||||
// Check for assignment to self
|
||||
if (this == &rhs)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::receivingReferralList::operator="
|
||||
"(const Foam::receivingReferralList&)"
|
||||
)
|
||||
<< "Attempted assignment to self"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
labelListList::operator=(rhs);
|
||||
|
||||
sourceProc_ = rhs.sourceProc();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
bool operator==
|
||||
(
|
||||
const Foam::receivingReferralList& a,
|
||||
const Foam::receivingReferralList& b
|
||||
)
|
||||
{
|
||||
// Trivial reject: lists are different size
|
||||
if (a.size() != b.size())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Or if source processors are not the same.
|
||||
if (a.sourceProc() != b.sourceProc())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Foam::List<bool> fnd(a.size(), false);
|
||||
|
||||
forAll (b, bI)
|
||||
{
|
||||
Foam::labelList curLList = b[bI];
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll (a, aI)
|
||||
{
|
||||
if (a[aI] == curLList)
|
||||
{
|
||||
found = true;
|
||||
fnd[aI] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// check if all LLists on a were marked
|
||||
bool result = true;
|
||||
|
||||
forAll (fnd, aI)
|
||||
{
|
||||
result = (result && fnd[aI]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, receivingReferralList& rRL)
|
||||
{
|
||||
is >> rRL.sourceProc_ >> static_cast<labelListList&>(rRL);
|
||||
|
||||
is.check
|
||||
(
|
||||
"Istream& operator<<(Istream& f, const receivingReferralList& rRL"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const receivingReferralList& rRL
|
||||
)
|
||||
{
|
||||
os << rRL.sourceProc() << token::SPACE
|
||||
<< static_cast< const labelListList& >(rRL);
|
||||
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<(Ostream& f, const receivingReferralList& rRL"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,138 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::receivingReferralList
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
receivingReferralListI.H
|
||||
receivingReferralList.C
|
||||
receivingReferralListIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef receivingReferralList_H
|
||||
#define receivingReferralList_H
|
||||
|
||||
#include "labelList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class receivingReferralList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class receivingReferralList
|
||||
:
|
||||
public labelListList
|
||||
{
|
||||
// Private data
|
||||
|
||||
label sourceProc_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
receivingReferralList();
|
||||
|
||||
//- Construct from components
|
||||
receivingReferralList
|
||||
(
|
||||
const label sourceProc,
|
||||
const labelListList& refCellsToSendTo
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
receivingReferralList(const receivingReferralList&);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~receivingReferralList();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
inline label sourceProc() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
void operator=(const receivingReferralList&);
|
||||
|
||||
|
||||
// Friend Operators
|
||||
|
||||
friend bool operator==
|
||||
(
|
||||
const receivingReferralList& a,
|
||||
const receivingReferralList& b
|
||||
);
|
||||
|
||||
inline friend bool operator!=
|
||||
(
|
||||
const receivingReferralList& a,
|
||||
const receivingReferralList& b
|
||||
);
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>
|
||||
(
|
||||
Istream&,
|
||||
receivingReferralList&
|
||||
);
|
||||
|
||||
friend Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const receivingReferralList&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "receivingReferralListI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::label Foam::receivingReferralList::sourceProc() const
|
||||
{
|
||||
return sourceProc_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool operator!=
|
||||
(
|
||||
const Foam::receivingReferralList& a,
|
||||
const Foam::receivingReferralList& b
|
||||
)
|
||||
{
|
||||
return (!(a == b));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,172 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "sendingReferralList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::sendingReferralList::sendingReferralList()
|
||||
:
|
||||
labelList(),
|
||||
destinationProc_(-1)
|
||||
{}
|
||||
|
||||
|
||||
Foam::sendingReferralList::sendingReferralList
|
||||
(
|
||||
const label destinationProc,
|
||||
const labelList& cellsToSend
|
||||
)
|
||||
:
|
||||
labelList(cellsToSend),
|
||||
destinationProc_(destinationProc)
|
||||
{}
|
||||
|
||||
|
||||
Foam::sendingReferralList::sendingReferralList
|
||||
(
|
||||
const sendingReferralList& rL
|
||||
)
|
||||
:
|
||||
labelList(rL),
|
||||
destinationProc_(rL.destinationProc())
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::sendingReferralList::~sendingReferralList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sendingReferralList::operator=(const sendingReferralList& rhs)
|
||||
{
|
||||
// Check for assignment to self
|
||||
if (this == &rhs)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::sendingReferralList::" \
|
||||
"operator=(const Foam::sendingReferralList&)"
|
||||
)
|
||||
<< "Attempted assignment to self"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
labelList::operator=(rhs);
|
||||
|
||||
destinationProc_ = rhs.destinationProc();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
bool operator==
|
||||
(
|
||||
const Foam::sendingReferralList& a,
|
||||
const Foam::sendingReferralList& b
|
||||
)
|
||||
{
|
||||
// Trivial reject: lists are different size
|
||||
if (a.size() != b.size())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Or if source processors are not the same.
|
||||
if (a.destinationProc() != b.destinationProc())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Foam::List<bool> fnd(a.size(), false);
|
||||
|
||||
forAll (b, bI)
|
||||
{
|
||||
Foam::label curLabel = b[bI];
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll (a, aI)
|
||||
{
|
||||
if (a[aI] == curLabel)
|
||||
{
|
||||
found = true;
|
||||
fnd[aI] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// check if all labels on a were marked
|
||||
bool result = true;
|
||||
|
||||
forAll (fnd, aI)
|
||||
{
|
||||
result = (result && fnd[aI]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Foam::Istream& Foam::operator>>
|
||||
(
|
||||
Istream& is,
|
||||
sendingReferralList& sRL
|
||||
)
|
||||
{
|
||||
is >> sRL.destinationProc_ >> static_cast<labelList&>(sRL);
|
||||
|
||||
is.check("Istream& operator<<(Istream& f, const sendingReferralList& sRL");
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const sendingReferralList& rL
|
||||
)
|
||||
{
|
||||
os << rL.destinationProc() << token::SPACE
|
||||
<< static_cast< const labelList& >(rL);
|
||||
|
||||
os.check("Ostream& operator<<(Ostream& f, const sendingReferralList& rL");
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,138 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::sendingReferralList
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
sendingReferralListI.H
|
||||
sendingReferralList.C
|
||||
sendingReferralListIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef sendingReferralList_H
|
||||
#define sendingReferralList_H
|
||||
|
||||
#include "labelList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class sendingReferralList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class sendingReferralList
|
||||
:
|
||||
public labelList
|
||||
{
|
||||
// Private data
|
||||
|
||||
label destinationProc_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
sendingReferralList();
|
||||
|
||||
//- Construct from components
|
||||
sendingReferralList
|
||||
(
|
||||
const label destinationProc,
|
||||
const labelList& cellsToSend
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
sendingReferralList(const sendingReferralList&);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~sendingReferralList();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
inline label destinationProc() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
void operator=(const sendingReferralList&);
|
||||
|
||||
|
||||
// Friend Operators
|
||||
|
||||
friend bool operator==
|
||||
(
|
||||
const sendingReferralList& a,
|
||||
const sendingReferralList& b
|
||||
);
|
||||
|
||||
inline friend bool operator!=
|
||||
(
|
||||
const sendingReferralList& a,
|
||||
const sendingReferralList& b
|
||||
);
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>
|
||||
(
|
||||
Istream&,
|
||||
sendingReferralList&
|
||||
);
|
||||
|
||||
friend Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const sendingReferralList&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "sendingReferralListI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::label Foam::sendingReferralList::destinationProc() const
|
||||
{
|
||||
return destinationProc_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool operator!=
|
||||
(
|
||||
const Foam::sendingReferralList& a,
|
||||
const Foam::sendingReferralList& b
|
||||
)
|
||||
{
|
||||
return (!(a == b));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user