transferModelList Class Reference
Inheritance diagram for transferModelList:
Collaboration diagram for transferModelList:

Public Member Functions

 transferModelList (surfaceFilmRegionModel &film)
 Construct null. More...
 
 transferModelList (surfaceFilmRegionModel &film, const dictionary &dict)
 Construct from type name, dictionary and surface film model. More...
 
virtual ~transferModelList ()
 Destructor. More...
 
virtual void correct (scalarField &availableMass, volScalarField &massToTransfer)
 Correct kinematic transfers. More...
 
virtual void correct (scalarField &availableMass, volScalarField &massToTransfer, volScalarField &energyToTransfer)
 Correct kinematic and thermodynamic transfers. More...
 
virtual void info (Ostream &os)
 Provide some info. More...
 
- Public Member Functions inherited from PtrList< transferModel >
constexpr PtrList () noexcept
 Default construct. More...
 
 PtrList (const label len)
 Construct with specified size, each element initialized to nullptr. More...
 
 PtrList (const PtrList< transferModel > &list)
 Copy construct using 'clone()' method on each element. More...
 
 PtrList (PtrList< transferModel > &&list) noexcept
 Move construct. More...
 
 PtrList (UList< transferModel * > &list)
 Take ownership of pointers in the list, set old pointers to null. More...
 
 PtrList (const PtrList< transferModel > &list, const CloneArg &cloneArgs)
 Copy construct using 'clone()' method on each element. More...
 
 PtrList (PtrList< transferModel > &list, bool reuse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< transferModel > &list)
 Copy construct using 'clone()' on each element of SLPtrList<T> More...
 
 PtrList (Istream &is, const INew &inew)
 Construct from Istream using given Istream constructor class. More...
 
 PtrList (Istream &is)
 Construct from Istream using default Istream constructor class. More...
 
 ~PtrList ()
 Destructor. Frees all pointers. More...
 
PtrList< transferModel > clone (Args &&... args) const
 Make a copy by cloning each of the list elements. More...
 
Foam::PtrList< transferModel > clone (Args &&... args) const
 
