Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE > Class Template Reference

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

Inheritance diagram for SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

static Vec createPETScVector (tbox::Pointer< SAMRAIVectorReal< DIM, TYPE > > samrai_vec)
static void destroyPETScVector (Vec petsc_vec)
static tbox::Pointer< SAMRAIVectorReal<
DIM, TYPE > > 
getSAMRAIVector (Vec petsc_vec)

Protected Member Functions

 PETSc_SAMRAIVectorReal (tbox::Pointer< SAMRAIVectorReal< DIM, TYPE > > samrai_vector, bool vector_created_via_duplicate)
virtual ~PETSc_SAMRAIVectorReal ()

Detailed Description

template<int DIM, class TYPE>
class SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >

Class PETSc_SAMRAIVectorReal<DIM> wraps a real-valued SAMRAI vector (see SAMRAIVectorReal class) object so that it may be used with the PETSc solver package. This class is derived from the abstract base class PETScAbstractVectorReal, the { C++} interface for PETSc vectors where the underlying data is float or double. It also maintains a pointer to a SAMRAI vector object. A SAMRAI vector is defined as a collection of patch data components and associated operations 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 PETSc vector objects (i.e., "Vec"s), and to obtain the SAMRAI vector associated with the PETSc 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 PETSc vector objects.

Finally, we remark that PETSc allows vectors with complex-valued entries. This class and the class VectorReal assume real-values vectors (i.e., data of type { double} or { float}. The class PETSc_SAMRAIVectorComplex must be used for complex data.

See also:
solv::PETScAbstractVectorReal

solv::SAMRAIVectorReal


Constructor & Destructor Documentation

template<int DIM, class TYPE>
SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >::PETSc_SAMRAIVectorReal tbox::Pointer< SAMRAIVectorReal< DIM, TYPE > >  samrai_vector,
bool  vector_created_via_duplicate
[protected]
 

template<int DIM, class TYPE>
SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >::~PETSc_SAMRAIVectorReal  )  [protected, virtual]
 


Member Function Documentation

template<int DIM, class TYPE>
Vec SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >::createPETScVector tbox::Pointer< SAMRAIVectorReal< DIM, TYPE > >  samrai_vec  )  [static]
 

Create and return a new PETSc vector object. The SAMRAI vector object is wrapped so that it may be manipulated through the PETSc vector structure in the PETScAbstractVectorReal base class. 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 PETSc "ViewVec" calls, the output stream to which the SAMRAI vector object writes will be used.

template<int DIM, class TYPE>
void SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >::destroyPETScVector Vec  petsc_vec  )  [static]
 

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

template<int DIM, class TYPE>
tbox::Pointer< SAMRAIVectorReal< DIM, TYPE > > SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >::getSAMRAIVector Vec  petsc_vec  )  [static]
 

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


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:32:54 2005 for SAMRAI by  doxygen 1.4.2