Loading...
Searching...
No Matches
zeroFieldField Class Reference

A class representing the concept of a field of zeroFields used to avoid unnecessary manipulations for objects which are known to be zero at compile-time. More...

#include <zeroFieldField.H>

Inheritance diagram for zeroFieldField:
Collaboration diagram for zeroFieldField:

Public Member Functions

 zeroFieldField () noexcept=default
 Default construct.
zeroField operator[] (const label) const noexcept
 Return the field.
zero operator[] (const labelPair &) const noexcept
 Return the field element.
Public Member Functions inherited from zero
constexpr zero () noexcept
 Default construct.
constexpr zero (Istream &) noexcept
 Construct from Istream consumes no content.
constexpr operator bool () const noexcept
 Return false (0) for bool.
constexpr operator label () const noexcept
 Return 0 for label.
constexpr operator float () const noexcept
 Return 0 for float.
constexpr operator double () const noexcept
 Return 0 for double.
zero operator[] (const label) const noexcept
 Component-wise or element-wise access returns zero.
template<class T>
constexpr zero operator() (const T &) const noexcept
 Unary functor returns zero.

Additional Inherited Members

Public Types inherited from zero
typedef zero value_type
 The value type.
Static Public Attributes inherited from zero
static zero dummy
 A static instance, when modifiable reference is required by an API.

Detailed Description

A class representing the concept of a field of zeroFields used to avoid unnecessary manipulations for objects which are known to be zero at compile-time.

Used for example as the density argument to a function written for compressible to be used for incompressible flow.

Definition at line 48 of file zeroFieldField.H.

Constructor & Destructor Documentation

◆ zeroFieldField()

zeroFieldField ( )
defaultnoexcept

Default construct.

References Foam::noexcept.

Member Function Documentation

◆ operator[]() [1/2]

zeroField operator[] ( const label ) const
inlinenoexcept

Return the field.

Definition at line 67 of file zeroFieldField.H.

References Foam::noexcept.

◆ operator[]() [2/2]

zero operator[] ( const labelPair & ) const
inlinenoexcept

Return the field element.

Definition at line 75 of file zeroFieldField.H.

References zero::zero().

Here is the call graph for this function:

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