#include <source/solvers/packages/sundials/vector/SundialsAbstractVector.h>
Inheritance diagram for SAMRAI::solv::SundialsAbstractVector:
Public Member Functions | |
SundialsAbstractVector () | |
virtual | ~SundialsAbstractVector () |
virtual SundialsAbstractVector * | makeNewVector ()=0 |
virtual void | freeVector ()=0 |
virtual void | setToScalar (const double c)=0 |
virtual void | scaleVector (const SundialsAbstractVector *x, const double c)=0 |
virtual void | setLinearSum (const double a, const SundialsAbstractVector *x, const double b, const SundialsAbstractVector *y)=0 |
virtual void | pointwiseMultiply (const SundialsAbstractVector *x, const SundialsAbstractVector *y)=0 |
virtual void | pointwiseDivide (const SundialsAbstractVector *x, const SundialsAbstractVector *y)=0 |
virtual void | setAbs (const SundialsAbstractVector *x)=0 |
virtual void | pointwiseReciprocal (const SundialsAbstractVector *x)=0 |
virtual void | addScalar (const SundialsAbstractVector *x, const double b)=0 |
virtual double | dotWith (const SundialsAbstractVector *x) const =0 |
virtual double | maxNorm () const=0 |
virtual double | L1Norm () const=0 |
virtual double | weightedL2Norm (const SundialsAbstractVector *x) const =0 |
virtual double | weightedRMSNorm (const SundialsAbstractVector *x) const =0 |
virtual double | vecMin () const=0 |
virtual int | constrProdPos (const SundialsAbstractVector *x) const =0 |
virtual void | compareToScalar (const SundialsAbstractVector *x, const double c)=0 |
virtual int | testReciprocal (const SundialsAbstractVector *x)=0 |
N_Vector | getNVector () |
virtual void | printVector () const=0 |
C++
class that may be used as the vector kernel by the Sundials nonlinear solver package. Sundials allows arbitrarily defined vectors to be used within it as long as the proper collection of operations are provided. The intent of this base class to provide the interface for one's own vector kernel. One implements a subclass that provides the functions declared herein as pure virtual and which provides necessary vector data structures. Note that the virtual members of this class are all protected. They should not be used outside of a subclass of this class.Sundials was developed in the Center for Applied Scientific Computing (CASC) at Lawrence Livermore National Laboratory (LLNL). For more information about Sundials, see A.G. Taylor and A.C. Hindmarsh, "User documentation for Sundials, a nonlinear solver for sequential and parallel computers", UCRL-ID-131185, Lawrence Livermore National Laboratory, 1998.
Important notes:
double
, which is the default for Sundials.
SAMRAI::solv::SundialsAbstractVector::SundialsAbstractVector | ( | ) |
Uninteresting constructor and destructor for solv::SundialsAbstractVector.
SAMRAI::solv::SundialsAbstractVector::~SundialsAbstractVector | ( | ) | [virtual] |
virtual SundialsAbstractVector* SAMRAI::solv::SundialsAbstractVector::makeNewVector | ( | ) | [pure virtual] |
Clone the vector structure and allocate storage for the vector data. Then, return a pointer to the new vector instance. Note that the new vector object must be distinct from the original. This function is distinct from the vector constructor since it will be called from within Sundials to allocate vectors during the nonlinear solution process. The original solution vector must be setup by the user's application code.
virtual void SAMRAI::solv::SundialsAbstractVector::freeVector | ( | ) | [pure virtual] |
Destroy vector structure and its storage. This function is distinct from the destructor since it will be called from within Sundials to deallocate vectors during the nonlinear solution process.
virtual void SAMRAI::solv::SundialsAbstractVector::setToScalar | ( | const double | c | ) | [pure virtual] |
Initialize all entries of this vector object to scalar .
virtual void SAMRAI::solv::SundialsAbstractVector::scaleVector | ( | const SundialsAbstractVector * | x, | |
const double | c | |||
) | [pure virtual] |
Set this vector object to scalar , where is a scalar and x is another vector.
virtual void SAMRAI::solv::SundialsAbstractVector::setLinearSum | ( | const double | a, | |
const SundialsAbstractVector * | x, | |||
const double | b, | |||
const SundialsAbstractVector * | y | |||
) | [pure virtual] |
Set this vector object to , where are scalars and are vectors.
virtual void SAMRAI::solv::SundialsAbstractVector::pointwiseMultiply | ( | const SundialsAbstractVector * | x, | |
const SundialsAbstractVector * | y | |||
) | [pure virtual] |
Set each entry of this vector: , where are entries in vectors and .
virtual void SAMRAI::solv::SundialsAbstractVector::pointwiseDivide | ( | const SundialsAbstractVector * | x, | |
const SundialsAbstractVector * | y | |||
) | [pure virtual] |
Set each entry of this vector: , where are entries in vectors and . Based on the Sundials vector implementation, it is not necessary to check for division by zero.
virtual void SAMRAI::solv::SundialsAbstractVector::setAbs | ( | const SundialsAbstractVector * | x | ) | [pure virtual] |
Set each entry of this vector to the absolute value of the corresponding entry in vector .
virtual void SAMRAI::solv::SundialsAbstractVector::pointwiseReciprocal | ( | const SundialsAbstractVector * | x | ) | [pure virtual] |
Set each entry of this vector: , where is an entry entry in vector . Based on the Sundials vector implementation, it is not necessary to no check for division by zero.
virtual void SAMRAI::solv::SundialsAbstractVector::addScalar | ( | const SundialsAbstractVector * | x, | |
const double | b | |||
) | [pure virtual] |
Set each entry of this vector to the corresponding entry in vector plus the scalar .
virtual double SAMRAI::solv::SundialsAbstractVector::dotWith | ( | const SundialsAbstractVector * | x | ) | const [pure virtual] |
Return the dot product of this vector and the argument vector .
virtual double SAMRAI::solv::SundialsAbstractVector::maxNorm | ( | ) | const [pure virtual] |
Return the max norm of this vector.
virtual double SAMRAI::solv::SundialsAbstractVector::L1Norm | ( | ) | const [pure virtual] |
Return the norm of this vector.
virtual double SAMRAI::solv::SundialsAbstractVector::weightedL2Norm | ( | const SundialsAbstractVector * | x | ) | const [pure virtual] |
Return the weighted- norm of this vector using the vector as the weighting vector.
virtual double SAMRAI::solv::SundialsAbstractVector::weightedRMSNorm | ( | const SundialsAbstractVector * | x | ) | const [pure virtual] |
Return the weighted root mean squared norm of this vector using the vector as the weighting vector.
virtual double SAMRAI::solv::SundialsAbstractVector::vecMin | ( | ) | const [pure virtual] |
Return the minimum entry of this vector.
virtual int SAMRAI::solv::SundialsAbstractVector::constrProdPos | ( | const SundialsAbstractVector * | x | ) | const [pure virtual] |
Return if and , for some . Here is an element of this vector. Otherwise, return .
virtual void SAMRAI::solv::SundialsAbstractVector::compareToScalar | ( | const SundialsAbstractVector * | x, | |
const double | c | |||
) | [pure virtual] |
Set each entry in this vector based on the vector as follows: if , then , else .
virtual int SAMRAI::solv::SundialsAbstractVector::testReciprocal | ( | const SundialsAbstractVector * | x | ) | [pure virtual] |
Set each entry of this vector: , where is an entry entry in the vector , unless . If , then return . Otherwise, is returned.
N_Vector SAMRAI::solv::SundialsAbstractVector::getNVector | ( | ) |
Return the wrapped Sundials N_Vector.
virtual void SAMRAI::solv::SundialsAbstractVector::printVector | ( | ) | const [pure virtual] |
Print the vector data to the output stream used by the subclass print routine.
Implemented in SAMRAI::solv::Sundials_SAMRAIVector< DIM >.