NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
NeoFOAM::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 NeoFOAM::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 NeoFOAM::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 370 of file sundials.hpp.

Member Typedef Documentation

◆ SKDefaultVectorV

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

Definition at line 376 of file sundials.hpp.

◆ SKVectorHostDefaultV

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

Definition at line 375 of file sundials.hpp.

◆ SKVectorSerialV

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

Definition at line 374 of file sundials.hpp.

◆ SKVectorVariant

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

Definition at line 377 of file sundials.hpp.

Constructor & Destructor Documentation

◆ SKVector() [1/3]

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

Default constructor. Initializes with host-default vector.

Definition at line 382 of file sundials.hpp.

◆ ~SKVector()

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

Default destructor.

◆ SKVector() [2/3]

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

Copy constructor.

Parameters
[in]otherSource SKVector to copy from

◆ SKVector() [3/3]

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

Move constructor.

Parameters
[in]otherSource SKVector to move from

Member Function Documentation

◆ initNVector()

template<typename ValueType >
void NeoFOAM::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 444 of file sundials.hpp.

◆ operator=() [1/2]

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

Copy assignment operator (deleted).

◆ operator=() [2/2]

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

Move assignment operator (deleted).

◆ setExecutor()

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

Sets appropriate vector implementation based on executor type.

Parameters
[in]execNeoFOAM executor specifying computation space

Definition at line 415 of file sundials.hpp.

◆ sunNVector() [1/2]

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

Gets mutable reference to underlying N_Vector.

Returns
Mutable reference to wrapped SUNDIALS N_Vector

Definition at line 466 of file sundials.hpp.

◆ sunNVector() [2/2]

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

Gets const reference to underlying N_Vector.

Returns
Const reference to wrapped SUNDIALS N_Vector

Definition at line 455 of file sundials.hpp.

◆ variant() [1/2]

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

Gets mutable reference to variant storing implementation.

Returns
Mutable reference to vector variant

Definition at line 481 of file sundials.hpp.

◆ variant() [2/2]

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

Gets const reference to variant storing implementation.

Returns
Const reference to vector variant

Definition at line 475 of file sundials.hpp.


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