#include <source/solvers/vectors/PETSc_SAMRAIVectorReal.h>
Inheritance diagram for SAMRAI::solv::PETSc_SAMRAIVectorReal< DIM, TYPE >:
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 () |
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.
|
|
|
|
|
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. |
|
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. |
|
Return pointer to the SAMRAI vector object associated with the given PETSc vector. |