tetPtI -> tetPti

This commit is contained in:
Henry Weller
2016-08-16 11:30:17 +01:00
parent 72bd9fd6cd
commit aaf8819c92
64 changed files with 249 additions and 238 deletions

View File

@ -34,7 +34,7 @@ Foam::tetIndices::tetIndices()
faceBasePtI_(-1), faceBasePtI_(-1),
facePtAI_(-1), facePtAI_(-1),
facePtBI_(-1), facePtBI_(-1),
tetPtI_(-1) tetPti_(-1)
{} {}
@ -53,7 +53,7 @@ Foam::tetIndices::tetIndices
faceBasePtI_(faceBasePtI), faceBasePtI_(faceBasePtI),
facePtAI_(facePtAI), facePtAI_(facePtAI),
facePtBI_(facePtBI), facePtBI_(facePtBI),
tetPtI_(tetPtI) tetPti_(tetPtI)
{} {}
@ -70,7 +70,7 @@ Foam::tetIndices::tetIndices
faceBasePtI_(-1), faceBasePtI_(-1),
facePtAI_(-1), facePtAI_(-1),
facePtBI_(-1), facePtBI_(-1),
tetPtI_(tetPtI) tetPti_(tetPtI)
{ {
const faceList& pFaces = mesh.faces(); const faceList& pFaces = mesh.faces();
const labelList& pOwner = mesh.faceOwner(); const labelList& pOwner = mesh.faceOwner();
@ -81,7 +81,7 @@ Foam::tetIndices::tetIndices
faceBasePtI_ = mesh.tetBasePtIs()[facei_]; faceBasePtI_ = mesh.tetBasePtIs()[facei_];
label facePtI = (tetPtI_ + faceBasePtI_) % f.size(); label facePtI = (tetPti_ + faceBasePtI_) % f.size();
label otherFacePtI = f.fcIndex(facePtI); label otherFacePtI = f.fcIndex(facePtI);
if (own) if (own)

View File

@ -104,7 +104,7 @@ class tetIndices
//- Point on the face, *relative to the base point*, which //- Point on the face, *relative to the base point*, which
// characterises this tet on the face. // characterises this tet on the face.
label tetPtI_; label tetPti_;
public: public:

View File

@ -23,8 +23,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::tetIndices::cell() const Foam::label Foam::tetIndices::cell() const
@ -59,7 +57,7 @@ Foam::label Foam::tetIndices::facePtB() const
Foam::label Foam::tetIndices::tetPt() const Foam::label Foam::tetIndices::tetPt() const
{ {
return tetPtI_; return tetPti_;
} }
@ -185,7 +183,7 @@ Foam::label& Foam::tetIndices::facePtB()
Foam::label& Foam::tetIndices::tetPt() Foam::label& Foam::tetIndices::tetPt()
{ {
return tetPtI_; return tetPti_;
} }

View File

@ -34,7 +34,6 @@ void Foam::wallBoundedParticle::patchInteraction
const scalar trackFraction const scalar trackFraction
) )
{ {
// typedef TrackData::CloudType cloudType;
typedef typename TrackData::cloudType::particleType particleType; typedef typename TrackData::cloudType::particleType particleType;
particleType& p = static_cast<particleType&>(*this); particleType& p = static_cast<particleType&>(*this);
@ -45,7 +44,7 @@ void Foam::wallBoundedParticle::patchInteraction
label origFacei = facei_; label origFacei = facei_;
label patchi = patch(facei_); label patchi = patch(facei_);
// No action taken for tetPtI_ for tetFacei_ here, handled by // No action taken for tetPti_ for tetFacei_ here, handled by
// patch interaction call or later during processor transfer. // patch interaction call or later during processor transfer.
@ -175,7 +174,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
// Check angle to nbrCell tet. Is it in the direction of the // Check angle to nbrCell tet. Is it in the direction of the
// endposition? I.e. since volume of nbr tet is positive the // endposition? I.e. since volume of nbr tet is positive the
// tracking direction should be into the tet. // tracking direction should be into the tet.
tetIndices nbrTi(nbrCelli, tetFacei_, tetPtI_, mesh_); tetIndices nbrTi(nbrCelli, tetFacei_, tetPti_, mesh_);
if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0) if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0)
{ {
// Change into nbrCell. No need to change tetFace, tetPt. // Change into nbrCell. No need to change tetFace, tetPt.

View File

@ -468,7 +468,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel
const scalar Ei, const scalar Ei,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId const label typeId
) )
{ {
@ -480,7 +480,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel
Ei, Ei,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId typeId
); );

View File

@ -455,7 +455,7 @@ public:
const scalar Ei, const scalar Ei,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId const label typeId
); );

View File

@ -183,7 +183,7 @@ public:
const scalar Ei, const scalar Ei,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId const label typeId
); );

View File

@ -60,11 +60,11 @@ inline Foam::DSMCParcel<ParcelType>::DSMCParcel
const scalar Ei, const scalar Ei,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId const label typeId
) )
: :
ParcelType(mesh, position, celli, tetFacei, tetPtI), ParcelType(mesh, position, celli, tetFacei, tetPti),
U_(U), U_(U),
Ei_(Ei), Ei_(Ei),
typeId_(typeId) typeId_(typeId)

View File

@ -44,7 +44,7 @@ Foam::dsmcParcel::dsmcParcel
const scalar Ei, const scalar Ei,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId const label typeId
) )
: :
@ -56,7 +56,7 @@ Foam::dsmcParcel::dsmcParcel
Ei, Ei,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId typeId
) )
{} {}

View File

@ -68,11 +68,11 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label index = 0 const label index = 0
) )
: :
particle(mesh, position, celli, tetFacei, tetPtI), particle(mesh, position, celli, tetFacei, tetPti),
index_(index) index_(index)
{} {}

View File

