IjkField< Type > Class Template Reference

Generic templated field type with i-j-k addressing. More...

Inheritance diagram for IjkField< Type >:
[legend]
Collaboration diagram for IjkField< Type >:
[legend]

Public Member Functions

 IjkField ()
 Construct zero-sized. More...
 
 IjkField (const IjkField< Type > &field)
 Copy construct. More...
 
 IjkField (IjkField< Type > &&field)
 Move construct. More...
 
 IjkField (const labelVector &ijk)
 Construct with sizing information, leaving values uninitialized. More...
 
 IjkField (const labelVector &ijk, const Type &val)
 Construct with sizing information and initial value. More...
 
 IjkField (const labelVector &ijk, const zero)
 Construct with sizing information and initial values of zero. More...
 
 IjkField (const labelVector &ijk, const UList< Type > &list)
 Copy construct from components. More...
 
 IjkField (const labelVector &ijk, Field< Type > &&field)
 Move construct from components. More...
 
const ijkAddressing & ijk () const
 Return i,j,k addressing. More...
 
ijkAddressing & ijk ()
 Return i,j,k addressing for modification. More...
 
const labelVector & sizes () const
 Return i,j,k addressing sizes. More...
 
labelVector & sizes ()
 Return i,j,k addressing sizes for modification. More...
 
const label & size (const vector::components cmpt) const
 The addressing dimension in the given direction. More...
 
void clear ()
 Clear dimensions and field. More...
 
void resize (const labelVector &newSizes)
 Change dimensions. Fill new values with Zero. More...
 
void resize (const labelVector &newSizes, const Type &val)
 Change dimensions. More...
 
const Type & operator() (const label i, const label j, const label k) const
 Field access at given i-j-k position. More...
 
Type & operator() (const label i, const label j, const label k)
 Field access at given i-j-k position. More...
 
const Type & operator() (const labelVector &ijk) const
 Field access at given i-j-k position. More...
 
Type & operator() (const labelVector &ijk)
 Field access at given i-j-k position. More...
 
void operator= (const IjkField< Type > &rhs)
 Copy assignment. More...
 
void operator= (const tmp< IjkField< Type >> &rhs)
 
void operator= (IjkField< Type > &&rhs)
 Move assignment. More...
 
void operator= (const Type &val)
 Value assignment. More...
 
void operator= (const zero)
 
- Public Member Functions inherited from Field< Type >
constexpr Field () noexcept
 Construct null. More...
 
 Field (const label len)
 Construct given size. More...
 
 Field (const label len, const Type &val)
 Construct given size and initial value. More...
 
 Field (const label len, const zero)
 Construct given size and initial values of zero. More...
 
 Field (const Field< Type > &fld)
 Copy construct. More...
 
 Field (const UList< Type > &list)
 Copy construct from UList<Type> More...
 
template<class Addr >
 Field (const IndirectListBase< Type, Addr > &list)
 Copy construct from IndirectList. More...
 
 Field (Field< Type > &&fld)
 Move construct from Field. More...
 
 Field (List< Type > &&list)
 Move construct from List. More...
 
template<int SizeMin>
 Field (DynamicList< Type, SizeMin > &&list)
 Move construct from DynamicList. More...
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given field. More...
 
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field. More...
 
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given tmp field. More...
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (Field< Type > &fld, bool reuse)
 Copy construct or re-use as specified. More...
 
 Field (const tmp< Field< Type >> &tfld)
 Copy or move construct from tmp. More...
 
 Field (Istream &is)
 Construct from Istream. More...
 
 Field (const word &keyword, const dictionary &dict, const label len)
 Construct from a dictionary entry. More...
 
tmp< Field< Type > > clone () const
 Clone. More...
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 map from the given field More...
 
void map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 1 to 1 map from the given tmp field More...
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given field. More...
 
void map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given tmp field. More...
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given field. More...
 
