Loading...
Searching...
No Matches
regionModelFunctionObjectList Class Reference

List of cloud function objects. More...

#include <regionModelFunctionObjectList.H>

Inheritance diagram for regionModelFunctionObjectList:
Collaboration diagram for regionModelFunctionObjectList:

Public Member Functions

 regionModelFunctionObjectList (regionModel &region)
 Null constructor.
 regionModelFunctionObjectList (regionModel &region, const dictionary &dict, const bool readFields=true)
 Construct from mesh.
 regionModelFunctionObjectList (const regionModelFunctionObjectList &rmfol)
 Construct copy.
virtual ~regionModelFunctionObjectList ()
 Destructor.
const regionModelregion () const
 Return const access to the cloud region.
regionModelregion ()
 Return reference to the cloud region.
const dictionarydict () const
 Return the forces dictionary.
virtual void preEvolveRegion ()
 Pre-evolve hook.
virtual void postEvolveRegion ()
 Post-evolve hook.
Public Member Functions inherited from PtrList< regionModelFunctionObject >
Foam::PtrList< regionModelFunctionObject > clone (Args &&... args) const
constexpr PtrList () noexcept
 Default construct.
 ~PtrList ()
 Destructor. Frees all pointers.
const regionModelFunctionObject * 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.
regionModelFunctionObject & 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 (regionModelFunctionObject *ptr)
 Append an element to the end of the list.
regionModelFunctionObject & emplace_set (const label i, Args &&... args)
 Construct and set a new element at given position, (discard old element at that location).
regionModelFunctionObject & emplace (const label i, Args &&... args)
 Same as emplace_set().
regionModelFunctionObject & try_emplace (const label i, Args &&... args)
 Like emplace_set() but will not overwrite an occupied (non-null) location.
autoPtr< regionModelFunctionObject > release (const label i)
 Release ownership of the pointer at the given position.
void transfer (PtrList< regionModelFunctionObject > &list)
 Transfer into this list and annul the argument list.
void operator= (const UPtrList< regionModelFunctionObject > &list)
 Copy assignment.
void setSize (const label n)
 Same as resize().
void append (autoPtr< regionModelFunctionObject > &ptr)
 Move append an element to the end of the list.
Public Member Functions inherited from UPtrList< regionModelFunctionObject >
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.
regionModelFunctionObject & front ()
 Reference to the first element of the list.
regionModelFunctionObject & back ()
 Reference to the last element of the list.
const regionModelFunctionObject * 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 regionModelFunctionObject * 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 regionModelFunctionObject * 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 (regionModelFunctionObject *ptr)
 Append an element to the end of the list.
void swap (UPtrList< regionModelFunctionObject > &list) noexcept
 Swap content.
void transfer (UPtrList< regionModelFunctionObject > &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 regionModelFunctionObject & at (const label i) const
 Return const reference to the element at given position. FatalError for bounds problem or nullptr.
const regionModelFunctionObject & 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 regionModelFunctionObject *operator()(const label i) const
 Deprecated(2022-09) - same as get().
void operator= (const UPtrList< regionModelFunctionObject > &list)
 Copy assignment (shallow copies addresses).
OstreamprintAddresses (Ostream &os) const
 Print pointer addresses to Ostream (debugging only).
OstreamwriteList (Ostream &os, const bool trimNull=false) const
 Write UPtrList to Ostream, optionally ignoring null entries.
regionModelFunctionObject ** begin_ptr () noexcept
 Iterator to begin of raw pointers traversal (use with caution).
regionModelFunctionObject ** 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().
regionModelFunctionObject & first ()
 Reference to the first element of the list.
regionModelFunctionObject & last ()
 Return reference to the last element of the list.
void append (regionModelFunctionObject *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

regionModelregionModel_
 Reference to the region region model.
const dictionary dict_
 Dictionary.
Protected Attributes inherited from UPtrList< regionModelFunctionObject >
Detail::PtrListDetail< regionModelFunctionObject > ptrs_
 The list of pointers.

Additional Inherited Members

Public Types inherited from UPtrList< regionModelFunctionObject >
typedef regionModelFunctionObject value_type
 Type of values the list contains.
typedef regionModelFunctionObject & reference
 A non-const reference to the value_type.
typedef const regionModelFunctionObject & const_reference
 A const reference to the value_type.
Protected Member Functions inherited from PtrList< regionModelFunctionObject >
void readIstream (Istream &is, const INew &inew)
 Read from Istream using Istream constructor class.
Protected Member Functions inherited from UPtrList< regionModelFunctionObject >
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< regionModelFunctionObject > &&ptrs) noexcept
 Low-level move construct.

Detailed Description

Constructor & Destructor Documentation

◆ regionModelFunctionObjectList() [1/3]

regionModelFunctionObjectList ( regionModel & region)

Null constructor.

Definition at line 26 of file regionModelFunctionObjectList.C.

References dict_, PtrList< regionModelFunctionObject >::PtrList(), region(), and regionModel_.

Referenced by regionModelFunctionObjectList().

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

◆ regionModelFunctionObjectList() [2/3]

regionModelFunctionObjectList ( regionModel & region,
const dictionary & dict,
const bool readFields = true )

◆ regionModelFunctionObjectList() [3/3]

regionModelFunctionObjectList ( const regionModelFunctionObjectList & rmfol)

Construct copy.

Definition at line 82 of file regionModelFunctionObjectList.C.

References dict_, PtrList< regionModelFunctionObject >::PtrList(), regionModel_, and regionModelFunctionObjectList().

Here is the call graph for this function:

◆ ~regionModelFunctionObjectList()

Destructor.

Definition at line 95 of file regionModelFunctionObjectList.C.

Member Function Documentation

◆ region() [1/2]

const Foam::regionModels::regionModel & region ( ) const
inline

Return const access to the cloud region.

Definition at line 22 of file regionModelFunctionObjectListI.H.

References regionModel_.

Referenced by regionModelFunctionObjectList(), and regionModelFunctionObjectList().

Here is the caller graph for this function:

◆ region() [2/2]

Foam::regionModels::regionModel & region ( )
inline

Return reference to the cloud region.

Definition at line 29 of file regionModelFunctionObjectListI.H.

References regionModel_.

◆ dict()

const Foam::dictionary & dict ( ) const
inline

Return the forces dictionary.

Definition at line 36 of file regionModelFunctionObjectListI.H.

References dict_.

Referenced by regionModelFunctionObjectList().

Here is the caller graph for this function:

◆ preEvolveRegion()

void preEvolveRegion ( )
virtual

Pre-evolve hook.

Definition at line 102 of file regionModelFunctionObjectList.C.

References forAll, and UPtrList< regionModelFunctionObject >::operator[]().

Here is the call graph for this function:

◆ postEvolveRegion()

void postEvolveRegion ( )
virtual

Post-evolve hook.

Definition at line 111 of file regionModelFunctionObjectList.C.

References forAll, and UPtrList< regionModelFunctionObject >::operator[]().

Here is the call graph for this function:

Member Data Documentation

◆ regionModel_

regionModel& regionModel_
protected

Reference to the region region model.

Definition at line 63 of file regionModelFunctionObjectList.H.

Referenced by region(), region(), regionModelFunctionObjectList(), regionModelFunctionObjectList(), and regionModelFunctionObjectList().

◆ dict_


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