@ -50,7 +50,7 @@ Foam::particle::particle
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
mesh_(mesh), mesh_(mesh),
@ -59,7 +59,7 @@ Foam::particle::particle
facei_(-1), facei_(-1),
stepFraction_(0.0), stepFraction_(0.0),
tetFacei_(tetFacei), tetFacei_(tetFacei),
tetPtI_(tetPtI), tetPti_(tetPti),
origProc_(Pstream::myProcNo()), origProc_(Pstream::myProcNo()),
origId_(getNewParticleID()) origId_(getNewParticleID())
{} {}
@ -79,7 +79,7 @@ Foam::particle::particle
facei_(-1), facei_(-1),
stepFraction_(0.0), stepFraction_(0.0),
tetFacei_(-1), tetFacei_(-1),
tetPtI_(-1), tetPti_(-1),
origProc_(Pstream::myProcNo()), origProc_(Pstream::myProcNo()),
origId_(getNewParticleID()) origId_(getNewParticleID())
{ {
@ -98,7 +98,7 @@ Foam::particle::particle(const particle& p)
facei_(p.facei_), facei_(p.facei_),
stepFraction_(p.stepFraction_), stepFraction_(p.stepFraction_),
tetFacei_(p.tetFacei_), tetFacei_(p.tetFacei_),
tetPtI_(p.tetPtI_), tetPti_(p.tetPti_),
origProc_(p.origProc_), origProc_(p.origProc_),
origId_(p.origId_) origId_(p.origId_)
{} {}
@ -112,7 +112,7 @@ Foam::particle::particle(const particle& p, const polyMesh& mesh)
facei_(p.facei_), facei_(p.facei_),
stepFraction_(p.stepFraction_), stepFraction_(p.stepFraction_),
tetFacei_(p.tetFacei_), tetFacei_(p.tetFacei_),
tetPtI_(p.tetPtI_), tetPti_(p.tetPti_),
origProc_(p.origProc_), origProc_(p.origProc_),
origId_(p.origId_) origId_(p.origId_)
{} {}

View File

@ -156,7 +156,7 @@ protected:
//- Index of the point on the face that defines the decomposed //- Index of the point on the face that defines the decomposed
// tet that the particle is in. Relative to the face base // tet that the particle is in. Relative to the face base
// point. // point.
label tetPtI_; label tetPti_;
//- Originating processor id //- Originating processor id
label origProc_; label origProc_;
@ -189,7 +189,7 @@ protected:
const label tetPlaneBasePtI, const label tetPlaneBasePtI,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const scalar tol const scalar tol
) const; ) const;
@ -203,7 +203,7 @@ protected:
const label tetPlaneBasePtI, const label tetPlaneBasePtI,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const scalar tol const scalar tol
) const; ) const;
@ -211,12 +211,12 @@ protected:
inline void tetNeighbour(label triI); inline void tetNeighbour(label triI);
//- Cross the from the given face across the given edge of the //- Cross the from the given face across the given edge of the
// given cell to find the resulting face and tetPtI // given cell to find the resulting face and tetPti
inline void crossEdgeConnectedFace inline void crossEdgeConnectedFace
( (
const label& celli, const label& celli,
label& tetFacei, label& tetFacei,
label& tetPtI, label& tetPti,
const edge& e const edge& e
); );
@ -316,7 +316,7 @@ public:
DefinePropertyList DefinePropertyList
( (
"(Px Py Pz) celli facei stepFraction " "(Px Py Pz) celli facei stepFraction "
"tetFacei tetPtI origProc origId" "tetFacei tetPti origProc origId"
); );
//- Cumulative particle counter - used to provode unique ID //- Cumulative particle counter - used to provode unique ID
@ -343,10 +343,10 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components, tetFacei_ and tetPtI_ are not //- Construct from components, tetFacei_ and tetPti_ are not
// supplied so they will be deduced by a search // supplied so they will be deduced by a search
particle particle
( (

View File

@ -53,7 +53,7 @@ inline void Foam::particle::findTris
tetPlaneBasePtIs[i], tetPlaneBasePtIs[i],
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
tol tol
); );
@ -74,7 +74,7 @@ inline Foam::scalar Foam::particle::tetLambda
const label tetPlaneBasePtI, const label tetPlaneBasePtI,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const scalar tol const scalar tol
) const ) const
{ {
@ -91,7 +91,7 @@ inline Foam::scalar Foam::particle::tetLambda
tetPlaneBasePtI, tetPlaneBasePtI,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
tol tol
); );
} }
@ -146,7 +146,7 @@ inline Foam::scalar Foam::particle::movingTetLambda
const label tetPlaneBasePtI, const label tetPlaneBasePtI,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const scalar tol const scalar tol
) const ) const
{ {
@ -169,7 +169,7 @@ inline Foam::scalar Foam::particle::movingTetLambda
vector n0 = Zero; vector n0 = Zero;
{ {
tetIndices tetIs(celli, tetFacei, tetPtI, mesh_); tetIndices tetIs(celli, tetFacei, tetPti, mesh_);
// Tet at timestep start // Tet at timestep start
tetPointRef tet00 = tetIs.oldTet(mesh_); tetPointRef tet00 = tetIs.oldTet(mesh_);
@ -337,7 +337,7 @@ inline void Foam::particle::tetNeighbour(label triI)
<< abort(FatalError); << abort(FatalError);
} }
label facePtI = (tetPtI_ + tetBasePtI) % f.size(); label facePtI = (tetPti_ + tetBasePtI) % f.size();
label otherFacePtI = f.fcIndex(facePtI); label otherFacePtI = f.fcIndex(facePtI);
switch (triI) switch (triI)
@ -348,7 +348,7 @@ inline void Foam::particle::tetNeighbour(label triI)
// neighbour cell over tetFacei // neighbour cell over tetFacei
// Modification of celli_ will happen by other indexing, // Modification of celli_ will happen by other indexing,
// tetFacei_ and tetPtI don't change. // tetFacei_ and tetPti don't change.
break; break;
} }
@ -358,7 +358,7 @@ inline void Foam::particle::tetNeighbour(label triI)
( (
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
Foam::edge(f[facePtI], f[otherFacePtI]) Foam::edge(f[facePtI], f[otherFacePtI])
); );
@ -368,9 +368,9 @@ inline void Foam::particle::tetNeighbour(label triI)
{ {
if (own) if (own)
{ {
if (tetPtI_ < f.size() - 2) if (tetPti_ < f.size() - 2)
{ {
tetPtI_ = f.fcIndex(tetPtI_); tetPti_ = f.fcIndex(tetPti_);
} }
else else
{ {
@ -378,16 +378,16 @@ inline void Foam::particle::tetNeighbour(label triI)
( (
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
Foam::edge(f[tetBasePtI], f[otherFacePtI]) Foam::edge(f[tetBasePtI], f[otherFacePtI])
); );
} }
} }
else else
{ {
if (tetPtI_ > 1) if (tetPti_ > 1)
{ {
tetPtI_ = f.rcIndex(tetPtI_); tetPti_ = f.rcIndex(tetPti_);
} }
else else
{ {
@ -395,7 +395,7 @@ inline void Foam::particle::tetNeighbour(label triI)
( (
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
Foam::edge(f[tetBasePtI], f[facePtI]) Foam::edge(f[tetBasePtI], f[facePtI])
); );
} }
@ -407,9 +407,9 @@ inline void Foam::particle::tetNeighbour(label triI)
{ {
if (own) if (own)
{ {
if (tetPtI_ > 1) if (tetPti_ > 1)
{ {
tetPtI_ = f.rcIndex(tetPtI_); tetPti_ = f.rcIndex(tetPti_);
} }
else else
{ {
@ -417,16 +417,16 @@ inline void Foam::particle::tetNeighbour(label triI)
( (
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
Foam::edge(f[tetBasePtI], f[facePtI]) Foam::edge(f[tetBasePtI], f[facePtI])
); );
} }
} }
else else
{ {
if (tetPtI_ < f.size() - 2) if (tetPti_ < f.size() - 2)
{ {
tetPtI_ = f.fcIndex(tetPtI_); tetPti_ = f.fcIndex(tetPti_);
} }
else else
{ {
@ -434,7 +434,7 @@ inline void Foam::particle::tetNeighbour(label triI)
( (
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
Foam::edge(f[tetBasePtI], f[otherFacePtI]) Foam::edge(f[tetBasePtI], f[otherFacePtI])
); );
} }
@ -458,7 +458,7 @@ inline void Foam::particle::crossEdgeConnectedFace
( (
const label& celli, const label& celli,
label& tetFacei, label& tetFacei,
label& tetPtI, label& tetPti,
const edge& e const edge& e
) )
{ {
@ -542,17 +542,17 @@ inline void Foam::particle::crossEdgeConnectedFace
{ {
// The point is the base point, so this is first tet // The point is the base point, so this is first tet
// in the face circulation // in the face circulation
tetPtI = 1; tetPti = 1;
} }
else if (eIndex == otherFace.size() - 1) else if (eIndex == otherFace.size() - 1)
{ {
// The point is the last before the base point, so // The point is the last before the base point, so
// this is the last tet in the face circulation // this is the last tet in the face circulation
tetPtI = otherFace.size() - 2; tetPti = otherFace.size() - 2;
} }
else else
{ {
tetPtI = eIndex; tetPti = eIndex;
} }
break; break;
@ -621,19 +621,19 @@ inline Foam::label& Foam::particle::tetFace()
inline Foam::label Foam::particle::tetPt() const inline Foam::label Foam::particle::tetPt() const
{ {
return tetPtI_; return tetPti_;
} }
inline Foam::label& Foam::particle::tetPt() inline Foam::label& Foam::particle::tetPt()
{ {
return tetPtI_; return tetPti_;
} }
inline Foam::tetIndices Foam::particle::currentTetIndices() const inline Foam::tetIndices Foam::particle::currentTetIndices() const
{ {
return tetIndices(celli_, tetFacei_, tetPtI_, mesh_); return tetIndices(celli_, tetFacei_, tetPti_, mesh_);
} }
@ -676,21 +676,22 @@ inline void Foam::particle::initCellFacePt()
position_, position_,
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_ tetPti_
); );
if (celli_ == -1) if (debug && celli_ == -1)
{ {
FatalErrorInFunction WarningInFunction
<< "cell, tetFace and tetPt search failure at position " << "cell, tetFace and tetPt search failure for position "
<< position_ << abort(FatalError); << position_
<< endl;
} }
} }
else else
{ {
mesh_.findTetFacePt(celli_, position_, tetFacei_, tetPtI_); mesh_.findTetFacePt(celli_, position_, tetFacei_, tetPti_);
if (tetFacei_ == -1 || tetPtI_ == -1) if (tetFacei_ == -1 || tetPti_ == -1)
{ {
label oldCelli = celli_; label oldCelli = celli_;
@ -699,43 +700,45 @@ inline void Foam::particle::initCellFacePt()
position_, position_,
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_ tetPti_
); );
if (celli_ == -1 || tetFacei_ == -1 || tetPtI_ == -1) if (celli_ == -1 || tetFacei_ == -1 || tetPti_ == -1)
{ {
// The particle has entered this function with a cell // The particle has entered this function with a cell number,
// number, but hasn't been able to find a cell to // but hasn't been able to find a cell to occupy.
// occupy.
if (!mesh_.pointInCellBB(position_, oldCelli, 0.1)) if (!mesh_.pointInCellBB(position_, oldCelli, 0.1))
{ {
// If the position is not inside the (slightly // If the position is not inside the (slightly extended)
// extended) bound-box of the cell that it thought // bound-box of the cell that it thought it should be in,
// it should be in, then this is considered an // then this is considered an error.
// error.
FatalErrorInFunction if (debug)
<< "position " << position_ << nl {
<< " for requested cell " << oldCelli << nl WarningInFunction
<< " If this is a restart or " << "position " << position_
"reconstruction/decomposition etc. it is likely that" << " not in specified cell " << oldCelli
" the write precision is not sufficient.\n" << " with centre " << mesh_.cellCentres()[oldCelli]
" Either increase 'writePrecision' or " << endl;
"set 'writeFormat' to 'binary'"
<< abort(FatalError);
} }
// The position is in the (slightly extended) celli_ = -1;
// bound-box of the cell. This situation may arise tetFacei_ = -1;
// because the face decomposition of the cell is not tetPti_ = -1;
// the same as when the particle acquired the cell
// index. For example, it has been read into a mesh return;
// that has made a different face base-point decision }
// for a boundary face and now this particle is in a
// position that is not in the mesh. Gradually move // The position is in the (slightly extended) bound-box of the
// the particle towards the centre of the cell that it // cell. This situation may arise because the face
// thought that it was in. // decomposition of the cell is not the same as when the
// particle acquired the cell index. For example, it has been
// read into a mesh that has made a different face base-point
// decision for a boundary face and now this particle is in a
// position that is not in the mesh. Gradually move the
// particle towards the centre of the cell that it thought that
// it was in.
celli_ = oldCelli; celli_ = oldCelli;
@ -756,7 +759,7 @@ inline void Foam::particle::initCellFacePt()
celli_, celli_,
newPosition, newPosition,
tetFacei_, tetFacei_,
tetPtI_ tetPti_
); );
iterNo++; iterNo++;
@ -777,7 +780,7 @@ inline void Foam::particle::initCellFacePt()
<< " to " << newPosition << " to " << newPosition
<< " in cell " << celli_ << " in cell " << celli_
<< " tetFace " << tetFacei_ << " tetFace " << tetFacei_
<< " tetPt " << tetPtI_ << nl << " tetPt " << tetPti_ << nl
<< " (A fraction of " << " (A fraction of "
<< 1.0 - mag(cC - newPosition)/mag(cC - position_) << 1.0 - mag(cC - newPosition)/mag(cC - position_)
<< " of the distance to the cell centre)" << " of the distance to the cell centre)"
@ -797,7 +800,7 @@ inline void Foam::particle::initCellFacePt()
<< " Found" << " Found"
<< " cell " << celli_ << " cell " << celli_
<< " tetFace " << tetFacei_ << " tetFace " << tetFacei_
<< " tetPt " << tetPtI_ << nl << " tetPt " << tetPti_ << nl
<< " This is a different cell to that which was supplied" << " This is a different cell to that which was supplied"
<< " (" << oldCelli << ")." << nl << " (" << oldCelli << ")." << nl
<< endl; << endl;

View File

@ -51,7 +51,7 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields)
facei_(-1), facei_(-1),
stepFraction_(0.0), stepFraction_(0.0),
tetFacei_(-1), tetFacei_(-1),
tetPtI_(-1), tetPti_(-1),
origProc_(Pstream::myProcNo()), origProc_(Pstream::myProcNo()),
origId_(-1) origId_(-1)
{ {
@ -64,7 +64,7 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields)
is >> facei_ is >> facei_
>> stepFraction_ >> stepFraction_
>> tetFacei_ >> tetFacei_
>> tetPtI_ >> tetPti_
>> origProc_ >> origProc_
>> origId_; >> origId_;
} }
@ -111,7 +111,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const particle& p)
<< token::SPACE << p.facei_ << token::SPACE << p.facei_
<< token::SPACE << p.stepFraction_ << token::SPACE << p.stepFraction_
<< token::SPACE << p.tetFacei_ << token::SPACE << p.tetFacei_
<< token::SPACE << p.tetPtI_ << token::SPACE << p.tetPti_
<< token::SPACE << p.origProc_ << token::SPACE << p.origProc_
<< token::SPACE << p.origId_; << token::SPACE << p.origId_;
} }

View File

@ -88,7 +88,7 @@ void Foam::particle::correctAfterParallelTransfer
tetFacei_ = facei_ + ppp.start(); tetFacei_ = facei_ + ppp.start();
// Faces either side of a coupled patch have matched base indices, // Faces either side of a coupled patch have matched base indices,
// tetPtI is specified relative to the base point, already and // tetPti is specified relative to the base point, already and
// opposite circulation directions by design, so if the vertices // opposite circulation directions by design, so if the vertices
// are: // are:
// source: // source:
@ -108,7 +108,7 @@ void Foam::particle::correctAfterParallelTransfer
// This relationship can be verified for other points and sizes of // This relationship can be verified for other points and sizes of
// face. // face.
tetPtI_ = mesh_.faces()[tetFacei_].size() - 1 - tetPtI_; tetPti_ = mesh_.faces()[tetFacei_].size() - 1 - tetPti_;
// Reset the face index for the next tracking operation // Reset the face index for the next tracking operation
if (stepFraction_ > (1.0 - SMALL)) if (stepFraction_ > (1.0 - SMALL))
@ -226,7 +226,7 @@ Foam::scalar Foam::particle::trackToFace
// Pout<< "stepFraction " << stepFraction_ << nl // Pout<< "stepFraction " << stepFraction_ << nl
// << "celli " << celli_ << nl // << "celli " << celli_ << nl
// << "tetFacei " << tetFacei_ << nl // << "tetFacei " << tetFacei_ << nl
// << "tetPtI " << tetPtI_ // << "tetPti " << tetPti_
// << endl; // << endl;
scalar trackFraction = 0.0; scalar trackFraction = 0.0;
@ -245,10 +245,10 @@ Foam::scalar Foam::particle::trackToFace
// + pA and pB are the remaining points on the face, such that // + pA and pB are the remaining points on the face, such that
// the circulation, {basePt, pA, pB} produces a positive // the circulation, {basePt, pA, pB} produces a positive
// normal by the right-hand rule. pA and pB are chosen from // normal by the right-hand rule. pA and pB are chosen from
// tetPtI_ do accomplish this depending if the cell owns the // tetPti_ do accomplish this depending if the cell owns the
// face, tetPtI_ is the vertex that characterises the tet, and // face, tetPti_ is the vertex that characterises the tet, and
// is the first vertex on the tet when circulating around the // is the first vertex on the tet when circulating around the
// face. Therefore, the same tetPtI represents the same face // face. Therefore, the same tetPti represents the same face
// triangle for both the owner and neighbour cell. // triangle for both the owner and neighbour cell.
// //
// Each tet has its four triangles represented in the same order: // Each tet has its four triangles represented in the same order:
@ -309,7 +309,7 @@ Foam::scalar Foam::particle::trackToFace
label basePtI = f[tetBasePtI]; label basePtI = f[tetBasePtI];
label facePtI = (tetPtI_ + tetBasePtI) % f.size(); label facePtI = (tetPti_ + tetBasePtI) % f.size();
label otherFacePtI = f.fcIndex(facePtI); label otherFacePtI = f.fcIndex(facePtI);
label fPtAI = -1; label fPtAI = -1;
@ -430,7 +430,7 @@ Foam::scalar Foam::particle::trackToFace
tetPlaneBasePtIs[tI], tetPlaneBasePtIs[tI],
celli_, celli_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
lambdaDistanceTolerance lambdaDistanceTolerance
); );
@ -457,7 +457,7 @@ Foam::scalar Foam::particle::trackToFace
tetBasePtI, tetBasePtI,
fPtAI, fPtAI,
fPtBI, fPtBI,
tetPtI_ tetPti_
); );
} }
else if (triI > 0) else if (triI > 0)
@ -470,7 +470,7 @@ Foam::scalar Foam::particle::trackToFace
// << " " << celli_ // << " " << celli_
// << " " << facei_ // << " " << facei_
// << " " << tetFacei_ // << " " << tetFacei_
// << " " << tetPtI_ // << " " << tetPti_
// << " " << triI // << " " << triI
// << " " << lambdaMin // << " " << lambdaMin
// << " " << trackFraction // << " " << trackFraction
@ -479,7 +479,7 @@ Foam::scalar Foam::particle::trackToFace
// Pout<< "# Tracking loop tet " // Pout<< "# Tracking loop tet "
// << origId_ << " " << origProc_<< nl // << origId_ << " " << origProc_<< nl
// << "# face: " << tetFacei_ << nl // << "# face: " << tetFacei_ << nl
// << "# tetPtI: " << tetPtI_ << nl // << "# tetPti: " << tetPti_ << nl
// << "# tetBasePtI: " << mesh_.tetBasePtIs()[tetFacei_] << nl // << "# tetBasePtI: " << mesh_.tetBasePtIs()[tetFacei_] << nl
// << "# tet.mag(): " << tet.mag() << nl // << "# tet.mag(): " << tet.mag() << nl
// << "# tet.quality(): " << tet.quality() // << "# tet.quality(): " << tet.quality()
@ -555,7 +555,7 @@ Foam::scalar Foam::particle::trackToFace
label origFacei = facei_; label origFacei = facei_;
label patchi = patch(facei_); label patchi = patch(facei_);
// No action taken for tetPtI_ for tetFacei_ here, handled by // No action taken for tetPti_ for tetFacei_ here, handled by
// patch interaction call or later during processor transfer. // patch interaction call or later during processor transfer.
if if
@ -1000,8 +1000,8 @@ void Foam::particle::hitCyclicPatch
tetFacei_ = facei_; tetFacei_ = facei_;
// See note in correctAfterParallelTransfer for tetPtI_ addressing. // See note in correctAfterParallelTransfer for tetPti_ addressing.
tetPtI_ = mesh_.faces()[tetFacei_].size() - 1 - tetPtI_; tetPti_ = mesh_.faces()[tetFacei_].size() - 1 - tetPti_;
const cyclicPolyPatch& receiveCpp = cpp.neighbPatch(); const cyclicPolyPatch& receiveCpp = cpp.neighbPatch();
label patchFacei = receiveCpp.whichFace(facei_); label patchFacei = receiveCpp.whichFace(facei_);
@ -1053,10 +1053,15 @@ void Foam::particle::hitCyclicAMIPatch
if (patchFacei < 0) if (patchFacei < 0)
{ {
FatalErrorInFunction // If the patch face of the particle is not known assume that
// the particle is lost and to be deleted
td.keepParticle = false;
WarningInFunction
<< "Particle lost across " << cyclicAMIPolyPatch::typeName << "Particle lost across " << cyclicAMIPolyPatch::typeName
<< " patches " << cpp.name() << " and " << receiveCpp.name() << " patches " << cpp.name() << " and " << receiveCpp.name()
<< " at position " << position_ << abort(FatalError); << " at position " << position_
<< endl;
} }
// Convert face index into global numbering // Convert face index into global numbering
@ -1066,8 +1071,8 @@ void Foam::particle::hitCyclicAMIPatch
tetFacei_ = facei_; tetFacei_ = facei_;
// See note in correctAfterParallelTransfer for tetPtI_ addressing. // See note in correctAfterParallelTransfer for tetPti_ addressing.
tetPtI_ = mesh_.faces()[tetFacei_].size() - 1 - tetPtI_; tetPti_ = mesh_.faces()[tetFacei_].size() - 1 - tetPti_;
// Now the particle is on the receiving side // Now the particle is on the receiving side

