NeoN
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
NeoN::sundials::SKVector< ValueType > Class Template Reference

Unified interface for SUNDIALS Kokkos vector management. More...

#include <sundials.hpp>

Public Types

using SKVectorSerialV = SKVectorSerial< ValueType >
 
using SKVectorHostDefaultV = SKVectorHostDefault< ValueType >
 
using SKDefaultVectorV = SKVectorDefault< ValueType >
 
using SKVectorVariant = std::variant< SKVectorSerialV, SKVectorHostDefaultV, SKDefaultVectorV >
 

Public Member Functions

 SKVector ()
 Default constructor. Initializes with host-default vector.
 
 ~SKVector ()=default
 Default destructor.
 
 SKVector (const SKVector &)=default
 Copy constructor.
 
SKVectoroperator= (const SKVector &)=delete
 Copy assignment operator (deleted).
 
 SKVector (SKVector &&) noexcept=default
 Move constructor.
 
SKVectoroperator= (SKVector &&) noexcept=delete
 Move assignment operator (deleted).
 
void setExecutor (const NeoN::Executor &exec)
 Sets appropriate vector implementation based on executor type.
 
void initNVector (size_t size, std::shared_ptr< SUNContext > context)
 Initializes underlying vector with given size and context.
 
const N_Vector & sunNVector () const
 Gets const reference to underlying N_Vector.
 
N_Vector & sunNVector ()
 Gets mutable reference to underlying N_Vector.
 
const SKVectorVariantvariant () const
 Gets const reference to variant storing implementation.
 
SKVectorVariantvariant ()
 Gets mutable reference to variant storing implementation.
 

Detailed Description

template<typename ValueType>
class NeoN::sundials::SKVector< ValueType >

Unified interface for SUNDIALS Kokkos vector management.

Template Parameters
ValueTypeThe vector data type

Manages executor-specific vector implementations through variant storage. Provides common interface for vector initialization and access.

Definition at line 372 of file sundials.hpp.

Member Typedef Documentation

◆ SKDefaultVectorV

template<typename ValueType >
using NeoN::sundials::SKVector< ValueType >::SKDefaultVectorV = SKVectorDefault<ValueType>

Definition at line 378 of file sundials.hpp.

◆ SKVectorHostDefaultV

template<typename ValueType >
using NeoN::sundials::SKVector< ValueType >::SKVectorHostDefaultV = SKVectorHostDefault<ValueType>

Definition at line 377 of file sundials.hpp.

◆ SKVectorSerialV

template<typename ValueType >
using NeoN::sundials::SKVector< ValueType >::SKVectorSerialV = SKVectorSerial<ValueType>

Definition at line 376 of file sundials.hpp.

◆ SKVectorVariant

template<typename ValueType >
using NeoN::sundials::SKVector< ValueType >::SKVectorVariant = std::variant<SKVectorSerialV, SKVectorHostDefaultV, SKDefaultVectorV>

Definition at line 379 of file sundials.hpp.

Constructor & Destructor Documentation

◆ SKVector() [1/3]

template<typename ValueType >
NeoN::sundials::SKVector< ValueType >::SKVector ( )
inline

Default constructor. Initializes with host-default vector.

Definition at line 384 of file sundials.hpp.

◆ ~SKVector()

template<typename ValueType >
NeoN::sundials::SKVector< ValueType >::~SKVector ( )
default

Default destructor.

◆ SKVector() [2/3]

template<typename ValueType >
NeoN::sundials::SKVector< ValueType >::SKVector ( const SKVector< ValueType > &  )
default

Copy constructor.

Parameters
[in]otherSource SKVector to copy from

◆ SKVector() [3/3]

template<typename ValueType >
NeoN::sundials::SKVector< ValueType >::SKVector ( SKVector< ValueType > &&  )
defaultnoexcept

Move constructor.

Parameters
[in]otherSource SKVector to move from

Member Function Documentation

◆ initNVector()

template<typename ValueType >
void NeoN::sundials::SKVector< ValueType >::initNVector ( size_t  size,
std::shared_ptr< SUNContext >  context 
)
inline

Initializes underlying vector with given size and context.

Parameters
sizeNumber of vector elements
contextSUNDIALS context for vector operations

Definition at line 446 of file sundials.hpp.

◆ operator=() [1/2]

template<typename ValueType >
SKVector & NeoN::sundials::SKVector< ValueType >::operator= ( const SKVector< ValueType > &  )
delete

Copy assignment operator (deleted).

◆ operator=() [2/2]

template<typename ValueType >
SKVector & NeoN::sundials::SKVector< ValueType >::operator= ( SKVector< ValueType > &&  )
deletenoexcept

Move assignment operator (deleted).

◆ setExecutor()

template<typename ValueType >
void NeoN::sundials::SKVector< ValueType >::setExecutor ( const NeoN::Executor exec)
inline

Sets appropriate vector implementation based on executor type.

Parameters
[in]execNeoN executor specifying computation space

Definition at line 417 of file sundials.hpp.

◆ sunNVector() [1/2]

template<typename ValueType >
N_Vector & NeoN::sundials::SKVector< ValueType >::sunNVector ( )
inline

Gets mutable reference to underlying N_Vector.

Returns
Mutable reference to wrapped SUNDIALS N_Vector

Definition at line 468 of file sundials.hpp.

◆ sunNVector() [2/2]

template<typename ValueType >
const N_Vector & NeoN::sundials::SKVector< ValueType >::sunNVector ( ) const
inline

Gets const reference to underlying N_Vector.

Returns
Const reference to wrapped SUNDIALS N_Vector

Definition at line 457 of file sundials.hpp.

◆ variant() [1/2]

template<typename ValueType >
SKVectorVariant & NeoN::sundials::SKVector< ValueType >::variant ( )
inline

Gets mutable reference to variant storing implementation.

Returns
Mutable reference to vector variant

Definition at line 483 of file sundials.hpp.

◆ variant() [2/2]

template<typename ValueType >
const SKVectorVariant & NeoN::sundials::SKVector< ValueType >::variant ( ) const
inline

Gets const reference to variant storing implementation.

Returns
Const reference to vector variant

Definition at line 477 of file sundials.hpp.


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