ENH: Added check for size of points.

Useful for in parallel if it cannot find processor*/constant/polyMesh/points
and decides to read undecomposed constant/polyMesh/points...
This commit is contained in:
mattijs
2010-02-17 15:17:44 +00:00
parent eb2cf75027
commit 85867eff93

View File

@ -151,6 +151,34 @@ displacementComponentLaplacianFvMotionSolver
: -1
)
{
if (points0_.size() != mesh.nPoints())
{
FatalErrorIn
(
"displacementComponentLaplacianFvMotionSolver::"
"displacementComponentLaplacianFvMotionSolver\n"
"(\n"
" const polyMesh&,\n"
" Istream&\n"
")"
) << "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size()
<< " read from file "
<<
IOobject
(
"points",
mesh.time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
).filePath()
<< exit(FatalError);
}
IOobject io
(
"pointLocation",