PyTrilinos  Development
 All Classes Functions
Public Member Functions | Public Attributes
PyTrilinos.ML.MultiVector Class Reference
Inheritance diagram for PyTrilinos.ML.MultiVector:
Inheritance graph
[legend]
Collaboration diagram for PyTrilinos.ML.MultiVector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def Reshape
def Append
def Delete
def GetVectorSpace
def GetNumVectors
def GetMyLength
def GetGlobalLength
def GetValues
def Update
def DotProduct
def Norm2
def NormInf
def NormOne
def Reciprocal
def Scale
def Random
def Sort
def IsAlias
def __init__
def __add__
def __sub__
def __mul__
def __rmul__
def __setitem__
def __getitem__
def __call__

Public Attributes

 this

Detailed Description

Basic class for distributed double-precision vectors.

Marzio Sala, SNL 9214.

C++ includes: MLAPI_MultiVector.h 

Constructor & Destructor Documentation

def PyTrilinos.ML.MultiVector.__init__ (   self,
  args 
)
__init__(MLAPI::MultiVector self) -> MultiVector
__init__(MLAPI::MultiVector self, Space VectorSpace, int const NumVectors=1, bool SetToZero=True) -> MultiVector
__init__(MLAPI::MultiVector self, MultiVector rhs) -> MultiVector
__init__(MLAPI::MultiVector self, Space vectorSpace, PyObject * pyValues) -> MultiVector

MLAPI::MultiVector::MultiVector(const MultiVector &rhs)

Copy constructor. 

Reimplemented from PyTrilinos.ML.CompObject.


Member Function Documentation

def PyTrilinos.ML.MultiVector.__add__ (   self,
  args 
)
__add__(self, MultiVector rhs) -> MultiVector

Element-wise addition operator.
def PyTrilinos.ML.MultiVector.__call__ (   self,
  args 
)
__call__(self, int i, int v=0) -> float

Returns the i-th element of the v-th vector.
def PyTrilinos.ML.MultiVector.__getitem__ (   self,
  args 
)
__getitem__(self, PyObject index, int v) -> PyObject

Argument index can be an integer or slice index into a vector.
Argument v must be an integer specifying the desired vector within the
MultiVector.  The returned PyObject will be either a scalar or an
array with the same shape as the index.
def PyTrilinos.ML.MultiVector.__mul__ (   self,
  args 
)
__mul__(self, MultiVector rhs) -> float

  Dot-product multiplication operator.

__mul__(MultiVector self, double const rhs) -> MultiVector
__mul__(self, int rhs) -> MultiVector

  Scalar multiplication operators.
def PyTrilinos.ML.MultiVector.__rmul__ (   self,
  args 
)
__rmul__(MultiVector self, double const lhs) -> MultiVector
__rmul__(self, int lhs) -> MultiVector

Scalar 'reverse' multiplication operators.
def PyTrilinos.ML.MultiVector.__setitem__ (   self,
  args 
)
__setitem__(self, PyObject index, int v, PyObject value)

Argument index can be an integer or slice index into a vector.
Argument v must be an integer specifying the desired vector within the
MultiVector.  The value argument must have a shape that matches the
shape of the index.
def PyTrilinos.ML.MultiVector.__sub__ (   self,
  args 
)
__sub__(self, MultiVector rhs) -> MultiVector

Element-wise subtraction operator.
def PyTrilinos.ML.MultiVector.Append (   self,
  args 
)
Append(MultiVector self, int const NumVectors=1, bool const SetToZero=True)
Append(MultiVector self, MultiVector rhs)

void
MLAPI::MultiVector::Append(MultiVector rhs)

Appends a new vector. 
def PyTrilinos.ML.MultiVector.Delete (   self,
  args 
)
Delete(self, int v)

Deletes the v-th vector within the MultiVector.

void
MLAPI::MultiVector::Delete(const int v)

Deletes the last vector. 
def PyTrilinos.ML.MultiVector.DotProduct (   self,
  args 
)
DotProduct(MultiVector self, MultiVector rhs, int v=-1) -> double

double
MLAPI::MultiVector::DotProduct(const MultiVector &rhs, int v=-1) const

Computes the dot product between this vector and rhs. 
def PyTrilinos.ML.MultiVector.GetGlobalLength (   self,
  args 
)
GetGlobalLength(MultiVector self) -> int

