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 "DirectInteractionList.H"
|
||||||
#include "interactionLists.H"
|
#include "InteractionLists.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
void Foam::DirectInteractionList<ParticleType>::buildDirectInteractionList
|
||||||
(
|
(
|
||||||
bool pointPointListBuild
|
bool pointPointListBuild
|
||||||
)
|
)
|
||||||
@ -39,7 +39,7 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
|
|
||||||
const polyMesh& mesh(il_.mesh());
|
const polyMesh& mesh(il_.mesh());
|
||||||
|
|
||||||
List<DynamicList<label> > directInteractionList(mesh.nCells());
|
List<DynamicList<label> > DirectInteractionList(mesh.nCells());
|
||||||
|
|
||||||
if (pointPointListBuild)
|
if (pointPointListBuild)
|
||||||
{
|
{
|
||||||
@ -82,13 +82,13 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellI],
|
DirectInteractionList[cellI],
|
||||||
cellJ
|
cellJ
|
||||||
)
|
)
|
||||||
== -1
|
== -1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellI].append(cellJ);
|
DirectInteractionList[cellI].append(cellJ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,14 +98,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellJ],
|
DirectInteractionList[cellJ],
|
||||||
cellI
|
cellI
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellJ].append(cellI);
|
DirectInteractionList[cellJ].append(cellI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -141,14 +141,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellI],
|
DirectInteractionList[cellI],
|
||||||
cellO
|
cellO
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellI].append(cellO);
|
DirectInteractionList[cellI].append(cellO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,14 +158,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellO],
|
DirectInteractionList[cellO],
|
||||||
cellI
|
cellI
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellO].append(cellI);
|
DirectInteractionList[cellO].append(cellI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,14 +182,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellI],
|
DirectInteractionList[cellI],
|
||||||
cellN
|
cellN
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellI].append(cellN);
|
DirectInteractionList[cellI].append(cellN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,14 +199,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellN],
|
DirectInteractionList[cellN],
|
||||||
cellI
|
cellI
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellN].append(cellI);
|
DirectInteractionList[cellN].append(cellI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,14 +250,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellI],
|
DirectInteractionList[cellI],
|
||||||
cellJ
|
cellJ
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directInteractionList[cellI].append(cellJ);
|
DirectInteractionList[cellI].append(cellJ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,14 +267,14 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
(
|
(
|
||||||
findIndex
|
findIndex
|
||||||
(
|
(
|
||||||
directInteractionList[cellJ],
|
DirectInteractionList[cellJ],
|
||||||
cellI
|
cellI
|
||||||
)
|
)
|
||||||
==
|
==
|
||||||
-1
|
-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
|
(*this)[transDIL].transfer
|
||||||
(
|
(
|
||||||
directInteractionList[transDIL].shrink()
|
DirectInteractionList[transDIL].shrink()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,9 +304,9 @@ void Foam::directInteractionList<ParticleType>::buildDirectInteractionList
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::directInteractionList<ParticleType>::directInteractionList
|
Foam::DirectInteractionList<ParticleType>::DirectInteractionList
|
||||||
(
|
(
|
||||||
const interactionLists<ParticleType>& il,
|
const InteractionLists<ParticleType>& il,
|
||||||
bool pointPointListBuild
|
bool pointPointListBuild
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -329,22 +329,22 @@ Foam::directInteractionList<ParticleType>::directInteractionList
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::directInteractionList<ParticleType>::directInteractionList
|
Foam::DirectInteractionList<ParticleType>::DirectInteractionList
|
||||||
(
|
(
|
||||||
const interactionLists<ParticleType>& il
|
const InteractionLists<ParticleType>& il
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
labelListList(il.mesh().nCells()),
|
labelListList(il.mesh().nCells()),
|
||||||
il_(il)
|
il_(il)
|
||||||
{
|
{
|
||||||
Info<< "Read directInteractionList from disk not implemented" << endl;
|
Info<< "Read DirectInteractionList from disk not implemented" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
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
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::directInteractionList
|
Foam::DirectInteractionList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
directInteractionListI.H
|
DirectInteractionListI.H
|
||||||
directInteractionList.C
|
DirectInteractionList.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef directInteractionList_H
|
#ifndef DirectInteractionList_H
|
||||||
#define directInteractionList_H
|
#define DirectInteractionList_H
|
||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "List.H"
|
#include "List.H"
|
||||||
@ -46,20 +46,20 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class interactionLists;
|
class InteractionLists;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class directInteractionList Declaration
|
Class DirectInteractionList Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class directInteractionList
|
class DirectInteractionList
|
||||||
:
|
:
|
||||||
public labelListList
|
public labelListList
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
const interactionLists<ParticleType>& il_;
|
const InteractionLists<ParticleType>& il_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -70,10 +70,10 @@ class directInteractionList
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
directInteractionList(const directInteractionList&);
|
DirectInteractionList(const DirectInteractionList&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const directInteractionList&);
|
void operator=(const DirectInteractionList&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -81,29 +81,29 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct lists by searching the mesh
|
//- Construct lists by searching the mesh
|
||||||
directInteractionList
|
DirectInteractionList
|
||||||
(
|
(
|
||||||
const interactionLists<ParticleType>& il,
|
const InteractionLists<ParticleType>& il,
|
||||||
bool pointPointListBuild
|
bool pointPointListBuild
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from file
|
//- Construct from file
|
||||||
directInteractionList
|
DirectInteractionList
|
||||||
(
|
(
|
||||||
const interactionLists<ParticleType>& il
|
const InteractionLists<ParticleType>& il
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
~directInteractionList();
|
~DirectInteractionList();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// 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
|
#ifdef NoRepository
|
||||||
# include "directInteractionList.C"
|
# include "DirectInteractionList.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -27,8 +27,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::interactionLists<ParticleType>&
|
inline const Foam::InteractionLists<ParticleType>&
|
||||||
Foam::directInteractionList<ParticleType>::il() const
|
Foam::DirectInteractionList<ParticleType>::il() const
|
||||||
{
|
{
|
||||||
return il_;
|
return il_;
|
||||||
}
|
}
|
||||||
@ -24,30 +24,30 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "interactionLists.H"
|
#include "InteractionLists.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::scalar Foam::interactionLists<ParticleType>::transTol = 1e-12;
|
Foam::scalar Foam::InteractionLists<ParticleType>::transTol = 1e-12;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::interactionLists<ParticleType>::buildCellReferralLists()
|
void Foam::InteractionLists<ParticleType>::buildCellReferralLists()
|
||||||
{
|
{
|
||||||
Info<< nl << "Determining particle referring schedule" << endl;
|
Info<< nl << "Determining particle referring schedule" << endl;
|
||||||
|
|
||||||
const referredCellList<ParticleType>& refIntL(ril());
|
const ReferredCellList<ParticleType>& refIntL(ril());
|
||||||
|
|
||||||
DynamicList<label> referralProcs;
|
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)
|
forAll(refIntL, rIL)
|
||||||
{
|
{
|
||||||
const referredCell<ParticleType>& rC(refIntL[rIL]);
|
const ReferredCell<ParticleType>& rC(refIntL[rIL]);
|
||||||
|
|
||||||
if (findIndex(referralProcs, rC.sourceProc()) == -1)
|
if (findIndex(referralProcs, rC.sourceProc()) == -1)
|
||||||
{
|
{
|
||||||
@ -64,11 +64,11 @@ void Foam::interactionLists<ParticleType>::buildCellReferralLists()
|
|||||||
List<DynamicList<DynamicList<label> > >
|
List<DynamicList<DynamicList<label> > >
|
||||||
cellReceivingReferralLists(referralProcs.size());
|
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)
|
forAll(refIntL, rIL)
|
||||||
{
|
{
|
||||||
const referredCell<ParticleType>& rC(refIntL[rIL]);
|
const ReferredCell<ParticleType>& rC(refIntL[rIL]);
|
||||||
|
|
||||||
label rPI = findIndex(referralProcs, rC.sourceProc());
|
label rPI = findIndex(referralProcs, rC.sourceProc());
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ void Foam::interactionLists<ParticleType>::buildCellReferralLists()
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::interactionLists<ParticleType>::interactionLists
|
Foam::InteractionLists<ParticleType>::InteractionLists
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
scalar maxDistanceSqr,
|
scalar maxDistanceSqr,
|
||||||
@ -216,7 +216,7 @@ Foam::interactionLists<ParticleType>::interactionLists
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::interactionLists<ParticleType>::interactionLists(const polyMesh& mesh)
|
Foam::InteractionLists<ParticleType>::InteractionLists(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
dil_(*this),
|
dil_(*this),
|
||||||
@ -227,14 +227,14 @@ Foam::interactionLists<ParticleType>::interactionLists(const polyMesh& mesh)
|
|||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::interactionLists<ParticleType>::~interactionLists()
|
Foam::InteractionLists<ParticleType>::~InteractionLists()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testPointPointDistance
|
bool Foam::InteractionLists<ParticleType>::testPointPointDistance
|
||||||
(
|
(
|
||||||
const label ptI,
|
const label ptI,
|
||||||
const label ptJ
|
const label ptJ
|
||||||
@ -245,7 +245,7 @@ bool Foam::interactionLists<ParticleType>::testPointPointDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
bool Foam::InteractionLists<ParticleType>::testEdgeEdgeDistance
|
||||||
(
|
(
|
||||||
const edge& eI,
|
const edge& eI,
|
||||||
const edge& eJ
|
const edge& eJ
|
||||||
@ -259,7 +259,7 @@ bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||||
(
|
(
|
||||||
const label p,
|
const label p,
|
||||||
const label faceNo
|
const label faceNo
|
||||||
@ -272,10 +272,10 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||||
(
|
(
|
||||||
const label p,
|
const label p,
|
||||||
const referredCell<ParticleType>& refCell
|
const ReferredCell<ParticleType>& refCell
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const vector& pointPosition(mesh_.points()[p]);
|
const vector& pointPosition(mesh_.points()[p]);
|
||||||
@ -303,7 +303,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||||
(
|
(
|
||||||
const vectorList& pointsToTest,
|
const vectorList& pointsToTest,
|
||||||
const label faceNo
|
const label faceNo
|
||||||
@ -328,7 +328,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||||
(
|
(
|
||||||
const vector& p,
|
const vector& p,
|
||||||
const label faceNo
|
const label faceNo
|
||||||
@ -354,7 +354,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
bool Foam::InteractionLists<ParticleType>::testPointFaceDistance
|
||||||
(
|
(
|
||||||
const vector& p,
|
const vector& p,
|
||||||
const labelList& faceToTest,
|
const labelList& faceToTest,
|
||||||
@ -461,7 +461,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
|||||||
// if the algorithm hasn't returned anything by now then something has
|
// if the algorithm hasn't returned anything by now then something has
|
||||||
// gone wrong.
|
// gone wrong.
|
||||||
|
|
||||||
FatalErrorIn("interactionLists.C") << nl
|
FatalErrorIn("InteractionLists.C") << nl
|
||||||
<< "point " << p << " to face " << faceToTest
|
<< "point " << p << " to face " << faceToTest
|
||||||
<< " comparison did not find a nearest point"
|
<< " comparison did not find a nearest point"
|
||||||
<< " to be inside or outside face."
|
<< " to be inside or outside face."
|
||||||
@ -472,7 +472,7 @@ bool Foam::interactionLists<ParticleType>::testPointFaceDistance
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
bool Foam::InteractionLists<ParticleType>::testEdgeEdgeDistance
|
||||||
(
|
(
|
||||||
const edge& eI,
|
const edge& eI,
|
||||||
const vector& eJs,
|
const vector& eJs,
|
||||||
@ -517,7 +517,7 @@ bool Foam::interactionLists<ParticleType>::testEdgeEdgeDistance
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
const Foam::labelList
|
const Foam::labelList
|
||||||
Foam::interactionLists<ParticleType>::realCellsInRangeOfSegment
|
Foam::InteractionLists<ParticleType>::realCellsInRangeOfSegment
|
||||||
(
|
(
|
||||||
const labelList& segmentFaces,
|
const labelList& segmentFaces,
|
||||||
const labelList& segmentEdges,
|
const labelList& segmentEdges,
|
||||||
@ -610,15 +610,15 @@ Foam::interactionLists<ParticleType>::realCellsInRangeOfSegment
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
const Foam::labelList
|
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& segmentFaces,
|
||||||
const labelList& segmentEdges,
|
const labelList& segmentEdges,
|
||||||
const labelList& segmentPoints
|
const labelList& segmentPoints
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
DynamicList<label> referredCellsFoundInRange;
|
DynamicList<label> ReferredCellsFoundInRange;
|
||||||
|
|
||||||
forAll(segmentFaces, sF)
|
forAll(segmentFaces, sF)
|
||||||
{
|
{
|
||||||
@ -631,9 +631,9 @@ Foam::interactionLists<ParticleType>::referredCellsInRangeOfSegment
|
|||||||
|
|
||||||
if (testPointFaceDistance(refCellPoints, f))
|
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)
|
forAll(referredInteractionList, rIL)
|
||||||
{
|
{
|
||||||
const referredCell<ParticleType>&
|
const ReferredCell<ParticleType>&
|
||||||
refCell(referredInteractionList[rIL]);
|
refCell(referredInteractionList[rIL]);
|
||||||
|
|
||||||
if (testPointFaceDistance(p, refCell))
|
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
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::interactionLists
|
Foam::InteractionLists
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
interactionListsI.H
|
InteractionListsI.H
|
||||||
interactionLists.C
|
InteractionLists.C
|
||||||
interactionListsIO.C
|
InteractionListsIO.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef interactionLists_H
|
#ifndef InteractionLists_H
|
||||||
#define interactionLists_H
|
#define InteractionLists_H
|
||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "vector2D.H"
|
#include "vector2D.H"
|
||||||
#include "directInteractionList.H"
|
#include "DirectInteractionList.H"
|
||||||
#include "referredCell.H"
|
#include "ReferredCell.H"
|
||||||
#include "referredCellList.H"
|
#include "ReferredCellList.H"
|
||||||
#include "sendingReferralList.H"
|
#include "sendingReferralList.H"
|
||||||
#include "receivingReferralList.H"
|
#include "receivingReferralList.H"
|
||||||
|
|
||||||
@ -52,11 +52,11 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class interactionLists Declaration
|
Class InteractionLists Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class interactionLists
|
class InteractionLists
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -64,9 +64,9 @@ class interactionLists
|
|||||||
|
|
||||||
scalar maxDistanceSqr_;
|
scalar maxDistanceSqr_;
|
||||||
|
|
||||||
directInteractionList<ParticleType> dil_;
|
DirectInteractionList<ParticleType> dil_;
|
||||||
|
|
||||||
referredCellList<ParticleType> ril_;
|
ReferredCellList<ParticleType> ril_;
|
||||||
|
|
||||||
List<sendingReferralList> cellSendingReferralLists_;
|
List<sendingReferralList> cellSendingReferralLists_;
|
||||||
|
|
||||||
@ -76,14 +76,14 @@ class interactionLists
|
|||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Build referralLists which define how to send information
|
//- Build referralLists which define how to send information
|
||||||
// to referredCells to source cells
|
// to ReferredCells to source cells
|
||||||
void buildCellReferralLists();
|
void buildCellReferralLists();
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
interactionLists(const interactionLists&);
|
InteractionLists(const InteractionLists&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const interactionLists&);
|
void operator=(const InteractionLists&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct and create all information from the mesh
|
//- Construct and create all information from the mesh
|
||||||
interactionLists
|
InteractionLists
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
scalar maxDistanceSqr,
|
scalar maxDistanceSqr,
|
||||||
@ -105,12 +105,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from file
|
//- Construct from file
|
||||||
interactionLists(const polyMesh& mesh);
|
InteractionLists(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
~interactionLists();
|
~InteractionLists();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
bool testPointFaceDistance
|
bool testPointFaceDistance
|
||||||
(
|
(
|
||||||
const label p,
|
const label p,
|
||||||
const referredCell<ParticleType>& refCell
|
const ReferredCell<ParticleType>& refCell
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
bool testPointFaceDistance
|
bool testPointFaceDistance
|
||||||
@ -174,9 +174,9 @@ public:
|
|||||||
const labelList& segmentPoints
|
const labelList& segmentPoints
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
const labelList referredCellsInRangeOfSegment
|
const labelList ReferredCellsInRangeOfSegment
|
||||||
(
|
(
|
||||||
const List<referredCell<ParticleType> >&
|
const List<ReferredCell<ParticleType> >&
|
||||||
referredInteractionList,
|
referredInteractionList,
|
||||||
const labelList& segmentFaces,
|
const labelList& segmentFaces,
|
||||||
const labelList& segmentEdges,
|
const labelList& segmentEdges,
|
||||||
@ -188,10 +188,10 @@ public:
|
|||||||
|
|
||||||
inline const polyMesh& mesh() const;
|
inline const polyMesh& mesh() const;
|
||||||
|
|
||||||
inline const directInteractionList<ParticleType>& dil() const;
|
inline const DirectInteractionList<ParticleType>& dil() const;
|
||||||
|
|
||||||
inline const referredCellList<ParticleType>& ril() const;
|
inline const ReferredCellList<ParticleType>& ril() const;
|
||||||
inline referredCellList<ParticleType>& ril();
|
inline ReferredCellList<ParticleType>& ril();
|
||||||
|
|
||||||
inline const List<sendingReferralList>&
|
inline const List<sendingReferralList>&
|
||||||
cellSendingReferralLists() const;
|
cellSendingReferralLists() const;
|
||||||
@ -209,12 +209,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "interactionListsI.H"
|
#include "InteractionListsI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "interactionLists.C"
|
# include "InteractionLists.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -29,31 +29,31 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
const Foam::polyMesh& Foam::interactionLists<ParticleType>::mesh() const
|
const Foam::polyMesh& Foam::InteractionLists<ParticleType>::mesh() const
|
||||||
{
|
{
|
||||||
return mesh_;
|
return mesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
const Foam::directInteractionList<ParticleType>&
|
const Foam::DirectInteractionList<ParticleType>&
|
||||||
Foam::interactionLists<ParticleType>::dil() const
|
Foam::InteractionLists<ParticleType>::dil() const
|
||||||
{
|
{
|
||||||
return dil_;
|
return dil_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::referredCellList<ParticleType>&
|
inline const Foam::ReferredCellList<ParticleType>&
|
||||||
Foam::interactionLists<ParticleType>::ril() const
|
Foam::InteractionLists<ParticleType>::ril() const
|
||||||
{
|
{
|
||||||
return ril_;
|
return ril_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Foam::referredCellList<ParticleType>&
|
inline Foam::ReferredCellList<ParticleType>&
|
||||||
Foam::interactionLists<ParticleType>::ril()
|
Foam::InteractionLists<ParticleType>::ril()
|
||||||
{
|
{
|
||||||
return ril_;
|
return ril_;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ Foam::interactionLists<ParticleType>::ril()
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::List<Foam::sendingReferralList>&
|
inline const Foam::List<Foam::sendingReferralList>&
|
||||||
Foam::interactionLists<ParticleType>::cellSendingReferralLists() const
|
Foam::InteractionLists<ParticleType>::cellSendingReferralLists() const
|
||||||
{
|
{
|
||||||
return cellSendingReferralLists_;
|
return cellSendingReferralLists_;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ Foam::interactionLists<ParticleType>::cellSendingReferralLists() const
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::List<Foam::receivingReferralList>&
|
inline const Foam::List<Foam::receivingReferralList>&
|
||||||
Foam::interactionLists<ParticleType>::cellReceivingReferralLists() const
|
Foam::InteractionLists<ParticleType>::cellReceivingReferralLists() const
|
||||||
{
|
{
|
||||||
return cellReceivingReferralLists_;
|
return cellReceivingReferralLists_;
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ Foam::interactionLists<ParticleType>::cellReceivingReferralLists() const
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Foam::label
|
inline Foam::label
|
||||||
Foam::interactionLists<ParticleType>::nInteractingProcs() const
|
Foam::InteractionLists<ParticleType>::nInteractingProcs() const
|
||||||
{
|
{
|
||||||
return cellReceivingReferralLists_.size();
|
return cellReceivingReferralLists_.size();
|
||||||
}
|
}
|
||||||
@ -24,13 +24,13 @@ License
|
|||||||
|
|
||||||
\*----------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "referredCell.H"
|
#include "ReferredCell.H"
|
||||||
#include "interactionLists.H"
|
#include "InteractionLists.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCell<ParticleType>::setConstructionData
|
void Foam::ReferredCell<ParticleType>::setConstructionData
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const label sourceCell
|
const label sourceCell
|
||||||
@ -92,7 +92,7 @@ void Foam::referredCell<ParticleType>::setConstructionData
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCell<ParticleType>::locallyMapEdgeList
|
void Foam::ReferredCell<ParticleType>::locallyMapEdgeList
|
||||||
(
|
(
|
||||||
const labelList& points,
|
const labelList& points,
|
||||||
const edgeList& sourceCellEdges
|
const edgeList& sourceCellEdges
|
||||||
@ -114,7 +114,7 @@ void Foam::referredCell<ParticleType>::locallyMapEdgeList
|
|||||||
|| edges_[sCE].end() == -1
|
|| edges_[sCE].end() == -1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::referredCell::locallyMapEdgeList")
|
FatalErrorIn("Foam::ReferredCell::locallyMapEdgeList")
|
||||||
<< "edgeList and points labelList for "
|
<< "edgeList and points labelList for "
|
||||||
<< "referred cell do not match: "
|
<< "referred cell do not match: "
|
||||||
<< nl << "points: " << points
|
<< nl << "points: " << points
|
||||||
@ -126,7 +126,7 @@ void Foam::referredCell<ParticleType>::locallyMapEdgeList
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCell<ParticleType>::locallyMapFaceList
|
void Foam::ReferredCell<ParticleType>::locallyMapFaceList
|
||||||
(
|
(
|
||||||
const labelList& points,
|
const labelList& points,
|
||||||
const labelListList& sourceCellFaces
|
const labelListList& sourceCellFaces
|
||||||
@ -148,7 +148,7 @@ void Foam::referredCell<ParticleType>::locallyMapFaceList
|
|||||||
|
|
||||||
if (localFace[p] == -1)
|
if (localFace[p] == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::referredCell::locallyMapEdgeList")
|
FatalErrorIn("Foam::ReferredCell::locallyMapEdgeList")
|
||||||
<< "edgeList and points labelList for "
|
<< "edgeList and points labelList for "
|
||||||
<< "referred cell do not match: "
|
<< "referred cell do not match: "
|
||||||
<< nl << "points: " << points
|
<< nl << "points: " << points
|
||||||
@ -161,7 +161,7 @@ void Foam::referredCell<ParticleType>::locallyMapFaceList
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vector Foam::referredCell<ParticleType>::referPosition
|
Foam::vector Foam::ReferredCell<ParticleType>::referPosition
|
||||||
(
|
(
|
||||||
const vector& positionToRefer
|
const vector& positionToRefer
|
||||||
)
|
)
|
||||||
@ -172,7 +172,7 @@ Foam::vector Foam::referredCell<ParticleType>::referPosition
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vectorList
|
Foam::vectorList
|
||||||
Foam::referredCell<ParticleType>::referPositions
|
Foam::ReferredCell<ParticleType>::referPositions
|
||||||
(
|
(
|
||||||
const vectorList& positionsToRefer
|
const vectorList& positionsToRefer
|
||||||
)
|
)
|
||||||
@ -183,7 +183,7 @@ Foam::referredCell<ParticleType>::referPositions
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vector
|
Foam::vector
|
||||||
Foam::referredCell<ParticleType>::rotateVector(const vector& vectorToRotate)
|
Foam::ReferredCell<ParticleType>::rotateVector(const vector& vectorToRotate)
|
||||||
{
|
{
|
||||||
return rotation_ & vectorToRotate;
|
return rotation_ & vectorToRotate;
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ Foam::referredCell<ParticleType>::rotateVector(const vector& vectorToRotate)
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vectorList
|
Foam::vectorList
|
||||||
Foam::referredCell<ParticleType>::rotateVectors
|
Foam::ReferredCell<ParticleType>::rotateVectors
|
||||||
(
|
(
|
||||||
const vectorList& vectorsToRotate
|
const vectorList& vectorsToRotate
|
||||||
)
|
)
|
||||||
@ -203,7 +203,7 @@ Foam::referredCell<ParticleType>::rotateVectors
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCell<ParticleType>::referredCell()
|
Foam::ReferredCell<ParticleType>::ReferredCell()
|
||||||
:
|
:
|
||||||
IDLList<ParticleType>(),
|
IDLList<ParticleType>(),
|
||||||
sourceProc_(-1),
|
sourceProc_(-1),
|
||||||
@ -216,7 +216,7 @@ Foam::referredCell<ParticleType>::referredCell()
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCell<ParticleType>::referredCell
|
Foam::ReferredCell<ParticleType>::ReferredCell
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const label sourceProc,
|
const label sourceProc,
|
||||||
@ -236,7 +236,7 @@ Foam::referredCell<ParticleType>::referredCell
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCell<ParticleType>::referredCell
|
Foam::ReferredCell<ParticleType>::ReferredCell
|
||||||
(
|
(
|
||||||
const label sourceProc,
|
const label sourceProc,
|
||||||
const label sourceCell,
|
const label sourceCell,
|
||||||
@ -270,7 +270,7 @@ Foam::referredCell<ParticleType>::referredCell
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCell<ParticleType>::referredCell
|
Foam::ReferredCell<ParticleType>::ReferredCell
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const label sourceProc,
|
const label sourceProc,
|
||||||
@ -295,7 +295,7 @@ Foam::referredCell<ParticleType>::referredCell
|
|||||||
|
|
||||||
offset_ = cD - (rotation_ & cS);
|
offset_ = cD - (rotation_ & cS);
|
||||||
|
|
||||||
// Allow sourceCell = -1 to create a dummy referredCell
|
// Allow sourceCell = -1 to create a dummy ReferredCell
|
||||||
// to obtain the transformation
|
// to obtain the transformation
|
||||||
|
|
||||||
if(sourceCell >= 0)
|
if(sourceCell >= 0)
|
||||||
@ -308,14 +308,14 @@ Foam::referredCell<ParticleType>::referredCell
|
|||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCell<ParticleType>::~referredCell()
|
Foam::ReferredCell<ParticleType>::~ReferredCell()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCell<ParticleType> Foam::referredCell<ParticleType>::reRefer
|
Foam::ReferredCell<ParticleType> Foam::ReferredCell<ParticleType>::reRefer
|
||||||
(
|
(
|
||||||
const vector& cS,
|
const vector& cS,
|
||||||
const vector& cD,
|
const vector& cD,
|
||||||
@ -334,7 +334,7 @@ Foam::referredCell<ParticleType> Foam::referredCell<ParticleType>::reRefer
|
|||||||
|
|
||||||
vector reReferredOffset = newOffset + (newRotation & offset_);
|
vector reReferredOffset = newOffset + (newRotation & offset_);
|
||||||
|
|
||||||
return referredCell
|
return ReferredCell
|
||||||
(
|
(
|
||||||
sourceProc_,
|
sourceProc_,
|
||||||
sourceCell_,
|
sourceCell_,
|
||||||
@ -350,7 +350,7 @@ Foam::referredCell<ParticleType> Foam::referredCell<ParticleType>::reRefer
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vector Foam::referredCell<ParticleType>::referPosition
|
Foam::vector Foam::ReferredCell<ParticleType>::referPosition
|
||||||
(
|
(
|
||||||
const vector& positionToRefer
|
const vector& positionToRefer
|
||||||
) const
|
) const
|
||||||
@ -360,7 +360,7 @@ Foam::vector Foam::referredCell<ParticleType>::referPosition
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vectorList Foam::referredCell<ParticleType>::referPosition
|
Foam::vectorList Foam::ReferredCell<ParticleType>::referPosition
|
||||||
(
|
(
|
||||||
const vectorList& positionsToRefer
|
const vectorList& positionsToRefer
|
||||||
) const
|
) const
|
||||||
@ -370,7 +370,7 @@ Foam::vectorList Foam::referredCell<ParticleType>::referPosition
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vector Foam::referredCell<ParticleType>::rotateVector
|
Foam::vector Foam::ReferredCell<ParticleType>::rotateVector
|
||||||
(
|
(
|
||||||
const vector& vectorToRotate
|
const vector& vectorToRotate
|
||||||
) const
|
) const
|
||||||
@ -380,7 +380,7 @@ Foam::vector Foam::referredCell<ParticleType>::rotateVector
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::vectorList Foam::referredCell<ParticleType>::rotateVectors
|
Foam::vectorList Foam::ReferredCell<ParticleType>::rotateVectors
|
||||||
(
|
(
|
||||||
const vectorList& vectorsToRotate
|
const vectorList& vectorsToRotate
|
||||||
) const
|
) const
|
||||||
@ -390,7 +390,7 @@ Foam::vectorList Foam::referredCell<ParticleType>::rotateVectors
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCell<ParticleType>::referInParticle
|
void Foam::ReferredCell<ParticleType>::referInParticle
|
||||||
(
|
(
|
||||||
ParticleType* incomingParticlePtr
|
ParticleType* incomingParticlePtr
|
||||||
)
|
)
|
||||||
@ -409,9 +409,9 @@ void Foam::referredCell<ParticleType>::referInParticle
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::referredCell<ParticleType>::duplicate
|
bool Foam::ReferredCell<ParticleType>::duplicate
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& refCellDupl
|
const ReferredCell<ParticleType>& refCellDupl
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
@ -419,13 +419,13 @@ bool Foam::referredCell<ParticleType>::duplicate
|
|||||||
sourceProc_ == refCellDupl.sourceProc()
|
sourceProc_ == refCellDupl.sourceProc()
|
||||||
&& sourceCell_ == refCellDupl.sourceCell()
|
&& sourceCell_ == refCellDupl.sourceCell()
|
||||||
&& mag(offset_ - refCellDupl.offset())
|
&& mag(offset_ - refCellDupl.offset())
|
||||||
< interactionLists<ParticleType>::transTol
|
< InteractionLists<ParticleType>::transTol
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::referredCell<ParticleType>::duplicate
|
bool Foam::ReferredCell<ParticleType>::duplicate
|
||||||
(
|
(
|
||||||
const label procNo,
|
const label procNo,
|
||||||
const label nCells
|
const label nCells
|
||||||
@ -436,7 +436,7 @@ bool Foam::referredCell<ParticleType>::duplicate
|
|||||||
sourceProc_ == procNo
|
sourceProc_ == procNo
|
||||||
&& sourceCell_ < nCells
|
&& sourceCell_ < nCells
|
||||||
&& mag(offset_)
|
&& mag(offset_)
|
||||||
< interactionLists<ParticleType>::transTol
|
< InteractionLists<ParticleType>::transTol
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,13 +446,13 @@ bool Foam::referredCell<ParticleType>::duplicate
|
|||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool Foam::operator==
|
bool Foam::operator==
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& a,
|
const ReferredCell<ParticleType>& a,
|
||||||
const referredCell<ParticleType>& b
|
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>
|
template<class ParticleType>
|
||||||
bool Foam::operator!=
|
bool Foam::operator!=
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& a,
|
const ReferredCell<ParticleType>& a,
|
||||||
const referredCell<ParticleType>& b
|
const ReferredCell<ParticleType>& b
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return !(a == b);
|
return !(a == b);
|
||||||
@ -469,7 +469,7 @@ bool Foam::operator!=
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::Istream& Foam::operator>>(Istream& is, referredCell<ParticleType>& rC)
|
Foam::Istream& Foam::operator>>(Istream& is, ReferredCell<ParticleType>& rC)
|
||||||
{
|
{
|
||||||
|
|
||||||
is >> rC.sourceProc_
|
is >> rC.sourceProc_
|
||||||
@ -484,7 +484,7 @@ Foam::Istream& Foam::operator>>(Istream& is, referredCell<ParticleType>& rC)
|
|||||||
|
|
||||||
is.check
|
is.check
|
||||||
(
|
(
|
||||||
"Istream& operator<<(Istream& f, const referredCell<ParticleType>& rC"
|
"Istream& operator<<(Istream& f, const ReferredCell<ParticleType>& rC"
|
||||||
);
|
);
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
@ -495,7 +495,7 @@ template<class ParticleType>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const referredCell<ParticleType>& rC
|
const ReferredCell<ParticleType>& rC
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
|
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"Ostream& operator<<(Ostream& f, const referredCell<ParticleType>& rC"
|
"Ostream& operator<<(Ostream& f, const ReferredCell<ParticleType>& rC"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
@ -23,18 +23,18 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::referredCell
|
Foam::ReferredCell
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
referredCellI.H
|
ReferredCellI.H
|
||||||
referredCell.C
|
ReferredCell.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef referredCell_H
|
#ifndef ReferredCell_H
|
||||||
#define referredCell_H
|
#define ReferredCell_H
|
||||||
|
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "vectorList.H"
|
#include "vectorList.H"
|
||||||
@ -54,43 +54,43 @@ namespace Foam
|
|||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class referredCell;
|
class ReferredCell;
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool operator==
|
bool operator==
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& a,
|
const ReferredCell<ParticleType>& a,
|
||||||
const referredCell<ParticleType>& b
|
const ReferredCell<ParticleType>& b
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
bool operator!=
|
bool operator!=
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& a,
|
const ReferredCell<ParticleType>& a,
|
||||||
const referredCell<ParticleType>& b
|
const ReferredCell<ParticleType>& b
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Istream& operator>>
|
Istream& operator>>
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
referredCell<ParticleType>&
|
ReferredCell<ParticleType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const referredCell<ParticleType>&
|
const ReferredCell<ParticleType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class referredCell Declaration
|
Class ReferredCell Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class referredCell
|
class ReferredCell
|
||||||
:
|
:
|
||||||
public IDLList<ParticleType>
|
public IDLList<ParticleType>
|
||||||
{
|
{
|
||||||
@ -153,10 +153,10 @@ public:
|
|||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
|
|
||||||
referredCell();
|
ReferredCell();
|
||||||
|
|
||||||
//- Construct from components with external edge information
|
//- Construct from components with external edge information
|
||||||
referredCell
|
ReferredCell
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const label sourceProc,
|
const label sourceProc,
|
||||||
@ -166,7 +166,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from components with existing local edge information
|
//- Construct from components with existing local edge information
|
||||||
referredCell
|
ReferredCell
|
||||||
(
|
(
|
||||||
const label sourceProc,
|
const label sourceProc,
|
||||||
const label sourceCell,
|
const label sourceCell,
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
// Order of vectors important (S = source, D = Destination).
|
// Order of vectors important (S = source, D = Destination).
|
||||||
// External edge information.
|
// External edge information.
|
||||||
|
|
||||||
referredCell
|
ReferredCell
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const label sourceProc,
|
const label sourceProc,
|
||||||
@ -199,14 +199,14 @@ public:
|
|||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
virtual ~referredCell();
|
virtual ~ReferredCell();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// 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.
|
// calculated and refer it on again, retaining same source info.
|
||||||
referredCell reRefer
|
ReferredCell reRefer
|
||||||
(
|
(
|
||||||
const vector& cS,
|
const vector& cS,
|
||||||
const vector& cD,
|
const vector& cD,
|
||||||
@ -234,16 +234,16 @@ public:
|
|||||||
void referInParticle(ParticleType* incomingParticlePtr);
|
void referInParticle(ParticleType* incomingParticlePtr);
|
||||||
|
|
||||||
//- duplicate() function to test whether a referred or real cell
|
//- 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
|
// Can be used bi-directionally - i.e. can be called on an existing
|
||||||
// referred cell with a proposed referredCell as argument,
|
// referred cell with a proposed ReferredCell as argument,
|
||||||
// or vice versa. Can only be called by a proposed referredCell with
|
// 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
|
// 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
|
// A duplicate cell is defined as one which has the same source
|
||||||
// processor, source cell, and an equal offset. Real cells have zero
|
// processor, source cell, and an equal offset. Real cells have zero
|
||||||
// offset by definition.
|
// offset by definition.
|
||||||
bool duplicate(const referredCell& refCellDupl) const;
|
bool duplicate(const ReferredCell& refCellDupl) const;
|
||||||
|
|
||||||
bool duplicate(const label procNo, const label nCells) const;
|
bool duplicate(const label procNo, const label nCells) const;
|
||||||
|
|
||||||
@ -277,14 +277,14 @@ public:
|
|||||||
|
|
||||||
friend bool operator== <ParticleType>
|
friend bool operator== <ParticleType>
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& a,
|
const ReferredCell<ParticleType>& a,
|
||||||
const referredCell<ParticleType>& b
|
const ReferredCell<ParticleType>& b
|
||||||
);
|
);
|
||||||
|
|
||||||
friend bool operator!= <ParticleType>
|
friend bool operator!= <ParticleType>
|
||||||
(
|
(
|
||||||
const referredCell<ParticleType>& a,
|
const ReferredCell<ParticleType>& a,
|
||||||
const referredCell<ParticleType>& b
|
const ReferredCell<ParticleType>& b
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -293,13 +293,13 @@ public:
|
|||||||
friend Istream& operator>> <ParticleType>
|
friend Istream& operator>> <ParticleType>
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
referredCell<ParticleType>&
|
ReferredCell<ParticleType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<< <ParticleType>
|
friend Ostream& operator<< <ParticleType>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const referredCell<ParticleType>&
|
const ReferredCell<ParticleType>&
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -310,12 +310,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "referredCellI.H"
|
#include "ReferredCellI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "referredCell.C"
|
# include "ReferredCell.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -27,28 +27,28 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Foam::label Foam::referredCell<ParticleType>::sourceProc() const
|
inline Foam::label Foam::ReferredCell<ParticleType>::sourceProc() const
|
||||||
{
|
{
|
||||||
return sourceProc_;
|
return sourceProc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Foam::label Foam::referredCell<ParticleType>::sourceCell() const
|
inline Foam::label Foam::ReferredCell<ParticleType>::sourceCell() const
|
||||||
{
|
{
|
||||||
return sourceCell_;
|
return sourceCell_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::vector& Foam::referredCell<ParticleType>::offset() const
|
inline const Foam::vector& Foam::ReferredCell<ParticleType>::offset() const
|
||||||
{
|
{
|
||||||
return offset_;
|
return offset_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::tensor& Foam::referredCell<ParticleType>::rotation() const
|
inline const Foam::tensor& Foam::ReferredCell<ParticleType>::rotation() const
|
||||||
{
|
{
|
||||||
return rotation_;
|
return rotation_;
|
||||||
}
|
}
|
||||||
@ -56,14 +56,14 @@ inline const Foam::tensor& Foam::referredCell<ParticleType>::rotation() const
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::vectorList&
|
inline const Foam::vectorList&
|
||||||
Foam::referredCell<ParticleType>::vertexPositions() const
|
Foam::ReferredCell<ParticleType>::vertexPositions() const
|
||||||
{
|
{
|
||||||
return vertexPositions_;
|
return vertexPositions_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::edgeList& Foam::referredCell<ParticleType>::edges() const
|
inline const Foam::edgeList& Foam::ReferredCell<ParticleType>::edges() const
|
||||||
{
|
{
|
||||||
return edges_;
|
return edges_;
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ inline const Foam::edgeList& Foam::referredCell<ParticleType>::edges() const
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::labelListList&
|
inline const Foam::labelListList&
|
||||||
Foam::referredCell<ParticleType>::faces() const
|
Foam::ReferredCell<ParticleType>::faces() const
|
||||||
{
|
{
|
||||||
return faces_;
|
return faces_;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ Foam::referredCell<ParticleType>::faces() const
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::vectorList&
|
inline const Foam::vectorList&
|
||||||
Foam::referredCell<ParticleType>::faceCentres() const
|
Foam::ReferredCell<ParticleType>::faceCentres() const
|
||||||
{
|
{
|
||||||
return faceCentres_;
|
return faceCentres_;
|
||||||
}
|
}
|
||||||
@ -87,14 +87,14 @@ Foam::referredCell<ParticleType>::faceCentres() const
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::vectorList&
|
inline const Foam::vectorList&
|
||||||
Foam::referredCell<ParticleType>::faceAreas() const
|
Foam::ReferredCell<ParticleType>::faceAreas() const
|
||||||
{
|
{
|
||||||
return faceAreas_;
|
return faceAreas_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline Foam::labelList& Foam::referredCell<ParticleType>::realCells()
|
inline Foam::labelList& Foam::ReferredCell<ParticleType>::realCells()
|
||||||
{
|
{
|
||||||
return realCellsForInteraction_;
|
return realCellsForInteraction_;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ inline Foam::labelList& Foam::referredCell<ParticleType>::realCells()
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::labelList&
|
inline const Foam::labelList&
|
||||||
Foam::referredCell<ParticleType>::realCellsForInteraction() const
|
Foam::ReferredCell<ParticleType>::realCellsForInteraction() const
|
||||||
{
|
{
|
||||||
return realCellsForInteraction_;
|
return realCellsForInteraction_;
|
||||||
}
|
}
|
||||||
@ -24,8 +24,8 @@ License
|
|||||||
|
|
||||||
\*----------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "referredCellList.H"
|
#include "ReferredCellList.H"
|
||||||
#include "interactionLists.H"
|
#include "InteractionLists.H"
|
||||||
#include "polyBoundaryMeshEntries.H"
|
#include "polyBoundaryMeshEntries.H"
|
||||||
#include "PstreamCombineReduceOps.H"
|
#include "PstreamCombineReduceOps.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
@ -36,7 +36,7 @@ License
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCellList<ParticleType>::buildReferredCellList
|
void Foam::ReferredCellList<ParticleType>::buildReferredCellList
|
||||||
(
|
(
|
||||||
bool pointPointListBuild
|
bool pointPointListBuild
|
||||||
)
|
)
|
||||||
@ -45,7 +45,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
|
|
||||||
const polyMesh& mesh(il_.mesh());
|
const polyMesh& mesh(il_.mesh());
|
||||||
|
|
||||||
DynamicList<referredCell<ParticleType> > referredInteractionList;
|
DynamicList<ReferredCell<ParticleType> > referredInteractionList;
|
||||||
|
|
||||||
// realCellsWithinRangeOfAnyReferringPatch
|
// realCellsWithinRangeOfAnyReferringPatch
|
||||||
DynamicList<label> rCellsWRRP;
|
DynamicList<label> rCellsWRRP;
|
||||||
@ -122,7 +122,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn ("referredCellList.C")
|
FatalErrorIn ("ReferredCellList.C")
|
||||||
<< nl << "unable to read undecomposed boundary file from "
|
<< nl << "unable to read undecomposed boundary file from "
|
||||||
<< "constant/polyMesh" << nl
|
<< "constant/polyMesh" << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -302,7 +302,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
{
|
{
|
||||||
if (processorPatchSegmentMapping[pP][faceI] == nUP)
|
if (processorPatchSegmentMapping[pP][faceI] == nUP)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType> testRefCell
|
ReferredCell<ParticleType> testRefCell
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
-1,
|
-1,
|
||||||
@ -329,18 +329,18 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
sum(mag(refOff-refOff[0]))/refOff.size()
|
sum(mag(refOff-refOff[0]))/refOff.size()
|
||||||
> interactionLists<ParticleType>::transTol
|
> InteractionLists<ParticleType>::transTol
|
||||||
|| sum(mag(refTrans-refTrans[0]))/refTrans.size()
|
|| sum(mag(refTrans-refTrans[0]))/refTrans.size()
|
||||||
> interactionLists<ParticleType>::transTol
|
> InteractionLists<ParticleType>::transTol
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn ("referredCellList.C")
|
FatalErrorIn ("ReferredCellList.C")
|
||||||
<< nl << "Face pairs on patch "
|
<< nl << "Face pairs on patch "
|
||||||
<< patch.name()
|
<< patch.name()
|
||||||
<< ", segment " << patchNames[nUP]
|
<< ", segment " << patchNames[nUP]
|
||||||
<< " do not give the same referring "
|
<< " do not give the same referring "
|
||||||
<< " transformations to within tolerance of "
|
<< " transformations to within tolerance of "
|
||||||
<< interactionLists<ParticleType>::transTol << nl
|
<< InteractionLists<ParticleType>::transTol << nl
|
||||||
<< " Referring offsets:" << refOff << nl
|
<< " Referring offsets:" << refOff << nl
|
||||||
<< " Average sum of mag difference: "
|
<< " Average sum of mag difference: "
|
||||||
<< sum(mag(refOff-refOff[0]))/refOff.size() << nl
|
<< sum(mag(refOff-refOff[0]))/refOff.size() << nl
|
||||||
@ -400,7 +400,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
faceL++, faceM++
|
faceL++, faceM++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType> testRefCell
|
ReferredCell<ParticleType> testRefCell
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
-1,
|
-1,
|
||||||
@ -419,17 +419,17 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
sum(mag(refOff - refOff[0]))/(patch.size()/2)
|
sum(mag(refOff - refOff[0]))/(patch.size()/2)
|
||||||
> interactionLists<ParticleType>::transTol
|
> InteractionLists<ParticleType>::transTol
|
||||||
|| sum(mag(refTrans - refTrans[0]))/(patch.size()/2)
|
|| 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 "
|
<< nl << "Face pairs on patch "
|
||||||
<< patch.name()
|
<< patch.name()
|
||||||
<< " do not give the same referring "
|
<< " do not give the same referring "
|
||||||
<< " transformations to within tolerance of "
|
<< " transformations to within tolerance of "
|
||||||
<< interactionLists<ParticleType>::transTol
|
<< InteractionLists<ParticleType>::transTol
|
||||||
<< nl << " Referring offsets:" << refOff << nl
|
<< nl << " Referring offsets:" << refOff << nl
|
||||||
<< " Average sum of mag difference: "
|
<< " Average sum of mag difference: "
|
||||||
<< sum(mag(refOff - refOff[0]))/refOff.size()
|
<< sum(mag(refOff - refOff[0]))/refOff.size()
|
||||||
@ -534,7 +534,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
{
|
{
|
||||||
const label realCell = realCellsFoundInRange[cFIR];
|
const label realCell = realCellsFoundInRange[cFIR];
|
||||||
|
|
||||||
referredCell<ParticleType> cellToRefer
|
ReferredCell<ParticleType> cellToRefer
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
Pstream::myProcNo(),
|
Pstream::myProcNo(),
|
||||||
@ -601,9 +601,9 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
|
|
||||||
referredInteractionList.shrink();
|
referredInteractionList.shrink();
|
||||||
|
|
||||||
labelList referredCellsFoundInRange
|
labelList ReferredCellsFoundInRange
|
||||||
(
|
(
|
||||||
il_.referredCellsInRangeOfSegment
|
il_.ReferredCellsInRangeOfSegment
|
||||||
(
|
(
|
||||||
referredInteractionList,
|
referredInteractionList,
|
||||||
meshFacesOnThisSegment,
|
meshFacesOnThisSegment,
|
||||||
@ -612,15 +612,15 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(referredCellsFoundInRange,cFIR)
|
forAll(ReferredCellsFoundInRange,cFIR)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType>& existingRefCell =
|
ReferredCell<ParticleType>& existingRefCell =
|
||||||
referredInteractionList
|
referredInteractionList
|
||||||
[
|
[
|
||||||
referredCellsFoundInRange[cFIR]
|
ReferredCellsFoundInRange[cFIR]
|
||||||
];
|
];
|
||||||
|
|
||||||
referredCell<ParticleType> cellToReRefer =
|
ReferredCell<ParticleType> cellToReRefer =
|
||||||
existingRefCell.reRefer
|
existingRefCell.reRefer
|
||||||
(
|
(
|
||||||
patch.faceCentres()[0],
|
patch.faceCentres()[0],
|
||||||
@ -766,7 +766,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
{
|
{
|
||||||
const label realCell = realCellsFoundInRange[cFIR];
|
const label realCell = realCellsFoundInRange[cFIR];
|
||||||
|
|
||||||
referredCell<ParticleType> cellToRefer
|
ReferredCell<ParticleType> cellToRefer
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
Pstream::myProcNo(),
|
Pstream::myProcNo(),
|
||||||
@ -833,8 +833,8 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
|
|
||||||
referredInteractionList.shrink();
|
referredInteractionList.shrink();
|
||||||
|
|
||||||
referredCellsFoundInRange =
|
ReferredCellsFoundInRange =
|
||||||
il_.referredCellsInRangeOfSegment
|
il_.ReferredCellsInRangeOfSegment
|
||||||
(
|
(
|
||||||
referredInteractionList,
|
referredInteractionList,
|
||||||
meshFacesOnThisSegment,
|
meshFacesOnThisSegment,
|
||||||
@ -842,15 +842,15 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
meshPointsOnThisSegment
|
meshPointsOnThisSegment
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(referredCellsFoundInRange,cFIR)
|
forAll(ReferredCellsFoundInRange,cFIR)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType>& existingRefCell =
|
ReferredCell<ParticleType>& existingRefCell =
|
||||||
referredInteractionList
|
referredInteractionList
|
||||||
[
|
[
|
||||||
referredCellsFoundInRange[cFIR]
|
ReferredCellsFoundInRange[cFIR]
|
||||||
];
|
];
|
||||||
|
|
||||||
referredCell<ParticleType> cellToReRefer =
|
ReferredCell<ParticleType> cellToReRefer =
|
||||||
existingRefCell.reRefer
|
existingRefCell.reRefer
|
||||||
(
|
(
|
||||||
patch.faceCentres()[patch.size()/2],
|
patch.faceCentres()[patch.size()/2],
|
||||||
@ -919,7 +919,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
mesh.boundaryMesh()[procPatches[pP]]
|
mesh.boundaryMesh()[procPatches[pP]]
|
||||||
);
|
);
|
||||||
|
|
||||||
DynamicList<referredCell<ParticleType> > referredCellsToTransfer;
|
DynamicList<ReferredCell<ParticleType> > ReferredCellsToTransfer;
|
||||||
|
|
||||||
const vectorList& neighbFaceCentres =
|
const vectorList& neighbFaceCentres =
|
||||||
allNeighbourFaceCentres[pP];
|
allNeighbourFaceCentres[pP];
|
||||||
@ -1023,7 +1023,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
{
|
{
|
||||||
if (faceT == -1)
|
if (faceT == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn ("referredCellList.C")
|
FatalErrorIn ("ReferredCellList.C")
|
||||||
<< nl << "faceT == -1 encountered but "
|
<< nl << "faceT == -1 encountered but "
|
||||||
<< meshFacesOnThisSegment.size()
|
<< meshFacesOnThisSegment.size()
|
||||||
<< " faces found on patch segment."
|
<< " faces found on patch segment."
|
||||||
@ -1051,7 +1051,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
const label realCell =
|
const label realCell =
|
||||||
realCellsFoundInRange[cFIR];
|
realCellsFoundInRange[cFIR];
|
||||||
|
|
||||||
referredCell<ParticleType> cellToRefer
|
ReferredCell<ParticleType> cellToRefer
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
Pstream::myProcNo(),
|
Pstream::myProcNo(),
|
||||||
@ -1063,7 +1063,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
/(mag(neighbFaceAreas[faceT]) + VSMALL)
|
/(mag(neighbFaceAreas[faceT]) + VSMALL)
|
||||||
);
|
);
|
||||||
|
|
||||||
referredCellsToTransfer.append(cellToRefer);
|
ReferredCellsToTransfer.append(cellToRefer);
|
||||||
|
|
||||||
// add real cells found in range of processor
|
// add real cells found in range of processor
|
||||||
// patch to whole mesh list
|
// patch to whole mesh list
|
||||||
@ -1077,9 +1077,9 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
|
|
||||||
referredInteractionList.shrink();
|
referredInteractionList.shrink();
|
||||||
|
|
||||||
labelList referredCellsFoundInRange
|
labelList ReferredCellsFoundInRange
|
||||||
(
|
(
|
||||||
il_.referredCellsInRangeOfSegment
|
il_.ReferredCellsInRangeOfSegment
|
||||||
(
|
(
|
||||||
referredInteractionList,
|
referredInteractionList,
|
||||||
meshFacesOnThisSegment,
|
meshFacesOnThisSegment,
|
||||||
@ -1088,15 +1088,15 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(referredCellsFoundInRange,cFIR)
|
forAll(ReferredCellsFoundInRange,cFIR)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType>& existingRefCell =
|
ReferredCell<ParticleType>& existingRefCell =
|
||||||
referredInteractionList
|
referredInteractionList
|
||||||
[
|
[
|
||||||
referredCellsFoundInRange[cFIR]
|
ReferredCellsFoundInRange[cFIR]
|
||||||
];
|
];
|
||||||
|
|
||||||
referredCell<ParticleType> cellToReRefer =
|
ReferredCell<ParticleType> cellToReRefer =
|
||||||
existingRefCell.reRefer
|
existingRefCell.reRefer
|
||||||
(
|
(
|
||||||
patch.faceCentres()[faceT],
|
patch.faceCentres()[faceT],
|
||||||
@ -1106,12 +1106,12 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
/(mag(neighbFaceAreas[faceT]) + VSMALL)
|
/(mag(neighbFaceAreas[faceT]) + VSMALL)
|
||||||
);
|
);
|
||||||
|
|
||||||
referredCellsToTransfer.append(cellToReRefer);
|
ReferredCellsToTransfer.append(cellToReRefer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
referredCellsToTransfer.shrink();
|
ReferredCellsToTransfer.shrink();
|
||||||
|
|
||||||
// Send these cells to the neighbouring processor.
|
// Send these cells to the neighbouring processor.
|
||||||
|
|
||||||
@ -1122,7 +1122,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
patch.neighbProcNo()
|
patch.neighbProcNo()
|
||||||
);
|
);
|
||||||
|
|
||||||
toNeighbProc << referredCellsToTransfer;
|
toNeighbProc << ReferredCellsToTransfer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1136,8 +1136,8 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
|
|
||||||
// Receive the cells from neighbour
|
// Receive the cells from neighbour
|
||||||
|
|
||||||
List<referredCell<ParticleType> >
|
List<ReferredCell<ParticleType> >
|
||||||
referredCellsFromNeighbour(patch.size());
|
ReferredCellsFromNeighbour(patch.size());
|
||||||
|
|
||||||
{
|
{
|
||||||
IPstream fromNeighbProc
|
IPstream fromNeighbProc
|
||||||
@ -1146,16 +1146,16 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
patch.neighbProcNo()
|
patch.neighbProcNo()
|
||||||
);
|
);
|
||||||
|
|
||||||
fromNeighbProc >> referredCellsFromNeighbour;
|
fromNeighbProc >> ReferredCellsFromNeighbour;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if they are duplicates, if not append
|
// Check to see if they are duplicates, if not append
|
||||||
// them to the referredInteractionList
|
// them to the referredInteractionList
|
||||||
|
|
||||||
forAll(referredCellsFromNeighbour,rCFN)
|
forAll(ReferredCellsFromNeighbour,rCFN)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType>& cellToRefer =
|
ReferredCell<ParticleType>& cellToRefer =
|
||||||
referredCellsFromNeighbour[rCFN];
|
ReferredCellsFromNeighbour[rCFN];
|
||||||
|
|
||||||
// Test all existing referred and real cells to check
|
// Test all existing referred and real cells to check
|
||||||
// duplicates are not being made or cells aren't being
|
// duplicates are not being made or cells aren't being
|
||||||
@ -1294,7 +1294,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
{
|
{
|
||||||
const polyMesh& mesh(il_.mesh());
|
const polyMesh& mesh(il_.mesh());
|
||||||
|
|
||||||
referredCell<ParticleType>& refCell = (*this)[rC];
|
ReferredCell<ParticleType>& refCell = (*this)[rC];
|
||||||
|
|
||||||
DynamicList<label> realCellsFoundInRange;
|
DynamicList<label> realCellsFoundInRange;
|
||||||
|
|
||||||
@ -1422,7 +1422,7 @@ void Foam::referredCellList<ParticleType>::buildReferredCellList
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCellList<ParticleType>::storeParticles
|
void Foam::ReferredCellList<ParticleType>::storeParticles
|
||||||
(
|
(
|
||||||
const receivingReferralList& rRL,
|
const receivingReferralList& rRL,
|
||||||
const labelList& destinationReferredCell,
|
const labelList& destinationReferredCell,
|
||||||
@ -1445,7 +1445,7 @@ void Foam::referredCellList<ParticleType>::storeParticles
|
|||||||
|
|
||||||
forAll(refCellsToReferTo, refCellI)
|
forAll(refCellsToReferTo, refCellI)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType>& refCellToRefParticlesTo =
|
ReferredCell<ParticleType>& refCellToRefParticlesTo =
|
||||||
(*this)[refCellsToReferTo[refCellI]];
|
(*this)[refCellsToReferTo[refCellI]];
|
||||||
|
|
||||||
refCellToRefParticlesTo.referInParticle
|
refCellToRefParticlesTo.referInParticle
|
||||||
@ -1462,13 +1462,13 @@ void Foam::referredCellList<ParticleType>::storeParticles
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCellList<ParticleType>::referredCellList
|
Foam::ReferredCellList<ParticleType>::ReferredCellList
|
||||||
(
|
(
|
||||||
interactionLists<ParticleType>& il,
|
InteractionLists<ParticleType>& il,
|
||||||
bool pointPointListBuild
|
bool pointPointListBuild
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
List<referredCell<ParticleType> >(),
|
List<ReferredCell<ParticleType> >(),
|
||||||
il_(il),
|
il_(il),
|
||||||
cloud_(il_.mesh(), "referredParticleCloud", IDLList<ParticleType>())
|
cloud_(il_.mesh(), "referredParticleCloud", IDLList<ParticleType>())
|
||||||
|
|
||||||
@ -1478,30 +1478,30 @@ Foam::referredCellList<ParticleType>::referredCellList
|
|||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
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),
|
il_(il),
|
||||||
cloud_(il_.mesh(), IDLList<ParticleType>())
|
cloud_(il_.mesh(), IDLList<ParticleType>())
|
||||||
{
|
{
|
||||||
Info<< "Read referredCellList from disk not implemented" << endl;
|
Info<< "Read ReferredCellList from disk not implemented" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Foam::referredCellList<ParticleType>::~referredCellList()
|
Foam::ReferredCellList<ParticleType>::~ReferredCellList()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::referredCellList<ParticleType>::referParticles
|
void Foam::ReferredCellList<ParticleType>::referParticles
|
||||||
(
|
(
|
||||||
const List<DynamicList<ParticleType*> >& cellOccupancy
|
const List<DynamicList<ParticleType*> >& cellOccupancy
|
||||||
)
|
)
|
||||||
@ -1572,8 +1572,8 @@ void Foam::referredCellList<ParticleType>::referParticles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receive referred particle lists to and distribute to referredCells
|
// Receive referred particle lists to and distribute to ReferredCells
|
||||||
// according to cellReceivingReferralLists, referredCells deal with the
|
// according to cellReceivingReferralLists, ReferredCells deal with the
|
||||||
// transformations themselves
|
// transformations themselves
|
||||||
|
|
||||||
forAll(il_.cellReceivingReferralLists(), cRRL)
|
forAll(il_.cellReceivingReferralLists(), cRRL)
|
||||||
@ -1619,7 +1619,7 @@ void Foam::referredCellList<ParticleType>::referParticles
|
|||||||
|
|
||||||
forAll(*this, refCellI)
|
forAll(*this, refCellI)
|
||||||
{
|
{
|
||||||
referredCell<ParticleType>& refCell = (*this)[refCellI];
|
ReferredCell<ParticleType>& refCell = (*this)[refCellI];
|
||||||
|
|
||||||
forAllIter
|
forAllIter
|
||||||
(
|
(
|
||||||
@ -23,20 +23,20 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::referredCellList
|
Foam::ReferredCellList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
referredCellListI.H
|
ReferredCellListI.H
|
||||||
referredCellList.C
|
ReferredCellList.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef referredCellList_H
|
#ifndef ReferredCellList_H
|
||||||
#define referredCellList_H
|
#define ReferredCellList_H
|
||||||
|
|
||||||
#include "referredCell.H"
|
#include "ReferredCell.H"
|
||||||
#include "sendingReferralList.H"
|
#include "sendingReferralList.H"
|
||||||
#include "receivingReferralList.H"
|
#include "receivingReferralList.H"
|
||||||
|
|
||||||
@ -47,20 +47,20 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class interactionLists;
|
class InteractionLists;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class referredCellList Declaration
|
Class ReferredCellList Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class referredCellList
|
class ReferredCellList
|
||||||
:
|
:
|
||||||
public List<referredCell<ParticleType> >
|
public List<ReferredCell<ParticleType> >
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
const interactionLists<ParticleType>& il_;
|
const InteractionLists<ParticleType>& il_;
|
||||||
|
|
||||||
//- Dummy cloud to give to particles
|
//- Dummy cloud to give to particles
|
||||||
Cloud<ParticleType> cloud_;
|
Cloud<ParticleType> cloud_;
|
||||||
@ -87,19 +87,19 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct lists by searching the mesh
|
//- Construct lists by searching the mesh
|
||||||
referredCellList
|
ReferredCellList
|
||||||
(
|
(
|
||||||
interactionLists<ParticleType>& il,
|
InteractionLists<ParticleType>& il,
|
||||||
bool pointPointListBuild
|
bool pointPointListBuild
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from file
|
//- Construct from file
|
||||||
referredCellList (interactionLists<ParticleType>& il);
|
ReferredCellList (InteractionLists<ParticleType>& il);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
~referredCellList();
|
~ReferredCellList();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -109,7 +109,7 @@ public:
|
|||||||
const List<DynamicList<ParticleType*> >& cellOccupancy
|
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
|
#ifdef NoRepository
|
||||||
# include "referredCellList.C"
|
# include "ReferredCellList.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -27,8 +27,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
inline const Foam::interactionLists<ParticleType>&
|
inline const Foam::InteractionLists<ParticleType>&
|
||||||
Foam::referredCellList<ParticleType>::il() const
|
Foam::ReferredCellList<ParticleType>::il() const
|
||||||
{
|
{
|
||||||
return il_;
|
return il_;
|
||||||
}
|
}
|
||||||
@ -1,9 +1,11 @@
|
|||||||
Cloud = Cloud
|
|
||||||
particle = particle
|
|
||||||
passiveParticle = passiveParticle
|
passiveParticle = passiveParticle
|
||||||
indexedParticle = indexedParticle
|
indexedParticle = indexedParticle
|
||||||
|
referralLists = InteractionLists/referralLists
|
||||||
|
|
||||||
$(passiveParticle)/passiveParticleCloud.C
|
$(passiveParticle)/passiveParticleCloud.C
|
||||||
$(indexedParticle)/indexedParticleCloud.C
|
$(indexedParticle)/indexedParticleCloud.C
|
||||||
|
|
||||||
|
$(referralLists)/sendingReferralList.C
|
||||||
|
$(referralLists)/receivingReferralList.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/liblagrangian
|
LIB = $(FOAM_LIBBIN)/liblagrangian
|
||||||
|
|||||||
@ -84,9 +84,4 @@ phaseProperties/phaseProperties/phasePropertiesIO.C
|
|||||||
phaseProperties/phasePropertiesList/phasePropertiesList.C
|
phaseProperties/phasePropertiesList/phasePropertiesList.C
|
||||||
|
|
||||||
|
|
||||||
// /* interation lists */
|
|
||||||
referralLists = interactionLists/referralLists
|
|
||||||
$(referralLists)/sendingReferralList.C
|
|
||||||
$(referralLists)/receivingReferralList.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate
|
LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate
|
||||||
|
|||||||
@ -135,7 +135,7 @@ void Foam::DeterministicPairForce<CloudType>::collide()
|
|||||||
|
|
||||||
buildCellOccupancy();
|
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* pA_ptr = NULL;
|
||||||
typename CloudType::parcelType* pB_ptr = NULL;
|
typename CloudType::parcelType* pB_ptr = NULL;
|
||||||
@ -180,12 +180,12 @@ void Foam::DeterministicPairForce<CloudType>::collide()
|
|||||||
|
|
||||||
// real-referred interactions
|
// real-referred interactions
|
||||||
|
|
||||||
referredCellList<typename CloudType::parcelType>& ril(il_.ril());
|
ReferredCellList<typename CloudType::parcelType>& ril(il_.ril());
|
||||||
|
|
||||||
// Loop over all referred cells
|
// Loop over all referred cells
|
||||||
forAll(ril, refCellI)
|
forAll(ril, refCellI)
|
||||||
{
|
{
|
||||||
referredCell<typename CloudType::parcelType>& refCell =
|
ReferredCell<typename CloudType::parcelType>& refCell =
|
||||||
ril[refCellI];
|
ril[refCellI];
|
||||||
|
|
||||||
const labelList& realCells = refCell.realCellsForInteraction();
|
const labelList& realCells = refCell.realCellsForInteraction();
|
||||||
|
|||||||
@ -36,7 +36,7 @@ SourceFiles
|
|||||||
#define DeterministicPairForce_H
|
#define DeterministicPairForce_H
|
||||||
|
|
||||||
#include "CollisionModel.H"
|
#include "CollisionModel.H"
|
||||||
#include "interactionLists.H"
|
#include "InteractionLists.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class DeterministicPairForce
|
|||||||
|
|
||||||
//- Interactions lists determining which cells are in
|
//- Interactions lists determining which cells are in
|
||||||
// interaction range of each other
|
// interaction range of each other
|
||||||
interactionLists<typename CloudType::parcelType> il_;
|
InteractionLists<typename CloudType::parcelType> il_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|||||||
@ -2,11 +2,8 @@ interactionLists = interactionLists
|
|||||||
referredMolecule = $(interactionLists)/referredMolecule
|
referredMolecule = $(interactionLists)/referredMolecule
|
||||||
referredCellList = $(interactionLists)/referredCellList
|
referredCellList = $(interactionLists)/referredCellList
|
||||||
referredCell = $(interactionLists)/referredCell
|
referredCell = $(interactionLists)/referredCell
|
||||||
referralLists = $(interactionLists)/referralLists
|
|
||||||
directInteractionList = $(interactionLists)/directInteractionList
|
directInteractionList = $(interactionLists)/directInteractionList
|
||||||
|
|
||||||
$(referralLists)/sendingReferralList.C
|
|
||||||
$(referralLists)/receivingReferralList.C
|
|
||||||
$(referredCellList)/referredCellList.C
|
$(referredCellList)/referredCellList.C
|
||||||
$(referredCell)/referredCell.C
|
$(referredCell)/referredCell.C
|
||||||
$(referredMolecule)/referredMolecule.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