Advanced Multi-Physics (AMP)
On-Line Documentation
ManagedSundialsVector.h
Go to the documentation of this file.
1#ifndef included_AMP_ManagedSundialsVector
2#define included_AMP_ManagedSundialsVector
3
4#include "AMP/vectors/sundials/SundialsVector.h"
5
6
7extern "C" {
8#include "sundials/sundials_nvector.h"
9}
10
11namespace AMP::LinearAlgebra {
12
13
25{
26
27public:
32
36
37 // These are adequately documented in a base class or there is little need for the documentation
38 std::string type() const override;
39 std::unique_ptr<Vector> rawClone() const override;
40 void swapVectors( Vector &other ) override;
41
42 std::shared_ptr<Vector> getManagedVec() override { return shared_from_this(); }
43 std::shared_ptr<const Vector> getManagedVec() const override { return shared_from_this(); }
44
45private:
48
53 // static void space_no_impl(N_Vector v, long int *lrw, long int *liw);
57 static void setToScalar_AMP( realtype c, N_Vector z );
58 static void multiply_AMP( N_Vector x, N_Vector y, N_Vector z );
59 static void divide_AMP( N_Vector x, N_Vector y, N_Vector z );
60 static void scale_AMP( realtype c, N_Vector x, N_Vector z );
61 static void abs_AMP( N_Vector x, N_Vector z );
62 static void reciprocal_AMP( N_Vector x, N_Vector z );
63 static void addScalar_AMP( N_Vector x, realtype b, N_Vector z );
71 static void compare_no_impl( realtype c, N_Vector x, N_Vector z );
75};
76} // namespace AMP::LinearAlgebra
77
78#endif
A class that can provide a Sundials N_Vector view of an AMP Vector.
static realtype minquotient_AMP(N_Vector num, N_Vector denom)
std::string type() const override
Return the name of the vector.
static N_Vector cloneempty_no_impl(N_Vector w)
static void multiply_AMP(N_Vector x, N_Vector y, N_Vector z)
static void reciprocal_AMP(N_Vector x, N_Vector z)
static void compare_no_impl(realtype c, N_Vector x, N_Vector z)
std::unique_ptr< Vector > rawClone() const override
Allocate space in the same fashion as this
static realtype * getarraypointer_no_impl(N_Vector v)
static realtype min_AMP(N_Vector x)
static void linearSum_AMP(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z)
std::shared_ptr< Vector > getManagedVec() override
ManagedSundialsVector(const ManagedSundialsVector &)
static realtype wl2norm_no_impl(N_Vector x, N_Vector w)
static void divide_AMP(N_Vector x, N_Vector y, N_Vector z)
static realtype L1Norm_AMP(N_Vector x)
static booleantype invtest_no_impl(N_Vector x, N_Vector z)
void operator=(const ManagedSundialsVector &)
static void setarraypointer_no_impl(realtype *v_data, N_Vector v)
static realtype WRMSNormMask_AMP(N_Vector x, N_Vector w, N_Vector mask)
static void scale_AMP(realtype c, N_Vector x, N_Vector z)
static realtype WRMSNorm_AMP(N_Vector x, N_Vector w)
ManagedSundialsVector(shared_ptr alias)
Create a view to an AMP vector.
static N_Vector clone_AMP(N_Vector w)
std::shared_ptr< const Vector > getManagedVec() const override
static void setToScalar_AMP(realtype c, N_Vector z)
static void freeVectorComponents_AMP(N_Vector v)
static void addScalar_AMP(N_Vector x, realtype b, N_Vector z)
void swapVectors(Vector &other) override
Swap the data in this Vector for another.
static booleantype constrmask_no_impl(N_Vector c, N_Vector x, N_Vector m)
static void abs_AMP(N_Vector x, N_Vector z)
static realtype maxNorm_AMP(N_Vector x)
static realtype dot_AMP(N_Vector x, N_Vector y)
SundialsVector is a bridge between AMP::LinearAlgebra::Vector and the Sundials N_Vector data structur...
Abstraction of a discrete Vector in a linear simulation.
Definition Vector.h:54
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page