#include <source/solvers/packages/petsc/PETScAbstractVectorReal.h>
Inheritance diagram for SAMRAI::solv::PETScAbstractVectorReal< TYPE >:
Protected Member Functions | |
PETScAbstractVectorReal (bool vector_created_via_duplicate) | |
virtual | ~PETScAbstractVectorReal () |
Vec | getPETScVector () |
virtual PETScAbstractVectorReal< TYPE > * | makeNewVector ()=0 |
virtual void | freeVector ()=0 |
virtual void | viewVector () const =0 |
virtual TYPE | dotWith (const PETScAbstractVectorReal< TYPE > *y, bool local_only=false) const =0 |
virtual TYPE | TdotWith (const PETScAbstractVectorReal< TYPE > *y, bool local_only=false) const =0 |
virtual double | L1Norm (bool local_only=false) const =0 |
virtual double | L2Norm (bool local_only=false) const =0 |
virtual double | maxNorm (bool local_only=false) const =0 |
virtual void | scaleVector (const TYPE alpha)=0 |
virtual void | copyVector (const PETScAbstractVectorReal< TYPE > *v_src)=0 |
virtual void | setToScalar (const TYPE alpha)=0 |
virtual void | swapWith (PETScAbstractVectorReal< TYPE > *v_other)=0 |
virtual void | setAXPY (const TYPE alpha, const PETScAbstractVectorReal< TYPE > *x)=0 |
virtual void | setAXPBY (const TYPE alpha, const PETScAbstractVectorReal< TYPE > *x, const TYPE beta)=0 |
virtual void | setWAXPY (const TYPE alpha, const PETScAbstractVectorReal< TYPE > *x, const PETScAbstractVectorReal< TYPE > *y)=0 |
virtual void | pointwiseMultiply (const PETScAbstractVectorReal< TYPE > *x, const PETScAbstractVectorReal< TYPE > *y)=0 |
virtual void | pointwiseDivide (const PETScAbstractVectorReal< TYPE > *x, const PETScAbstractVectorReal< TYPE > *y)=0 |
virtual double | maxPointwiseDivide (const PETScAbstractVectorReal< TYPE > *y)=0 |
virtual void | vecMax (int &i, double &max) const =0 |
virtual void | vecMin (int &i, double &min) const =0 |
virtual void | setRandomValues (const TYPE width, const TYPE low)=0 |
virtual void | getDataArray (TYPE *array)=0 |
virtual int | getDataSize () const =0 |
virtual int | getLocalDataSize () const =0 |
PETSc was developed in the Mathematics and Computer Science Division at Argonne National Laboratory (ANL). For more information about PETSc, see { http://www-fp.mcs.anl.gov/petsc/}.
Important notes:
|
Constructor PETScAbstractVectorReal class that provides a wrapper for a SAMRAI vector so that it can be manipulated within PETSc. The constructor allocates the PETSc vector and sets its data structures and member functions so that it can operate on the SAMRAI vector. |
|
Destructor for PETScAbstractVectorReal class destroys the PETSc vector created by the constructor. |
|
Return PETSc "Vec" object for this PETScAbstractVectorReal object. |
|
Clone the vector structure and allocate storage for the vector data. Then, return a pointer to the new vector instance. This function is distinct from the vector constructor since it is called from within PETSc (via the duplicateVec(), duplicateVecs() functions) to allocate new vector objects. |
|
Destroy vector structure and its storage. This function is distinct from the destructor since it will be called from within PETSc to deallocate vectors (via the destroyVec(), destroyVecs() functions). |
|
View all vector data. Note that the user-supplied vector must choose how to view the vector and its data; e.g., print to file, dump to standard out, etc. |
|
Return |
|
Limited to local data only, return |
|
Return
|
|
Return
|
|
Return
|
|
Multiply each entry of this vector by given scalar. |
|
Copy source vector data to this vector. |
|
Set each entry of this vector to given scalar. |
|
Swap data between this vector and argument vector. |
|
Set |
|
Set |
|
Set |
|
Set |
|
Set |
|
Compute |
|
Find maximum vector entry and vector index at which maximum occurs. |
|
Find minimum vector entry and vector index at which minimum occurs. |
|
Set vector entries to random values. Note that PETSc uses the drand48() function and computes random value as width*drand48()+low. |
|
Set argument to vector data in contiguous array (local to processor). |
|
Return total length of vector. |
|
Return length of vector (local to processor). |