FreeFOAM The Cross-Platform CFD Toolkit
cellZoneSet Class Reference

Like cellSet but updates cellZone when writing. More...

#include <meshTools/cellZoneSet.H>


Detailed Description

Like cellSet but updates cellZone when writing.

Source files

Definition at line 50 of file cellZoneSet.H.

+ Inheritance diagram for cellZoneSet:
+ Collaboration diagram for cellZoneSet:

List of all members.

Public Member Functions

 TypeName ("cellZoneSet")
 Runtime type information.
 cellZoneSet (const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
 Construct from objectRegistry and name.
 cellZoneSet (const polyMesh &mesh, const word &name, const label, writeOption w=NO_WRITE)
 Construct from additional size of labelHashSet.
 cellZoneSet (const polyMesh &mesh, const word &name, const topoSet &, writeOption w=NO_WRITE)
 Construct from existing set.
virtual ~cellZoneSet ()
const labelListaddressing () const
labelListaddressing ()
void updateSet ()
 Sort addressing and make cellSet part consistent with addressing.
virtual void invert (const label maxLen)
 Invert contents. (insert all members 0..maxLen-1 which were not in.
virtual void subset (const topoSet &set)
 Subset contents. Only elements present in both sets remain.
virtual void addSet (const topoSet &set)
 Add elements present in set.
virtual void deleteSet (const topoSet &set)
 Delete elements present in set.
virtual void sync (const polyMesh &mesh)
 Sync cellZoneSet across coupled patches.
virtual void writeDebug (Ostream &os, const primitiveMesh &, const label maxLen) const
 Write maxLen items with label and coordinates.
virtual bool writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
 Write cellZone.
virtual void updateMesh (const mapPolyMesh &morphMap)
 Update any stored data for new labels.
virtual label maxSize (const polyMesh &mesh) const
 Return max index+1.
- Public Member Functions inherited from cellSet
 TypeName ("cellSet")
 Runtime type information.
 cellSet (const IOobject &obj)
 Construct from IOobject. No checking.
 cellSet (const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
 Construct from polyMesh and name. Checks for valid cell ids.
 cellSet (const polyMesh &mesh, const word &name, const label sizes, writeOption w=NO_WRITE)
 Construct empty from size of labelHashSet.
 cellSet (const polyMesh &mesh, const word &name, const topoSet &, writeOption w=NO_WRITE)
 Construct from existing set.
 cellSet (const polyMesh &mesh, const word &name, const labelHashSet &, writeOption w=NO_WRITE)
 Construct from labelHashSet.
 cellSet (const Time &, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
 Construct from objectRegistry and name.
 cellSet (const Time &, const word &name, const label size, writeOption w=NO_WRITE)
 Construct empty from objectRegistry.
 cellSet (const Time &, const word &name, const labelHashSet &, writeOption w=NO_WRITE)
 Construct from labelHashSet.
virtual ~cellSet ()
- Public Member Functions inherited from topoSet
 TypeName ("topoSet")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, topoSet, word,(const polyMesh &mesh, const word &name, readOption r, writeOption w),(mesh, name, r, w))
 declareRunTimeSelectionTable (autoPtr, topoSet, size,(const polyMesh &mesh, const word &name, const label size, writeOption w),(mesh, name, size, w))
 declareRunTimeSelectionTable (autoPtr, topoSet, set,(const polyMesh &mesh, const word &name, const topoSet &set, writeOption w),(mesh, name, set, w))
 topoSet (const IOobject &, const word &wantedType)
 Construct from IOobject as explicitly passed type.
 topoSet (const polyMesh &mesh, const word &wantedType, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
 Construct from polyMesh and name.
 topoSet (const polyMesh &mesh, const word &name, const label, writeOption w=NO_WRITE)
 Construct empty from additional size of labelHashSet.
 topoSet (const polyMesh &mesh, const word &name, const labelHashSet &, writeOption w=NO_WRITE)
 Construct empty from additional labelHashSet.
 topoSet (const IOobject &, const label size)
 Construct empty from IOobject and size.
 topoSet (const IOobject &, const labelHashSet &)
 Construct from IOobject and labelHashSet.
autoPtr< topoSetclone () const
 Clone.
virtual ~topoSet ()
virtual void writeDebug (Ostream &os, const label maxLen) const
 Write labels columnwise to os. Truncate to maxLen.
virtual bool writeData (Ostream &) const
 Write contents.
void operator= (const topoSet &)
 Copy labelHashSet part only.
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information.
 regIOobject (const IOobject &, const bool isTime=false)
 Construct from IOobject. Optional flag for if IOobject is the.
 regIOobject (const regIOobject &)
 Construct as copy.
 regIOobject (const regIOobject &, bool registerCopy)
 Construct as copy, and transferring registry registration to copy.
virtual ~regIOobject ()
bool checkIn ()
 Add object to registry.
bool checkOut ()
 Remove object from registry.
bool ownedByRegistry () const
 Is this object owned by the registry?
void store ()
 Transfer ownership of this object to its registry.
void release ()
 Release ownership of this object from its registry.
label eventNo () const
 Event number at last update.
label & eventNo ()
 Event number at last update.
bool upToDate (const word &) const
 Am I uptodate with respect to other regIOobjects.
bool upToDate (const word &, const word &) const
bool upToDate (const word &, const word &, const word &) const
bool upToDate (const word &, const word &, const word &, const word &) const
void setUpToDate ()
 Flag me as up to date.
virtual void rename (const word &newName)
 Rename.
IstreamreadStream (const word &)
 Return Istream and check object type against that given.
void close ()
 Close Istream.
virtual bool readData (Istream &)
 Virtual readData function.
virtual bool read ()
 Read object.
virtual bool modified () const
 Return true if the object's file has been modified.
virtual bool readIfModified ()
 Read object if modified.
virtual bool write () const
 Write using setting from DB.
void operator= (const IOobject &)
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Runtime type information.
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, registry, io options.
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, local, registry, io options.
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from path, registry, io options.
virtual ~IOobject ()
const Timetime () const
 Return time.
const objectRegistrydb () const
 Return the local objectRegistry.
const wordname () const
 Return name.
const wordheaderClassName () const
 Return name of the class name read from header.
stringnote ()
 Return non-constant access to the optional note.
const stringnote () const
 Return the optional note.
bool registerObject () const
 Register object created from this IOobject with registry if true.
readOption readOpt () const
readOptionreadOpt ()
writeOption writeOpt () const
writeOptionwriteOpt ()
const fileNamerootPath () const
const fileNamecaseName () const
const fileNameinstance () const
fileNameinstance ()
const fileNamelocal () const
fileName path () const
 Return complete path.
fileName path (const word &instance, const fileName &local="") const
 Return complete path with alternative instance and local.
fileName objectPath () const
 Return complete path + object name.
fileName filePath () const
 Return complete path + object name if the file exists.
bool readHeader (Istream &)
 Read header.
bool headerOk ()
 Read and check header info.
bool writeHeader (Ostream &) const
 Write header.
bool good () const
bool bad () const
InfoProxy< IOobjectinfo () const
 Return info proxy.
- Public Member Functions inherited from HashSet< label, Hash< label > >
 HashSet (const label size=128)
 Construct given initial size.
 HashSet (Istream &is)
 Construct from Istream.
 HashSet (const UList< label > &lst)
 Construct from UList of Key.
 HashSet (const HashSet< label, Hash< label > > &hs)
 Construct as copy.
 HashSet (const Xfer< HashSet< label, Hash< label > > > &hs)
 Construct by transferring the parameter contents.
 HashSet (const Xfer< HashTable< nil, label, Hash< label > > > &hs)
 Construct by transferring the parameter contents.
 HashSet (const HashTable< AnyType, label, AnyHash > &)
 Construct from the keys of another HashTable,.
bool insert (const label &key)
 Insert a new entry.
bool set (const label &key)
 Same as insert (cannot overwrite nil content)
bool operator[] (const label &) const
 Return true if the entry exists, same as found()
bool operator== (const HashSet< label, Hash< label > > &) const
 Equality. Two hashtables are equal when their contents are equal.
bool operator!= (const HashSet< label, Hash< label > > &) const
 The opposite of the equality operation.
void operator|= (const HashSet< label, Hash< label > > &)
 Combine entries from HashSets.
void operator&= (const HashSet< label, Hash< label > > &)
 Only retain entries found in both HashSets.
void operator^= (const HashSet< label, Hash< label > > &)
 Only retain unique entries (xor)
void operator+= (const HashSet< label, Hash< label > > &rhs)
 Add entries listed in the given HashSet to this HashSet.
void operator-= (const HashSet< label, Hash< label > > &)
 Remove entries listed in the given HashSet from this HashSet.
- Public Member Functions inherited from HashTable< nil, label, Hash< label > >
bool set (const label &, const nil &newElmt)
 Assign a new hashedEntry, overwriting existing entries.
 HashTable (const label size=128)
 Construct given initial table size.
 HashTable (Istream &, const label size=128)
 Construct from Istream.
 HashTable (const HashTable< nil, label, Hash< label > > &)
 Construct as copy.
 HashTable (const Xfer< HashTable< nil, label, Hash< label > > > &)
 Construct by transferring the parameter contents.
 ~HashTable ()
label size () const
 Return number of elements in table.
bool empty () const
 Return true if the hash table is empty.
bool found (const label &) const
 Return true if hashedEntry is found in table.
iterator find (const label &)
 Find and return an iterator set at the hashedEntry.
const_iterator find (const label &) const
 Find and return an const_iterator set at the hashedEntry.
List< label > toc () const
 Return the table of contents.
List< label > sortedToc () const
 Return the table of contents as a sorted list.
OstreamprintInfo (Ostream &) const
 Print information.
bool insert (const label &, const nil &newElmt)
 Insert a new hashedEntry.
bool erase (const iterator &)
 Erase an hashedEntry specified by given iterator.
bool erase (const label &)
 Erase an hashedEntry specified by given key if in table.
label erase (const UList< label > &)
 Remove entries given by the listed keys from this HashTable.
label erase (const HashTable< AnyType, label, AnyHash > &)
 Remove entries given by the given keys from this HashTable.
void resize (const label newSize)
 Resize the hash table for efficiency.
void clear ()
 Clear all entries from table.
void clearStorage ()
 Clear the table entries and the table itself.
void transfer (HashTable< nil, label, Hash< label > > &)
 Transfer the contents of the argument table into this table.
Xfer< HashTable< nil, label,
Hash< label > > > 
xfer ()
 Transfer contents to the Xfer container.
niloperator[] (const label &)
 Find and return an hashedEntry.
niloperator() (const label &)
 Find and return an hashedEntry, create it null if not present.
void operator= (const HashTable< nil, label, Hash< label > > &)
 Assignment.
bool operator== (const HashTable< nil, label, Hash< label > > &) const
 Equality. Two hash tables are equal if all contents of first are.
bool operator!= (const HashTable< nil, label, Hash< label > > &) const
 The opposite of the equality operation. Takes linear time.
iterator begin ()
 iterator set to the begining of the HashTable
const_iterator begin () const
 const_iterator set to the beginning of the HashTable
const iterator & end ()
 iterator set to beyond the end of the HashTable
const const_iterator & end () const
 const_iterator set to beyond the end of the HashTable
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable
const const_iterator & cend () const
 const_iterator set to beyond the end of the HashTable

Constructor & Destructor Documentation

cellZoneSet ( const polyMesh mesh,
const word name,
const label  size,
writeOption  w = NO_WRITE 
)

Construct from additional size of labelHashSet.

Definition at line 99 of file cellZoneSet.C.

cellZoneSet ( const polyMesh mesh,
const word name,
const topoSet set,
writeOption  w = NO_WRITE 
)

Construct from existing set.

Definition at line 115 of file cellZoneSet.C.

~cellZoneSet ( )
virtual

Definition at line 132 of file cellZoneSet.C.


Member Function Documentation

TypeName ( "cellZoneSet"  )

Runtime type information.

const labelList& addressing ( ) const
inline

Definition at line 104 of file cellZoneSet.H.

Referenced by cellZoneSet::addSet(), and setToCellZone::applyToSet().

labelList& addressing ( )
inline

Definition at line 109 of file cellZoneSet.H.

void invert ( const label  maxLen)
virtual

Invert contents. (insert all members 0..maxLen-1 which were not in.

set)

Reimplemented from topoSet.

Definition at line 138 of file cellZoneSet.C.

References HashTable< nil, label, Hash< label > >::found(), List< T >::setSize(), and cellZoneSet::updateSet().

void subset ( const topoSet set)
virtual

Subset contents. Only elements present in both sets remain.

Reimplemented from topoSet.

Definition at line 155 of file cellZoneSet.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), forAll, HashTable< nil, label, Hash< label > >::found(), List< T >::size(), List< T >::transfer(), and cellZoneSet::updateSet().

void addSet ( const topoSet set)
virtual
void deleteSet ( const topoSet set)
virtual

Delete elements present in set.

Reimplemented from topoSet.

Definition at line 197 of file cellZoneSet.C.

References List< T >::append(), forAll, List< T >::size(), List< T >::transfer(), and cellZoneSet::updateSet().

void sync ( const polyMesh mesh)
virtual

Sync cellZoneSet across coupled patches.

Reimplemented from cellSet.

Definition at line 219 of file cellZoneSet.C.

void writeDebug ( Ostream os,
const primitiveMesh mesh,
const label  maxLen 
) const
virtual

Write maxLen items with label and coordinates.

Reimplemented from cellSet.

Definition at line 299 of file cellZoneSet.C.

References cellSet::writeDebug().

void updateMesh ( const mapPolyMesh morphMap)
virtual

Update any stored data for new labels.

Reimplemented from cellSet.

Definition at line 274 of file cellZoneSet.C.

References forAll, mapPolyMesh::reverseCellMap(), List< T >::setSize(), List< T >::size(), List< T >::transfer(), and cellZoneSet::updateSet().

label maxSize ( const polyMesh mesh) const
virtual

Return max index+1.

Reimplemented from cellSet.

Definition at line 223 of file cellZoneSet.C.

References primitiveMesh::nCells().


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