IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
Class PETScSAMRAIVectorReal is a class for wrapping SAMRAI::solv::SAMRAIVectorReal objects so that they may be used with the PETSc solver package. More...
#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/PETScSAMRAIVectorReal.h>
Static Public Member Functions | |
static Vec | createPETScVector (SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > samrai_vec, MPI_Comm comm=PETSC_COMM_WORLD) |
static void | destroyPETScVector (Vec petsc_vec) |
static void | getSAMRAIVector (Vec petsc_vec, SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > *samrai_vec) |
static void | restoreSAMRAIVector (Vec petsc_vec, SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > *samrai_vec) |
static void | getSAMRAIVectorRead (Vec petsc_vec, SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > *samrai_vec) |
static void | restoreSAMRAIVectorRead (Vec petsc_vec, SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > *samrai_vec) |
static void | replaceSAMRAIVector (Vec petsc_vec, SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > samrai_vec) |
Protected Member Functions | |
PETScSAMRAIVectorReal (SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > samrai_vector, bool vector_created_via_duplicate, MPI_Comm comm) | |
Class PETScSAMRAIVectorReal is a class for wrapping SAMRAI::solv::SAMRAIVectorReal objects so that they may be used with the PETSc solver package.
Class PETScSAMRAIVectorReal wraps a real-valued SAMRAI vector (see SAMRAI::solv::SAMRAIVectorReal class) object so that it may be used with the PETSc solver package. 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 vectors (i.e., Vec
objects) 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 SAMRAI::solv::SAMRAIVectorReal assume real-values vectors, i.e., data of type double
or float
. The (currently unimplemented) class PETScSAMRAIVectorComplex must be used for complex data.
|
inlinestatic |
Create and return a new PETSc vector object that wraps the SAMRAI vector object, so that the SAMRAI vector may be manipulated by PETSc routines. 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.
|
inlinestatic |
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.
|
inlinestatic |
Get a pointer to the SAMRAI vector object associated with the given PETSc vector object.
|
inlinestatic |
Get a pointer to the SAMRAI vector object associated with the given PETSc vector object. This vector must be treated as read only.
|
inlinestatic |
Replace the SAMRAI vector object associated with the given PETSc vector object.
|
inlinestatic |
Restore the SAMRAI vector object associated with the given PETSc vector object.
|
inlinestatic |
Restore the SAMRAI vector object associated with the given PETSc vector object.