List container for MRF zomes. More...
#include <MRFZoneList.H>


Public Member Functions | |
| MRFZoneList (const fvMesh &mesh, const dictionary &dict) | |
| Constructor. | |
| ~MRFZoneList ()=default | |
| Destructor. | |
| bool | active (const bool warn=false) const |
| Return active status. | |
| void | reset (const dictionary &dict) |
| Reset the source list. | |
| const MRFZone & | getFromName (const word &name) const |
| Return the MRF with a given name. | |
| void | addAcceleration (const volVectorField &U, volVectorField &ddtU) const |
| Add the frame acceleration. | |
| void | addAcceleration (fvVectorMatrix &UEqn) const |
| Add the frame acceleration contribution to the momentum equation. | |
| void | addAcceleration (const volScalarField &rho, fvVectorMatrix &UEqn) const |
| Add the frame acceleration contribution to the momentum equation. | |
| tmp< volVectorField > | DDt (const volVectorField &U) const |
| Return the frame acceleration. | |
| tmp< volVectorField > | DDt (const volScalarField &rho, const volVectorField &U) const |
| Return the frame acceleration. | |
| tmp< surfaceScalarField > | phi () const |
| Return the MRF absolute flux. | |
| void | makeRelative (volVectorField &U) const |
| Make the given absolute velocity relative within the MRF region. | |
| void | makeRelative (surfaceScalarField &phi) const |
| Make the given absolute flux relative within the MRF region. | |
| tmp< surfaceScalarField > | relative (const tmp< surfaceScalarField > &phi) const |
| Return the given absolute flux relative within the MRF region. | |
| tmp< FieldField< fvsPatchField, scalar > > | relative (const tmp< FieldField< fvsPatchField, scalar > > &tphi) const |
| Return the given absolute boundary flux relative within. | |
| tmp< Field< scalar > > | relative (const tmp< Field< scalar > > &tphi, const label patchi) const |
| Return the given absolute patch flux relative within. | |
| void | makeRelative (const surfaceScalarField &rho, surfaceScalarField &phi) const |
| Make the given absolute mass-flux relative within the MRF region. | |
| void | makeAbsolute (volVectorField &U) const |
| Make the given relative velocity absolute within the MRF region. | |
| void | makeAbsolute (surfaceScalarField &phi) const |
| Make the given relative flux absolute within the MRF region. | |
| tmp< surfaceScalarField > | absolute (const tmp< surfaceScalarField > &phi) const |
| Return the given relative flux absolute within the MRF region. | |
| void | makeAbsolute (const surfaceScalarField &rho, surfaceScalarField &phi) const |
| Make the given relative mass-flux absolute within the MRF region. | |
| void | correctBoundaryVelocity (volVectorField &U) const |
| Correct the boundary velocity for the rotation of the MRF region. | |
| void | correctBoundaryFlux (const volVectorField &U, surfaceScalarField &phi) const |
| Correct the boundary flux for the rotation of the MRF region. | |
| template<class Type> | |
| tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > | zeroFilter (const tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > &tphi) const |
| Filter-out the MRF region contribution from the given field. | |
| void | update () |
| Update MRFZone faces if the mesh topology changes. | |
| bool | read (const dictionary &dict) |
| Read dictionary. | |
| bool | writeData (Ostream &os) const |
| Write data to Ostream. | |
| template<class Type> | |
| Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > | zeroFilter (const tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > &tphi) const |
| Public Member Functions inherited from PtrList< MRFZone > | |
| Foam::PtrList< MRFZone > | clone (Args &&... args) const |
| constexpr | PtrList () noexcept |
| Default construct. | |
| ~PtrList () | |
| Destructor. Frees all pointers. | |
| const MRFZone * | set (const label i) const |
| Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). | |
| void | clear () |
| Clear the PtrList. Delete allocated entries and set size to zero. | |
| void | free () |
| Free memory and nullify all entries. Does not change the list size. | |
| void | resize (const label newLen) |
| Adjust size of PtrList. | |
| void | resize_null (const label newLen) |
Set the addressed list to the given size, deleting all existing entries. Afterwards the list contains all nullptr entries. | |
| MRFZone & | emplace_back (Args &&... args) |
| Construct and append an element to the end of the list, return reference to the new list element. | |
| void | push_back (MRFZone *ptr) |
| Append an element to the end of the list. | |
| MRFZone & | emplace_set (const label i, Args &&... args) |
| Construct and set a new element at given position, (discard old element at that location). | |
| MRFZone & | emplace (const label i, Args &&... args) |
| Same as emplace_set(). | |
| MRFZone & | try_emplace (const label i, Args &&... args) |
| Like emplace_set() but will not overwrite an occupied (non-null) location. | |
| autoPtr< MRFZone > | release (const label i) |
| Release ownership of the pointer at the given position. | |
| void | transfer (PtrList< MRFZone > &list) |
| Transfer into this list and annul the argument list. | |
| void | operator= (const UPtrList< MRFZone > &list) |
| Copy assignment. | |
| void | setSize (const label n) |
| Same as resize(). | |
| void | append (autoPtr< MRFZone > &ptr) |
| Move append an element to the end of the list. | |
| Public Member Functions inherited from UPtrList< MRFZone > | |
| bool | empty () const noexcept |
| True if the list is empty (ie, size() is zero). | |
| label | size () const noexcept |
| The number of entries in the list. | |
| label | capacity () const noexcept |
| Size of the underlying storage. | |
| label | count_nonnull () const noexcept |
| The number of non-nullptr entries in the list. | |
| MRFZone & | front () |
| Reference to the first element of the list. | |
| MRFZone & | back () |
| Reference to the last element of the list. | |
| const MRFZone * | test (const label i) const |
| Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). | |
| const MRFZone * | get (const label i) const |
| Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). | |
| const MRFZone * | set (const label i) const |
| Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). | |
| void | clear () |
| Set list size to zero. | |
| void | free () |
| Nullify all entries. Does not change the list size. | |
| void | resize (const label newLen) |
Change the size of the list. Any new entries are nullptr. | |
| void | resize_null (const label newLen) |
Set the list to the given size and set all entries to nullptr. | |
| label | squeezeNull () |
| Squeeze out nullptr entries in the list of pointers after which any null pointers will be at the end of the list. | |
| void | push_back (MRFZone *ptr) |
| Append an element to the end of the list. | |
| void | swap (UPtrList< MRFZone > &list) noexcept |
| Swap content. | |
| void | transfer (UPtrList< MRFZone > &list) |
| Transfer contents into this list and annul the argument. | |
| void | reorder (const labelUList &oldToNew, const bool check=false) |
| Reorder elements. Reordering must be unique (ie, shuffle). | |
| void | sortOrder (const labelUList &order, const bool check=false) |
| Reorder elements according to new order mapping (newToOld). Reordering must be unique (ie, shuffle). | |
| void | checkNonNull () const |
| Check and raise FatalError if any nullptr exists in the list. | |
| const MRFZone & | at (const label i) const |
| Return const reference to the element at given position. FatalError for bounds problem or nullptr. | |
| const MRFZone & | operator[] (const label i) const |
| Return const reference to the element at given position. FatalError for bounds problem or nullptr. Same as at(). | |
| FOAM_DEPRECATED_FOR (2022-09, "get(), set() or test() methods") const MRFZone *operator()(const label i) const | |
| Deprecated(2022-09) - same as get(). | |
| void | operator= (const UPtrList< MRFZone > &list) |
| Copy assignment (shallow copies addresses). | |
| Ostream & | printAddresses (Ostream &os) const |
| Print pointer addresses to Ostream (debugging only). | |
| Ostream & | writeList (Ostream &os, const bool trimNull=false) const |
| Write UPtrList to Ostream, optionally ignoring null entries. | |
| MRFZone ** | begin_ptr () noexcept |
| Iterator to begin of raw pointers traversal (use with caution). | |
| MRFZone ** | end_ptr () noexcept |
| Iterator beyond end of raw pointers traversal (use with caution). | |
| iterator | begin () |
| Return iterator to begin traversal of non-nullptr entries. | |
| iterator | end () noexcept |
| Return iterator beyond end of UPtrList traversal. | |
| const_iterator | cbegin () const |
| Return const_iterator to begin traversal of non-nullptr entries. | |
| const_iterator | cend () const noexcept |
| Return const_iterator beyond end of UPtrList traversal. | |
| void | setSize (const label n) |
| Alias for resize(). | |
| MRFZone & | first () |
| Reference to the first element of the list. | |
| MRFZone & | last () |
| Return reference to the last element of the list. | |
| void | append (MRFZone *ptr) |
| Append an element to the end of the list. | |
| label | count () const noexcept |
| The number of non-nullptr entries in the list. | |
Protected Attributes | |
| const fvMesh & | mesh_ |
| Reference to the mesh database. | |
| Protected Attributes inherited from UPtrList< MRFZone > | |
| Detail::PtrListDetail< MRFZone > | ptrs_ |
| The list of pointers. | |
Friends | |
| Ostream & | operator<< (Ostream &os, const MRFZoneList &models) |
| Ostream operator. | |
Additional Inherited Members | |
| Public Types inherited from UPtrList< MRFZone > | |
| typedef MRFZone | value_type |
| Type of values the list contains. | |
| typedef MRFZone & | reference |
| A non-const reference to the value_type. | |
| typedef const MRFZone & | const_reference |
| A const reference to the value_type. | |
| Protected Member Functions inherited from PtrList< MRFZone > | |
| void | readIstream (Istream &is, const INew &inew) |
| Read from Istream using Istream constructor class. | |
| Protected Member Functions inherited from UPtrList< MRFZone > | |
| void | setAddressableSize (const label n) noexcept |
| Adjust addressable size. | |
| label | find_next (label pos) const |
| The next non-null entry after the specified position. | |
| UPtrList (Detail::PtrListDetail< MRFZone > &&ptrs) noexcept | |
| Low-level move construct. | |
| MRFZoneList | ( | const fvMesh & | mesh, |
| const dictionary & | dict ) |
Constructor.
Definition at line 29 of file MRFZoneList.C.
References active(), dict, mesh, mesh_, PtrList< MRFZone >::PtrList(), and reset().

