STYLE: consistency updates
This commit is contained in:
@ -56,10 +56,10 @@ Foam::edge Foam::wallBoundedParticle::currentEdge() const
|
||||
}
|
||||
else
|
||||
{
|
||||
label faceBasePtI = mesh_.tetBasePtIs()[tetFace()];
|
||||
label diagPtI = (faceBasePtI+diagEdge_)%f.size();
|
||||
label faceBasePti = mesh_.tetBasePtIs()[tetFace()];
|
||||
label diagPti = (faceBasePti+diagEdge_)%f.size();
|
||||
|
||||
return edge(f[faceBasePtI], f[diagPtI]);
|
||||
return edge(f[faceBasePti], f[diagPti]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
|
||||
|
||||
const Foam::face& f = mesh_.faces()[tetFace()];
|
||||
|
||||
// tetPtI starts from 1, goes up to f.size()-2
|
||||
// tetPti starts from 1, goes up to f.size()-2
|
||||
|
||||
if (tetPt() == diagEdge_)
|
||||
{
|
||||
@ -165,7 +165,7 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
|
||||
Foam::scalar Foam::wallBoundedParticle::trackFaceTri
|
||||
(
|
||||
const vector& endPosition,
|
||||
label& minEdgeI
|
||||
label& minEdgei
|
||||
)
|
||||
{
|
||||
// Track p from position to endPosition
|
||||
@ -175,7 +175,7 @@ Foam::scalar Foam::wallBoundedParticle::trackFaceTri
|
||||
|
||||
// Check which edge intersects the trajectory.
|
||||
// Project trajectory onto triangle
|
||||
minEdgeI = -1;
|
||||
minEdgei = -1;
|
||||
scalar minS = 1; // end position
|
||||
|
||||
edge currentE(-1, -1);
|
||||
@ -217,13 +217,13 @@ Foam::scalar Foam::wallBoundedParticle::trackFaceTri
|
||||
if (s >= 0 && s < minS)
|
||||
{
|
||||
minS = s;
|
||||
minEdgeI = i;
|
||||
minEdgei = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (minEdgeI != -1)
|
||||
if (minEdgei != -1)
|
||||
{
|
||||
position() += minS*(endPosition-position());
|
||||
}
|
||||
@ -299,12 +299,12 @@ Foam::wallBoundedParticle::wallBoundedParticle
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const label tetFacei,
|
||||
const label tetPtI,
|
||||
const label tetPti,
|
||||
const label meshEdgeStart,
|
||||
const label diagEdge
|
||||
)
|
||||
:
|
||||
particle(mesh, position, celli, tetFacei, tetPtI),
|
||||
particle(mesh, position, celli, tetFacei, tetPti),
|
||||
meshEdgeStart_(meshEdgeStart),
|
||||
diagEdge_(diagEdge)
|
||||
{}
|
||||
|
||||
@ -112,9 +112,9 @@ protected:
|
||||
|
||||
//- Particle is on diagonal edge:
|
||||
// const face& f = mesh.faces()[tetFace()]
|
||||
// label faceBasePtI = mesh.tetBasePtIs()[facei];
|
||||
// label diagPtI = (faceBasePtI+diagEdge_)%f.size();
|
||||
// const edge e(f[faceBasePtI], f[diagPtI]);
|
||||
// label faceBasePti = mesh.tetBasePtIs()[facei];
|
||||
// label diagPti = (faceBasePti+diagEdge_)%f.size();
|
||||
// const edge e(f[faceBasePti], f[diagPti]);
|
||||
label diagEdge_;
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ protected:
|
||||
void crossDiagonalEdge();
|
||||
|
||||
//- Track through single triangle
|
||||
scalar trackFaceTri(const vector& endPosition, label& minEdgeI);
|
||||
scalar trackFaceTri(const vector& endPosition, label& minEdgei);
|
||||
|
||||
//- Is current triangle in the track direction
|
||||
bool isTriAlongTrack(const point& endPosition) const;
|
||||
@ -225,7 +225,7 @@ public:
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const label tetFacei,
|
||||
const label tetPtI,
|
||||
const label tetPti,
|
||||
const label meshEdgeStart,
|
||||
const label diagEdge
|
||||
);
|
||||
|
||||
@ -172,7 +172,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
: mesh_.faceOwner()[facei_]
|
||||
);
|
||||
// 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.
|
||||
tetIndices nbrTi(nbrCelli, tetFacei_, tetPti_, mesh_);
|
||||
if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0)
|
||||
@ -241,10 +241,10 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
if (doTrack)
|
||||
{
|
||||
// Track across triangle. Return triangle edge crossed.
|
||||
label triEdgeI = -1;
|
||||
trackFraction = trackFaceTri(projectedEndPosition, triEdgeI);
|
||||
label triEdgei = -1;
|
||||
trackFraction = trackFaceTri(projectedEndPosition, triEdgei);
|
||||
|
||||
if (triEdgeI == -1)
|
||||
if (triEdgei == -1)
|
||||
{
|
||||
// Reached endpoint
|
||||
//checkInside();
|
||||
@ -268,7 +268,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
const Foam::face& f = mesh_.faces()[ti.face()];
|
||||
const label fp0 = ti.faceBasePt();
|
||||
|
||||
if (triEdgeI == 0)
|
||||
if (triEdgei == 0)
|
||||
{
|
||||
if (ti.facePtA() == f.fcIndex(fp0))
|
||||
{
|
||||
@ -305,7 +305,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
crossDiagonalEdge();
|
||||
}
|
||||
}
|
||||
else if (triEdgeI == 1)
|
||||
else if (triEdgei == 1)
|
||||
{
|
||||
//Pout<< "Real edge." << endl;
|
||||
diagEdge_ = -1;
|
||||
@ -314,7 +314,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
crossEdgeConnectedFace(currentEdge());
|
||||
patchInteraction(td, trackFraction);
|
||||
}
|
||||
else // if (triEdgeI == 2)
|
||||
else // if (triEdgei == 2)
|
||||
{
|
||||
if (ti.facePtB() == f.rcIndex(fp0))
|
||||
{
|
||||
|
||||
@ -59,7 +59,7 @@ Foam::tetIndices Foam::functionObjects::wallBoundedStreamLine::findNearestTet
|
||||
const cell& cFaces = mesh_.cells()[celli];
|
||||
|
||||
label minFacei = -1;
|
||||
label minTetPtI = -1;
|
||||
label minTetPti = -1;
|
||||
scalar minDistSqr = sqr(GREAT);
|
||||
|
||||
forAll(cFaces, cFacei)
|
||||
@ -86,7 +86,7 @@ Foam::tetIndices Foam::functionObjects::wallBoundedStreamLine::findNearestTet
|
||||
{
|
||||
minDistSqr = d2;
|
||||
minFacei = facei;
|
||||
minTetPtI = i-1;
|
||||
minTetPti = i-1;
|
||||
}
|
||||
fp = nextFp;
|
||||
}
|
||||
@ -98,7 +98,7 @@ Foam::tetIndices Foam::functionObjects::wallBoundedStreamLine::findNearestTet
|
||||
(
|
||||
celli,
|
||||
minFacei,
|
||||
minTetPtI,
|
||||
minTetPti,
|
||||
mesh_
|
||||
);
|
||||
}
|
||||
|
||||
@ -63,11 +63,11 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields
|
||||
|
||||
// Store the scalar fields
|
||||
sampledScalars_.setSize(td.vsInterp_.size());
|
||||
forAll(td.vsInterp_, scalarI)
|
||||
forAll(td.vsInterp_, scalari)
|
||||
{
|
||||
sampledScalars_[scalarI].append
|
||||
sampledScalars_[scalari].append
|
||||
(
|
||||
td.vsInterp_[scalarI].interpolate
|
||||
td.vsInterp_[scalari].interpolate
|
||||
(
|
||||
position,
|
||||
ti, //celli,
|
||||
@ -78,23 +78,23 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields
|
||||
|
||||
// Store the vector fields
|
||||
sampledVectors_.setSize(td.vvInterp_.size());
|
||||
forAll(td.vvInterp_, vectorI)
|
||||
forAll(td.vvInterp_, vectori)
|
||||
{
|
||||
vector positionU;
|
||||
if (vectorI == td.UIndex_)
|
||||
if (vectori == td.UIndex_)
|
||||
{
|
||||
positionU = U;
|
||||
}
|
||||
else
|
||||
{
|
||||
positionU = td.vvInterp_[vectorI].interpolate
|
||||
positionU = td.vvInterp_[vectori].interpolate
|
||||
(
|
||||
position,
|
||||
ti, //celli,
|
||||
facei
|
||||
);
|
||||
}
|
||||
sampledVectors_[vectorI].append(positionU);
|
||||
sampledVectors_[vectori].append(positionU);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const label tetFacei,
|
||||
const label tetPtI,
|
||||
const label tetPti,
|
||||
const label meshEdgeStart,
|
||||
const label diagEdge,
|
||||
const label lifeTime
|
||||
@ -148,7 +148,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
|
||||
position,
|
||||
celli,
|
||||
tetFacei,
|
||||
tetPtI,
|
||||
tetPti,
|
||||
meshEdgeStart,
|
||||
diagEdge
|
||||
),
|
||||
|
||||
@ -170,7 +170,7 @@ public:
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const label tetFacei,
|
||||
const label tetPtI,
|
||||
const label tetPti,
|
||||
const label meshEdgeStart,
|
||||
const label diagEdge,
|
||||
const label lifeTime
|
||||
|
||||
Reference in New Issue
Block a user