View File

@ -64,10 +64,10 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
particle(mesh, position, celli, tetFacei, tetPtI) particle(mesh, position, celli, tetFacei, tetPti)
{} {}
//- Construct from components, with searching for tetFace and //- Construct from components, with searching for tetFace and

View File

@ -171,7 +171,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components //- Construct from components
@ -181,7 +181,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -66,10 +66,10 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(owner, position, celli, tetFacei, tetPtI), ParcelType(owner, position, celli, tetFacei, tetPti),
f_(Zero), f_(Zero),
angularMomentum_(Zero), angularMomentum_(Zero),
torque_(Zero), torque_(Zero),
@ -84,7 +84,7 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -102,7 +102,7 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId, typeId,
nParticle0, nParticle0,
d0, d0,

View File

@ -328,7 +328,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components //- Construct from components
@ -338,7 +338,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -76,10 +76,10 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(owner, position, celli, tetFacei, tetPtI), ParcelType(owner, position, celli, tetFacei, tetPti),
active_(true), active_(true),
typeId_(-1), typeId_(-1),
nParticle_(0), nParticle_(0),
@ -103,7 +103,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -112,7 +112,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
const constantProperties& constProps const constantProperties& constProps
) )
: :
ParcelType(owner, position, celli, tetFacei, tetPtI), ParcelType(owner, position, celli, tetFacei, tetPti),
active_(true), active_(true),
typeId_(typeId), typeId_(typeId),
nParticle_(nParticle0), nParticle_(nParticle0),