|
default |
| bool active | ( | const bool | warn = false | ) | const |
Return active status.
Definition at line 46 of file MRFZoneList.C.
References Foam::endl(), forAll, Foam::Info, UPtrList< MRFZone >::operator[](), and UPtrList< MRFZone >::size().
Referenced by MRFZoneList().


| void reset | ( | const dictionary & | dict | ) |
Reset the source list.
Definition at line 63 of file MRFZoneList.C.
References UPtrList< MRFZone >::count(), dict, Foam::endl(), Foam::Info, mesh_, Foam::name(), resize(), and PtrList< MRFZone >::set().
Referenced by MRFZoneList().


| const Foam::MRFZone & getFromName | ( | const word & | name | ) | const |
Return the MRF with a given name.
Definition at line 96 of file MRFZoneList.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, UPtrList< MRFZone >::first(), Foam::name(), and names.

| void addAcceleration | ( | const volVectorField & | U, |
| volVectorField & | ddtU ) const |
| void addAcceleration | ( | fvVectorMatrix & | UEqn | ) | const |
Add the frame acceleration contribution to the momentum equation.
Definition at line 158 of file MRFZoneList.C.
References UEqn.
| void addAcceleration | ( | const volScalarField & | rho, |
| fvVectorMatrix & | UEqn ) const |
Add the frame acceleration contribution to the momentum equation.
Definition at line 167 of file MRFZoneList.C.
| Foam::tmp< Foam::volVectorField > DDt | ( | const volVectorField & | U | ) | const |
Return the frame acceleration.
Definition at line 180 of file MRFZoneList.C.
References Foam::dimTime, GeometricField< vector, fvPatchField, volMesh >::New(), IOobjectOption::NO_REGISTER, IOobject::scopedName(), U, and Foam::Zero.
Referenced by DDt().