void map (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given tmp field. More...
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 Map from self. More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given field More...
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given tmp field More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given field. More...
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given tmp field. More...
 
void negate ()
 Negate this field (negative). More...
 
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field. More...
 
void replace (const direction, const UList< cmptType > &)
 Replace a component field of the field. More...
 
void replace (const direction, const tmp< Field< cmptType >> &)
 Replace a component field of the field. More...
 
void replace (const direction, const cmptType &)
 Replace a component field of the field. More...
 
template<class VSForm >
VSForm block (const label start) const
 
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write the field as a dictionary entry. More...
 
void operator= (const Field< Type > &)
 Copy assignment. More...
 
void operator= (const tmp< Field< Type >> &)
 
void operator= (const UList< Type > &)
 
void operator= (const SubField< Type > &)
 
void operator= (Field< Type > &&rhs)
 Move assignment. More...
 
void operator= (List< Type > &&rhs)
 
template<int SizeMin>
void operator= (DynamicList< Type, SizeMin > &&rhs)
 
void operator= (const Type &val)
 Value assignment. More...
 
void operator= (const zero)
 
template<class Form , class Cmpt , direction nCmpt>
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
 
void operator+= (const UList< Type > &)
 
void operator+= (const tmp< Field< Type >> &)
 
void operator-= (const UList< Type > &)
 
void operator-= (const tmp< Field< Type >> &)
 
void operator*= (const UList< scalar > &)
 
void operator*= (const tmp< Field< scalar >> &)
 
void operator/= (const UList< scalar > &)
 
void operator/= (const tmp< Field< scalar >> &)
 
void operator+= (const Type &)
 
void operator-= (const Type &)
 
void operator*= (const scalar &)
 
void operator/= (const scalar &)
 
template<class Type>
void operator= (const tmp< Field > &rhs)
 

Additional Inherited Members

- Public Types inherited from Field< Type >
typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
typedef SubField< Type > subField
 Declare type of subField. More...
 
- Static Public Member Functions inherited from Field< Type >
static const Field< Type > & null ()
 Return nullObject reference field. More...
 
static autoPtr< Field< Type > > New (Istream &is)
 Return a pointer to a new Field created on freestore. More...
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 

Detailed Description

template<class Type>
class Foam::IjkField< Type >

Generic templated field type with i-j-k addressing.

Source files

Definition at line 53 of file IjkField.H.

Constructor & Destructor Documentation

◆ IjkField() [1/8]

IjkField ( )
inline

Construct zero-sized.

Definition at line 31 of file IjkFieldI.H.

◆ IjkField() [2/8]

IjkField ( const IjkField< Type > &  field)
inline

Copy construct.

Definition at line 39 of file IjkFieldI.H.

◆ IjkField() [3/8]

IjkField ( IjkField< Type > &&  field)
inline

Move construct.

Definition at line 47 of file IjkFieldI.H.

◆ IjkField() [4/8]

IjkField ( const labelVector &  ijk)
inlineexplicit

Construct with sizing information, leaving values uninitialized.

Definition at line 55 of file IjkFieldI.H.

◆ IjkField() [5/8]

IjkField ( const labelVector &  ijk,
const Type &  val 
)
inline

Construct with sizing information and initial value.

Definition at line 64 of file IjkFieldI.H.

◆ IjkField() [6/8]

IjkField ( const labelVector &  ijk,
const  zero 
)
inline

Construct with sizing information and initial values of zero.

Definition at line 76 of file IjkFieldI.H.

◆ IjkField() [7/8]

IjkField ( const labelVector &  ijk,
const UList< Type > &  list 
)
inline

Copy construct from components.

Definition at line 88 of file IjkFieldI.H.

◆ IjkField() [8/8]

IjkField ( const labelVector &  ijk,
Field< Type > &&  field 
)
inline

Move construct from components.

Definition at line 111 of file IjkFieldI.H.

Member Function Documentation

◆ ijk() [1/2]

const Foam::ijkAddressing & ijk ( ) const
inline

Return i,j,k addressing.

Definition at line 135 of file IjkFieldI.H.

◆ ijk() [2/2]

Foam::ijkAddressing & ijk ( )
inline

Return i,j,k addressing for modification.

Definition at line 142 of file IjkFieldI.H.

◆ sizes() [1/2]

const Foam::labelVector & sizes ( ) const
inline

Return i,j,k addressing sizes.

Definition at line 149 of file IjkFieldI.H.

Referenced by IjkField< Foam::Vector< bool > >::operator=().

Here is the caller graph for this function:

◆ sizes() [2/2]

Foam::labelVector & sizes ( )
inline

Return i,j,k addressing sizes for modification.

Definition at line 156 of file IjkFieldI.H.

◆ size()

const Foam::label & size ( const vector::components  cmpt) const
inline

The addressing dimension in the given direction.

Definition at line 164 of file IjkFieldI.H.

◆ clear()

void clear ( )
inline

Clear dimensions and field.

Definition at line 173 of file IjkFieldI.H.

◆ resize() [1/2]

void resize ( const labelVector &  newSizes)

Change dimensions. Fill new values with Zero.

Definition at line 115 of file IjkField.C.

◆ resize() [2/2]

void resize ( const labelVector &  newSizes,
const Type &  val 
)

Change dimensions.

Definition at line 32 of file IjkField.C.

◆ operator()() [1/4]

const Type & operator() ( const label  i,
const label  j,
const label  k 
) const
inline

Field access at given i-j-k position.

Definition at line 184 of file IjkFieldI.H.

◆ operator()() [2/4]

Type & operator() ( const label  i,
const label  j,
const label  k 
)
inline

Field access at given i-j-k position.

Definition at line 196 of file IjkFieldI.H.

◆ operator()() [3/4]

const Type & operator() ( const labelVector &  ijk) const
inline

Field access at given i-j-k position.

Definition at line 208 of file IjkFieldI.H.

◆ operator()() [4/4]

Type & operator() ( const labelVector &  ijk)
inline

Field access at given i-j-k position.

Definition at line 218 of file IjkFieldI.H.

◆ operator=() [1/5]

void operator= ( const IjkField< Type > &  rhs)

Copy assignment.

Definition at line 124 of file IjkField.C.

◆ operator=() [2/5]

void operator= ( const tmp< IjkField< Type >> &  rhs)

Definition at line 136 of file IjkField.C.

◆ operator=() [3/5]

void operator= ( IjkField< Type > &&  rhs)
inline

Move assignment.

Definition at line 227 of file IjkFieldI.H.

◆ operator=() [4/5]

void operator= ( const Type &  val)
inline

Value assignment.

Definition at line 241 of file IjkFieldI.H.

◆ operator=() [5/5]

void operator= ( const  zero)
inline

Definition at line 248 of file IjkFieldI.H.


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