View File

@ -189,7 +189,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components //- Construct from components
@ -199,7 +199,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -32,10 +32,10 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(owner, position, celli, tetFacei, tetPtI), ParcelType(owner, position, celli, tetFacei, tetPti),
UCorrect_(Zero) UCorrect_(Zero)
{} {}
@ -47,7 +47,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -63,7 +63,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId, typeId,
nParticle0, nParticle0,
d0, d0,

View File

@ -278,7 +278,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
@ -289,7 +289,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -71,10 +71,10 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(mesh, position, celli, tetFacei, tetPtI), ParcelType(mesh, position, celli, tetFacei, tetPti),
YGas_(0), YGas_(0),
YLiquid_(0), YLiquid_(0),
YSolid_(0), YSolid_(0),
@ -89,7 +89,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -111,7 +111,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId, typeId,
nParticle0, nParticle0,
d0, d0,

View File

@ -232,7 +232,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components //- Construct from components
@ -242,7 +242,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -66,10 +66,10 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(mesh, position, celli, tetFacei, tetPtI), ParcelType(mesh, position, celli, tetFacei, tetPti),
mass0_(0.0), mass0_(0.0),
Y_(0), Y_(0),
pc_(0.0) pc_(0.0)
@ -83,7 +83,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -102,7 +102,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId, typeId,
nParticle0, nParticle0,
d0, d0,

