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

List of injection models. More...

#include <InjectionModelList.H>

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

Public Member Functions

 InjectionModelList (CloudType &owner)
 Construct null from owner.
 InjectionModelList (const dictionary &dict, CloudType &owner)
 Construct from dictionary and cloud owner.
 InjectionModelList (const InjectionModelList< CloudType > &im)
 Construct copy.
virtual autoPtr< InjectionModelList< CloudType > > clone () const
 Construct and return a clone.
virtual ~InjectionModelList ()=default
 Destructor.
scalar timeStart () const
 Return the minimum start-of-injection time.
scalar timeEnd () const
 Return the maximum end-of-injection time.
scalar volumeToInject (const scalar time0, const scalar time1)
 Volume of parcels to introduce relative to SOI.
scalar averageParcelMass ()
 Return the average parcel mass.
void updateMesh ()
 Set injector locations when mesh is updated.
template<class TrackCloudType>
void inject (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
 Main injection loop.
template<class TrackCloudType>
void injectSteadyState (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime)
 Main injection loop - steady-state.
virtual void info ()
 Write injection info.
Public Member Functions inherited from PtrList< InjectionModel< CloudType > >
Foam::PtrList< InjectionModel< CloudType > > clone (Args &&... args) const
constexpr PtrList () noexcept
 Default construct.
 ~PtrList ()
 Destructor. Frees all pointers.
const InjectionModel< 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.
InjectionModel< 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 (InjectionModel< CloudType > *ptr)
 Append an element to the end of the list.
InjectionModel< CloudType > & emplace_set (const label i, Args &&... args)
 Construct and set a new element at given position, (discard old element at that location).
InjectionModel< CloudType > & emplace (const label i, Args &&... args)
 Same as emplace_set().
InjectionModel< CloudType > & try_emplace (const label i, Args &&... args)
 Like emplace_set() but will not overwrite an occupied (non-null) location.
autoPtr< InjectionModel< CloudType > > release (const label i)
 Release ownership of the pointer at the given position.
void transfer (PtrList< InjectionModel< CloudType > > &list)
 Transfer into this list and annul the argument list.
void operator= (const UPtrList< InjectionModel< CloudType > > &list)
 Copy assignment.
void setSize (const label n)
 Same as resize().
void append (autoPtr< InjectionModel< CloudType > > &ptr)
 Move append an element to the end of the list.
Public Member Functions inherited from UPtrList< InjectionModel< 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.
InjectionModel< CloudType > & front ()
 Reference to the first element of the list.
InjectionModel< CloudType > & back ()
 Reference to the last element of the list.
const InjectionModel< 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 InjectionModel< 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 InjectionModel< 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 (InjectionModel< CloudType > *ptr)
 Append an element to the end of the list.
void swap (UPtrList< InjectionModel< CloudType > > &list) noexcept
 Swap content.
void transfer (UPtrList< InjectionModel< 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 InjectionModel< CloudType > & at (const label i) const
 Return const reference to the element at given position. FatalError for bounds problem or nullptr.
const InjectionModel< 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 InjectionModel< CloudType > *operator()(const label i) const
 Deprecated(2022-09) - same as get().
void operator= (const UPtrList< InjectionModel< 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.
InjectionModel< CloudType > ** begin_ptr () noexcept
 Iterator to begin of raw pointers traversal (use with caution).
InjectionModel< 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().
InjectionModel< CloudType > & first ()
 Reference to the first element of the list.
InjectionModel< CloudType > & last ()
 Return reference to the last element of the list.
void append (InjectionModel< CloudType > *ptr)
 Append an element to the end of the list.
label count () const noexcept
 The number of non-nullptr entries in the list.

Additional Inherited Members

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

Detailed Description

template<class CloudType>
class Foam::InjectionModelList< CloudType >

List of injection models.

Source files

Definition at line 48 of file InjectionModelList.H.

Constructor & Destructor Documentation

◆ InjectionModelList() [1/3]

template<class CloudType>
InjectionModelList ( CloudType & owner)

Construct null from owner.

Definition at line 27 of file InjectionModelList.C.

References PtrList< InjectionModel< CloudType > >::PtrList().

Referenced by clone(), and InjectionModelList().

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

◆ InjectionModelList() [2/3]

template<class CloudType>
InjectionModelList ( const dictionary & dict,
CloudType & owner )

◆ InjectionModelList() [3/3]

template<class CloudType>
InjectionModelList ( const InjectionModelList< CloudType > & im)

Construct copy.

Definition at line 93 of file InjectionModelList.C.

References InjectionModelList().

Here is the call graph for this function:

◆ ~InjectionModelList()

template<class CloudType>
virtual ~InjectionModelList ( )
virtualdefault

Destructor.

References td().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

template<class CloudType>
virtual autoPtr< InjectionModelList< CloudType > > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 74 of file InjectionModelList.H.

References InjectionModelList().

Here is the call graph for this function:

◆ timeStart()

template<class CloudType>
Foam::scalar timeStart ( ) const

Return the minimum start-of-injection time.

Definition at line 105 of file InjectionModelList.C.

◆ timeEnd()

template<class CloudType>
Foam::scalar timeEnd ( ) const

Return the maximum end-of-injection time.

Definition at line 118 of file InjectionModelList.C.

◆ volumeToInject()

template<class CloudType>
Foam::scalar volumeToInject ( const scalar time0,
const scalar time1 )

Volume of parcels to introduce relative to SOI.

Definition at line 131 of file InjectionModelList.C.

◆ averageParcelMass()

template<class CloudType>
Foam::scalar averageParcelMass ( )

Return the average parcel mass.

Definition at line 148 of file InjectionModelList.C.

◆ updateMesh()

template<class CloudType>
void updateMesh ( )

Set injector locations when mesh is updated.

Definition at line 164 of file InjectionModelList.C.

◆ inject()

template<class CloudType>
template<class TrackCloudType>
void inject ( TrackCloudType & cloud,
typename CloudType::parcelType::trackingData & td )

Main injection loop.

Definition at line 175 of file InjectionModelList.C.

References td().

Here is the call graph for this function:

◆ injectSteadyState()

template<class CloudType>
template<class TrackCloudType>
void injectSteadyState ( TrackCloudType & cloud,
typename CloudType::parcelType::trackingData & td,
const scalar trackTime )

Main injection loop - steady-state.

Definition at line 190 of file InjectionModelList.C.

References td().

Here is the call graph for this function:

◆ info()

template<class CloudType>
void info ( )
virtual

Write injection info.

Definition at line 205 of file InjectionModelList.C.


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