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

A class for the representation of a 3D Vector. More...

#include <vector.hpp>

Public Member Functions

KOKKOS_INLINE_FUNCTION Vector ()
 
KOKKOS_INLINE_FUNCTION Vector (scalar x, scalar y, scalar z)
 
scalardata ()
 Returns pointer to the data of the vector.
 
const scalardata () const
 Returns pointer to the data of the vector.
 
constexpr size_t size () const
 Returns the size of the vector.
 
KOKKOS_INLINE_FUNCTION scalaroperator[] (const size_t i)
 
KOKKOS_INLINE_FUNCTION scalar operator[] (const size_t i) const
 
KOKKOS_INLINE_FUNCTION scalaroperator() (const size_t i)
 
KOKKOS_INLINE_FUNCTION scalar operator() (const size_t i) const
 
KOKKOS_INLINE_FUNCTION bool operator== (const Vector &rhs) const
 
KOKKOS_INLINE_FUNCTION Vector operator+ (const Vector &rhs) const
 
KOKKOS_INLINE_FUNCTION Vectoroperator+= (const Vector &rhs)
 
KOKKOS_INLINE_FUNCTION Vector operator- (const Vector &rhs) const
 
KOKKOS_INLINE_FUNCTION Vectoroperator-= (const Vector &rhs)
 
KOKKOS_INLINE_FUNCTION Vector operator* (const scalar &rhs) const
 
KOKKOS_INLINE_FUNCTION Vector operator* (const label &rhs) const
 
KOKKOS_INLINE_FUNCTION Vectoroperator*= (const scalar &rhs)
 

Detailed Description

A class for the representation of a 3D Vector.

Definition at line 20 of file vector.hpp.

Constructor & Destructor Documentation

◆ Vector() [1/2]

KOKKOS_INLINE_FUNCTION NeoFOAM::Vector::Vector ( )
inline

Definition at line 25 of file vector.hpp.

◆ Vector() [2/2]

KOKKOS_INLINE_FUNCTION NeoFOAM::Vector::Vector ( scalar  x,
scalar  y,
scalar  z 
)
inline

Definition at line 33 of file vector.hpp.

Member Function Documentation

◆ data() [1/2]

scalar * NeoFOAM::Vector::data ( )
inline

Returns pointer to the data of the vector.

Returns
point to the first scalar

Definition at line 45 of file vector.hpp.

◆ data() [2/2]

const scalar * NeoFOAM::Vector::data ( ) const
inline

Returns pointer to the data of the vector.

Returns
point to the first scalar

Definition at line 52 of file vector.hpp.

◆ operator()() [1/2]

KOKKOS_INLINE_FUNCTION scalar & NeoFOAM::Vector::operator() ( const size_t  i)
inline

Definition at line 68 of file vector.hpp.

◆ operator()() [2/2]

KOKKOS_INLINE_FUNCTION scalar NeoFOAM::Vector::operator() ( const size_t  i) const
inline

Definition at line 71 of file vector.hpp.

◆ operator*() [1/2]

KOKKOS_INLINE_FUNCTION Vector NeoFOAM::Vector::operator* ( const label rhs) const
inline

Definition at line 117 of file vector.hpp.

◆ operator*() [2/2]

KOKKOS_INLINE_FUNCTION Vector NeoFOAM::Vector::operator* ( const scalar rhs) const
inline

Definition at line 110 of file vector.hpp.

◆ operator*=()

KOKKOS_INLINE_FUNCTION Vector & NeoFOAM::Vector::operator*= ( const scalar rhs)
inline

Definition at line 124 of file vector.hpp.

◆ operator+()

KOKKOS_INLINE_FUNCTION Vector NeoFOAM::Vector::operator+ ( const Vector rhs) const
inline

Definition at line 80 of file vector.hpp.

◆ operator+=()

KOKKOS_INLINE_FUNCTION Vector & NeoFOAM::Vector::operator+= ( const Vector rhs)
inline

Definition at line 86 of file vector.hpp.

◆ operator-()

KOKKOS_INLINE_FUNCTION Vector NeoFOAM::Vector::operator- ( const Vector rhs) const
inline

Definition at line 95 of file vector.hpp.

◆ operator-=()

KOKKOS_INLINE_FUNCTION Vector & NeoFOAM::Vector::operator-= ( const Vector rhs)
inline

Definition at line 101 of file vector.hpp.

◆ operator==()

KOKKOS_INLINE_FUNCTION bool NeoFOAM::Vector::operator== ( const Vector rhs) const
inline

Definition at line 74 of file vector.hpp.

◆ operator[]() [1/2]

KOKKOS_INLINE_FUNCTION scalar & NeoFOAM::Vector::operator[] ( const size_t  i)
inline

Definition at line 62 of file vector.hpp.

◆ operator[]() [2/2]

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

Definition at line 65 of file vector.hpp.

◆ size()

constexpr size_t NeoFOAM::Vector::size ( ) const
inlineconstexpr

Returns the size of the vector.

Returns
The size of the vector

Definition at line 59 of file vector.hpp.


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