View File

@ -288,7 +288,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components //- Construct from components
@ -298,7 +298,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -77,10 +77,10 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(mesh, position, celli, tetFacei, tetPtI), ParcelType(mesh, position, celli, tetFacei, tetPti),
T_(0.0), T_(0.0),
Cp_(0.0), Cp_(0.0),
Tc_(0.0), Tc_(0.0),
@ -95,7 +95,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -113,7 +113,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId, typeId,
nParticle0, nParticle0,
d0, d0,

View File

@ -320,13 +320,13 @@ void Foam::CellZoneInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
position = positions_[parcelI]; position = positions_[parcelI];
cellOwner = injectorCells_[parcelI]; cellOwner = injectorCells_[parcelI];
tetFacei = injectorTetFaces_[parcelI]; tetFacei = injectorTetFaces_[parcelI];
tetPtI = injectorTetPts_[parcelI]; tetPti = injectorTetPts_[parcelI];
} }

View File

@ -157,7 +157,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -241,7 +241,7 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
const label i = parcelI % positionAxis_.size(); const label i = parcelI % positionAxis_.size();
@ -249,7 +249,7 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell
position = positionAxis_[i].first(); position = positionAxis_[i].first();
cellOwner = injectorCells_[i]; cellOwner = injectorCells_[i];
tetFacei = injectorTetFaces_[i]; tetFacei = injectorTetFaces_[i];
tetPtI = injectorTetPts_[i]; tetPti = injectorTetPts_[i];
} }