const transferModel * set (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
autoPtr< transferModel > set (const label i, transferModel *ptr)
 Set element to given pointer and return old element (can be null) More...
 
autoPtr< transferModel > set (const label i, std::unique_ptr< transferModel > &&ptr)
 Set element to given unique_ptr and return old element. More...
 
autoPtr< transferModel > set (const label i, autoPtr< transferModel > &&ptr)
 Set element to given autoPtr and return old element. More...
 
autoPtr< transferModel > set (const label i, const refPtr< transferModel > &ptr)
 Set element to given refPtr and return old element. More...
 
autoPtr< transferModel > set (const label i, const tmp< transferModel > &ptr)
 Set element to given tmp and return old element. More...
 
autoPtr< transferModel > set (const label i, autoPtr< transferModel > &ptr)
 Set element to given autoPtr and return old element. More...
 
void clear ()
 Clear the PtrList. Delete allocated entries and set size to zero. More...
 
void free ()
 Free memory and nullify all entries. Does not change the list size. More...
 
void resize (const label newLen)
 Adjust size of PtrList. More...
 
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. More...
 
transferModel & emplace_back (Args &&... args)
 Construct and append an element to the end of the list, return reference to the new list element. More...
 
void push_back (transferModel *ptr)
 Append an element to the end of the list. More...
 
void push_back (std::unique_ptr< transferModel > &&ptr)
 Move append an element to the end of the list. More...
 
void push_back (autoPtr< transferModel > &&ptr)
 Move append an element to the end of the list. More...
 
void push_back (const refPtr< transferModel > &ptr)
 Move or clone append a refPtr to the end of the list. More...
 
void push_back (const tmp< transferModel > &ptr)
 Move or clone append a tmp to the end of the list. More...
 
void push_back (PtrList< transferModel > &&other)
 Move append another list to the end of this list. More...
 
void push_back (autoPtr< transferModel > &ptr)=delete
 Disallow push_back with autoPtr without std::move. More...
 
transferModel & emplace_set (const label i, Args &&... args)
 Construct and set a new element at given position, (discard old element at that location). More...
 
transferModel & emplace (const label i, Args &&... args)
 Same as emplace_set() More...
 
transferModel & try_emplace (const label i, Args &&... args)
 Like emplace_set() but will not overwrite an occupied (non-null) location. More...
 
autoPtr< transferModel > release (const label i)
 Release ownership of the pointer at the given position. More...
 
void transfer (PtrList< transferModel > &list)
 Transfer into this list and annul the argument list. More...
 
void operator= (const PtrList< transferModel > &list)
 Copy assignment. More...
 
void operator= (PtrList< transferModel > &&list)
 Move assignment. More...
 
void setSize (const label newLen)
 Same as resize() More...
 
void append (autoPtr< transferModel > &ptr)
 Move append an element to the end of the list. More...
 
void append (transferModel *ptr)
 Append an element to the end of the list. More...
 
void append (std::unique_ptr< transferModel > &&ptr)
 Move append an element to the end of the list. More...
 
void append (autoPtr< transferModel > &&ptr)
 Move append an element to the end of the list. More...
 
void append (const refPtr< transferModel > &ptr)
 Move or clone append a tmp to the end of the list. More...
 
void append (const tmp< transferModel > &ptr)
 Move or clone append a tmp to the end of the list. More...
 
void append (PtrList< transferModel > &&other)
 Move append another list to the end of this list. More...
 
- Public Member Functions inherited from UPtrList< T >
constexpr UPtrList () noexcept=default
 Default construct. More...
 
 UPtrList (const label len)
 Construct with specified size and set all entries to nullptr. More...
 
 UPtrList (const UPtrList< T > &list)
 Copy construct (shallow copies addresses) More...
 
 UPtrList (UPtrList< T > &&list) noexcept
 Move construct. More...
 
 UPtrList (UPtrList< T > &list, bool reuse)
 Construct as shallow copy or re-use as specified. More...
 
 UPtrList (PtrList< T > &list)
 Shallow copy from PtrList. More...
 
 UPtrList (const UList< T *> &list)
 Construct from UList of pointers (shallow copy) More...
 
 UPtrList (UList< T > &list)
 Construct from UList, taking the address of each list element. More...
 
bool empty () const noexcept
 True if the list is empty (ie, size() is zero) More...
 
label size () const noexcept
 The number of entries in the list. More...
 
label capacity () const noexcept
 Size of the underlying storage. More...
 
label count () const noexcept
 The number of non-null entries in the list. More...
 
Tfront ()
 Reference to the first element of the list. More...
 
const Tfront () const
 Reference to first element of the list. More...
 
Tback ()
 Reference to the last element of the list. More...
 
const Tback () const
 Reference to the last element of the list. More...
 
const Ttest (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
const Tget (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
Tget (const label i)
 Return pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
const Tset (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
void clear ()
 Set list size to zero. More...
 
void free ()
 Nullify all entries. Does not change the list size. More...
 
void resize (const label newLen)
 Change the size of the list. Any new entries are nullptr. More...
 
void resize_null (const label newLen)
 Set the list to the given size and set all entries to nullptr. More...
 
label squeezeNull ()
 Squeeze out nullptr entries in the list of pointers after which any null pointers will be at the end of the list. More...
 
void trimTrailingNull ()
 Reduce addressable list size to ignore any trailing null pointers. More...
 
void push_back (T *ptr)
 Append an element to the end of the list. More...
 
void push_back (UPtrList< T > &&other)
 Move append another list to the end of this list. More...
 
void swap (UPtrList< T > &list) noexcept
 Swap content. More...
 
void transfer (UPtrList< T > &list)
 Transfer contents into this list and annul the argument. More...
 
Tset (const label i, T *ptr)
 Set element to specified pointer and return the old list element, which can be a nullptr. More...
 
void reorder (const labelUList &oldToNew, const bool check=false)
 Reorder elements. Reordering must be unique (ie, shuffle). More...
 
void sortOrder (const labelUList &order, const bool check=false)
 Reorder elements according to new order mapping (newToOld). Reordering must be unique (ie, shuffle). More...
 
void checkNonNull () const
 Check and raise FatalError if any nullptr exists in the list. More...
 
const Tat (const label i) const
 Return const reference to the element at given position. FatalError for bounds problem or nullptr. More...
 
Tat (const label i)
 Return reference to the element at given position. FatalError for bounds problem or nullptr. More...
 
const Toperator[] (const label i) const
 Return const reference to the element at given position. FatalError for bounds problem or nullptr. Same as at(). More...
 
Toperator[] (const label i)
 Return reference to the element at given position. FatalError for bounds problem or nullptr. Same as at(). More...
 
 FOAM_DEPRECATED_FOR (2022-09, "get(), set() or test() methods") const T *operator()(const label i) const
 Deprecated(2022-09) - same as get() More...
 
void operator= (const UPtrList< T > &list)
 Copy assignment (shallow copies addresses) More...
 
void operator= (UPtrList< T > &&list)
 Move assignment. More...
 
T ** begin_ptr () noexcept
 Iterator to begin of raw pointers traversal (use with caution) More...
 
T ** end_ptr () noexcept
 Iterator beyond end of raw pointers traversal (use with caution) More...
 
iterator begin ()
 Return iterator to begin traversal of non-nullptr entries. More...
 
iterator end () noexcept
 Return iterator beyond end of UPtrList traversal. More...
 
const_iterator cbegin () const
 Return const_iterator to begin traversal of non-nullptr entries. More...
 
const_iterator cend () const noexcept
 Return const_iterator beyond end of UPtrList traversal. More...
 
const_iterator begin () const
 Return const_iterator to begin traversal of non-nullptr entries. More...
 
const_iterator end () const noexcept
 Return const_iterator beyond end of UPtrList traversal. More...
 
void setSize (const label n)
 Alias for resize() More...
 
Tfirst ()
 Reference to the first element of the list. More...
 
const Tfirst () const
 Return reference to first element of the list. More...
 
Tlast ()
 Return reference to the last element of the list. More...
 
const Tlast () const
 Return reference to the last element of the list. More...
 
void append (T *ptr)
 Append an element to the end of the list. More...
 
void append (UPtrList< T > &&other)
 Move append another list to the end of this list. More...
 
- Public Member Functions inherited from filmSubModelBase
 filmSubModelBase (surfaceFilmRegionModel &film)
 Construct null. More...
 
 filmSubModelBase (surfaceFilmRegionModel &film, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs")
 Construct from film film without name. More...
 
 filmSubModelBase (const word &modelName, surfaceFilmRegionModel &film, const dictionary &dict, const word &baseName, const word &modelType)
 Construct from film film with name. More...
 
virtual ~filmSubModelBase ()
 Destructor. More...
 
virtual bool writeTime () const
 Flag to indicate when to write a property. More...
 
const surfaceFilmRegionModelfilm () const
 Return const access to the film surface film model. More...
 
surfaceFilmRegionModelfilm ()
 Return the reference to the film surface film model. More...
 
template<class FilmType >
const FilmType & filmType () const
 
- Public Member Functions inherited from subModelBase
 subModelBase (dictionary &properties)
 Construct null. More...
 
 subModelBase (dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs")
 Construct from components without name. More...
 
 subModelBase (const word &modelName, dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType)
 Construct from components with name. More...
 
 subModelBase (const subModelBase &smb)
 Construct as copy. More...
 
virtual ~subModelBase ()=default
 Destructor. More...
 
const wordmodelName () const
 Return const access to the name of the sub-model. More...
 
const dictionarydict () const
 Return const access to the cloud dictionary. More...
 
const wordbaseName () const
 Return const access to the base name of the sub-model. More...
 
const wordmodelType () const
 Return const access to the sub-model type. More...
 
const dictionarycoeffDict () const
 Return const access to the coefficients dictionary. More...
 
const dictionaryproperties () const
 Return const access to the properties dictionary. More...
 
virtual bool defaultCoeffs (const bool printMsg) const
 Returns true if defaultCoeffs is true and outputs on printMsg. More...
 
virtual bool active () const
 Return the model 'active' status - default active = true. More...
 
virtual void cacheFields (const bool store)
 Cache dependent sub-model fields. More...
 
virtual fileName localPath () const
 Output directory. More...
 
template<class Type >
Type getBaseProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const
 Retrieve generic property from the base model. More...
 
template<class Type >
void getBaseProperty (const word &entryName, Type &value) const
 Retrieve generic property from the base model. More...
 
template<class Type >
void setBaseProperty (const word &entryName, const Type &value)
 Add generic property to the base model. More...
 
bool getModelDict (const word &entryName, dictionary &dict) const
 Retrieve dictionary, return true if set. More...
 
template<class Type >
bool getModelProperty (const word &entryName, Type &value) const
 Retrieve generic property from the sub-model. More...
 
template<class Type >
Type getModelProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const
 Retrieve generic property from the sub-model. More...
 
template<class Type >
void setModelProperty (const word &entryName, const Type &value)
 Add generic property to the sub-model. More...
 
virtual void write (Ostream &os) const
 Write. More...
 

Additional Inherited Members

- Public Types inherited from UPtrList< T >
typedef T value_type
 Type of values the list contains. More...
 
typedef Treference
 A non-const reference to the value_type. More...
 
typedef const Tconst_reference
 A const reference to the value_type. More...
 
- Public Attributes inherited from subModelBase
bool log
 Flag to write log into Info. More...
 
- Protected Member Functions inherited from PtrList< transferModel >
void readIstream (Istream &is, const INew &inew)
 Read from Istream using Istream constructor class. More...
 
- Protected Member Functions inherited from UPtrList< T >
void setAddressableSize (const label n) noexcept
 Adjust addressable size. More...
 
label find_next (label pos) const
 The next non-null entry after the specified position. More...
 
 UPtrList (Detail::PtrListDetail< T > &&ptrs) noexcept
 Low-level move construct. More...
 
- Protected Member Functions inherited from subModelBase
bool inLine () const
 Flag to indicate whether data is/was read in-line. More...
 
- Protected Attributes inherited from UPtrList< T >
Detail::PtrListDetail< Tptrs_
 The list of pointers. More...
 
- Protected Attributes inherited from filmSubModelBase
surfaceFilmRegionModelfilmModel_
 Reference to the film surface film model. More...
 
- Protected Attributes inherited from subModelBase
const word modelName_
 Name of the sub-model. More...
 
dictionaryproperties_
 Reference to properties dictionary e.g. for restart. More...
 
const dictionary dict_
 Copy of dictionary used during construction. More...
 
const word baseName_
 Name of the sub-model base class. More...
 
const word modelType_
 Type of the sub-model. More...
 
const dictionary coeffDict_
 Coefficients dictionary. More...
 

Detailed Description

Definition at line 52 of file transferModelList.H.

Constructor & Destructor Documentation

◆ transferModelList() [1/2]

Construct null.

Definition at line 35 of file transferModelList.C.

◆ transferModelList() [2/2]

transferModelList ( surfaceFilmRegionModel film,
const dictionary dict 
)

Construct from type name, dictionary and surface film model.

Definition at line 43 of file transferModelList.C.

References dict, Foam::endl(), Foam::Info, transferModel::New(), setSize(), and HashTable< T, Key, Hash >::size().

Here is the call graph for this function:

◆ ~transferModelList()

~transferModelList ( )
virtual

Destructor.

Definition at line 87 of file transferModelList.C.

Member Function Documentation

◆ correct() [1/2]

void correct ( scalarField availableMass,
volScalarField massToTransfer 
)
virtual

Correct kinematic transfers.

Definition at line 94 of file transferModelList.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), forAll, regionModel::intCoupledPatchIDs(), patchIDs(), and Foam::sum().

Referenced by thermoSingleLayer::updateSubmodels(), and kinematicSingleLayer::updateSubmodels().

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

◆ correct() [2/2]

void correct ( scalarField availableMass,
volScalarField massToTransfer,
volScalarField energyToTransfer 
)
virtual

Correct kinematic and thermodynamic transfers.

Definition at line 120 of file transferModelList.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), forAll, regionModel::intCoupledPatchIDs(), patchIDs(), and Foam::sum().

Here is the call graph for this function:

◆ info()


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