surfMesh Class Reference

A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storing fields. More...

Inheritance diagram for surfMesh:
[legend]
Collaboration diagram for surfMesh:
[legend]

Public Types

enum  readUpdateState { UNCHANGED, POINTS_MOVED, TOPO_CHANGE, TOPO_PATCH_CHANGE }
 Enumeration defining the state of the mesh after a read update. More...
 
typedef surfMesh Mesh
 Typedef required for GeoMesh. More...
 
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
- Public Types inherited from IOobject
enum  objectState : char { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
 
enum  readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
 
enum  writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...
 
enum  fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster }
 Enumeration defining the file checking options. More...
 
- Public Types inherited from HashTable< regIOobject * >
typedef HashTable< regIOobject *, word, Foam::Hash< word > > this_type
 The template instance used for this HashTable. More...
 
typedef word key_type
 The second template parameter, type of keys used. More...
 
typedef regIOobjectmapped_type
 The first template parameter, type of objects contained. More...
 
typedef regIOobjectvalue_type
 Same as mapped_type for OpenFOAM HashTables. More...
 
typedef Foam::Hash< wordhasher
 The third template parameter, the hash index method. More...
 
typedef regIOobject * * pointer
 Pointer type for storing into value_type objects. More...
 
typedef regIOobject * & reference
 Reference to the stored value_type. More...
 
typedef label difference_type
 The type to represent the difference between two iterators. More...
 
typedef label size_type
 The type that can represent the size of a HashTable. More...
 
using key_iterator = key_iterator_base< iterator >
 Forward iterator returning the key. More...
 
using const_key_iterator = key_iterator_base< const_iterator >
 Forward const iterator returning the key. More...
 
- Public Types inherited from PrimitivePatch<::Foam::UList< face >, const pointField & >
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
typedef std::remove_reference< ::Foam::UList< face > >::type::value_type face_type
 The face type. More...
 
typedef std::remove_reference< const pointField & >::type::value_type point_type
 The point type. More...
 
typedef ::Foam::UList< faceFaceListType
 The face list type. More...
 
typedef const pointFieldPointFieldType
 The point field type. More...
 
typedef face_type FaceType
 Deprecated(2020-03) prefer face_type typedef. More...
 
- Public Types inherited from UList< face >
typedef face value_type
 The value type the list contains. More...
 
typedef facepointer
 The pointer type for non-const access to value_type items. More...
 
typedef facereference
 The type used for storing into value_type objects. More...
 
typedef faceiterator
 Random access iterator for traversing a UList. More...
 
typedef label size_type
 The type to represent the size of a UList. More...
 
typedef label difference_type
 The difference between iterator objects. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 Reverse iterator (non-const access) More...
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Reverse iterator (const access) More...
 

Public Member Functions

 TypeName ("surfMesh")
 Declare type-name, virtual type (with debug switch) More...
 
 surfMesh (const IOobject &io)
 Read construct from IOobject. More...
 
 surfMesh (const IOobject &io, const word &surfName)
 Read construct from IOobject, with alternative surface name. More...
 
 surfMesh (const word &surfName, const objectRegistry &obr)
 Construct null with specified name on the given registry. More...
 
 surfMesh (const IOobject &io, const MeshedSurface< face > &surf, const word &surfName=word::null)
 Copy construct from MeshedSurface<face> More...
 
 surfMesh (const IOobject &io, MeshedSurface< face > &&surf, const word &surfName=word::null)
 Move construct from MeshedSurface<face> More...
 
virtual ~surfMesh ()
 Destructor. More...
 
fileName meshDir () const
 Return the local mesh directory (dbDir()/meshSubDir) More...
 
const fileNamepointsInstance () const
 Return the current instance directory for points. More...
 
const fileNamefacesInstance () const
 Return the current instance directory for faces. More...
 
