zeroField Class Reference

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

Inheritance diagram for zeroField:
[legend]
Collaboration diagram for zeroField:
[legend]

Public Member Functions

 zeroField ()=default
 Construct null. More...
 
zeroField field () const
 
scalar operator[] (const label) const
 
zeroField operator() () const
 
zeroField operator- () const
 
- Public Member Functions inherited from zero
constexpr zero () noexcept
 Null constructible. More...
 
constexpr zero (Istream &) noexcept
 Construct from Istream consumes no content. More...
 
constexpr operator bool () const noexcept
 Return false (0) for bool. More...
 
constexpr operator label () const noexcept
 Return 0 for label. More...
 
constexpr operator float () const noexcept
 Return 0 for float. More...
 
constexpr operator double () const noexcept
 Return 0 for double. More...
 

Additional Inherited Members

- Public Types inherited from zero
typedef zero value_type
 

Detailed Description

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

Used for example as the argument to a function in which certain terms are optional, see source terms in the MULES solvers.

Definition at line 53 of file zeroField.H.

Constructor & Destructor Documentation

◆ zeroField()

zeroField ( )
default

Construct null.

Referenced by zeroField::field(), zeroField::operator()(), and zeroField::operator-().

Here is the caller graph for this function:

Member Function Documentation

◆ field()

zeroField field ( ) const
inline

Definition at line 67 of file zeroField.H.

References zeroField::zeroField().

Here is the call graph for this function:

◆ operator[]()

scalar operator[] ( const  label) const
inline

Definition at line 75 of file zeroField.H.

◆ operator()()

zeroField operator() ( ) const
inline

Definition at line 80 of file zeroField.H.

References zeroField::zeroField().

Here is the call graph for this function:

◆ operator-()

zeroField operator- ( ) const
inline

Definition at line 85 of file zeroField.H.

References zeroField::zeroField().

Here is the call graph for this function:

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