View File

@ -172,7 +172,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -49,7 +49,7 @@ void Foam::ConeNozzleInjection<CloudType>::setInjectionMethod()
( (
injectorCell_, injectorCell_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
position_, position_,
false false
); );
@ -111,7 +111,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
position_(this->coeffDict().lookup("position")), position_(this->coeffDict().lookup("position")),
injectorCell_(-1), injectorCell_(-1),
tetFacei_(-1), tetFacei_(-1),
tetPtI_(-1), tetPti_(-1),
direction_(this->coeffDict().lookup("direction")), direction_(this->coeffDict().lookup("direction")),
parcelsPerSecond_ parcelsPerSecond_
( (
@ -215,7 +215,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
position_(im.position_), position_(im.position_),
injectorCell_(im.injectorCell_), injectorCell_(im.injectorCell_),
tetFacei_(im.tetFacei_), tetFacei_(im.tetFacei_),
tetPtI_(im.tetPtI_), tetPti_(im.tetPti_),
direction_(im.direction_), direction_(im.direction_),
parcelsPerSecond_(im.parcelsPerSecond_), parcelsPerSecond_(im.parcelsPerSecond_),
flowRateProfile_(im.flowRateProfile_), flowRateProfile_(im.flowRateProfile_),
@ -252,7 +252,7 @@ void Foam::ConeNozzleInjection<CloudType>::updateMesh()
( (
injectorCell_, injectorCell_,
tetFacei_, tetFacei_,
tetPtI_, tetPti_,
position_ position_
); );
} }
@ -316,7 +316,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
cachedRandom& rndGen = this->owner().rndGen(); cachedRandom& rndGen = this->owner().rndGen();
@ -331,7 +331,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell
position = position_; position = position_;
cellOwner = injectorCell_; cellOwner = injectorCell_;
tetFacei = tetFacei_; tetFacei = tetFacei_;
tetPtI = tetPtI_; tetPti = tetPti_;
break; break;
} }
@ -346,7 +346,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell
( (
cellOwner, cellOwner,
tetFacei, tetFacei,
tetPtI, tetPti,
position, position,
false false
); );

View File

@ -131,7 +131,7 @@ private:
label tetFacei_; label tetFacei_;
//- Index of tet point for injector cell //- Index of tet point for injector cell
label tetPtI_; label tetPti_;
//- Injector direction [] //- Injector direction []
vector direction_; vector direction_;
@ -244,7 +244,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -201,13 +201,13 @@ void Foam::FieldActivatedInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
position = positions_[parcelI]; position = positions_[parcelI];
cellOwner = injectorCells_[parcelI]; cellOwner = injectorCells_[parcelI];
tetFacei = injectorTetFaces_[parcelI]; tetFacei = injectorTetFaces_[parcelI];
tetPtI = injectorTetPts_[parcelI]; tetPti = injectorTetPts_[parcelI];
} }

View File

@ -174,7 +174,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -446,7 +446,7 @@ void Foam::InflationInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
position = newParticles_[parcelI].first().first(); position = newParticles_[parcelI].first().first();
@ -455,7 +455,7 @@ void Foam::InflationInjection<CloudType>::setPositionAndCell
( (
cellOwner, cellOwner,
tetFacei, tetFacei,
tetPtI, tetPti,
position, position,
false false
); );

View File

@ -170,7 +170,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -73,7 +73,7 @@ bool Foam::InjectionModel<CloudType>::prepareForNextTimeStep
} }
else else
{ {
// injection should have started, but not sufficient volume to // Injection should have started, but not sufficient volume to
// produce (at least) 1 parcel - hold value of timeStep0_ // produce (at least) 1 parcel - hold value of timeStep0_
validInjection = false; validInjection = false;
} }
@ -93,7 +93,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
( (
label& celli, label& celli,
label& tetFacei, label& tetFacei,
label& tetPtI, label& tetPti,
vector& position, vector& position,
bool errorOnNotFound bool errorOnNotFound
) )
@ -107,7 +107,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI tetPti
); );
label proci = -1; label proci = -1;
@ -125,7 +125,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
{ {
celli = -1; celli = -1;
tetFacei = -1; tetFacei = -1;
tetPtI = -1; tetPti = -1;
} }
// Last chance - find nearest cell and try that one - the point is // Last chance - find nearest cell and try that one - the point is
@ -138,7 +138,15 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
{ {
position += SMALL*(cellCentres[celli] - position); position += SMALL*(cellCentres[celli] - position);
if (this->owner().mesh().pointInCell(position, celli)) this->owner().mesh().findCellFacePt
(
position,
celli,
tetFacei,
tetPti
);
if (celli > 0)
{ {
proci = Pstream::myProcNo(); proci = Pstream::myProcNo();
} }
@ -150,7 +158,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
{ {
celli = -1; celli = -1;
tetFacei = -1; tetFacei = -1;
tetPtI = -1; tetPti = -1;
} }
} }
@ -377,9 +385,7 @@ Foam::InjectionModel<CloudType>::~InjectionModel()
template<class CloudType> template<class CloudType>
void Foam::InjectionModel<CloudType>::updateMesh() void Foam::InjectionModel<CloudType>::updateMesh()
{ {}
// do nothing
}
template<class CloudType> template<class CloudType>
@ -443,7 +449,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
// tetFace and tetPt // tetFace and tetPt
label celli = -1; label celli = -1;
label tetFacei = -1; label tetFacei = -1;
label tetPtI = -1; label tetPti = -1;
vector pos = Zero; vector pos = Zero;
@ -455,7 +461,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
pos, pos,
celli, celli,
tetFacei, tetFacei,
tetPtI tetPti
); );
if (celli > -1) if (celli > -1)
@ -468,7 +474,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
// Create a new parcel // Create a new parcel
parcelType* pPtr = parcelType* pPtr =
new parcelType(mesh, pos, celli, tetFacei, tetPtI); new parcelType(mesh, pos, celli, tetFacei, tetPti);
// Check/set new parcel thermo properties // Check/set new parcel thermo properties
cloud.setParcelThermoProperties(*pPtr, dt); cloud.setParcelThermoProperties(*pPtr, dt);
@ -563,7 +569,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
// tetFace and tetPt // tetFace and tetPt
label celli = -1; label celli = -1;
label tetFacei = -1; label tetFacei = -1;
label tetPtI = -1; label tetPti = -1;
vector pos = Zero; vector pos = Zero;
@ -575,7 +581,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
pos, pos,
celli, celli,
tetFacei, tetFacei,
tetPtI tetPti
); );
if (celli > -1) if (celli > -1)
@ -585,7 +591,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
// Create a new parcel // Create a new parcel
parcelType* pPtr = parcelType* pPtr =
new parcelType(mesh, pos, celli, tetFacei, tetPtI); new parcelType(mesh, pos, celli, tetFacei, tetPti);
// Check/set new parcel thermo properties // Check/set new parcel thermo properties
cloud.setParcelThermoProperties(*pPtr, 0.0); cloud.setParcelThermoProperties(*pPtr, 0.0);

View File

@ -160,7 +160,7 @@ protected:
( (
label& celli, label& celli,
label& tetFacei, label& tetFacei,
label& tetPtI, label& tetPti,
vector& position, vector& position,
bool errorOnNotFound = true bool errorOnNotFound = true
); );
@ -320,7 +320,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) = 0; ) = 0;
//- Set the parcel properties //- Set the parcel properties

View File

@ -176,7 +176,7 @@ void Foam::KinematicLookupTableInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
label injectorI = 0; label injectorI = 0;
@ -193,7 +193,7 @@ void Foam::KinematicLookupTableInjection<CloudType>::setPositionAndCell
position = injectors_[injectorI].x(); position = injectors_[injectorI].x();
cellOwner = injectorCells_[injectorI]; cellOwner = injectorCells_[injectorI];
tetFacei = injectorTetFaces_[injectorI]; tetFacei = injectorTetFaces_[injectorI];
tetPtI = injectorTetPts_[injectorI]; tetPti = injectorTetPts_[injectorI];
} }

View File

@ -160,7 +160,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -206,13 +206,13 @@ void Foam::ManualInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
position = positions_[parcelI]; position = positions_[parcelI];
cellOwner = injectorCells_[parcelI]; cellOwner = injectorCells_[parcelI];
tetFacei = injectorTetFaces_[parcelI]; tetFacei = injectorTetFaces_[parcelI];
tetPtI = injectorTetPts_[parcelI]; tetPti = injectorTetPts_[parcelI];
} }

View File

@ -151,7 +151,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -106,7 +106,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
virtual void setProperties virtual void setProperties

View File

@ -221,7 +221,7 @@ void Foam::PatchFlowRateInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
patchInjectionBase::setPositionAndCell patchInjectionBase::setPositionAndCell
@ -231,7 +231,7 @@ void Foam::PatchFlowRateInjection<CloudType>::setPositionAndCell
position, position,
cellOwner, cellOwner,
tetFacei, tetFacei,
tetPtI tetPti
); );
} }

View File

@ -157,7 +157,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
virtual void setProperties virtual void setProperties

View File

@ -176,7 +176,7 @@ void Foam::PatchInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
patchInjectionBase::setPositionAndCell patchInjectionBase::setPositionAndCell
@ -186,7 +186,7 @@ void Foam::PatchInjection<CloudType>::setPositionAndCell
position, position,
cellOwner, cellOwner,
tetFacei, tetFacei,
tetPtI tetPti
); );
} }

View File

@ -152,7 +152,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
virtual void setProperties virtual void setProperties

View File

