Skip to content
Snippets Groups Projects
Commit 61d7e8fc authored by andy's avatar andy
Browse files

ENH: solidBodyMotionFvMesh - Added check to ensure cellZone is set

parent fd8fd811
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -94,10 +94,23 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
if (cellZoneName != "none")
{
zoneID_ = cellZones().findZoneID(cellZoneName);
Info<< "Applying solid body motion to cellZone " << cellZoneName
<< endl;
zoneID_ = cellZones().findZoneID(cellZoneName);
if (zoneID_ == -1)
{
FatalErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)"
)
<< "Unable to find cellZone " << cellZoneName
<< ". Valid celLZones are:"
<< cellZones().names()
<< exit(FatalError);
}
const cellZone& cz = cellZones()[zoneID_];
......
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