Set of sets to sample. Call sampledSets.write() to sample&write files. More...
Data Structures | |
class | fieldGroup |
Class used for grouping field types. More... | |
class | volFieldSampler |
Class used for sampling volFields. More... | |
Public Member Functions | |
TypeName ("sets") | |
Runtime type information. More... | |
sampledSets (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~sampledSets () |
Destructor. 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 sampledSets. More... | |
void | correct () |
Correct for mesh changes. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &) |
Update for mesh point-motion. More... | |
virtual void | readUpdate (const polyMesh::readUpdateState state) |
Update for changes of mesh due to readUpdate. 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... | |
Private Member Functions | |
void | clearFieldGroups () |
Clear old field groups. More... | |
label | appendFieldGroup (const word &fieldName, const word &fieldType) |
Append fieldName to the appropriate group. More... | |
label | classifyFields () |
Classify field types, returns the number of fields. More... | |
void | combineSampledSets (PtrList< coordSet > &masterSampledSets, labelListList &indexSets) |
Combine points from all processors. Sort by curveDist and produce. More... | |
template<class T > | |
void | combineSampledValues (const PtrList< volFieldSampler< T > > &sampledFields, const labelListList &indexSets, PtrList< volFieldSampler< T > > &masterFields) |
Combine values from all processors. More... | |
template<class Type > | |
void | writeSampleFile (const coordSet &masterSampleSet, const PtrList< volFieldSampler< Type > > &masterFields, const label setI, const fileName &timeDir, const writer< Type > &formatter) |
template<class Type > | |
void | sampleAndWrite (fieldGroup< Type > &fields) |
sampledSets (const sampledSets &) | |
Disallow default bitwise copy construct and assignment. More... | |
void | operator= (const sampledSets &) |
Private Attributes | |
const fvMesh & | mesh_ |
Const reference to fvMesh. More... | |
dictionary | dict_ |
Keep the dictionary to recreate sets for moving mesh cases. More... | |
bool | loadFromFiles_ |
Load fields from files (not from objectRegistry) More... | |
fileName | outputPath_ |
Output path. More... | |
meshSearch | searchEngine_ |
Mesh search engine. More... | |
wordReList | fieldSelection_ |
Names of fields to sample. More... | |
word | interpolationScheme_ |
Interpolation scheme to use. More... | |
word | writeFormat_ |
Output format to use. More... | |
fieldGroup< scalar > | scalarFields_ |
fieldGroup< vector > | vectorFields_ |
fieldGroup< sphericalTensor > | sphericalTensorFields_ |
fieldGroup< symmTensor > | symmTensorFields_ |
fieldGroup< tensor > | tensorFields_ |
PtrList< coordSet > | masterSampledSets_ |
labelListList | indexSets_ |
Static Private Attributes | |
static bool | verbose_ = false |
Output verbosity. 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 sets to sample. Call sampledSets.write() to sample&write files.
Definition at line 60 of file sampledSets.H.
|
private |
Disallow default bitwise copy construct and assignment.
sampledSets | ( | 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 132 of file sampledSets.C.
References dict, and Foam::read().
|
virtual |
Destructor.
Definition at line 167 of file sampledSets.C.
|
private |
Clear old field groups.
Definition at line 33 of file sampledSetsGrouping.C.
References sampledSets::fieldGroup< Type >::clear(), sampledSets::scalarFields_, sampledSets::sphericalTensorFields_, sampledSets::symmTensorFields_, sampledSets::tensorFields_, and sampledSets::vectorFields_.
|
private |
Append fieldName to the appropriate group.
Definition at line 44 of file sampledSetsGrouping.C.
|
private |
Classify field types, returns the number of fields.
Definition at line 79 of file sampledSetsGrouping.C.
References Foam::endl(), Foam::findStrings(), forAll, List::size(), IOobjectList::sortedNames(), and WarningInFunction.
|
private |
Combine points from all processors. Sort by curveDist and produce.
index list. Valid result only on master processor.
Definition at line 46 of file sampledSets.C.
References coordSet::axis(), Foam::ListListOps::combine(), coordSet::curveDist(), Foam::endl(), forAll, SortableList::indices(), coordSet::name(), sampledSet::segments(), PtrList::set(), List::size(), and WarningInFunction.
|
private |
Combine values from all processors.
Valid result only on master processor.
Definition at line 178 of file sampledSetsTemplates.C.
References Foam::ListListOps::combine(), forAll, Foam::name(), and List::size().
Referenced by sampledSets::sampleAndWrite().
|
private |
Definition at line 126 of file sampledSetsTemplates.C.
References Foam::endl(), forAll, writer< Type >::getFileName(), OFstream::name(), IOstream::opened(), propsDict(), WarningInFunction, and writer< Type >::write().
Referenced by sampledSets::sampleAndWrite().
|
private |
Definition at line 228 of file sampledSetsTemplates.C.
References sampledSets::combineSampledValues(), Foam::endl(), fields, forAll, sampledSets::indexSets_, Foam::interpolate(), sampledSets::interpolationScheme_, sampledSets::loadFromFiles_, objectRegistry::lookupObject(), UPstream::master(), sampledSets::masterSampledSets_, sampledSets::mesh_, IOobject::MUST_READ, IOobject::NO_WRITE, sampledSets::outputPath_, Foam::Pout, PtrList::set(), PtrList::size(), fvMesh::time(), Time::timeName(), sampledSets::verbose_, sampledSets::writeFormat_, and sampledSets::writeSampleFile().
|
private |
TypeName | ( | "sets" | ) |
Runtime type information.
void verbose | ( | const bool | verbosity = true | ) |
Set verbosity level.
Definition at line 173 of file sampledSets.C.
|
virtual |
Execute, currently does nothing.
Definition at line 179 of file sampledSets.C.
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 185 of file sampledSets.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 191 of file sampledSets.C.
|
virtual |
Sample and write.
Definition at line 197 of file sampledSets.C.
References Foam::endl(), UPstream::master(), Foam::mkDir(), Foam::nl, and Foam::Pout.
|
virtual |
Read the sampledSets.
Definition at line 240 of file sampledSets.C.
References dict, Foam::endl(), forAll, dictionary::found(), Foam::Info, dictionary::lookup(), UPstream::master(), Foam::nl, and Foam::Pout.
void correct | ( | ) |
Correct for mesh changes.
Definition at line 286 of file sampledSets.C.
|
virtual |
Update for changes of mesh.
Definition at line 304 of file sampledSets.C.
References correct().
|
virtual |
Update for mesh point-motion.
Definition at line 310 of file sampledSets.C.
References correct().
|
virtual |
Update for changes of mesh due to readUpdate.
Definition at line 316 of file sampledSets.C.
References correct(), and polyMesh::UNCHANGED.
|
staticprivate |
Output verbosity.
Definition at line 152 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Const reference to fvMesh.
Definition at line 158 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Keep the dictionary to recreate sets for moving mesh cases.
Definition at line 161 of file sampledSets.H.
|
private |
Load fields from files (not from objectRegistry)
Definition at line 164 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Output path.
Definition at line 167 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Mesh search engine.
Definition at line 170 of file sampledSets.H.
|
private |
Names of fields to sample.
Definition at line 176 of file sampledSets.H.
|
private |
Interpolation scheme to use.
Definition at line 179 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Output format to use.
Definition at line 182 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Definition at line 187 of file sampledSets.H.
Referenced by sampledSets::clearFieldGroups().
|
private |
Definition at line 188 of file sampledSets.H.
Referenced by sampledSets::clearFieldGroups().
|
private |
Definition at line 189 of file sampledSets.H.
Referenced by sampledSets::clearFieldGroups().
|
private |
Definition at line 190 of file sampledSets.H.
Referenced by sampledSets::clearFieldGroups().
|
private |
Definition at line 191 of file sampledSets.H.
Referenced by sampledSets::clearFieldGroups().
Definition at line 196 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
|
private |
Definition at line 197 of file sampledSets.H.
Referenced by sampledSets::sampleAndWrite().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.