parallel running mods

This commit is contained in:
andy
2009-06-12 16:34:42 +01:00
parent ed8262bcd7
commit d0080fe487

View File

@ -52,8 +52,24 @@ void Foam::timeActivatedExplicitMulticomponentPointSource::updateAddressing()
forAll(pointSources_, sourceI)
{
const pointSourceProperties& psp = pointSources_[sourceI];
bool foundCell = false;
label cid = mesh_.findCell(psp.location());
if (cid < 0)
if (cid >= 0)
{
foundCell = mesh_.pointInCell(psp.location(), cid);
}
reduce(foundCell, orOp<bool>());
if (!foundCell)
{
label cid = mesh_.findNearestCell(psp.location());
if (cid >= 0)
{
foundCell = mesh_.pointInCell(psp.location(), cid);
}
}
reduce(foundCell, orOp<bool>());
if (!foundCell)
{
FatalErrorIn
(
@ -180,7 +196,11 @@ Foam::timeActivatedExplicitMulticomponentPointSource::Su
)
{
const label cid = cellOwners_[sourceI];
sourceField[cid] += dt*psp.fieldData()[i].second()/V[cid];
if (cid >= 0)
{
sourceField[cid] +=
dt*psp.fieldData()[i].second()/V[cid];
}
}
}
}
@ -235,7 +255,11 @@ Foam::timeActivatedExplicitMulticomponentPointSource::Su()
)
{
const label cid = cellOwners_[sourceI];
sourceField[cid] += dt*psp.fieldData()[i].second()/V[cid];
if (cid >= 0)
{
sourceField[cid] +=
dt*psp.fieldData()[i].second()/V[cid];
}
}
}
}