44void 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()
113 const word& surfName,
175 if (objectRegistry::foundObject<objectRegistry>(pointDataName))
187 objectRegistry::cfindObject<objectRegistry>(pointDataName);
191 return subreg->
size();
214 unsigned where(FieldAssociation::NO_DATA);
220 if (regptr && regptr->
found(fieldName))
222 where |= FieldAssociation::FACE_DATA;
229 cfindObject<objectRegistry>(pointDataName);
231 if (regptr && regptr->
found(fieldName))
233 where |= FieldAssociation::POINT_DATA;
243 const word& fieldName,
247 const unsigned where(association);
253 if (where & FieldAssociation::FACE_DATA)
264 if (where & FieldAssociation::POINT_DATA)
267 cfindObject<objectRegistry>(pointDataName);
291 || this->nFaces() != faces.
size()
298 this->storedPoints() =
points;
299 this->storedFaces() = faces;
328 this->storedPoints() = surf.
points();
329 this->storedFaces() = surf.
faces();
358 this->storedPoints() = surf.
points();
380 this->storedPoints().transfer(
points);
381 this->storedFaces().transfer(faces);
382 zoneIds_.transfer(zoneIds);
451const regIOobject* polySurface::findFieldObject<polySurfaceGeoMesh>
453 const word& fieldName
457 return cfindObject<regIOobject>(fieldName);
462const regIOobject* polySurface::findFieldObject<polySurfacePointGeoMesh>
464 const word& fieldName
485 const word& fieldName
491 if (subreg->
found(fieldName))
503 const word& fieldName
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,...
void resize(const label len)
Adjust allocated size of list.
void clear()
Clear the list, i.e. set size to zero.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
const surfZoneList & surfZones() const
Const access to the surface zones.
pointField & storedPoints()
Non-const access to global points.
const List< Face > & surfFaces() const
Return const access to the faces.
List< Face > & storedFaces()
Non-const access to the faces.
A special purpose MeshedSurface that exposes the stored values for direct modification.
const Field< point_type > & points() const noexcept
Return reference to global points.
void size(const label n)
Older name for setAddressableSize.
Abstract definition of a meshed surface defined by faces and points.
virtual const faceList & faces() const =0
The faces used for the surface.
virtual const labelList & zoneIds() const
Per-face zone/region information.
virtual const pointField & points() const =0
The points used for the surface.
Registry of regIOobjects.
const objectRegistry & subRegistry(const word &name, const bool forceCreate=false, const bool recursive=false) const
Lookup and return a const sub-objectRegistry.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
bool found(const word &name, const bool recursive=false) const
Can the regIOobject object be found (by name).
constant condensation/saturation model.
A surface mesh consisting of general polygon faces and capable of holding fields.
virtual label size() const
Return number of faces.
const objectRegistry & faceData() const
Face data are stored directly on the registry.
void copySurface(const pointField &points, const faceList &faces, bool unused=false)
Update with new contents.
label nFaceData() const
Number of main entries, without PointData sub-registry.
virtual ~polySurface()
Destructor.
const objectRegistry & pointData() const
Point data are stored in a sub-registry.
label nPointData() const
Number of entries on PointData sub-registry (if it exists)
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.
FieldAssociation queryFieldAssociation(const word &fieldName) const
Query the field association (FACE or POINT)
static const word pointDataName
Name for point fields sub-registry.
const regIOobject * findFieldObject(const word &fieldName, const FieldAssociation association) const
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
transferModelList & transfer()
Transfer.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
errorManipArg< error, int > exit(error &err, const int errNo=1)