Generic field type. More...
Public Types | |
typedef pTraits< Type >::cmptType | cmptType |
Component type. More... | |
Public Types inherited from UPtrList< T > | |
typedef T | value_type |
Type of values the UPtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into UPtrList::value_type objects. More... | |
typedef const T & | const_reference |
Type that can be used for storing into constant UPtrList::value_type. More... | |
Public Member Functions | |
FieldField () | |
Construct null. More... | |
FieldField (const label) | |
Construct given size. More... | |
FieldField (const word &, const FieldField< Field, Type > &) | |
Construct using the Field sizes from the given FieldField. More... | |
FieldField (const FieldField< Field, Type > &) | |
Copy constructor. More... | |
FieldField (FieldField< Field, Type > &&) | |
Move constructor. More... | |
FieldField (FieldField< Field, Type > &, bool reuse) | |
Construct as copy or reuse as specified. More... | |
FieldField (const PtrList< Field< Type >> &) | |
Construct as copy of a PtrList<Field, Type> More... | |
FieldField (const tmp< FieldField< Field, Type >> &) | |
Construct as copy of tmp<FieldField> More... | |
FieldField (Istream &) | |
Construct from Istream. More... | |
tmp< FieldField< Field, Type > > | clone () const |
Clone. More... | |
void | negate () |
Negate this field. More... | |
tmp< FieldField< Field, cmptType > > | component (const direction) const |
Return a component field of the field. More... | |
void | replace (const direction, const FieldField< Field, cmptType > &) |
Replace a component field of the field. More... | |
void | replace (const direction, const cmptType &) |
Replace a component field of the field. More... | |
tmp< FieldField< Field, Type > > | T () const |
Return the field transpose (only defined for second rank tensors) More... | |
void | operator= (const FieldField< Field, Type > &) |
void | operator= (FieldField< Field, Type > &&) |
void | operator= (const tmp< FieldField< Field, Type >> &) |
void | operator= (const Type &) |
void | operator+= (const FieldField< Field, Type > &) |
void | operator+= (const tmp< FieldField< Field, Type >> &) |
void | operator-= (const FieldField< Field, Type > &) |
void | operator-= (const tmp< FieldField< Field, Type >> &) |
void | operator*= (const FieldField< Field, scalar > &) |
void | operator*= (const tmp< FieldField< Field, scalar >> &) |
void | operator/= (const FieldField< Field, scalar > &) |
void | operator/= (const tmp< FieldField< Field, scalar >> &) |
void | operator+= (const Type &) |
void | operator-= (const Type &) |
void | operator*= (const scalar &) |
void | operator/= (const scalar &) |
Public Member Functions inherited from refCount | |
int | count () const |
Return the current reference count. More... | |
bool | unique () const |
Return true if the reference count is zero. More... | |
void | operator++ () |
Increment the reference count. More... | |
void | operator++ (int) |
Increment the reference count. More... | |
void | operator-- () |
Decrement the reference count. More... | |
void | operator-- (int) |
Decrement the reference count. More... | |
void | operator= (const refCount &)=delete |
Disallow bitwise assignment. More... | |
Public Member Functions inherited from PtrList< Field< Type > > | |
PtrList () | |
Null Constructor. More... | |
PtrList (const label) | |
Construct with size specified. More... | |
PtrList (const PtrList< Field< Type > > &) | |
Copy constructor. More... | |
PtrList (const PtrList< Field< Type > > &, const CloneArg &) | |
Copy constructor with additional argument for clone. More... | |
PtrList (PtrList< Field< Type > > &&) | |
Move constructor. More... | |
PtrList (PtrList< Field< Type > > &, bool reuse) | |
Construct as copy or reuse as specified. More... | |
PtrList (const SLPtrList< Field< Type > > &) | |
Construct as copy of SLPtrList<T> More... | |
PtrList (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
PtrList (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
~PtrList () | |
Destructor. More... | |
void | setSize (const label) |
Reset size of PtrList. If extending the PtrList, new entries are. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | shrink () |
Shrink the allocated space to the number of elements used. More... | |
void | clear () |
Clear the PtrList, i.e. set size to zero deleting all the. More... | |
void | append (Field< Type > *) |
Append an element at the end of the list. More... | |
void | append (const autoPtr< Field< Type > > &) |
Append an element at the end of the list. More... | |
void | append (const tmp< Field< Type > > &) |
Append an element at the end of the list. More... | |
void | transfer (PtrList< Field< Type > > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< Field< Type > > | set (const label, Field< Type > *) |
Set element to given T* and return old element (can be nullptr) More... | |
autoPtr< Field< Type > > | set (const label, const autoPtr< Field< Type > > &) |
Set element to given autoPtr<T> and return old element. More... | |
autoPtr< Field< Type > > | set (const label, const tmp< Field< Type > > &) |
Set element to given tmp<T> and return old element. More... | |
void | reorder (const labelUList &oldToNew) |
Reorders elements. Ordering does not have to be done in. More... | |
void | shuffle (const labelUList &newToOld) |
Reorders elements. Ordering does not have to be done in. More... | |
void | operator= (const PtrList< Field< Type > > &) |
Assignment operator. More... | |
void | operator= (PtrList< Field< Type > > &&) |
Move assignment operator. More... | |
Public Member Functions inherited from UPtrList< T > | |
UPtrList () | |
Null Constructor. More... | |
UPtrList (const label) | |
Construct with size specified. More... | |
UPtrList (UPtrList< T > &, bool reuse) | |
Construct as copy or reuse as specified. More... | |
label | size () const |
Return the number of elements in the UPtrList. More... | |
bool | empty () const |
Return true if the UPtrList is empty (ie, size() is zero) More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | resize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | clear () |
Clear the UPtrList, i.e. set size to zero. More... | |
void | append (T *) |
Append an element at the end of the list. More... | |
void | transfer (UPtrList< T > &) |
Transfer the contents of the argument UPtrList into this. More... | |
bool | set (const label) const |
Is element set. More... | |
T * | set (const label, T *) |
Set element. Return old element (can be nullptr). More... | |
void | reorder (const labelUList &oldToNew) |
Reorders elements. Ordering does not have to be done in. More... | |
void | shuffle (const labelUList &newToOld) |
Reorders elements. Ordering does not have to be done in. More... | |
template<class T2 > | |
UPtrList< T2 > | convert () |
Convert to list of different pointer type. More... | |
template<class T2 > | |
UPtrList< const T2 > | convert () const |
Convert to list of different pointer type. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
T * | operator() (const label) |
Return element const pointer. More... | |
iterator | begin () |
Return an iterator to begin traversing the UPtrList. More... | |
iterator | end () |
Return an iterator to end traversing the UPtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the UPtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the UPtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the UPtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the UPtrList. More... | |
template<class T2 > | |
Foam::UPtrList< T2 > | convert () |
template<class T2 > | |
Foam::UPtrList< const T2 > | convert () const |
Static Public Member Functions | |
template<class Type2 > | |
static tmp< FieldField< Field, Type > > | NewCalculatedType (const FieldField< Field, Type2 > &ff) |
Return a pointer to a new calculatedFvPatchFieldField created on. More... | |
Friends | |
Ostream & | operator (Ostream &, const FieldField< Field, Type > &) |
Ostream & | operator (Ostream &, const tmp< FieldField< Field, Type >> &) |
Additional Inherited Members | |
Protected Member Functions inherited from refCount | |
refCount () | |
Construct null initialising count to 0. More... | |
refCount (const refCount &)=delete | |
Disallow copy. More... | |
Protected Member Functions inherited from PtrList< Field< Type > > | |
void | read (Istream &, const INew &inewt) |
Read from Istream using given Istream constructor class. More... | |
Generic field type.
Definition at line 73 of file FieldField.H.
Component type.
Definition at line 82 of file FieldField.H.
Construct null.
Used for temporary fields which are initialised after construction
Definition at line 108 of file FieldField.C.
|
explicit |
Construct given size.
Used for temporary fields which are initialised after construction
Definition at line 115 of file FieldField.C.
FieldField | ( | const word & | type, |
const FieldField< Field, Type > & | ff | ||
) |
Construct using the Field sizes from the given FieldField.
and the given Field type. Used for temporary fields which are initialised after construction
Definition at line 122 of file FieldField.C.
FieldField | ( | const FieldField< Field, Type > & | f | ) |
Copy constructor.
Definition at line 138 of file FieldField.C.
FieldField | ( | FieldField< Field, Type > && | f | ) |
Move constructor.
Definition at line 146 of file FieldField.C.
FieldField | ( | FieldField< Field, Type > & | f, |
bool | reuse | ||
) |
Construct as copy or reuse as specified.
Definition at line 154 of file FieldField.C.
FieldField | ( | const PtrList< Field< Type >> & | tl | ) |
Construct as copy of a PtrList<Field, Type>
Definition at line 161 of file FieldField.C.
FieldField | ( | const tmp< FieldField< Field, Type >> & | tf | ) |
Construct as copy of tmp<FieldField>
Definition at line 168 of file FieldField.C.
FieldField | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 181 of file FieldField.C.
tmp< FieldField< Field, Type > > clone |
Clone.
Definition at line 188 of file FieldField.C.
|
static |
Return a pointer to a new calculatedFvPatchFieldField created on.
freestore without setting patchField values
Definition at line 196 of file FieldField.C.
References Foam::fv::ff(), forAll, and PtrList< T >::set().
Referenced by reuseTmpFieldField< Field, TypeR, Type1 >::New(), reuseTmpTmpFieldField< Field, TypeR, Type1, Type2 >::New(), reuseTmpTmpFieldField< Field, TypeR, Type1, TypeR >::New(), reuseTmpFieldField< Field, TypeR, TypeR >::New(), reuseTmpTmpFieldField< Field, TypeR, TypeR, Type2 >::New(), and reuseTmpTmpFieldField< Field, TypeR, TypeR, TypeR >::New().
void negate |
Negate this field.
Definition at line 218 of file FieldField.C.
References forAll.
Referenced by nonBlockingGaussSeidelSmoother::smooth(), GaussSeidelSmoother::smooth(), and symGaussSeidelSmoother::smooth().
tmp< FieldField< Field, typename FieldField< Field, Type >::cmptType > > component | ( | const direction | d | ) | const |
Return a component field of the field.
Definition at line 229 of file FieldField.C.
References Foam::component(), and tmp< T >::ref().
void replace | ( | const direction | d, |
const FieldField< Field, cmptType > & | sf | ||
) |
Replace a component field of the field.
Definition at line 247 of file FieldField.C.
Replace a component field of the field.
Definition at line 261 of file FieldField.C.
tmp< FieldField< Field, Type > > T |
Return the field transpose (only defined for second rank tensors)
Definition at line 275 of file FieldField.C.
References tmp< T >::ref(), and Foam::T().
void operator= | ( | const FieldField< Field, Type > & | f | ) |
Definition at line 290 of file FieldField.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, and forAll.
void operator= | ( | FieldField< Field, Type > && | f | ) |
Definition at line 307 of file FieldField.C.
References Foam::abort(), f(), Foam::FatalError, and FatalErrorInFunction.
void operator= | ( | const tmp< FieldField< Field, Type >> & | ) |
void operator= | ( | const Type & | t | ) |
Definition at line 338 of file FieldField.C.
References forAll.
void operator+= | ( | const FieldField< Field, Type > & | f | ) |
Definition at line 377 of file FieldField.C.
void operator+= | ( | const tmp< FieldField< Field, Type >> & | tf | ) |
Definition at line 377 of file FieldField.C.
void operator-= | ( | const FieldField< Field, Type > & | f | ) |
Definition at line 378 of file FieldField.C.
void operator-= | ( | const tmp< FieldField< Field, Type >> & | tf | ) |
Definition at line 378 of file FieldField.C.
void operator*= | ( | const FieldField< Field, scalar > & | f | ) |
Definition at line 379 of file FieldField.C.
void operator*= | ( | const tmp< FieldField< Field, scalar >> & | tf | ) |
Definition at line 379 of file FieldField.C.
void operator/= | ( | const FieldField< Field, scalar > & | f | ) |
Definition at line 380 of file FieldField.C.
void operator/= | ( | const tmp< FieldField< Field, scalar >> & | tf | ) |
Definition at line 380 of file FieldField.C.
void operator+= | ( | const Type & | t | ) |
Definition at line 377 of file FieldField.C.
void operator-= | ( | const Type & | t | ) |
Definition at line 378 of file FieldField.C.
void operator*= | ( | const scalar & | t | ) |
Definition at line 379 of file FieldField.C.
void operator/= | ( | const scalar & | t | ) |
Definition at line 380 of file FieldField.C.
|
friend |
|
friend |