mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
keyedSurface::setSize() affects faces and regions
This commit is contained in:
@ -220,7 +220,7 @@ Foam::fileFormats::OFFfileFormat::OFFfileFormat
|
||||
faces().transfer(faceLst);
|
||||
|
||||
// no region information
|
||||
regions().setSize(nFaces());
|
||||
regions().setSize(size());
|
||||
regions() = 0;
|
||||
|
||||
setPatches(0);
|
||||
|
||||
@ -694,6 +694,13 @@ Foam::keyedSurface::~keyedSurface()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::keyedSurface::setSize(const label s)
|
||||
{
|
||||
MeshStorage::setSize(s);
|
||||
regions_.setSize(s);
|
||||
}
|
||||
|
||||
|
||||
//- Move points
|
||||
void Foam::keyedSurface::movePoints(const pointField& newPoints)
|
||||
{
|
||||
@ -796,7 +803,7 @@ void Foam::keyedSurface::transfer(meshedSurface& surf)
|
||||
clearOut();
|
||||
points().transfer(surf.points());
|
||||
faces().transfer(surf.faces());
|
||||
regions_.setSize(nFaces());
|
||||
regions_.setSize(size());
|
||||
|
||||
surfacePatchList& patchLst = surf.patches();
|
||||
|
||||
@ -968,11 +975,11 @@ void Foam::keyedSurface::write(Ostream& os) const
|
||||
<< geoPatches_ << endl;
|
||||
|
||||
// Note: Write with global point numbering
|
||||
os << "\n// points:"
|
||||
os << "\n// points:\n"
|
||||
<< points() << nl
|
||||
<< "\n// faces:"
|
||||
<< "\n// faces:\n"
|
||||
<< faces() << nl
|
||||
<< "\n// regions:"
|
||||
<< "\n// regions:\n"
|
||||
<< regions() << endl;
|
||||
|
||||
// Check state of Ostream
|
||||
|
||||
@ -118,6 +118,10 @@ private:
|
||||
//- Generic read routine. Chooses reader based on extension.
|
||||
//? bool read(const fileName&, const word& ext);
|
||||
|
||||
|
||||
//- Disable setSize with value
|
||||
void setSize(const label, const FaceType&);
|
||||
|
||||
protected:
|
||||
|
||||
// Static protected functions
|
||||
@ -341,15 +345,18 @@ public:
|
||||
//- Return the number of faces
|
||||
label nFaces() const
|
||||
{
|
||||
return faces().size();
|
||||
return MeshStorage::size();
|
||||
}
|
||||
|
||||
//- The surface size is the number of faces
|
||||
label size() const
|
||||
{
|
||||
return nFaces();
|
||||
return MeshStorage::size();
|
||||
}
|
||||
|
||||
//- Reset size of face and region list
|
||||
void setSize(const label);
|
||||
|
||||
//- Return const access to global points
|
||||
const pointField& points() const
|
||||
{
|
||||
|
||||
@ -893,9 +893,9 @@ void Foam::meshedSurface::write(Ostream& os) const
|
||||
os << token::END_LIST << endl;
|
||||
|
||||
// Note: Write with global point numbering
|
||||
os << "\n// points:"
|
||||
os << "\n// points:\n"
|
||||
<< points() << nl
|
||||
<< "\n// faces:"
|
||||
<< "\n// faces:\n"
|
||||
<< faces() << endl;
|
||||
|
||||
// Check state of Ostream
|
||||
|
||||
@ -120,7 +120,6 @@ private:
|
||||
//- Read in Foam format
|
||||
bool read(Istream&);
|
||||
|
||||
|
||||
// Static private functions
|
||||
|
||||
public:
|
||||
@ -309,13 +308,13 @@ public:
|
||||
//- Return the number of faces
|
||||
label nFaces() const
|
||||
{
|
||||
return faces().size();
|
||||
return MeshStorage::size();
|
||||
}
|
||||
|
||||
//- The surface size is the number of faces
|
||||
label size() const
|
||||
{
|
||||
return nFaces();
|
||||
return MeshStorage::size();
|
||||
}
|
||||
|
||||
//- Return const access to global points
|
||||
|
||||
Reference in New Issue
Block a user