NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NeoFOAM::dsl::Coeff Class Reference

A class that represents a coefficient for the NeoFOAM dsl. More...

#include <coeff.hpp>

Public Member Functions

 Coeff ()
 
 Coeff (scalar value)
 
 Coeff (scalar coeff, const Field< scalar > &field)
 
 Coeff (const Field< scalar > &field)
 
KOKKOS_INLINE_FUNCTION scalar operator[] (const size_t i) const
 
bool hasSpan ()
 
std::span< const scalarspan ()
 
Coeffoperator*= (scalar rhs)
 
Coeffoperator*= (const Coeff &rhs)
 

Detailed Description

A class that represents a coefficient for the NeoFOAM dsl.

This class stores a single scalar coefficient and optionally span of values. It is used to delay the evaluation of a scalar multiplication with a field to avoid the creation of a temporary field copy. It provides an indexing operator operator[] that returns the evaluated value at the specified index.

Definition at line 21 of file coeff.hpp.

Constructor & Destructor Documentation

◆ Coeff() [1/4]

NeoFOAM::dsl::Coeff::Coeff ( )

◆ Coeff() [2/4]

NeoFOAM::dsl::Coeff::Coeff ( scalar  value)

◆ Coeff() [3/4]

NeoFOAM::dsl::Coeff::Coeff ( scalar  coeff,
const Field< scalar > &  field 
)

◆ Coeff() [4/4]

NeoFOAM::dsl::Coeff::Coeff ( const Field< scalar > &  field)

Member Function Documentation

◆ hasSpan()

bool NeoFOAM::dsl::Coeff::hasSpan ( )

◆ operator*=() [1/2]

Coeff & NeoFOAM::dsl::Coeff::operator*= ( const Coeff rhs)

◆ operator*=() [2/2]

Coeff & NeoFOAM::dsl::Coeff::operator*= ( scalar  rhs)

◆ operator[]()

KOKKOS_INLINE_FUNCTION scalar NeoFOAM::dsl::Coeff::operator[] ( const size_t  i) const
inline

Definition at line 35 of file coeff.hpp.

◆ span()

std::span< const scalar > NeoFOAM::dsl::Coeff::span ( )

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