zone updates

This commit is contained in:
andy
2009-08-17 18:38:44 +01:00
parent c6aaf9be58
commit 9b350a235d
6 changed files with 30 additions and 21 deletions

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A subset of mesh cells.
\*---------------------------------------------------------------------------*/
#include "cellZone.H"

View File

@ -201,15 +201,9 @@ public:
//- Return zoneMesh reference
const cellZoneMesh& zoneMesh() const;
//- Clear addressing
virtual void clearAddressing();
//- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const;
//- Write
virtual void write(Ostream&) const;
//- Write dictionary
virtual void writeDict(Ostream&) const;

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A subset of mesh faces.
\*---------------------------------------------------------------------------*/
#include "faceZone.H"

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A subset of mesh points.
\*---------------------------------------------------------------------------*/
#include "pointZone.H"

View File

@ -202,9 +202,6 @@ public:
//- Helper function to re-direct to zone::localID(...)
label whichPoint(const label globalPointID) const;
//- Clear addressing
virtual void clearAddressing();
//- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const;
@ -212,9 +209,6 @@ public:
virtual void movePoints(const pointField&)
{}
//- Write
virtual void write(Ostream&) const;
//- Write dictionary
virtual void writeDict(Ostream&) const;

View File

@ -189,6 +189,36 @@ void Foam::zone::clearAddressing()
}
bool Foam::zone::checkDefinition(const label maxSize, const bool report) const
{
const labelList& addr = *this;
bool boundaryError = false;
forAll(addr, i)
{
if (addr[i] < 0 || addr[i] >= maxSize)
{
boundaryError = true;
if (report)
{
SeriousErrorIn
(
"bool zone::checkDefinition("
"const label maxSize, const bool report) const"
) << "Zone " << name_
<< " contains invalid index label " << addr[i] << nl
<< "Valid index labels are 0.."
<< maxSize-1 << endl;
}
}
}
return boundaryError;
}
void Foam::zone::write(Ostream& os) const
{
os << nl << name_