SAMRAI::solv::Sundials_SAMRAIVector< DIM > Class Template Reference

#include <source/solvers/vectors/Sundials_SAMRAIVector.h>

Inheritance diagram for SAMRAI::solv::Sundials_SAMRAIVector< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void printVector () const

Static Public Member Functions

static SundialsAbstractVectorcreateSundialsVector (tbox::Pointer< SAMRAIVectorReal< DIM, double > > samrai_vec)
static void destroySundialsVector (SundialsAbstractVector *sundials_vec)
static tbox::Pointer< SAMRAIVectorReal<
DIM, double > > 
getSAMRAIVector (SundialsAbstractVector *sundials_vec)
static tbox::Pointer< SAMRAIVectorReal<
DIM, double > > 
getSAMRAIVector (N_Vector sundials_vec)

Protected Member Functions

 Sundials_SAMRAIVector (tbox::Pointer< SAMRAIVectorReal< DIM, double > > samrai_vector)
virtual ~Sundials_SAMRAIVector ()

Detailed Description

template<int DIM>
class SAMRAI::solv::Sundials_SAMRAIVector< DIM >

Class Sundials_SAMRAIVector<DIM> wraps a real-valued SAMRAI vector (see SAMRAIVectorReal class) object so that it may be used with the Sundials solver packages. This class is derived from the abstract base class SundialsAbstractVector, which defines a C++ interface for Sundials vectors. It also maintains a pointer to a SAMRAI vector object. A SAMRAI vector is defined as a collection of patch data components living on some subset of levels in a structured AMR mesh hierarchy.

Observe that there are only three public member functions in this class They are used to create and destroy Sundials vector objects (i.e., "N_Vector"s), and to obtain the SAMRAI vector associated with the Sundials vector. In particular, note that the constructor and destructor of this class are protected members. The construction and destruction of instances of this class may occur only through the static member functions that create and destroy Sundials vector objects.

Finally, we remark that this class provides vectors of type double, which is the default for Sundials.

See also:
solv::SundialsAbstractVector

solv::SAMRAIVectorReal


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::solv::Sundials_SAMRAIVector< DIM >::Sundials_SAMRAIVector ( tbox::Pointer< SAMRAIVectorReal< DIM, double > >  samrai_vector  )  [protected]

template<int DIM>
SAMRAI::solv::Sundials_SAMRAIVector< DIM >::~Sundials_SAMRAIVector (  )  [protected, virtual]


Member Function Documentation

template<int DIM>
SundialsAbstractVector * SAMRAI::solv::Sundials_SAMRAIVector< DIM >::createSundialsVector ( tbox::Pointer< SAMRAIVectorReal< DIM, double > >  samrai_vec  )  [static]

Create and return a new SundialsAbstractVector vector object. The SAMRAI vector object is wrapped so that it may be manipulated within Sundials as an N_Vector (which is typedef'd to SundialsAbstractVector* in the abstract Sundials vector interface). It is important to note that this function does not allocate storage for the vector data. Data must be allocated through the SAMRAI vector object directly. For output of the data through "N_VPrint" calls, the output stream to which the SAMRAI vector object writes will be used.

template<int DIM>
void SAMRAI::solv::Sundials_SAMRAIVector< DIM >::destroySundialsVector ( SundialsAbstractVector sundials_vec  )  [static]

Destroy a given Sundials vector object. It is important to note that this function does not deallocate storage for the vector data. Vector data must be deallocated hrough the SAMRAI vector object.

template<int DIM>
tbox::Pointer< SAMRAIVectorReal< DIM, double > > SAMRAI::solv::Sundials_SAMRAIVector< DIM >::getSAMRAIVector ( SundialsAbstractVector sundials_vec  )  [static]

Return pointer to the SAMRAI vector object associated with the given Sundials wrapper vector.

template<int DIM>
tbox::Pointer< SAMRAIVectorReal< DIM, double > > SAMRAI::solv::Sundials_SAMRAIVector< DIM >::getSAMRAIVector ( N_Vector  sundials_vec  )  [static]

Return pointer to the SAMRAI vector object associated with the given Sundials vector.

template<int DIM>
void SAMRAI::solv::Sundials_SAMRAIVector< DIM >::printVector (  )  const [virtual]

Print the vector data to the output stream used by the subclass print routine.

Implements SAMRAI::solv::SundialsAbstractVector.


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