| Foam::tmp< Foam::volVectorField > DDt | ( | const volScalarField & | rho, |
| const volVectorField & | U ) const |
Return the frame acceleration.
Definition at line 203 of file MRFZoneList.C.

| Foam::tmp< Foam::surfaceScalarField > phi | ( | ) | const |
Return the MRF absolute flux.
Definition at line 213 of file MRFZoneList.C.
References Foam::dimArea, Foam::dimVelocity, mesh_, GeometricField< scalar, fvsPatchField, surfaceMesh >::New(), IOobjectOption::NO_REGISTER, phi(), and Foam::Zero.
Referenced by correctBoundaryFlux(), makeAbsolute(), makeAbsolute(), makeRelative(), makeRelative(), phi(), and ~MRFZoneList().


| void makeRelative | ( | volVectorField & | U | ) | const |
Make the given absolute velocity relative within the MRF region.
Definition at line 233 of file MRFZoneList.C.
References U.
| void makeRelative | ( | surfaceScalarField & | phi | ) | const |
Make the given absolute flux relative within the MRF region.
Definition at line 242 of file MRFZoneList.C.
References phi().

| Foam::tmp< Foam::surfaceScalarField > relative | ( | const tmp< surfaceScalarField > & | phi | ) | const |
Return the given absolute flux relative within the MRF region.
Definition at line 251 of file MRFZoneList.C.
References tmp< T >::clear(), makeRelative(), name, Foam::New(), tmp< T >::ref(), and UPtrList< MRFZone >::size().
Referenced by correctBoundaryFlux().


| Foam::tmp< Foam::FieldField< Foam::fvsPatchField, Foam::scalar > > relative | ( | const tmp< FieldField< fvsPatchField, scalar > > & | tphi | ) | const |
Return the given absolute boundary flux relative within.
the MRF region
Definition at line 281 of file MRFZoneList.C.
References Foam::New(), tmp< T >::ref(), and UPtrList< MRFZone >::size().

| Foam::tmp< Foam::Field< Foam::scalar > > relative | ( | const tmp< Field< scalar > > & | tphi, |
| const label | patchi ) const |
Return the given absolute patch flux relative within.
the MRF region
Definition at line 305 of file MRFZoneList.C.
References Foam::New(), tmp< T >::ref(), and UPtrList< MRFZone >::size().

| void makeRelative | ( | const surfaceScalarField & | rho, |
| surfaceScalarField & | phi ) const |
Make the given absolute mass-flux relative within the MRF region.
Definition at line 329 of file MRFZoneList.C.

| void makeAbsolute | ( | volVectorField & | U | ) | const |
Make the given relative velocity absolute within the MRF region.
Definition at line 342 of file MRFZoneList.C.
References U.
Referenced by absolute().

| void makeAbsolute | ( | surfaceScalarField & | phi | ) | const |
Make the given relative flux absolute within the MRF region.
Definition at line 351 of file MRFZoneList.C.
References phi().

| Foam::tmp< Foam::surfaceScalarField > absolute | ( | const tmp< surfaceScalarField > & | phi | ) | const |
Return the given relative flux absolute within the MRF region.
Definition at line 360 of file MRFZoneList.C.
References tmp< T >::clear(), makeAbsolute(), name, Foam::New(), tmp< T >::ref(), and UPtrList< MRFZone >::size().

| void makeAbsolute | ( | const surfaceScalarField & | rho, |
| surfaceScalarField & | phi ) const |
Make the given relative mass-flux absolute within the MRF region.
Definition at line 389 of file MRFZoneList.C.

| void correctBoundaryVelocity | ( | volVectorField & | U | ) | const |
Correct the boundary velocity for the rotation of the MRF region.
Definition at line 402 of file MRFZoneList.C.
References U.
| void correctBoundaryFlux | ( | const volVectorField & | U, |
| surfaceScalarField & | phi ) const |
Correct the boundary flux for the rotation of the MRF region.
Definition at line 411 of file MRFZoneList.C.
References forAll, Foam::isA(), mesh_, phi(), relative(), U, and Uf.

| tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > zeroFilter | ( | const tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > & | tphi | ) | const |
| void update | ( | ) |
Update MRFZone faces if the mesh topology changes.
Definition at line 434 of file MRFZoneList.C.
References mesh_.
| bool read | ( | const dictionary & | dict | ) |
Read dictionary.
Definition at line 121 of file MRFZoneList.C.
References dict.
Referenced by IOMRFZoneList::read().

| bool writeData | ( | Ostream & | os | ) | const |
Write data to Ostream.
Definition at line 133 of file MRFZoneList.C.
References Foam::nl, and os().

| Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > zeroFilter | ( | const tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > & | tphi | ) | const |
Definition at line 27 of file MRFZoneListTemplates.C.
References forAll, name, Foam::New(), UPtrList< MRFZone >::operator[](), tmp< T >::ref(), UPtrList< MRFZone >::size(), and MRFZone::zero().

|
protected |
Reference to the mesh database.
Definition at line 78 of file MRFZoneList.H.
Referenced by correctBoundaryFlux(), MRFZoneList(), phi(), reset(), and update().