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

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

#include <coeff.hpp>

Public Member Functions

 Coeff ()
 
 Coeff (scalar value)
 
 Coeff (scalar coeff, const Vector< scalar > &field)
 
 Coeff (const Vector< scalar > &field)
 
KOKKOS_INLINE_FUNCTION scalar operator[] (const localIdx i) const
 
bool hasSpan ()
 
View< const scalarview ()
 
Coeffoperator*= (scalar rhs)
 
Coeffoperator*= (const Coeff &rhs)
 

Detailed Description

A class that represents a coefficient for the NeoN dsl.

This class stores a single scalar coefficient and optionally view 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]

NeoN::dsl::Coeff::Coeff ( )

◆ Coeff() [2/4]

NeoN::dsl::Coeff::Coeff ( scalar  value)

◆ Coeff() [3/4]

NeoN::dsl::Coeff::Coeff ( scalar  coeff,
const Vector< scalar > &  field 
)

◆ Coeff() [4/4]

NeoN::dsl::Coeff::Coeff ( const Vector< scalar > &  field)

Member Function Documentation

◆ hasSpan()

bool NeoN::dsl::Coeff::hasSpan ( )

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

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

◆ operator[]()

KOKKOS_INLINE_FUNCTION scalar NeoN::dsl::Coeff::operator[] ( const localIdx  i) const
inline

Definition at line 35 of file coeff.hpp.

◆ view()

View< const scalar > NeoN::dsl::Coeff::view ( )

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