void setInstance (const fileName &inst, IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
 Set the instance for mesh files. More...
 
void setWriteOption (IOobject::writeOption wOpt)
 Adjust the write option for all components. More...
 
virtual label nPoints () const
 Return the number of raw points. More...
 
virtual label nFaces () const
 Return the number of raw faces. More...
 
virtual label size () const
 Return number of faces. More...
 
virtual const pointFieldpoints () const
 Return points. More...
 
virtual const faceListfaces () const
 Return faces. More...
 
virtual const surfZoneListsurfZones () const
 Return surface zones. More...
 
const vectorFieldSf () const
 Return face area vectors (normals) More...
 
const scalarFieldmagSf () const
 Return face area magnitudes. More...
 
const vectorFieldCf () const
 Face centres. More...
 
void addZones (const surfZoneList &zones, bool validate=true)
 Add surface zones, optionally validating the zone coverage. More...
 
void removeZones ()
 Remove surface zones. More...
 
void checkZones (const bool verbose=true)
 Check the surface zone definitions. More...
 
void copySurface (const pointField &points, const faceList &faces, bool validate=false)
 Update with new contents. More...
 
void copySurface (const meshedSurf &surf, bool validate=false)
 Update with new contents. More...
 
void copySurface (const MeshedSurface< face > &surf, bool validate=false)
 Update with new contents. More...
 
void transfer (MeshedSurface< face > &surf, bool validate=false)
 Transfer the contents of the argument and annul the argument. More...
 
virtual readUpdateState readUpdate ()
 Update mesh based on the files saved in time directories. More...
 
template<class Type , class GeoMeshType = surfGeoMesh>
void storeField (const word &fieldName, const dimensionSet &dims, const Field< Type > &values)
 Copy/store named field as face or point data (template parameter). More...
 
template<class Type , class GeoMeshType = surfGeoMesh>
void storeField (const word &fieldName, const dimensionSet &dims, Field< Type > &&values)
 Move/store named field as face or point data (template parameter). More...
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 Write all components using given format, version and compression. More...
 
void write (const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 Write to file, choosing writer based on its extension. More...
 
void write (const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 Write to file, choosing writer for given fileType. More...
 
autoPtr< MeshedSurface< face > > releaseGeom ()
 Release the geometry and return as a MeshedSurface<face>. More...
 
void clearGeom ()
 Clear geometry. More...
 
void clearAddressing ()
 Clear addressing. More...
 
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD. More...
 
void clearPrimitives ()
 Clear primitive data (points, faces and cells) More...
 
void clearFields ()
 Clear stored fields. More...
 
void removeFiles (const fileName &instanceDir) const
 Remove all files from mesh instance. More...
 
void removeFiles () const
 Remove all files from mesh instance() More...
 
- Public Member Functions inherited from surfaceRegistry
 TypeName ("surfaceRegistry")
 Runtime type information. More...
 
 surfaceRegistry (const objectRegistry &obr, const word &surfName=word::null)
 Construct for the given objectRegistry and named surface. More...
 
virtual ~surfaceRegistry ()=default
 Destructor. More...
 
- Public Member Functions inherited from objectRegistry
 TypeName ("objectRegistry")
 Declare type name for this IOobject. More...
 
 objectRegistry (const Time &db, const label nObjects=128)
 
 objectRegistry (const IOobject &io, const label nObjects=128)
 
virtual ~objectRegistry ()
 Destructor, with checkOut() for all objects that are ownedByRegistry. More...
 
const objectRegistrythisDb () const noexcept
 Return the object registry. More...
 
const objectRegistryparent () const noexcept
 Return the parent objectRegistry. More...
 
const Timetime () const noexcept
 Return time registry. More...
 
bool isTimeDb () const noexcept
 True if the registry is Time. More...
 
virtual const fileNamedbDir () const
 Local directory path of this objectRegistry relative to the time. More...
 
HashTable< wordHashSetclasses () const
 A summary hash of classes used and their associated object names. More...
 
template<class MatchPredicate >
HashTable< wordHashSetclasses (const MatchPredicate &matchName) const
 
label count (const char *clsName) const
 The number of objects of the given class name. More...
 
template<class MatchPredicate >
label count (const MatchPredicate &matchClass) const
 The number of objects of the given class name. More...
 
template<class MatchPredicate1 , class MatchPredicate2 >
label count (const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
 The number of objects of the given class name. More...
 
template<class Type >
label count (const bool strict=false) const
 The names of objects with a class satisfying isA<Type> More...
 
template<class Type , class MatchPredicate >
label count (const MatchPredicate &matchName) const
 
wordList names () const
 The names of all objects. More...
 
wordList names (const char *clsName) const
 The names of objects with the given class name. More...
 
template<class MatchPredicate >
wordList names (const MatchPredicate &matchClass) const
 The names of objects with a matching class name. More...
 
template<class MatchPredicate1 , class MatchPredicate2 >
wordList names (const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
 
template<class Type >
wordList names () const
 The names of objects with a class satisfying isA<Type>. More...
 
template<class Type , class MatchPredicate >
wordList names (const MatchPredicate &matchName) const
 
wordList sortedNames () const
 The sorted names of all objects. More...
 
wordList sortedNames (const char *clsName) const
 The sorted names of objects with the given class name. More...
 
template<class MatchPredicate >
wordList sortedNames (const MatchPredicate &matchClass) const
 The sorted names objects with a matching class name. More...
 
template<class MatchPredicate1 , class MatchPredicate2 >
wordList sortedNames (const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
 
template<class Type >
wordList sortedNames () const
 The sorted names of objects with a class satisfying isA<Type> More...
 
template<class Type , class MatchPredicate >
wordList sortedNames (const MatchPredicate &matchName) const
 
const objectRegistrysubRegistry (const word &name, const bool forceCreate=false, const bool recursive=false) const
 Lookup and return a const sub-objectRegistry. More...
 
template<class Type >
HashTable< const Type * > lookupClass (const bool strict=false) const
 Return all objects with a class satisfying isA<Type> More...
 
template<class Type >
HashTable< Type * > lookupClass (const bool strict=false)
 Return all objects with a class satisfying isA<Type> More...
 
const regIOobjectcfindIOobject (const word &name, const bool recursive=false) const
 Return const pointer to the regIOobject. More...
 
bool found (const word &name, const bool recursive=false) const
 Can the regIOobject object be found (by name). More...
 
template<class Type >
bool foundObject (const word &name, const bool recursive=false) const
 Is the named Type found? More...
 
template<class Type >
const Type * cfindObject (const word &name, const bool recursive=false) const
 Return const pointer to the object of the given Type. More...
 
template<class Type >
const Type * findObject (const word &name, const bool recursive=false) const
 Return const pointer to the object of the given Type. More...
 
template<class Type >
Type * findObject (const word &name, const bool recursive=false)
 Return non-const pointer to the object of the given Type. More...
 
template<class Type >
Type * getObjectPtr (const word &name, const bool recursive=false) const
 
template<class Type >
const Type & lookupObject (const word &name, const bool recursive=false) const
 
template<class Type >
Type & lookupObjectRef (const word &name, const bool recursive=false) const
 
label getEvent () const
 Return new event number. More...
 
bool checkIn (regIOobject *io) const
 Add a regIOobject to registry. A nullptr is ignored. More...
 
bool checkIn (regIOobject &io) const
 Add a regIOobject to registry. More...
 
bool checkOut (regIOobject *io) const
 
bool checkOut (regIOobject &io) const
 
bool checkOut (const word &key) const
 
void clear ()
 Clear all entries from the registry. More...
 
void clearStorage ()
 Clear all entries from the registry and the table itself. More...
 
bool erase (const iterator &iter)
 Erase an entry specified by the given iterator. More...
 
bool erase (const word &key)
 Erase an entry specified by the given key. More...
 
label erase (std::initializer_list< word > keys)
 Remove entries given by the listed keys. More...
 
label erase (const UList< word > &keys)
 Remove entries given by the listed keys. More...
 
virtual void rename (const word &newName)
 Rename. More...
 
virtual bool modified () const
 Return true if any of the object's files have been modified. More...
 
void readModifiedObjects ()
 Read the objects that have been modified. More...
 
virtual bool readIfModified ()
 Read object if modified. More...
 
virtual bool writeData (Ostream &) const
 writeData function required by regIOobject but not used. More...
 
template<class Type >
const Type * lookupObjectPtr (const word &name, bool recursive=false) const
 Deprecated(2018-10) find object. More...
 
template<class Type >
Type * lookupObjectRefPtr (const word &name, bool recursive=false) const
 Deprecated(2018-10) get object pointer, ignoring constness. More...
 
template<class MatchPredicate >
Foam::HashTable< Foam::wordHashSetclassesImpl (const objectRegistry &list, const MatchPredicate &matchName)
 
template<class MatchPredicate1 , class MatchPredicate2 >
Foam::label countImpl (const objectRegistry &list, const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName)
 
template<class Type , class MatchPredicate >
Foam::label countTypeImpl (const objectRegistry &list, const MatchPredicate &matchName)
 
template<class MatchPredicate1 , class MatchPredicate2 >
Foam::wordList namesImpl (const objectRegistry &list, const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName, const bool doSort)
 
template<class Type , class MatchPredicate >
Foam::wordList namesTypeImpl (const objectRegistry &list, const MatchPredicate &matchName, const bool doSort)
 
template<class MatchPredicate >
Foam::HashTable< Foam::wordHashSetclasses (const MatchPredicate &matchName) const
 
template<class MatchPredicate >
Foam::label count (const MatchPredicate &matchClass) const
 
template<class MatchPredicate1 , class MatchPredicate2 >
Foam::label count (const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
 
template<class Type , class MatchPredicate >
Foam::label count (const MatchPredicate &matchName) const
 
template<class Type >
Foam::label count (const bool strict) const
 
template<class MatchPredicate >
Foam::wordList names (const MatchPredicate &matchClass) const
 
template<class MatchPredicate1 , class MatchPredicate2 >
Foam::wordList names (const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
 
template<class Type >
Foam::wordList names () const
 
template<class Type , class MatchPredicate >
Foam::wordList names (const MatchPredicate &matchName) const
 
template<class MatchPredicate >
Foam::wordList sortedNames (const MatchPredicate &matchClass) const
 
template<class MatchPredicate1 , class MatchPredicate2 >
Foam::wordList sortedNames (const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
 
template<class Type >
Foam::wordList sortedNames () const
 
template<class Type , class MatchPredicate >
Foam::wordList sortedNames (const MatchPredicate &matchName) const
 
template<class Type >
Foam::HashTable< const Type * > lookupClass (const bool strict) const
 
template<class Type >
Foam::HashTable< Type * > lookupClass (const bool strict)
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information. More...
 
 regIOobject (const IOobject &io, const bool isTimeObject=false)
 
 regIOobject (const regIOobject &rio)
 Copy construct. More...
 
 regIOobject (const regIOobject &rio, bool registerCopy)
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 
 regIOobject (const IOobject &io, const regIOobject &rio)
 Copy construct with new IO parameters. More...
 
virtual ~regIOobject ()
 Destructor. More...
 
bool checkIn ()
 Add object to registry, if not already registered. More...
 
bool checkOut ()
 Remove all file watches and remove object from registry. More...
 
virtual void addWatch ()
 Add file watch on object (if registered and READ_IF_MODIFIED) More...
 
bool ownedByRegistry () const
 Is this object owned by the registry? More...
 
bool store ()
 
void release (const bool unregister=false)
 Release ownership of this object from its registry. More...
 
label eventNo () const
 Event number at last update. More...
 
label & eventNo ()
 Event number at last update. More...
 
bool upToDate (const regIOobject &) const
 Return true if up-to-date with respect to given object. More...
 
bool upToDate (const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
void setUpToDate ()
 Set as up-to-date. More...
 
const dictionaryfindMetaData () const noexcept
 Return pointer to meta-data or nullptr. More...
 
dictionarygetMetaData () noexcept
 Get or create meta-data. More...
 
void removeMetaData ()
 Remove meta-data. More...
 
virtual void updateMetaData ()
 Update internal meta-data (eg, prior to writing) More...
 
virtual fileName filePath () const
 Return complete path + object name if the file exists. More...
 
bool headerOk ()
 Read and check header info. More...
 
IstreamreadStream (const word &, const bool valid=true)
 Return Istream and check object type against that given. More...
 
void close ()
 Close Istream. More...
 
virtual bool readData (Istream &)
 Virtual readData function. More...
 
virtual bool read ()
 Read object. More...
 
virtual label addWatch (const fileName &)
 Add file watch for fileName on object if not yet watched. More...
 
const labelListwatchIndices () const
 Return file-monitoring handles. More...
 
labelListwatchIndices ()
 Return file-monitoring handles. More...
 
virtual bool write (const bool valid=true) const
 Write using setting from DB. More...
 
virtual bool global () const
 Is object global. More...
 
void operator= (const IOobject &io)
 Copy assignment. More...
 
virtual bool writeObject (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType comp, const bool valid) const
 Write using given format, version and compression. More...
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Declare type-name, virtual type (with debug switch) More...
 
 IOobject (const IOobject &)=default
 Copy construct. More...
 
virtual ~IOobject ()=default
 Destructor. More...
 
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from name, instance, registry, io options. More...
 
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from name, instance, local, registry, io options. More...
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from path, registry, io options. More...
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 Copy construct, resetting registry. More...
 
 IOobject (const IOobject &io, const word &name)
 Copy construct, resetting name. More...
 
 IOobject (const IOobject &io, readOption, writeOption)
 Copy construct, resetting io options. More...
 
autoPtr< IOobjectclone () const
 Clone. More...
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 Clone resetting registry. More...
 
const objectRegistrydb () const noexcept
 Return the local objectRegistry. More...
 
const Timetime () const
 Return Time associated with the objectRegistry. More...
 
const wordname () const noexcept
 Return name. More...
 
const wordheaderClassName () const noexcept
 Return name of the class name read from header. More...
 
wordheaderClassName () noexcept
 Return non-constant access to the class name read from header. More...
 
const stringnote () const noexcept
 Return the optional note. More...
 
stringnote () noexcept
 Return non-constant access to the optional note. More...
 
bool registerObject () const noexcept
 Should object created with this IOobject be registered? More...
 
bool registerObject (bool on) noexcept
 Change registration preference, return previous value. More...
 
bool globalObject () const noexcept
 Is object same for all processors? More...
 
bool globalObject (bool on) noexcept
 Change global-object status, return previous value. More...
 
unsigned labelByteSize () const noexcept
 The sizeof (label) in bytes, possibly read from the header. More...
 
unsigned scalarByteSize () const noexcept
 The sizeof (scalar) in bytes, possibly read from the header. More...
 
bool isHeaderClassName (const word &clsName) const
 Test if headerClassName() equals the given class name. More...
 
template<class Type >
bool isHeaderClassName () const
 Test if headerClassName() equals Type::typeName. More...
 
readOption readOpt () const noexcept
 The read option. More...
 
readOption readOpt (readOption opt) noexcept
 Change the read option, return previous value. More...
 
writeOption writeOpt () const noexcept
 The write option. More...
 
writeOption writeOpt (writeOption opt) noexcept
 Change the write option, return previous value. More...
 
word group () const
 Return group (extension part of name) More...
 
word member () const
 Return member (name without the extension) More...
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const noexcept
 
fileNameinstance () noexcept
 
const fileNamelocal () const noexcept
 
fileName path () const
 The complete path. More...
 
fileName path (const word &instance, const fileName &local=fileName::null) const
 The complete path with alternative instance and local. More...
 
fileName objectPath () const
 The complete path + object name. More...
 
fileName objectRelPath () const
 The object path relative to the root. More...
 
fileName localFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches locally. More...
 
fileName globalFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches up if in parallel. More...
 
IOstreamOption parseHeader (const dictionary &headerDict)
 
bool readHeader (Istream &is)
 
bool readHeader (dictionary &headerDict, Istream &is)
 
template<class Type >
bool typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true)
 Read header (uses typeFilePath to find file) and check its info. More...
 
template<class Type >
void warnNoRereading () const
 Helper: warn that type does not support re-reading. More...
 
bool writeHeader (Ostream &os) const
 Write header with current type() More...
 
bool writeHeader (Ostream &os, const word &objectType) const
 Write header with override of type. More...
 
void writeHeader (dictionary &dict, IOstreamOption streamOpt) const
 
void writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const
 
bool good () const noexcept
 
bool bad () const noexcept
 
InfoProxy< IOobjectinfo () const
 Return info proxy. More...
 
void operator= (const IOobject &io)
 
readOptionreadOpt () noexcept
 Access to the read option. More...
 
writeOptionwriteOpt () noexcept
 Access to the write option. More...
 
boolregisterObject () noexcept
 Access to the register object option. More...
 
boolglobalObject () noexcept
 Access to the global object option. More...
 
template<>
bool isHeaderClassName () const
 Specialization for void always returns true (no headerClassName check). More...
 
template<class StringType >
Foam::word groupName (StringType base, const word &group)
 
- Public Member Functions inherited from HashTable< regIOobject * >
 HashTable ()
 Default construct with default (128) table capacity. More...
 
 HashTable (const label size)
 Construct given initial table capacity. More...
 
 HashTable (Istream &is, const label size=128)
 Construct from Istream with default table capacity. More...
 
 HashTable (const this_type &ht)
 Copy construct. More...
 
 HashTable (this_type &&rhs)
 Move construct. More...
 
 HashTable (std::initializer_list< std::pair< word, regIOobject * >> list)
 Construct from an initializer list. More...
 
 ~HashTable ()
 Destructor. More...
 
label capacity () const noexcept
 The size of the underlying table. More...
 
label size () const noexcept
 The number of elements in table. More...
 
bool empty () const noexcept
 True if the hash table is empty. More...
 
regIOobject * & at (const word &key)
 Find and return a hashed entry. FatalError if it does not exist. More...
 
const regIOobject * & at (const word &key) const
 Find and return a hashed entry. FatalError if it does not exist. More...
 
bool found (const word &key) const
 Return true if hashed entry is found in table. More...
 
iterator find (const word &key)
 Find and return an iterator set at the hashed entry. More...
 
const_iterator find (const word &key) const
 Find and return an const_iterator set at the hashed entry. More...
 
const_iterator cfind (const word &key) const
 Find and return an const_iterator set at the hashed entry. More...
 
const regIOobject * & lookup (const word &key, const regIOobject * &deflt) const
 Return hashed entry if it exists, or return the given default. More...
 
List< wordtoc () const
 The table of contents (the keys) in unsorted order. More...
 
List< wordsortedToc () const
 The table of contents (the keys) in sorted order. More...
 
List< wordsortedToc (const Compare &comp) const
 
Foam::List< wordsortedToc (const Compare &comp) const
 
List< wordtocKeys (const UnaryPredicate &pred, const bool invert=false) const
 
Foam::List< wordtocKeys (const UnaryPredicate &pred, const bool invert) const
 
List< wordtocValues (const UnaryPredicate &pred, const bool invert=false) const
 
Foam::List< wordtocValues (const UnaryPredicate &pred, const bool invert) const
 
List< wordtocEntries (const BinaryPredicate &pred, const bool invert=false) const
 
Foam::List< wordtocEntries (const BinaryPredicate &pred, const bool invert) const
 
label countKeys (const UnaryPredicate &pred, const bool invert=false) const
 Count the number of keys that satisfy the unary predicate. More...
 
Foam::label countKeys (const UnaryPredicate &pred, const bool invert) const
 
label countValues (const UnaryPredicate &pred, const bool invert=false) const
 Count the number of values that satisfy the unary predicate. More...
 
Foam::label countValues (const UnaryPredicate &pred, const bool invert) const
 
label countEntries (const BinaryPredicate &pred, const bool invert=false) const
 Count the number of entries that satisfy the binary predicate. More...
 
Foam::label countEntries (const BinaryPredicate &pred, const bool invert) const
 
bool emplace (const word &key, Args &&... args)
 Emplace insert a new entry, not overwriting existing entries. More...
 
bool emplace_set (const word &key, Args &&... args)
 Emplace set an entry, overwriting any existing entries. More...
 
bool insert (const word &key, const regIOobject * &obj)
 Copy insert a new entry, not overwriting existing entries. More...
 
bool insert (const word &key, regIOobject * &&obj)
 Move insert a new entry, not overwriting existing entries. More...
 
bool set (const word &key, const regIOobject * &obj)
 Copy assign a new entry, overwriting existing entries. More...
 
bool set (const word &key, regIOobject * &&obj)
 Move assign a new entry, overwriting existing entries. More...
 
bool erase (const iterator &iter)
 Erase an entry specified by given iterator. More...
 
bool erase (const word &key)
 Erase an entry specified by the given key. More...
 
label erase (const HashTable< AnyType, word, AnyHash > &other)
 Remove table entries given by keys of the other hash-table. More...
 
label erase (std::initializer_list< word > keys)
 Remove table entries given by the listed keys. More...
 
label erase (InputIter first, InputIter last)
 Remove multiple entries using an iterator range of keys. More...
 
label erase (const FixedList< word, N > &keys)
 Remove table entries given by the listed keys. More...
 
label erase (const UList< word > &keys)
 Remove table entries given by the listed keys. More...
 
Foam::label erase (InputIter first, InputIter last)
 
Foam::label erase (const FixedList< word, N > &keys)
 
Foam::label erase (const HashTable< AnyType, word, AnyHash > &other)
 
label retain (const HashTable< AnyType, word, AnyHash > &other)
 Retain table entries given by keys of the other hash-table. More...
 
Foam::label retain (const HashTable< AnyType, word, AnyHash > &other)
 
label filterKeys (const UnaryPredicate &pred, const bool pruning=false)
 Generalized means to filter table entries based on their keys. More...
 
Foam::label filterKeys (const UnaryPredicate &pred, const bool pruning)
 
label filterValues (const UnaryPredicate &pred, const bool pruning=false)
 Generalized means to filter table entries based on their values. More...
 
Foam::label filterValues (const UnaryPredicate &pred, const bool pruning)
 
label filterEntries (const BinaryPredicate &pred, const bool pruning=false)
 Generalized means to filter table entries based on their key/value. More...
 
Foam::label filterEntries (const BinaryPredicate &pred, const bool pruning)
 
void resize (const label sz)
 Resize the hash table for efficiency. More...
 
void clear ()
 Clear all entries from table. More...
 
void clearStorage ()
 Clear the table entries and the table itself. More...
 
void swap (HashTable< regIOobject *, word, Foam::Hash< word > > &rhs)
 Swap contents into this table. More...
 
void transfer (HashTable< regIOobject *, word, Foam::Hash< word > > &rhs)
 Transfer contents into this table. More...
 
regIOobject * & operator[] (const word &key)
 Find and return a hashed entry. FatalError if it does not exist. More...
 
const regIOobject * & operator[] (const word &key) const
 Find and return a hashed entry. FatalError if it does not exist. More...
 
regIOobject * & operator() (const word &key)
 Return existing entry or create a new entry. More...
 
regIOobject * & operator() (const word &key, const regIOobject * &deflt)
 Return existing entry or insert a new entry. More...
 
void operator= (const this_type &rhs)
 Copy assign. More...
 
void operator= (std::initializer_list< std::pair< word, regIOobject * >> rhs)
 Copy assign from an initializer list. More...
 
void operator= (this_type &&rhs)
 Move assign. More...
 
bool operator== (const this_type &rhs) const
 
bool operator!= (const this_type &rhs) const
 The opposite of the equality operation. More...
 
this_typeoperator+= (const this_type &rhs)
 Add entries into this HashTable. More...
 
const_iterator_pair< const_key_iterator, this_typekeys () const
 A const iterator begin/end pair for iterating over keys. More...
 
iterator begin ()
 iterator set to the beginning of the HashTable More...
 
const_iterator begin () const
 const_iterator set to the beginning of the HashTable More...
 
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable More...
 
iterator end () noexcept
 iterator to signal the end (for any HashTable) More...
 
const_iterator end () const noexcept
 const_iterator to signal the end (for any HashTable) More...
 
constexpr const_iterator cend () const noexcept
 const_iterator to signal the end (for any HashTable) More...
 
OstreamprintInfo (Ostream &os) const
 Print information. More...
 
OstreamwriteKeys (Ostream &os, const label shortLen=0) const
 
- Public Member Functions inherited from PrimitivePatch<::Foam::UList< face >, const pointField & >
 PrimitivePatch (const ::Foam::UList< face > &faces, const const pointField & &points)
 Construct from components. More...
 
 PrimitivePatch (::Foam::UList< face > &&faces, const const pointField & &points)
 Construct from components, transferring faces. More...
 
 PrimitivePatch (::Foam::UList< face > &faces, const pointField & &points, const bool reuse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< ::Foam::UList< face >, const pointField & > &pp)
 Copy construct. More...
 
virtual ~PrimitivePatch ()
 Destructor. More...
 
void clearOut ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void swap (PrimitivePatch &)=delete
 Suppress direct swapping, since storage containers may be const. More...
 
const Field< point_type > & points () const noexcept
 Return reference to global points. More...
 
label nFaces () const noexcept
 Number of faces in the patch. More...
 
label nPoints () const
 Number of points supporting patch faces. More...
 
label nEdges () const
 Number of edges in patch. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
const edgeList::subList internalEdges () const
 Return sub-list of internal edges, address into LOCAL point list. More...
 
const edgeList::subList boundaryEdges () const
 Return sub-list of boundary edges, address into LOCAL point list. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
label nBoundaryEdges () const
 Number of boundary edges == (nEdges() - nInternalEdges()) More...
 
bool isInternalEdge (const label edgei) const
 Is internal edge? More...
 
const labelListboundaryPoints () const
 Return list of boundary points, address into LOCAL point list. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const List< face_type > & localFaces () const
 Return patch faces addressing into local point list. More...
 
labelList boundaryFaces () const
 
labelList uniqBoundaryFaces () const
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. More...
 
const Field< point_type > & localPoints () const
 Return pointField of points in patch. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point index. More...
 
edge meshEdge (const label edgei) const
 From patch edge to global edge using meshPoints. More...
 
edge meshEdge (const edge &e) const
 From patch edge to global edge using meshPoints. More...
 
label meshEdge (const label edgei, const edgeList &allEdges, const labelListList &pointEdges) const
 
label findEdge (const edge &e) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 
labelList meshEdges (const labelUList &edgeLabels, const edgeList &allEdges, const labelListList &pointEdges) const
 
const Field< point_type > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point_type > & faceAreas () const
 Return face area vectors for patch. More...
 
const Field< scalar > & magFaceAreas () const
 Return face area magnitudes for patch. More...
 
const Field< point_type > & faceNormals () const
 Return face unit normals for patch. More...
 
const Field< point_type > & pointNormals () const
 Return point normals for patch. More...
 
bool hasFaceAreas () const
 
bool hasFaceCentres () const
 
bool hasFaceNormals () const
 
bool hasPointNormals () const
 
bool hasBoundaryPoints () const
 
bool hasFaceFaces () const
 
bool hasEdgeFaces () const
 
bool hasFaceEdges () const
 
bool hasPointEdges () const
 
bool hasPointFaces () const
 
bool hasMeshPointMap () const
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< ::Foam::UList< face >, const pointField & >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< ::Foam::UList< face >, const pointField & >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=nullptr) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
virtual void movePoints (const Field< point_type > &)
 Correct patch after moving points. More...
 
void operator= (const PrimitivePatch< ::Foam::UList< face >, const pointField & > &rhs)
 Copy assign faces. Leave points alone (could be a reference). More...
 
void operator= (PrimitivePatch< ::Foam::UList< face >, const pointField & > &&rhs)
 Move assign faces. Leave points alone (could be a reference). More...
 
label whichEdge (const edge &e) const
 Identical to findEdge. More...
 
- Public Member Functions inherited from PrimitivePatchBase
 ClassName ("PrimitivePatch")
 Runtime type information. More...
 
 PrimitivePatchBase ()=default
 Default construct. More...
 
- Public Member Functions inherited from UList< face >
label size () const noexcept
 The number of elements in the UList. More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write the List as a dictionary entry with keyword. More...
 
void operator= (const face &val)
 Assignment of all entries to the given value. More...
 
void operator= (const Foam::zero)
 Assignment of all entries to zero. More...
 
 UList (const UList< face > &)=default
 Copy construct. More...
 
constexpr UList () noexcept
 Default construct, zero-sized and nullptr. More...
 
 UList (face *__restrict__ v, const label len) noexcept
 Construct from components. More...
 
label fcIndex (const label i) const noexcept
 
label rcIndex (const label i) const noexcept
 
const facefcValue (const label i) const
 Return forward circular value (ie, next value in the list) More...
 
facefcValue (const label i)
 Return forward circular value (ie, next value in the list) More...
 
const facercValue (const label i) const
 Return reverse circular value (ie, previous value in the list) More...
 
facercValue (const label i)
 Return reverse circular value (ie, previous value in the list) More...
 
const facecdata () const noexcept
 Return pointer to the underlying array serving as data storage. More...
 
facedata () noexcept
 Return pointer to the underlying array serving as data storage. More...
 
const char * cdata_bytes () const noexcept
 Return pointer to the underlying array serving as data storage,. More...
 
char * data_bytes () noexcept
 Return pointer to the underlying array serving as data storage,. More...
 
facefirst ()
 Return the first element of the list. More...
 
const facefirst () const
 Return first element of the list. More...
 
facelast ()
 Return the last element of the list. More...
 
const facelast () const
 Return the last element of the list. More...
 
std::streamsize size_bytes () const noexcept
 Number of contiguous bytes for the List data. More...
 
std::streamsize byteSize () const
 
void checkStart (const label start) const
 Check start is within valid range [0,size) More...
 
void checkSize (const label size) const
 Check size is within valid range [0,size]. More...
 
void checkRange (const label start, const label len) const
 Check that start and length define a valid range. More...
 
void checkIndex (const label i) const
 Check index is within valid range [0,size) More...
 
bool uniform () const
 True if all entries have identical values, and list is non-empty. More...
 
label find (const face &val, label pos=0) const
 Find index of the first occurrence of the value. More...
 
label rfind (const face &val, label pos=-1) const
 Find index of the last occurrence of the value. More...
 
bool found (const face &val, label pos=0) const
 True if the value if found in the list. More...
 
void moveFirst (const label i)
 Move element to the first position. More...
 
void moveLast (const label i)
 Move element to the last position. More...
 
void swapFirst (const label i)
 Swap element with the first element. Fatal on an empty list. More...
 
void swapLast (const label i)
 Swap element with the last element. Fatal on an empty list. More...
 
void shallowCopy (const UList< face > &list)
 Copy the pointer and size held by the given UList. More...
 
void deepCopy (const UList< face > &list)
 Copy elements of the given UList. Sizes must match! More...
 
void deepCopy (const IndirectListBase< face, Addr > &list)
 Copy elements of the given indirect list. Sizes must match! More...
 
SubList< faceslice (const label pos, label len=-1)
 Return SubList slice (non-const access) - no range checking. More...
 
const SubList< faceslice (const label pos, label len=-1) const
 Return SubList slice (const access) - no range checking. More...
 
SubList< faceslice (const labelRange &range)
 Return SubList slice (non-const access) - with range checking. More...
 
const SubList< faceslice (const labelRange &range) const
 Return SubList slice (const access) - with range checking. More...
 
faceoperator[] (const label i)
 Return element of UList. More...
 
const faceoperator[] (const label i) const
 Return element of constant UList. More...
 
const booloperator[] (const label i) const
 
Foam::UPstream::commsStructoperator[] (const label procID)
 
const Foam::UPstream::commsStructoperator[] (const label procID) const
 
UPstream::commsStructoperator[] (const label)
 
const UPstream::commsStructoperator[] (const label) const
 
 operator const Foam::List< face > & () const
 Allow cast to a const List<T>&. More...
 
iterator begin () noexcept
 Return an iterator to begin traversing the UList. More...
 
const_iterator begin () const noexcept
 Return const_iterator to begin traversing the constant UList. More...
 
iterator end () noexcept
 Return an iterator to end traversing the UList. More...
 
const_iterator end () const noexcept
 Return const_iterator to end traversing the constant UList. More...
 
const_iterator cbegin () const noexcept
 Return const_iterator to begin traversing the constant UList. More...
 
const_iterator cend () const noexcept
 Return const_iterator to end traversing the constant UList. More...
 
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the UList. More...
 
const_reverse_iterator rbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList. More...
 
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the UList. More...
 
const_reverse_iterator rend () const
 Return const_reverse_iterator to end reverse traversing the UList. More...
 
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList. More...
 
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing the UList. More...
 
bool empty () const noexcept
 True if the UList is empty (ie, size() is zero) More...
 
void swap (UList< face > &list)
 Swap content with another UList of the same type in constant time. More...
 
bool operator== (const UList< face > &a) const
 Equality operation on ULists of the same type. More...
 
bool operator!= (const UList< face > &a) const
 The opposite of the equality operation. Takes linear time. More...
 
bool operator< (const UList< face > &list) const
 Compare two ULists lexicographically. Takes linear time. More...
 
bool operator> (const UList< face > &a) const
 Compare two ULists lexicographically. Takes linear time. More...
 
bool operator<= (const UList< face > &a) const
 Return true if !(a > b). Takes linear time. More...
 
bool operator>= (const UList< face > &a) const
 Return true if !(a < b). Takes linear time. More...
 
IstreamreadList (Istream &is)
 Read List contents from Istream. More...
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
OstreamwriteList (Ostream &os, const label shortLen=0) const
 Write List, with line-breaks in ASCII when length exceeds shortLen. More...
 
OstreamwriteList (Ostream &os, const label) const
 
OstreamwriteList (Ostream &os, const label) const
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type test (const label i) const
 A bitSet::test() method for a list of bool. More...
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type get (const label i) const
 A bitSet::get() method for a list of bool. More...
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type unset (const label i)
 A bitSet::unset() method for a list of bool. More...
 

Static Public Attributes

static word meshSubDir = "surfMesh"
 Return the mesh sub-directory name (normally "surfMesh") More...
 
- Static Public Attributes inherited from surfaceRegistry
static const word prefix
 The prefix to local: surfaces. More...
 
static word defaultName
 The default surface name: default. More...
 
- Static Public Attributes inherited from IOobject
static const Enum< fileCheckTypesfileCheckTypesNames
 Names for the fileCheckTypes. More...
 
static char scopeSeparator
 Character for scoping object names (':' or '_') More...
 
static fileCheckTypes fileModificationChecking
 Type of file modification checking. More...
 
static float fileModificationSkew
 Time skew (seconds) for file modification checks. More...
 
static int maxFileModificationPolls
 Max number of times to poll for file modification changes. More...
 

Protected Member Functions

pointFieldstoredPoints ()
 Non-const access to global points. More...
 
faceListstoredFaces ()
 Non-const access to the faces. More...
 
surfZoneListstoredZones ()
 Non-const access to the surface zones. More...
 
void updateRefs ()
 Update point/face references. More...
 
- Protected Member Functions inherited from regIOobject
bool readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName)
 Helper: check readOpt flags and read if necessary. More...
 
- Protected Member Functions inherited from IOobject
void setBad (const string &s)
 Set the object state to bad. More...
 
- Protected Member Functions inherited from HashTable< regIOobject * >
bool iterator_erase (node_type *&entry, label &index)
 Low-level entry erasure using iterator internals. More...
 
- Protected Member Functions inherited from UList< face >
void setAddressableSize (const label n) noexcept
 Set addressed size to be inconsistent with allocated storage. More...
 
void size (const label n)
 Older name for setAddressableSize. More...
 
void writeEntry (Ostream &os) const
 Write the UList with its compound type. More...
 
void writeEntry (Ostream &os) const
 
void writeEntry (Ostream &os) const
 
labelRange validateRange (const labelRange &requestedRange) const
 
UList< face > & operator= (const UList< face > &)=delete
 No copy assignment (default: shallow copy) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *p)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
- Static Public Member Functions inherited from IOobject
static bool bannerEnabled () noexcept
 Status of output file banner. More...
 
static bool bannerEnabled (bool on) noexcept
 Enable/disable an output file banner. More...
 
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 Split path into instance, local, name components. More...
 
template<class StringType >
static word groupName (StringType base, const word &group)
 Create dot-delimited name.group string. More...
 
static word group (const word &name)
 Return group (extension part of name) More...
 
static word member (const word &name)
 Return member (name without the extension) More...
 
static word scopedName (const std::string &scope, const word &name)
 Create scope:name or scope_name string. More...
 
static IOobject selectIO (const IOobject &io, const fileName &altFile, const word &ioName="")
 Return the IOobject, but also consider an alternative file name. More...
 
static OstreamwriteBanner (Ostream &os, const bool noSyntaxHint=false)
 Write the standard OpenFOAM file/dictionary banner. More...
 
static OstreamwriteDivider (Ostream &os)
 Write the standard file section divider. More...
 
static OstreamwriteEndDivider (Ostream &os)
 Write the standard end file divider. More...
 
- Static Public Member Functions inherited from UList< face >
static const UList< face > & null ()
 Return a UList reference to a nullObject. More...
 
static constexpr label max_size () noexcept
 The size of the largest possible UList. More...
 
- Public Attributes inherited from HashTable< regIOobject * >
const typedef regIOobject * * const_pointer
 Const pointer type for the stored value_type. More...
 
const typedef regIOobject * & const_reference
 Const reference to the stored value_type. More...
 
- Public Attributes inherited from UList< face >
const typedef faceconst_pointer
 The pointer type for const access to value_type items. More...
 
const typedef faceconst_reference
 The type used for reading from constant value_type objects. More...
 
const typedef faceconst_iterator
 Random access iterator for traversing a UList. More...
 
- Static Protected Member Functions inherited from IOobject
static void writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr)
 
static void writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr)
 
- Static Protected Attributes inherited from regIOobject
static bool masterOnlyReading = false
 To flag master-only reading of objects. More...
 

Detailed Description

A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storing fields.

Source files

Definition at line 63 of file surfMesh.H.

Member Typedef Documentation

◆ Mesh

typedef surfMesh Mesh

Typedef required for GeoMesh.

Definition at line 143 of file surfMesh.H.

◆ BoundaryMesh

typedef bool BoundaryMesh

Placeholder only, but do not remove - it is needed for GeoMesh.

Definition at line 146 of file surfMesh.H.

Member Enumeration Documentation

◆ readUpdateState

Enumeration defining the state of the mesh after a read update.

Used for post-processing applications, where the mesh needs to update based on the files written in time directories

Enumerator
UNCHANGED 
POINTS_MOVED 
TOPO_CHANGE 
TOPO_PATCH_CHANGE 

Definition at line 76 of file surfMesh.H.

Constructor & Destructor Documentation

◆ surfMesh() [1/5]

surfMesh ( const IOobject io)
explicit

Read construct from IOobject.

Writing = NO_WRITE

Definition at line 82 of file surfMesh.C.

◆ surfMesh() [2/5]

surfMesh ( const IOobject io,
const word surfName 
)

Read construct from IOobject, with alternative surface name.

Writing = NO_WRITE

Definition at line 88 of file surfMesh.C.

◆ surfMesh() [3/5]

surfMesh ( const word surfName,
const objectRegistry obr 
)

Construct null with specified name on the given registry.

Definition at line 130 of file surfMesh.C.

◆ surfMesh() [4/5]

surfMesh ( const IOobject io,
const MeshedSurface< face > &  surf,
const word surfName = word::null 
)

Copy construct from MeshedSurface<face>

Definition at line 175 of file surfMesh.C.

References IOobject::db(), objectRegistry::dbDir(), DebugInfo, Foam::endl(), IOobject::instance(), IOobject::local(), IOobject::name(), Foam::nl, and IOobject::path().

Here is the call graph for this function:

◆ surfMesh() [5/5]

surfMesh ( const IOobject io,
MeshedSurface< face > &&  surf,
const word surfName = word::null 
)

Move construct from MeshedSurface<face>

Definition at line 231 of file surfMesh.C.

References IOobject::db(), objectRegistry::dbDir(), DebugInfo, Foam::endl(), IOobject::instance(), IOobject::local(), IOobject::name(), Foam::nl, and IOobject::path().

Here is the call graph for this function:

◆ ~surfMesh()

~surfMesh ( )
virtual

Destructor.

Definition at line 289 of file surfMesh.C.

Member Function Documentation

◆ storedPoints()

pointField& storedPoints ( )
inlineprotected

Non-const access to global points.

Definition at line 117 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOPoints().

Here is the call graph for this function:

◆ storedFaces()

faceList& storedFaces ( )
inlineprotected

Non-const access to the faces.

Definition at line 123 of file surfMesh.H.

References MeshedSurfaceIOAllocator::storedIOFaces().

Referenced by surfMesh::updateRefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storedZones()

surfZoneList& storedZones ( )
inlineprotected

Non-const access to the surface zones.

Definition at line 129 of file surfMesh.H.

◆ updateRefs()

void updateRefs ( )
protected

Update point/face references.

Definition at line 70 of file surfMesh.C.

References UList< T >::shallowCopy(), and surfMesh::storedFaces().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "surfMesh"  )

Declare type-name, virtual type (with debug switch)

◆ meshDir()

Foam::fileName meshDir ( ) const

Return the local mesh directory (dbDir()/meshSubDir)

Definition at line 426 of file surfMesh.C.

◆ pointsInstance()

const Foam::fileName & pointsInstance ( ) const

Return the current instance directory for points.

Used when constructing geometric mesh data dependent on points

Definition at line 432 of file surfMesh.C.

◆ facesInstance()

const Foam::fileName & facesInstance ( ) const

Return the current instance directory for faces.

Definition at line 438 of file surfMesh.C.

◆ setInstance()

void setInstance ( const fileName inst,
IOobject::writeOption  wOpt = IOobject::AUTO_WRITE 
)

Set the instance for mesh files.

Definition at line 35 of file surfMeshIO.C.

References DebugInFunction, and Foam::endl().

Here is the call graph for this function:

◆ setWriteOption()

void setWriteOption ( IOobject::writeOption  wOpt)

Adjust the write option for all components.

Definition at line 50 of file surfMeshIO.C.

References MeshedSurfaceIOAllocator::setWriteOption(), and IOobject::writeOpt().

Here is the call graph for this function:

◆ nPoints()

Foam::label nPoints ( ) const
virtual

Return the number of raw points.

Definition at line 444 of file surfMesh.C.

References points.

◆ nFaces()

Foam::label nFaces ( ) const
virtual

Return the number of raw faces.

Definition at line 450 of file surfMesh.C.

Referenced by surfMesh::size().

Here is the caller graph for this function:

◆ size()

virtual label size ( ) const
inlinevirtual

Return number of faces.

Definition at line 224 of file surfMesh.H.

References surfMesh::nFaces().

Here is the call graph for this function:

◆ points()

const Foam::pointField & points ( ) const
virtual

Return points.

Definition at line 456 of file surfMesh.C.

◆ faces()

const Foam::faceList & faces ( ) const
virtual

Return faces.

Definition at line 462 of file surfMesh.C.

◆ surfZones()

virtual const surfZoneList& surfZones ( ) const
inlinevirtual

Return surface zones.

Definition at line 237 of file surfMesh.H.

◆ Sf()

const vectorField& Sf ( ) const
inline

Return face area vectors (normals)

Definition at line 243 of file surfMesh.H.

References PrimitivePatch<::Foam::UList< face >, const pointField & >::faceAreas().

Here is the call graph for this function:

◆ magSf()

const scalarField& magSf ( ) const
inline

Return face area magnitudes.

Definition at line 249 of file surfMesh.H.

References PrimitivePatch<::Foam::UList< face >, const pointField & >::magFaceAreas().

Here is the call graph for this function:

◆ Cf()

const vectorField& Cf ( ) const
inline

Face centres.

Definition at line 255 of file surfMesh.H.

References PrimitivePatch<::Foam::UList< face >, const pointField & >::faceCentres().

Here is the call graph for this function:

◆ addZones()

void addZones ( const surfZoneList zones,
bool  validate = true 
)

Add surface zones, optionally validating the zone coverage.

Definition at line 530 of file surfMesh.C.

References forAll, and Foam::stringOps::validate().

Here is the call graph for this function:

◆ removeZones()

void removeZones ( )

Remove surface zones.

Definition at line 34 of file surfMeshClear.C.

References List< T >::clear(), surfMesh::clearOut(), DebugInFunction, and Foam::endl().

Here is the call graph for this function:

◆ checkZones()

void checkZones ( const bool  verbose = true)

Check the surface zone definitions.

Definition at line 468 of file surfMesh.C.

References Foam::nl, surfZone::size(), surfZone::start(), and WarningInFunction.

Here is the call graph for this function:

◆ copySurface() [1/3]

void copySurface ( const pointField points,
const faceList faces,
bool  validate = false 
)

Update with new contents.

Definition at line 298 of file surfMesh.C.

References List< T >::clear(), nPoints, and points.

Referenced by sampledSurface::storeSurfMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copySurface() [2/3]

void copySurface ( const meshedSurf surf,
bool  validate = false 
)

Update with new contents.

Definition at line 327 of file surfMesh.C.

References List< T >::clear(), meshedSurf::faces(), nPoints, and meshedSurf::points().

Here is the call graph for this function:

◆ copySurface() [3/3]

void copySurface ( const MeshedSurface< face > &  surf,
bool  validate = false 
)

Update with new contents.

Definition at line 355 of file surfMesh.C.

References nPoints, MeshedSurface< Face >::size(), MeshedSurface< Face >::surfFaces(), MeshedSurface< Face >::surfZones(), and Foam::stringOps::validate().

Here is the call graph for this function:

◆ transfer()

void transfer ( MeshedSurface< face > &  surf,
bool  validate = false 
)

Transfer the contents of the argument and annul the argument.

Optionally validate the zone coverage.

Definition at line 386 of file surfMesh.C.

References MeshedSurface< Face >::storedFaces(), MeshedSurface< Face >::storedPoints(), MeshedSurface< Face >::storedZones(), and Foam::stringOps::validate().

Here is the call graph for this function:

◆ readUpdate()

Foam::surfMesh::readUpdateState readUpdate ( )
virtual

Update mesh based on the files saved in time directories.

Definition at line 58 of file surfMeshIO.C.

References DebugInfo, DebugInFunction, Foam::endl(), forAll, IOobject::MUST_READ, Foam::name(), Foam::nl, IOobject::NO_WRITE, surfMesh::POINTS_MOVED, IOobject::READ_IF_PRESENT, surfMesh::TOPO_CHANGE, surfMesh::TOPO_PATCH_CHANGE, surfMesh::UNCHANGED, and WarningInFunction.

Here is the call graph for this function:

◆ storeField() [1/2]

void storeField ( const word fieldName,
const dimensionSet dims,
const Field< Type > &  values 
)

Copy/store named field as face or point data (template parameter).

Default is face-data (surfGeoMesh as template).

Definition at line 35 of file surfMeshTemplates.C.

References DimensionedField< Type, GeoMesh >::dimensions(), objectRegistry::getObjectPtr(), and Foam::HashTableOps::values().

Referenced by sampledSurface::storeSurfMeshField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storeField() [2/2]

void storeField ( const word fieldName,
const dimensionSet dims,
Field< Type > &&  values 
)

Move/store named field as face or point data (template parameter).

Default is face-data (surfGeoMesh as template).

Definition at line 75 of file surfMeshTemplates.C.

References DimensionedField< Type, GeoMesh >::dimensions(), objectRegistry::getObjectPtr(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ writeObject()

bool writeObject ( IOstreamOption  streamOpt,
const bool  valid 
) const
virtual

Write all components using given format, version and compression.

Reimplemented from MeshedSurfaceIOAllocator.

Definition at line 195 of file surfMeshIO.C.

◆ write() [1/2]

void write ( const fileName name,
IOstreamOption  streamOpt = IOstreamOption(),
const dictionary options = dictionary::null 
) const

Write to file, choosing writer based on its extension.

Uses MeshedSurfaceProxy for writing.

Definition at line 567 of file surfMesh.C.

References word::ext(), Foam::name(), and Foam::vtk::write().

Here is the call graph for this function:

◆ write() [2/2]

void write ( const fileName name,
const word fileType,
IOstreamOption  streamOpt = IOstreamOption(),
const dictionary options = dictionary::null 
) const

Write to file, choosing writer for given fileType.

Uses MeshedSurfaceProxy for writing.

Definition at line 578 of file surfMesh.C.

References Foam::name(), points, and MeshedSurfaceProxy< Face >::write().

Here is the call graph for this function:

◆ releaseGeom()

Release the geometry and return as a MeshedSurface<face>.

Definition at line 407 of file surfMesh.C.

References Foam::New().

Here is the call graph for this function:

◆ clearGeom()

void clearGeom ( )

Clear geometry.

Definition at line 47 of file surfMeshClear.C.

References DebugInFunction, and Foam::endl().

Here is the call graph for this function:

◆ clearAddressing()

void clearAddressing ( )

Clear addressing.

Definition at line 55 of file surfMeshClear.C.

References DebugInFunction, and Foam::endl().

Here is the call graph for this function:

◆ clearOut()

void clearOut ( )

Clear all geometry and addressing unnecessary for CFD.

Definition at line 63 of file surfMeshClear.C.

Referenced by surfMesh::removeZones().

Here is the caller graph for this function:

◆ clearPrimitives()

void clearPrimitives ( )

Clear primitive data (points, faces and cells)

◆ clearFields()

void clearFields ( )

Clear stored fields.

Definition at line 72 of file surfMeshClear.C.

References objectRegistry::clear().

Here is the call graph for this function:

◆ removeFiles() [1/2]

void removeFiles ( const fileName instanceDir) const

Remove all files from mesh instance.

Definition at line 550 of file surfMesh.C.

References fileName::path(), and Foam::rm().

Here is the call graph for this function:

◆ removeFiles() [2/2]

void removeFiles ( ) const

Remove all files from mesh instance()

Definition at line 560 of file surfMesh.C.

Member Data Documentation

◆ meshSubDir

Foam::word meshSubDir = "surfMesh"
static

Return the mesh sub-directory name (normally "surfMesh")

Definition at line 153 of file surfMesh.H.


The documentation for this class was generated from the following files: