Loading...
Searching...
No Matches
CloudFunctionObjectList< CloudType > Class Template Reference

List of cloud function objects. More...

#include <CloudFunctionObjectList.H>

Inheritance diagram for CloudFunctionObjectList< CloudType >:
Collaboration diagram for CloudFunctionObjectList< CloudType >:

Public Member Functions

 CloudFunctionObjectList (CloudType &owner)
 Null constructor.
 CloudFunctionObjectList (CloudType &owner, const dictionary &dict, const bool readFields)
 Construct from mesh.
 CloudFunctionObjectList (const CloudFunctionObjectList &ppml)
 Construct copy.
virtual ~CloudFunctionObjectList ()=default
 Destructor.
const CloudTypeowner () const
 Return const access to the cloud owner.
CloudTypeowner ()
 Return reference to the cloud owner.
const dictionarydict () const
 Return the forces dictionary.
virtual void preEvolve (const typename parcelType::trackingData &td)
 Pre-evolve hook.
virtual void postEvolve (const typename parcelType::trackingData &td)
 Post-evolve hook.
virtual bool postMove (parcelType &p, const scalar dt, const point &position0, const typename parcelType::trackingData &td)
 Post-move hook.
virtual bool postPatch (parcelType &p, const polyPatch &pp, const typename parcelType::trackingData &td)
 Post-patch hook.
virtual bool postFace (parcelType &p, const typename parcelType::trackingData &td)
 Post-face hook.
Public Member Functions inherited from PtrList< CloudFunctionObject< CloudType > >
Foam::PtrList< CloudFunctionObject< CloudType > > clone (Args &&... args) const
constexpr PtrList () noexcept
 Default construct.
 ~PtrList ()
 Destructor. Frees all pointers.
const CloudFunctionObject< CloudType > * 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.
CloudFunctionObject< CloudType > & 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 (CloudFunctionObject< CloudType > *ptr)
 Append an element to the end of the list.
CloudFunctionObject< CloudType > & emplace_set (const label i, Args &&... args)
 Construct and set a new element at given position, (discard old element at that location).
CloudFunctionObject< CloudType > & emplace (const label i, Args &&... args)
 Same as emplace_set().
CloudFunctionObject< CloudType > & try_emplace (const label i, Args &&... args)
 Like emplace_set() but will not overwrite an occupied (non-null) location.
autoPtr< CloudFunctionObject< CloudType > > release (const label i)
 Release ownership of the pointer at the given position.
void transfer (PtrList< CloudFunctionObject< CloudType > > &list)
 Transfer into this list and annul the argument list.
void operator= (const UPtrList< CloudFunctionObject< CloudType > > &list)
 Copy assignment.
void setSize (const label n)
 Same as resize().
void append (autoPtr< CloudFunctionObject< CloudType > > &ptr)
 Move append an element to the end of the list.
Public Member Functions inherited from UPtrList< CloudFunctionObject< CloudType > >
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.
CloudFunctionObject< CloudType > & front ()
 Reference to the first element of the list.
CloudFunctionObject< CloudType > & back ()
 Reference to the last element of the list.
const CloudFunctionObject< CloudType > * 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 CloudFunctionObject< CloudType > * 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 CloudFunctionObject< CloudType > * 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 (CloudFunctionObject< CloudType > *ptr)
 Append an element to the end of the list.
void swap (UPtrList< CloudFunctionObject< CloudType > > &list) noexcept
 Swap content.
void transfer (UPtrList< CloudFunctionObject< CloudType > > &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 CloudFunctionObject< CloudType > & at (const label i) const
 Return const reference to the element at given position. FatalError for bounds problem or nullptr.
const CloudFunctionObject< CloudType > & 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 CloudFunctionObject< CloudType > *operator()(const label i) const
 Deprecated(2022-09) - same as get().
void operator= (const UPtrList< CloudFunctionObject< CloudType > > &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.
CloudFunctionObject< CloudType > ** begin_ptr () noexcept
 Iterator to begin of raw pointers traversal (use with caution).
CloudFunctionObject< CloudType > ** 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().
CloudFunctionObject< CloudType > & first ()
 Reference to the first element of the list.
CloudFunctionObject< CloudType > & last ()
 Return reference to the last element of the list.
void append (CloudFunctionObject< CloudType > *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 CloudTypeowner_
 Reference to the owner cloud.
const dictionary dict_
 Dictionary.
Protected Attributes inherited from UPtrList< CloudFunctionObject< CloudType > >
Detail::PtrListDetail< CloudFunctionObject< CloudType > > ptrs_
 The list of pointers.

Additional Inherited Members

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

Detailed Description

template<class CloudType>
class Foam::CloudFunctionObjectList< CloudType >

List of cloud function objects.

Source files

Definition at line 50 of file CloudFunctionObjectList.H.

Constructor & Destructor Documentation

◆ CloudFunctionObjectList() [1/3]

template<class CloudType>
CloudFunctionObjectList ( CloudType & owner)

Null constructor.

Definition at line 28 of file CloudFunctionObjectList.C.

References dict_, owner(), owner_, and PtrList< CloudFunctionObject< CloudType > >::PtrList().

Referenced by CloudFunctionObjectList().

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

◆ CloudFunctionObjectList() [2/3]

◆ CloudFunctionObjectList() [3/3]

template<class CloudType>
CloudFunctionObjectList ( const CloudFunctionObjectList< CloudType > & ppml)

Construct copy.

Definition at line 87 of file CloudFunctionObjectList.C.

References CloudFunctionObjectList(), dict_, owner_, and PtrList< CloudFunctionObject< CloudType > >::PtrList().

Here is the call graph for this function:

◆ ~CloudFunctionObjectList()

template<class CloudType>
virtual ~CloudFunctionObjectList ( )
virtualdefault

Destructor.

Member Function Documentation

◆ owner() [1/2]

template<class CloudType>
const CloudType & owner ( ) const
inline

Return const access to the cloud owner.

Definition at line 22 of file CloudFunctionObjectListI.H.

References owner_.

Referenced by CloudFunctionObjectList(), and CloudFunctionObjectList().

Here is the caller graph for this function:

◆ owner() [2/2]

template<class CloudType>
CloudType & owner ( )
inline

Return reference to the cloud owner.

Definition at line 29 of file CloudFunctionObjectListI.H.

References owner_.

◆ dict()

template<class CloudType>
const Foam::dictionary & dict ( ) const
inline

Return the forces dictionary.

Definition at line 37 of file CloudFunctionObjectListI.H.

References dict_.

Referenced by CloudFunctionObjectList().

Here is the caller graph for this function:

◆ preEvolve()

template<class CloudType>
void preEvolve ( const typename parcelType::trackingData & td)
virtual

Pre-evolve hook.

Definition at line 101 of file CloudFunctionObjectList.C.

References td().

Here is the call graph for this function:

◆ postEvolve()

template<class CloudType>
void postEvolve ( const typename parcelType::trackingData & td)
virtual

Post-evolve hook.

Definition at line 114 of file CloudFunctionObjectList.C.

References td().

Here is the call graph for this function:

◆ postMove()

template<class CloudType>
bool postMove ( parcelType & p,
const scalar dt,
const point & position0,
const typename parcelType::trackingData & td )
virtual

Post-move hook.

Definition at line 127 of file CloudFunctionObjectList.C.

References p, and td().

Here is the call graph for this function:

◆ postPatch()

template<class CloudType>
bool postPatch ( parcelType & p,
const polyPatch & pp,
const typename parcelType::trackingData & td )
virtual

Post-patch hook.

Definition at line 153 of file CloudFunctionObjectList.C.

References p, pp(), and td().

Here is the call graph for this function:

◆ postFace()

template<class CloudType>
bool postFace ( parcelType & p,
const typename parcelType::trackingData & td )
virtual

Post-face hook.

Definition at line 178 of file CloudFunctionObjectList.C.

References p, and td().

Here is the call graph for this function:

Member Data Documentation

◆ owner_

template<class CloudType>
const CloudType& owner_
protected

Reference to the owner cloud.

Definition at line 69 of file CloudFunctionObjectList.H.

Referenced by CloudFunctionObjectList(), CloudFunctionObjectList(), CloudFunctionObjectList(), owner(), and owner().

◆ dict_

template<class CloudType>
const dictionary dict_
protected

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