SAMRAI::solv::SundialsAbstractVector Class Reference

#include <source/solvers/packages/sundials/vector/SundialsAbstractVector.h>

Inheritance diagram for SAMRAI::solv::SundialsAbstractVector:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SundialsAbstractVector ()
virtual ~SundialsAbstractVector ()
virtual SundialsAbstractVectormakeNewVector ()=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

Detailed Description

Class solv::SundialsAbstractVector is an abstract base class that declares operations provided by any 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:

See also:
solv::SundialsSolver


Constructor & Destructor Documentation

SAMRAI::solv::SundialsAbstractVector::SundialsAbstractVector (  ) 

Uninteresting constructor and destructor for solv::SundialsAbstractVector.

SAMRAI::solv::SundialsAbstractVector::~SundialsAbstractVector (  )  [virtual]


Member Function Documentation

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 $c$.

virtual void SAMRAI::solv::SundialsAbstractVector::scaleVector ( const SundialsAbstractVector x,
const double  c 
) [pure virtual]

Set this vector object to scalar $c x$, where $c$ 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 $a x + b y$, where $a, b$ are scalars and $x, y$ are vectors.

virtual void SAMRAI::solv::SundialsAbstractVector::pointwiseMultiply ( const SundialsAbstractVector x,
const SundialsAbstractVector y 
) [pure virtual]

Set each entry of this vector: $v_i = x_i y_i$, where $x_i, y_i$ are entries in vectors $x$ and $y$.

virtual void SAMRAI::solv::SundialsAbstractVector::pointwiseDivide ( const SundialsAbstractVector x,
const SundialsAbstractVector y 
) [pure virtual]

Set each entry of this vector: $v_i = x_i / y_i$, where $x_i, y_i$ are entries in vectors $x$ and $y$. 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 $x$.

virtual void SAMRAI::solv::SundialsAbstractVector::pointwiseReciprocal ( const SundialsAbstractVector x  )  [pure virtual]

Set each entry of this vector: $v_i = 1 / x_i$, where $x_i$ is an entry entry in vector $x$. 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 $x$ plus the scalar $b$.

virtual double SAMRAI::solv::SundialsAbstractVector::dotWith ( const SundialsAbstractVector x  )  const [pure virtual]

Return the dot product of this vector and the argument vector $x$.

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 $L_1$ norm of this vector.

virtual double SAMRAI::solv::SundialsAbstractVector::weightedL2Norm ( const SundialsAbstractVector x  )  const [pure virtual]

Return the weighted-$L_2$ norm of this vector using the vector $x$ 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 $x$ 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 $0$ if $x_i \neq 0$ and $x_i z_i \leq 0$, for some $i$. Here $z_i$ is an element of this vector. Otherwise, return $1$.

virtual void SAMRAI::solv::SundialsAbstractVector::compareToScalar ( const SundialsAbstractVector x,
const double  c 
) [pure virtual]

Set each entry in this vector based on the vector $x$ as follows: if $\mid x_i \mid \geq c$, then $v_i = 1$, else $v_i = 0$.

virtual int SAMRAI::solv::SundialsAbstractVector::testReciprocal ( const SundialsAbstractVector x  )  [pure virtual]

Set each entry of this vector: $v_i = 1 / x_i$, where $x_i$ is an entry entry in the vector $x$, unless $x_i = 0$. If $x_i = 0$, then return $0$. Otherwise, $1$ 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 >.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:56 2009 for SAMRAI by  doxygen 1.5.1