@ -153,7 +153,7 @@ void Foam::patchInjectionBase::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
scalar areaFraction = rnd.globalPosition(scalar(0), patchArea_); scalar areaFraction = rnd.globalPosition(scalar(0), patchArea_);
@ -209,13 +209,13 @@ void Foam::patchInjectionBase::setPositionAndCell
// the base point on the face as the tetPt. The tracking will pick // the base point on the face as the tetPt. The tracking will pick
// the cell consistent with the motion in the first tracking step // the cell consistent with the motion in the first tracking step
tetFacei = mesh.cells()[cellOwner][0]; tetFacei = mesh.cells()[cellOwner][0];
tetPtI = 1; tetPti = 1;
} }
else else
{ {
cellOwner = -1; cellOwner = -1;
tetFacei = -1; tetFacei = -1;
tetPtI = -1; tetPti = -1;
// Dummy position // Dummy position
position = pTraits<vector>::max; position = pTraits<vector>::max;
@ -225,7 +225,7 @@ void Foam::patchInjectionBase::setPositionAndCell
{ {
cellOwner = -1; cellOwner = -1;
tetFacei = -1; tetFacei = -1;
tetPtI = -1; tetPti = -1;
// Dummy position // Dummy position
position = pTraits<vector>::max; position = pTraits<vector>::max;

View File

@ -121,7 +121,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
}; };

View File

@ -152,7 +152,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
// point as the tetPt. The tracking will pick the cell // point as the tetPt. The tracking will pick the cell
// consistent with the motion in the first tracking step. // consistent with the motion in the first tracking step.
const label tetFacei = this->owner().mesh().cells()[celli][0]; const label tetFacei = this->owner().mesh().cells()[celli][0];
const label tetPtI = 1; const label tetPti = 1;
// const point& pos = this->owner().mesh().C()[celli]; // const point& pos = this->owner().mesh().C()[celli];
@ -172,7 +172,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
pos, pos,
celli, celli,
tetFacei, tetFacei,
tetPtI tetPti
); );
// Check/set new parcel thermo properties // Check/set new parcel thermo properties

View File

@ -175,7 +175,7 @@ void Foam::ReactingLookupTableInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
label injectorI = 0; label injectorI = 0;
@ -192,7 +192,7 @@ void Foam::ReactingLookupTableInjection<CloudType>::setPositionAndCell
position = injectors_[injectorI].x(); position = injectors_[injectorI].x();
cellOwner = injectorCells_[injectorI]; cellOwner = injectorCells_[injectorI];
tetFacei = injectorTetFaces_[injectorI]; tetFacei = injectorTetFaces_[injectorI];
tetPtI = injectorTetPts_[injectorI]; tetPti = injectorTetPts_[injectorI];
} }

View File

@ -160,7 +160,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -181,7 +181,7 @@ void Foam::ReactingMultiphaseLookupTableInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
label injectorI = 0; label injectorI = 0;
@ -198,7 +198,7 @@ void Foam::ReactingMultiphaseLookupTableInjection<CloudType>::setPositionAndCell
position = injectors_[injectorI].x(); position = injectors_[injectorI].x();
cellOwner = injectorCells_[injectorI]; cellOwner = injectorCells_[injectorI];
tetFacei = injectorTetFaces_[injectorI]; tetFacei = injectorTetFaces_[injectorI];
tetPtI = injectorTetPts_[injectorI]; tetPti = injectorTetPts_[injectorI];
} }

View File

@ -162,7 +162,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -176,7 +176,7 @@ void Foam::ThermoLookupTableInjection<CloudType>::setPositionAndCell
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
) )
{ {
label injectorI = 0; label injectorI = 0;
@ -193,7 +193,7 @@ void Foam::ThermoLookupTableInjection<CloudType>::setPositionAndCell
position = injectors_[injectorI].x(); position = injectors_[injectorI].x();
cellOwner = injectorCells_[injectorI]; cellOwner = injectorCells_[injectorI];
tetFacei = injectorTetFaces_[injectorI]; tetFacei = injectorTetFaces_[injectorI];
tetPtI = injectorTetPts_[injectorI]; tetPti = injectorTetPts_[injectorI];
} }

View File

@ -160,7 +160,7 @@ public:
vector& position, vector& position,
label& cellOwner, label& cellOwner,
label& tetFacei, label& tetFacei,
label& tetPtI label& tetPti
); );
//- Set the parcel properties //- Set the parcel properties

View File

@ -242,7 +242,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const tensor& Q, const tensor& Q,
const vector& v, const vector& v,
const vector& a, const vector& a,

View File

@ -223,7 +223,7 @@ inline Foam::molecule::molecule
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const tensor& Q, const tensor& Q,
const vector& v, const vector& v,
const vector& a, const vector& a,
@ -236,7 +236,7 @@ inline Foam::molecule::molecule
) )
: :
particle(mesh, position, celli, tetFacei, tetPtI), particle(mesh, position, celli, tetFacei, tetPti),
Q_(Q), Q_(Q),
v_(v), v_(v),
a_(a), a_(a),

View File

@ -133,7 +133,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const scalar d, const scalar d,
const vector& U const vector& U
); );

View File

@ -48,12 +48,12 @@ inline Foam::solidParticle::solidParticle
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const scalar d, const scalar d,
const vector& U const vector& U
) )
: :
particle(mesh, position, celli, tetFacei, tetPtI), particle(mesh, position, celli, tetFacei, tetPti),
d_(d), d_(d),
U_(U) U_(U)
{} {}

View File

@ -192,7 +192,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
); );
//- Construct from components //- Construct from components
@ -202,7 +202,7 @@ public:
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,

View File

@ -110,10 +110,10 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI const label tetPti
) )
: :
ParcelType(mesh, position, celli, tetFacei, tetPtI), ParcelType(mesh, position, celli, tetFacei, tetPti),
d0_(this->d()), d0_(this->d()),
position0_(position), position0_(position),
sigma_(0.0), sigma_(0.0),
@ -137,7 +137,7 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel
const vector& position, const vector& position,
const label celli, const label celli,
const label tetFacei, const label tetFacei,
const label tetPtI, const label tetPti,
const label typeId, const label typeId,
const scalar nParticle0, const scalar nParticle0,
const scalar d0, const scalar d0,
@ -165,7 +165,7 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel
position, position,
celli, celli,
tetFacei, tetFacei,
tetPtI, tetPti,
typeId, typeId,
nParticle0, nParticle0,
d0, d0,