int
MLAPI::MultiVector::GetGlobalLength() const

Returns the global length of each vector. 
def PyTrilinos.ML.MultiVector.GetMyLength (   self,
  args 
)
GetMyLength(MultiVector self) -> int

int
MLAPI::MultiVector::GetMyLength() const

Returns the local length of each vector. 
def PyTrilinos.ML.MultiVector.GetNumVectors (   self,
  args 
)
GetNumVectors(MultiVector self) -> int

int
MLAPI::MultiVector::GetNumVectors() const

Returns the number of vectors. 
def PyTrilinos.ML.MultiVector.GetValues (   self,
  args 
)
GetValues(self, int v) -> numpy.ndarray

Returns a 1D numpy array representing the v-th vector in the
MultiVector.

const double*
MLAPI::MultiVector::GetValues(const int v) const

Returns a pointer to the double array (const version) 
def PyTrilinos.ML.MultiVector.GetVectorSpace (   self,
  args 
)
GetVectorSpace(MultiVector self) -> Space
GetVectorSpace(MultiVector self) -> Space

Space&
MLAPI::MultiVector::GetVectorSpace()

Returns the Space on which this vector is defined (non-const) 
def PyTrilinos.ML.MultiVector.IsAlias (   self,
  args 
)
IsAlias(MultiVector self, MultiVector rhs) -> bool

bool
MLAPI::MultiVector::IsAlias(const MultiVector &rhs) const 
def PyTrilinos.ML.MultiVector.Norm2 (   self,
  args 
)
Norm2(MultiVector self, int v=-1) -> double

double
MLAPI::MultiVector::Norm2(int v=-1) const

Computes the 2-norm of this vector. 
def PyTrilinos.ML.MultiVector.NormInf (   self,
  args 
)
NormInf(MultiVector self, int v=-1) -> double

double
MLAPI::MultiVector::NormInf(int v=-1) const

Computes the infinite norm of this vector. 
def PyTrilinos.ML.MultiVector.NormOne (   self,
  args 
)
NormOne(MultiVector self, int v=-1) -> double

double
MLAPI::MultiVector::NormOne(int v=-1) const

Computes the one norm of this vector. 
def PyTrilinos.ML.MultiVector.Random (   self,
  args 
)
Random(MultiVector self, int v=-1)

void
MLAPI::MultiVector::Random(int v=-1)

Populates the vector with random elements. 
def PyTrilinos.ML.MultiVector.Reciprocal (   self,
  args 
)
Reciprocal(MultiVector self, int v=-1)

void
MLAPI::MultiVector::Reciprocal(int v=-1)

Replaces each element of the vector with its reciprocal. 
def PyTrilinos.ML.MultiVector.Reshape (   self,
  args 
)
Reshape(MultiVector self)
Reshape(MultiVector self, Space S, int const NumVectors=1, bool const SetToZero=True)

void
MLAPI::MultiVector::Reshape(const Space &S, const int NumVectors=1,
const bool SetToZero=true)

Sets the space of this vector. 
def PyTrilinos.ML.MultiVector.Scale (   self,
  args 
)
Scale(MultiVector self, double const Factor, int v=-1)

void
MLAPI::MultiVector::Scale(const double Factor, int v=-1)

Scales each element by the specified factor. 
def PyTrilinos.ML.MultiVector.Sort (   self,
  args 
)
Sort(MultiVector self, int v=-1, bool const IsIncreasing=False)

void
MLAPI::MultiVector::Sort(int v=-1, const bool IsIncreasing=false)

Sorts the component of the vector. 
def PyTrilinos.ML.MultiVector.Update (   self,
  args 
)
Update(MultiVector self, double const alpha, int v=-1)
Update(MultiVector self, MultiVector rhs)
Update(MultiVector self, double alpha, MultiVector rhs)
Update(MultiVector self, double alpha, MultiVector x, double beta, MultiVector y)
Update(MultiVector self, double alpha, MultiVector rhs, double beta)

void
MLAPI::MultiVector::Update(double alpha, const MultiVector &rhs,
double beta)

Sets this = alpha * rhs + beta * this. 

The documentation for this class was generated from the following file:
 All Classes Functions