Go to the documentation of this file.
44 void Foam::polySurface::calculateZoneIds(
const UList<surfZone>& zones)
58 for (
const surfZone& zn : zones)
60 const label sz = zn.size();
62 SubList<label>(zoneIds_, sz, off) = zn.index();
70 <<
"More faces " <<
size() <<
" than zones " << off <<
endl;
72 SubList<label>(zoneIds_,
size()-off, off) = zones.last().index();
74 else if (
size() < off)
77 <<
"More zones " << off <<
" than faces " <<
size()
85 Foam::polySurface::polySurface(
const IOobject& io,
bool doCheckIn)
111 Foam::polySurface::polySurface
113 const word& surfName,
134 Foam::polySurface::polySurface
147 Foam::polySurface::polySurface
175 if (objectRegistry::foundObject<objectRegistry>(pointDataName))
187 objectRegistry::cfindObject<objectRegistry>(pointDataName);
191 return subreg->
size();
220 if (regptr && regptr->
found(fieldName))
229 cfindObject<objectRegistry>(pointDataName);
231 if (regptr && regptr->
found(fieldName))
243 const word& fieldName,
247 const unsigned where(association);
267 cfindObject<objectRegistry>(pointDataName);
290 this->
nPoints() != points.size()
291 || this->nFaces() != faces.size()
298 this->storedPoints() =
points;
299 this->storedFaces() = faces;
321 || this->nFaces() != surf.
faces().size()
328 this->storedPoints() = surf.
points();
329 this->storedFaces() = surf.
faces();
351 || this->nFaces() != surf.
surfFaces().size()
358 this->storedPoints() = surf.points();
380 this->storedPoints().transfer(
points);
381 this->storedFaces().transfer(faces);
382 zoneIds_.transfer(zoneIds);
451 const regIOobject* polySurface::findFieldObject<polySurfaceGeoMesh>
453 const word& fieldName
457 return cfindObject<regIOobject>(fieldName);
462 const regIOobject* polySurface::findFieldObject<polySurfacePointGeoMesh>
464 const word& fieldName
470 objectRegistry::cfindObject<objectRegistry>(pointDataName);
483 const objectRegistry* polySurface::whichRegistry<polySurfaceGeoMesh>
485 const word& fieldName
491 if (subreg->
found(fieldName))
501 const objectRegistry* polySurface::whichRegistry<polySurfacePointGeoMesh>
503 const word& fieldName
509 objectRegistry::cfindObject<objectRegistry>(pointDataName);
511 if (subreg && subreg->
found(fieldName))
label size() const noexcept
The number of elements in table.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const surfZoneList & surfZones() const
Const access to the surface zones.
label nFaceData() const
Number of main entries, without PointData sub-registry.
A class for handling words, derived from Foam::string.
List< Face > & storedFaces()
Non-const access to the faces.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void resize(const label len)
Adjust allocated size of list.
static constexpr const zero Zero
Global zero (0)
const regIOobject * findFieldObject(const word &fieldName, const FieldAssociation association) const
pointField & storedPoints()
Non-const access to global points.
const objectRegistry & faceData() const
Face data are stored directly on the registry.
virtual ~polySurface()
Destructor.
FieldAssociation
Enumeration for the field association.
void transfer(pointField &&points, faceList &&faces, labelList &&zoneIds=labelList())
Transfer the contents of the argument and annul the argument.
virtual const faceList & faces() const =0
The faces used for the surface.
Abstract definition of a meshed surface defined by faces and points.
const List< Face > & surfFaces() const
Return const access to the faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Registry of regIOobjects.
A surface mesh consisting of general polygon faces and capable of holding fields.
void copySurface(const pointField &points, const faceList &faces, bool unused=false)
Update with new contents.
static const word pointDataName
Name for point fields sub-registry.
virtual const pointField & points() const =0
The points used for the surface.
bool found(const word &name, const bool recursive=false) const
Can the regIOobject object be found (by name).
FieldAssociation queryFieldAssociation(const word &fieldName) const
Query the field association (FACE or POINT)
errorManipArg< error, int > exit(error &err, const int errNo=1)
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
const objectRegistry & subRegistry(const word &name, const bool forceCreate=false, const bool recursive=false) const
Lookup and return a const sub-objectRegistry.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
void clear()
Clear the list, i.e. set size to zero.
virtual const labelList & zoneIds() const
Per-face zone/region information.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const objectRegistry & pointData() const
Point data are stored in a sub-registry.
virtual label size() const
Return number of faces.
const word & constant() const
Return constant name.
A special purpose MeshedSurface that exposes the stored values for direct modification.
constant condensation/saturation model.
label size() const
The surface size is the number of faces.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
const Time & time() const noexcept
Return time registry.
label nPointData() const
Number of entries on PointData sub-registry (if it exists)