NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
sundials.hpp File Reference
#include <concepts>
#include <functional>
#include <memory>
#include <sundials/sundials_nvector.h>
#include <sundials/sundials_core.hpp>
#include <nvector/nvector_serial.h>
#include <nvector/nvector_kokkos.hpp>
#include <arkode/arkode_arkstep.h>
#include <arkode/arkode_erkstep.h>
#include "NeoFOAM/core/error.hpp"
#include "NeoFOAM/core/parallelAlgorithms.hpp"
#include "NeoFOAM/fields/field.hpp"

Go to the source code of this file.

Classes

class  NeoFOAM::sundials::SKVectorSerial< ValueType >
 Serial executor SUNDIALS Kokkos vector wrapper. More...
 
class  NeoFOAM::sundials::SKVectorHostDefault< ValueType >
 Host default executor SUNDIALS Kokkos vector wrapper. More...
 
class  NeoFOAM::sundials::SKVectorDefault< ValueType >
 Default executor SUNDIALS Kokkos vector wrapper. More...
 
class  NeoFOAM::sundials::SKVector< ValueType >
 Unified interface for SUNDIALS Kokkos vector management. More...
 

Namespaces

namespace  NeoFOAM
 
namespace  NeoFOAM::sundials
 
namespace  NeoFOAM::sundials::detail
 

Functions

ARKODE_ERKTableID NeoFOAM::sundials::stringToERKTable (const std::string &key)
 Maps dictionary keywords to SUNDIALS RKButcher tableau identifiers.
 
template<typename SKVectorType , typename ValueType >
void NeoFOAM::sundials::fieldToSunNVectorImpl (const NeoFOAM::Field< ValueType > &field, N_Vector &vector)
 Converts NeoFOAM Field data to SUNDIALS N_Vector format.
 
template<typename ValueType >
void NeoFOAM::sundials::fieldToSunNVector (const NeoFOAM::Field< ValueType > &field, N_Vector &vector)
 Dispatcher for field to N_Vector conversion based on executor type.
 
template<typename SKVectorType , typename ValueType >
void NeoFOAM::sundials::sunNVectorToFieldImpl (const N_Vector &vector, NeoFOAM::Field< ValueType > &field)
 Converts SUNDIALS N_Vector data back to NeoFOAM Field format.
 
template<typename ValueType >
void NeoFOAM::sundials::sunNVectorToField (const N_Vector &vector, NeoFOAM::Field< ValueType > &field)
 Dispatcher for N_Vector to field conversion based on executor type.
 
template<typename SolutionFieldType >
int NeoFOAM::sundials::explicitRKSolve (sunrealtype t, N_Vector y, N_Vector ydot, void *userData)
 Performs a single explicit Runge-Kutta stage evaluation.
 
template<typename Vector >
void NeoFOAM::sundials::detail::initNVector (size_t size, std::shared_ptr< SUNContext > context, Vector &vec)
 Initializes a vector wrapper with specified size and context.
 
template<typename Vector >
const N_Vector & NeoFOAM::sundials::detail::sunNVector (const Vector &vec)
 Provides const access to underlying N_Vector.
 
template<typename Vector >
N_Vector & NeoFOAM::sundials::detail::sunNVector (Vector &vec)
 Provides mutable access to underlying N_Vector.
 

Variables

auto NeoFOAM::sundials::SUN_CONTEXT_DELETER
 Custom deleter for SUNContext shared pointers.
 
auto NeoFOAM::sundials::SUN_ARK_DELETER
 Custom deleter for explicit type RK solvers (ERK, ARK, etc) for the unique pointers.