Set of surfaces to sample. More...
Data Structures | |
class | mergeInfo |
Class used for surface merging information. More... | |
Public Member Functions | |
TypeName ("surfaces") | |
Runtime type information. More... | |
sampledSurfaces (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~sampledSurfaces () |
Destructor. More... | |
virtual bool | needsUpdate () const |
Does any of the surfaces need an update? More... | |
virtual bool | expire () |
Mark the surfaces as needing an update. More... | |
virtual bool | update () |
Update the surfaces as required and merge surface points (parallel). More... | |
virtual const word & | name () const |
Return name of the set of surfaces. More... | |
void | verbose (const bool verbosity=true) |
Set verbosity level. More... | |
virtual void | execute () |
Execute, currently does nothing. More... | |
virtual void | end () |
Execute at the final time-loop, currently does nothing. More... | |
virtual void | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual void | write () |
Sample and write. More... | |
virtual void | read (const dictionary &) |
Read the sampledSurfaces dictionary. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh - expires the surfaces. More... | |
virtual void | movePoints (const polyMesh &) |
Update for mesh point-motion - expires the surfaces. More... | |
virtual void | readUpdate (const polyMesh::readUpdateState state) |
Update for changes of mesh due to readUpdate - expires the surfaces. More... | |
![]() | |
functionObjectState (const objectRegistry &obr, const word &name) | |
Construct from components. More... | |
virtual | ~functionObjectState () |
Destructor. More... | |
const word & | name () const |
Return the name. More... | |
bool | active () const |
Return the active flag. More... | |
const IOdictionary & | stateDict () const |
Return access to the state dictionary. More... | |
dictionary & | propertyDict () |
Return access to the property dictionary. More... | |
template<class Type > | |
bool | setActive () |
Set the active status by querying objectRegistry type. More... | |
bool | foundProperty (const word &entryName) const |
Return true if the property exists. More... | |
template<class Type > | |
Type | getProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property. More... | |
template<class Type > | |
void | getProperty (const word &entryName, Type &value) const |
Retrieve generic property. More... | |
template<class Type > | |
void | setProperty (const word &entryName, const Type &value) |
Add generic property. More... | |
template<class Type > | |
Type | getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property from named object. More... | |
template<class Type > | |
void | getObjectProperty (const word &objectName, const word &entryName, Type &value) const |
Retrieve generic property from named object. More... | |
template<class Type > | |
void | setObjectProperty (const word &objectName, const word &entryName, const Type &value) |
Add generic property from named object. More... | |
template<class Type > | |
void | setResult (const word &entryName, const Type &value) |
Add result. More... | |
template<class Type > | |
void | setObjectResult (const word &objectName, const word &entryName, const Type &value) |
Add result from named object. More... | |
template<class Type > | |
Type | getResult (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve result. More... | |
template<class Type > | |
Type | getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve result from named object. More... | |
template<class Type > | |
void | getObjectResult (const word &objectName, const word &entryName, Type &value) const |
Retrieve result from named object. More... | |
word | resultType (const word &entryName) const |
Retrieve the result type. More... | |
word | objectResultType (const word &objectName, const word &entryName) const |
Return the type of result. More... | |
List< word > | objectResultEntries () const |
Retrieve the result entries. More... | |
List< word > | objectResultEntries (const word &objectName) const |
Return result entries for named object. More... | |
![]() | |
PtrList () | |
Null Constructor. More... | |
PtrList (const label) | |
Construct with size specified. More... | |
PtrList (const PtrList< T > &) | |
Copy constructor. More... | |
PtrList (const PtrList< T > &, const CloneArg &) | |
Copy constructor with additional argument for clone. More... | |
PtrList (const Xfer< PtrList< T > > &) | |
Construct by transferring the parameter contents. More... | |
PtrList (PtrList< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
PtrList (const SLPtrList< T > &) | |
Construct as copy of SLPtrList<T> More... | |
PtrList (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
PtrList (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
PtrList () | |
PtrList (const label s) | |
PtrList (const PtrList< T > &a) | |
PtrList (const Xfer< PtrList< T > > &lst) | |
PtrList (PtrList< T > &a, bool reUse) | |
PtrList (const SLPtrList< T > &sll) | |
PtrList (Istream &is) | |
~PtrList () | |
Destructor. More... | |
label | size () const |
Return the number of elements in the PtrList. More... | |
bool | empty () const |
Return true if the PtrList is empty (ie, size() is zero). More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of PtrList. If extending the PtrList, new entries are. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | clear () |
Clear the PtrList, i.e. set size to zero deleting all the. More... | |
void | append (T *) |
Append an element at the end of the list. More... | |
void | append (const autoPtr< T > &) |
void | append (const tmp< T > &) |
void | transfer (PtrList< T > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
Xfer< PtrList< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< T > | set (const label, T *) |
Set element. Return old element (can be NULL). More... | |
autoPtr< T > | set (const label, const autoPtr< T > &) |
autoPtr< T > | set (const label, const tmp< T > &) |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
PtrList< T > & | operator= (const PtrList< T > &) |
Assignment. More... | |
iterator | begin () |
Return an iterator to begin traversing the PtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
iterator | end () |
Return an iterator to end traversing the PtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the PtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the PtrList. More... | |
Static Public Member Functions | |
static scalar | mergeTol () |
Get merge tolerance. More... | |
static scalar | mergeTol (const scalar) |
Set tolerance (and return old tolerance) More... | |
Private Member Functions | |
label | classifyFields () |
Return number of fields. More... | |
void | writeGeometry () const |
Write geometry only. More... | |
template<class Type > | |
void | writeSurface (const Field< Type > &values, const label surfI, const word &fieldName, const fileName &outputDir) |
Write sampled fieldName on surface and on outputDir path. More... | |
template<class Type > | |
void | sampleAndWrite (const GeometricField< Type, fvPatchField, volMesh > &) |
Sample and write a particular volume field. More... | |
template<class Type > | |
void | sampleAndWrite (const GeometricField< Type, fvsPatchField, surfaceMesh > &) |
Sample and write a particular surface field. More... | |
template<class Type > | |
void | sampleAndWrite (const IOobjectList &objects) |
Sample and write all sampled fields. More... | |
sampledSurfaces (const sampledSurfaces &) | |
Disallow default bitwise copy construct and assignment. More... | |
void | operator= (const sampledSurfaces &) |
Private Attributes | |
const objectRegistry & | obr_ |
Const reference to database. More... | |
const bool | loadFromFiles_ |
Load fields from files (not from objectRegistry) More... | |
fileName | outputPath_ |
Output path. More... | |
wordReList | fieldSelection_ |
Names of fields to sample. More... | |
word | interpolationScheme_ |
Interpolation scheme to use. More... | |
List< mergeInfo > | mergeList_ |
Information for merging surfaces. More... | |
autoPtr< surfaceWriter > | formatter_ |
Surface formatter. More... | |
Static Private Attributes | |
static bool | verbose_ = false |
Output verbosity. More... | |
static scalar | mergeTol_ = 1e-10 |
Tolerance for merging points (fraction of mesh bounding box) More... | |
Additional Inherited Members | |
![]() | |
typedef T | value_type |
Type of values the PtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into PtrList::value_type objects. More... | |
![]() | |
const typedef T & | const_reference |
Type that can be used for storing into constant PtrList::value_type. More... | |
![]() | |
functionObjectState (const functionObjectState &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const functionObjectState &) |
Disallow default bitwise assignment. More... | |
![]() | |
void | read (Istream &, const INew &inewt) |
Read from Istream using given Istream constructor class. More... | |
![]() | |
const word | name_ |
Name of model. More... | |
bool | active_ |
Flag to indicate whether the object is active. More... | |
IOdictionary & | stateDict_ |
Reference to the state dictionary. More... | |
Set of surfaces to sample.
The write() method is used to sample and write files.
Definition at line 59 of file sampledSurfaces.H.
|
private |
Disallow default bitwise copy construct and assignment.
sampledSurfaces | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
const bool | loadFromFiles = false |
||
) |
Construct for given objectRegistry and dictionary.
allow the possibility to load fields from files
Definition at line 88 of file sampledSurfaces.C.
References dict, UPstream::parRun(), and Foam::read().
|
virtual |
Destructor.
Definition at line 126 of file sampledSurfaces.C.
|
private |
Return number of fields.
Definition at line 33 of file sampledSurfacesGrouping.C.
References Foam::endl(), sampledSurfaces::fieldSelection_, Foam::findStrings(), forAll, sampledSurfaces::loadFromFiles_, sampledSurfaces::obr_, List::size(), IOobjectList::sortedNames(), objectRegistry::sortedNames(), objectRegistry::time(), Time::timeName(), and WarningInFunction.
|
private |
Write geometry only.
Definition at line 47 of file sampledSurfaces.C.
References forAll, sampledSurfaces::formatter_, UPstream::master(), sampledSurfaces::mergeList_, sampledSurfaces::obr_, PtrList< sampledSurface >::operator[](), sampledSurfaces::outputPath_, UPstream::parRun(), s(), objectRegistry::time(), and Time::timeName().
|
private |
Write sampled fieldName on surface and on outputDir path.
Definition at line 36 of file sampledSurfacesTemplates.C.
References Foam::ListListOps::combine(), Foam::inplaceReorder(), points, propsDict(), and s().
|
private |
Sample and write a particular volume field.
Definition at line 119 of file sampledSurfacesTemplates.C.
References autoPtr::empty(), forAll, Foam::compressible::New(), and s().
Referenced by sampledSurfaces::sampleAndWrite().
|
private |
Sample and write a particular surface field.
Definition at line 160 of file sampledSurfacesTemplates.C.
|
private |
Sample and write all sampled fields.
Definition at line 177 of file sampledSurfacesTemplates.C.
References Foam::endl(), Foam::fieldNames(), sampledSurfaces::fieldSelection_, Foam::findStrings(), fld(), forAllConstIter(), sampledSurfaces::loadFromFiles_, IOobjectList::lookupClass(), UPstream::master(), mesh, IOobject::MUST_READ, IOobjectList::names(), sampledSurfaces::obr_, Foam::Pout, sampledSurfaces::sampleAndWrite(), and sampledSurfaces::verbose_.
|
private |
TypeName | ( | "surfaces" | ) |
Runtime type information.
|
virtual |
Does any of the surfaces need an update?
Definition at line 273 of file sampledSurfaces.C.
References forAll.
|
virtual |
Mark the surfaces as needing an update.
May also free up unneeded data. Return false if all surfaces were already marked as expired.
Definition at line 287 of file sampledSurfaces.C.
References forAll, and UPstream::parRun().
|
virtual |
Update the surfaces as required and merge surface points (parallel).
Return false if no surfaces required an update.
Definition at line 310 of file sampledSurfaces.C.
References polyMesh::bounds(), Foam::endl(), forAll, PatchTools::gatherAndMerge(), Foam::Info, boundBox::mag(), UPstream::master(), mesh, Foam::nl, UPstream::parRun(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, and s().
|
inlinevirtual |
Return name of the set of surfaces.
Definition at line 207 of file sampledSurfaces.H.
References functionObjectState::name_.
void verbose | ( | const bool | verbosity = true | ) |
Set verbosity level.
Definition at line 132 of file sampledSurfaces.C.
|
virtual |
Execute, currently does nothing.
Definition at line 138 of file sampledSurfaces.C.
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 144 of file sampledSurfaces.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 150 of file sampledSurfaces.C.
|
virtual |
Sample and write.
Definition at line 156 of file sampledSurfaces.C.
|
virtual |
Read the sampledSurfaces dictionary.
Definition at line 189 of file sampledSurfaces.C.
References dict, Foam::endl(), forAll, dictionary::found(), Foam::Info, dictionary::lookup(), UPstream::master(), mesh, surfaceWriter::New(), Foam::nl, UPstream::parRun(), Foam::Pout, and dictionary::subOrEmptyDict().
|
virtual |
Update for changes of mesh - expires the surfaces.
Definition at line 250 of file sampledSurfaces.C.
|
virtual |
Update for mesh point-motion - expires the surfaces.
Definition at line 258 of file sampledSurfaces.C.
|
virtual |
Update for changes of mesh due to readUpdate - expires the surfaces.
Definition at line 264 of file sampledSurfaces.C.
References polyMesh::UNCHANGED.
|
static |
Get merge tolerance.
Definition at line 377 of file sampledSurfaces.C.
|
static |
Set tolerance (and return old tolerance)
Definition at line 383 of file sampledSurfaces.C.
|
staticprivate |
Output verbosity.
Definition at line 88 of file sampledSurfaces.H.
Referenced by sampledSurfaces::sampleAndWrite().
|
staticprivate |
Tolerance for merging points (fraction of mesh bounding box)
Definition at line 91 of file sampledSurfaces.H.
|
private |
Const reference to database.
Definition at line 97 of file sampledSurfaces.H.
Referenced by sampledSurfaces::classifyFields(), sampledSurfaces::sampleAndWrite(), and sampledSurfaces::writeGeometry().
|
private |
Load fields from files (not from objectRegistry)
Definition at line 100 of file sampledSurfaces.H.
Referenced by sampledSurfaces::classifyFields(), and sampledSurfaces::sampleAndWrite().
|
private |
Output path.
Definition at line 103 of file sampledSurfaces.H.
Referenced by sampledSurfaces::writeGeometry().
|
private |
Names of fields to sample.
Definition at line 109 of file sampledSurfaces.H.
Referenced by sampledSurfaces::classifyFields(), and sampledSurfaces::sampleAndWrite().
|
private |
Interpolation scheme to use.
Definition at line 112 of file sampledSurfaces.H.
Information for merging surfaces.
Definition at line 118 of file sampledSurfaces.H.
Referenced by sampledSurfaces::writeGeometry().
|
private |
Surface formatter.
Definition at line 124 of file sampledSurfaces.H.
Referenced by sampledSurfaces::writeGeometry().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.