Skip to content
Snippets Groups Projects
Commit fe2e219b authored by Andrew Heather's avatar Andrew Heather
Browse files

added check for user supplied location in mesh

parent 0d441221
Branches
Tags
No related merge requests found
......@@ -52,7 +52,21 @@ void Foam::timeActivatedExplicitMulticomponentPointSource::updateAddressing()
forAll(pointSources_, sourceI)
{
const pointSourceProperties& psp = pointSources_[sourceI];
cellOwners_[sourceI] = mesh_.findCell(psp.location());
label cid = mesh_.findCell(psp.location());
if (cid < 0)
{
FatalErrorIn
(
"timeActivatedExplicitMulticomponentPointSource::"
"updateAddressing()"
) << "Unable to find location " << psp.location() << " in mesh "
<< "for source " << psp.name() << nl
<< exit(FatalError);
}
else
{
cellOwners_[sourceI] = cid;
}
forAll(psp.fieldData(), fieldI)
{
const word& fieldName = psp.fieldData()[fieldI].first();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment