Bugfix: reactingParcelFoam/evaporationTest tut hangs in parallel
This commit is contained in:
parent
01fb221ee3
commit
71983fec41
3 changed files with 19 additions and 7 deletions
|
@ -48,8 +48,6 @@ bool Foam::primitiveMesh::pointInCell(const point& p, label celli) const
|
||||||
const vectorField& cf = faceCentres();
|
const vectorField& cf = faceCentres();
|
||||||
const vectorField& Sf = faceAreas();
|
const vectorField& Sf = faceAreas();
|
||||||
|
|
||||||
bool inCell = true;
|
|
||||||
|
|
||||||
forAll(f, facei)
|
forAll(f, facei)
|
||||||
{
|
{
|
||||||
label nFace = f[facei];
|
label nFace = f[facei];
|
||||||
|
@ -59,10 +57,14 @@ bool Foam::primitiveMesh::pointInCell(const point& p, label celli) const
|
||||||
{
|
{
|
||||||
normal = -normal;
|
normal = -normal;
|
||||||
}
|
}
|
||||||
inCell = inCell && ((normal & proj) <= 0);
|
|
||||||
|
if ((normal & proj) > 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return inCell;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = cloud_.polyMesh_;
|
const polyMesh& mesh = cloud_.polyMesh_;
|
||||||
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
bool movingMesh = mesh.moving();
|
bool movingMesh = mesh.moving();
|
||||||
|
|
||||||
if (movingMesh)
|
if (movingMesh)
|
||||||
|
@ -46,7 +47,11 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||||
vector Cf = mesh.faceCentres()[facei];
|
vector Cf = mesh.faceCentres()[facei];
|
||||||
|
|
||||||
// move reference point for wall
|
// move reference point for wall
|
||||||
if (!cloud_.internalFace(facei))
|
if
|
||||||
|
(
|
||||||
|
!cloud_.internalFace(facei)
|
||||||
|
&& isA<wallPolyPatch>(patches[cloud_.facePatch(facei)])
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const vector& C = mesh.cellCentres()[celli_];
|
const vector& C = mesh.cellCentres()[celli_];
|
||||||
scalar CCf = mag((C - Cf) & Sf);
|
scalar CCf = mag((C - Cf) & Sf);
|
||||||
|
@ -184,13 +189,18 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = cloud_.polyMesh_;
|
const polyMesh& mesh = cloud_.polyMesh_;
|
||||||
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
vector Sf = mesh.faceAreas()[facei];
|
vector Sf = mesh.faceAreas()[facei];
|
||||||
Sf /= mag(Sf);
|
Sf /= mag(Sf);
|
||||||
vector Cf = mesh.faceCentres()[facei];
|
vector Cf = mesh.faceCentres()[facei];
|
||||||
|
|
||||||
// move reference point for wall
|
// move reference point for wall
|
||||||
if (!cloud_.internalFace(facei))
|
if
|
||||||
|
(
|
||||||
|
!cloud_.internalFace(facei)
|
||||||
|
&& isA<wallPolyPatch>(patches[cloud_.facePatch(facei)])
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const vector& C = mesh.cellCentres()[celli_];
|
const vector& C = mesh.cellCentres()[celli_];
|
||||||
scalar CCf = mag((C - Cf) & Sf);
|
scalar CCf = mag((C - Cf) & Sf);
|
||||||
|
|
Reference in a new issue