|
IBAMR
IBAMR version 0.19.
|
Class PETScSAMRAIVectorReal is a class for wrapping SAMRAI::solv::SAMRAIVectorReal objects so that they may be used with the PETSc solver package. More...
#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) | |
| ~PETScSAMRAIVectorReal () | |
Private Member Functions | |
| PETScSAMRAIVectorReal ()=delete | |
| Default constructor. More... | |
| PETScSAMRAIVectorReal (const PETScSAMRAIVectorReal &from)=delete | |
| Copy constructor. More... | |
| PETScSAMRAIVectorReal & | operator= (const PETScSAMRAIVectorReal &that)=delete |
| Assignment operator. More... | |
Static Private Member Functions | |
| static PetscErrorCode | VecDuplicate_SAMRAI (Vec v, Vec *newv) |
| static PetscErrorCode | VecDestroy_SAMRAI (Vec v) |
| static PetscErrorCode | VecDuplicateVecs_SAMRAI (Vec v, PetscInt m, Vec *V[]) |
| static PetscErrorCode | VecDestroyVecs_SAMRAI (PetscInt m, Vec vv[]) |
| static PetscErrorCode | VecDot_SAMRAI (Vec x, Vec y, PetscScalar *val) |
| static PetscErrorCode | VecMDot_SAMRAI (Vec x, PetscInt nv, const Vec *y, PetscScalar *val) |
| static PetscErrorCode | VecNorm_SAMRAI (Vec x, NormType type, PetscScalar *val) |
| static PetscErrorCode | VecTDot_SAMRAI (Vec x, Vec y, PetscScalar *val) |
| static PetscErrorCode | VecMTDot_SAMRAI (Vec x, PetscInt nv, const Vec *y, PetscScalar *val) |
| static PetscErrorCode | VecScale_SAMRAI (Vec x, PetscScalar alpha) |
| static PetscErrorCode | VecCopy_SAMRAI (Vec x, Vec y) |
| static PetscErrorCode | VecSet_SAMRAI (Vec x, PetscScalar alpha) |
| static PetscErrorCode | VecSwap_SAMRAI (Vec x, Vec y) |
| static PetscErrorCode | VecAXPY_SAMRAI (Vec y, PetscScalar alpha, Vec x) |
| static PetscErrorCode | VecAXPBY_SAMRAI (Vec y, PetscScalar alpha, PetscScalar beta, Vec x) |
| static PetscErrorCode | VecMAXPY_SAMRAI (Vec y, PetscInt nv, const PetscScalar *alpha, Vec *x) |
| static PetscErrorCode | VecAYPX_SAMRAI (Vec y, const PetscScalar alpha, Vec x) |
| static PetscErrorCode | VecWAXPY_SAMRAI (Vec w, PetscScalar alpha, Vec x, Vec y) |
| static PetscErrorCode | VecAXPBYPCZ_SAMRAI (Vec z, PetscScalar alpha, PetscScalar beta, PetscScalar gamma, Vec x, Vec y) |
| static PetscErrorCode | VecPointwiseMult_SAMRAI (Vec w, Vec x, Vec y) |
| static PetscErrorCode | VecPointwiseDivide_SAMRAI (Vec w, Vec x, Vec y) |
| static PetscErrorCode | VecGetSize_SAMRAI (Vec v, PetscInt *size) |
| static PetscErrorCode | VecGetLocalSize_SAMRAI (Vec v, PetscInt *size) |
| static PetscErrorCode | VecMax_SAMRAI (Vec x, PetscInt *p, PetscScalar *val) |
| static PetscErrorCode | VecMin_SAMRAI (Vec x, PetscInt *p, PetscScalar *val) |
| static PetscErrorCode | VecSetRandom_SAMRAI (Vec x, PetscRandom rctx) |
| static PetscErrorCode | VecDot_local_SAMRAI (Vec x, Vec y, PetscScalar *val) |
| static PetscErrorCode | VecTDot_local_SAMRAI (Vec x, Vec y, PetscScalar *val) |
| static PetscErrorCode | VecNorm_local_SAMRAI (Vec x, NormType type, PetscScalar *val) |
| static PetscErrorCode | VecMDot_local_SAMRAI (Vec x, PetscInt nv, const Vec *y, PetscScalar *val) |
| static PetscErrorCode | VecMTDot_local_SAMRAI (Vec x, PetscInt nv, const Vec *y, PetscScalar *val) |
| static PetscErrorCode | VecMaxPointwiseDivide_SAMRAI (Vec x, Vec y, PetscScalar *max) |
| static PetscErrorCode | VecDotNorm2_SAMRAI (Vec s, Vec t, PetscScalar *dp, PetscScalar *nm) |
Private Attributes | |
| SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, PetscScalar > > | d_samrai_vector |
| Vec | d_petsc_vector |
| bool | d_vector_created_via_duplicate |
| bool | d_vector_checked_out_read_write = false |
| bool | d_vector_checked_out_read = false |
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.
|
protected |
|
protected |
|
privatedelete |
|
privatedelete |
| from | The value to copy to this object. |
|
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 |
Restore 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 |
Restore the SAMRAI vector object associated with the given PETSc vector object.
|
inlinestatic |
Replace the SAMRAI vector object associated with the given PETSc vector object.
|
privatedelete |
| that | The value to assign to this object. |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17