Public Member Functions | |
EpetraVector (const VectorSpace< double > &vs) | |
EpetraVector (const VectorSpace< double > &vs, const RCP< Epetra_Vector > &vec) | |
const RCP< Epetra_Vector > & | epetraVec () const |
RCP< Epetra_Vector > & | epetraVec () |
virtual void | update (const double &alpha, const VectorBase< double > *other, const double &gamma) |
virtual void | update (const double &alpha, const VectorBase< double > *x, const double &beta, const VectorBase< double > *y, const double &gamma) |
virtual double | dot (const VectorBase< double > *other) const |
virtual double | norm2 () const |
VectorBase interface | |
RCP< const VectorSpaceBase < double > > | space () const |
IndexableVector interface | |
virtual const double & | operator[] (int globalIndex) const |
virtual double & | operator[] (int globalIndex) |
LoadableVector interface | |
void | setElement (int globalIndex, const double &value) |
void | addToElement (int globalIndex, const double &value) |
void | setElements (int numElems, const int *globalIndices, const double *values) |
void | addToElements (int numElems, const int *globalIndices, const double *values) |
void | finalizeAssembly () |
AccessibleVector interface | |
const double & | getElement (int globalIndex) const |
void | getElements (const int *globalIndices, int numElems, Teuchos::Array< double > &elems) const |
Printable interface | |
void | print (std::ostream &os) const |
Static Public Member Functions | |
static const Epetra_Vector & | getConcrete (const Playa::Vector< double > &tsfVec) |
static Epetra_Vector & | getConcrete (Playa::Vector< double > &tsfVec) |
static Epetra_Vector * | getConcretePtr (Playa::Vector< double > &tsfVec) |
Protected Member Functions | |
Single chunk data access interface | |
virtual const double * | dataPtr () const |
virtual double * | dataPtr () |
virtual int | chunkSize () const |
Private Attributes | |
VectorSpace< double > | vecSpace_ |
RCP< Epetra_Vector > | epetraVec_ |
int | numLocalElements_ |
Definition at line 24 of file PlayaEpetraVector.hpp.
EpetraVector::EpetraVector | ( | const VectorSpace< double > & | vs | ) |
Construct with an Epetra vector space.
Definition at line 17 of file PlayaEpetraVector.cpp.
References Playa::EpetraVectorSpace::epetraMap(), epetraVec_, and Playa::Handle< PointerType >::ptr().
EpetraVector::EpetraVector | ( | const VectorSpace< double > & | vs, | |
const RCP< Epetra_Vector > & | vec | |||
) |
Construct with an Epetra vector space and an existing Epetra vector.
Definition at line 35 of file PlayaEpetraVector.cpp.
References Playa::Handle< PointerType >::ptr().
void EpetraVector::addToElement | ( | int | globalIndex, | |
const double & | value | |||
) | [virtual] |
add to a single element
Implements Playa::LoadableVector< double >.
Definition at line 66 of file PlayaEpetraVector.cpp.
References epetraVec().
void EpetraVector::addToElements | ( | int | numElems, | |
const int * | globalIndices, | |||
const double * | values | |||
) | [virtual] |
add to a group of elements
Reimplemented from Playa::LoadableVector< double >.
Definition at line 102 of file PlayaEpetraVector.cpp.
References epetraVec().
virtual int Playa::EpetraVector::chunkSize | ( | ) | const [inline, protected, virtual] |
Size of the (single) chunk of data values
Implements Playa::SingleChunkVector< double >.
Definition at line 135 of file PlayaEpetraVector.hpp.
References numLocalElements_.
virtual double* Playa::EpetraVector::dataPtr | ( | ) | [inline, protected, virtual] |
Implements Playa::SingleChunkVector< double >.
Definition at line 132 of file PlayaEpetraVector.hpp.
References epetraVec_.
virtual const double* Playa::EpetraVector::dataPtr | ( | ) | const [inline, protected, virtual] |
Implements Playa::SingleChunkVector< double >.
Definition at line 130 of file PlayaEpetraVector.hpp.
References epetraVec_.
double EpetraVector::dot | ( | const VectorBase< double > * | other | ) | const [virtual] |
Reimplemented from Playa::SingleChunkVector< double >.
Definition at line 181 of file PlayaEpetraVector.cpp.
References epetraVec_.
RCP<Epetra_Vector>& Playa::EpetraVector::epetraVec | ( | ) | [inline] |
const RCP<Epetra_Vector>& Playa::EpetraVector::epetraVec | ( | ) | const [inline] |
Definition at line 95 of file PlayaEpetraVector.hpp.
References epetraVec_.
Referenced by addToElement(), addToElements(), finalizeAssembly(), getConcrete(), getConcretePtr(), getElement(), getElements(), operator[](), print(), setElement(), and setElements().
void EpetraVector::finalizeAssembly | ( | ) | [virtual] |
Reimplemented from Playa::LoadableVector< double >.
Definition at line 111 of file PlayaEpetraVector.cpp.
References epetraVec().
Epetra_Vector & EpetraVector::getConcrete | ( | Playa::Vector< double > & | tsfVec | ) | [static] |
Get a read-write Epetra_Vector
Definition at line 134 of file PlayaEpetraVector.cpp.
References epetraVec(), and Playa::Handle< PointerType >::ptr().
const Epetra_Vector & EpetraVector::getConcrete | ( | const Playa::Vector< double > & | tsfVec | ) | [static] |
Get a read-only Epetra_Vector
Definition at line 124 of file PlayaEpetraVector.cpp.
References epetraVec(), and Playa::Handle< PointerType >::ptr().
Referenced by Playa::MLOperator::apply(), Playa::IfpackOperator::apply(), Epetra::Epetra_PlayaOperator::Apply(), Epetra::Epetra_PlayaOperator::ApplyInverse(), Playa::epetraLeftScale(), Playa::epetraRightScale(), and Playa::EpetraGhostImporter::importView().
Epetra_Vector * EpetraVector::getConcretePtr | ( | Playa::Vector< double > & | tsfVec | ) | [static] |
Get a read-write Epetra_Vector pointer
Definition at line 145 of file PlayaEpetraVector.cpp.
References epetraVec(), and Playa::Handle< PointerType >::ptr().
Referenced by Playa::getEpetraDiagonal(), Playa::AztecSolver::solve(), and Playa::AmesosSolver::solve().
const double & EpetraVector::getElement | ( | int | globalIndex | ) | const |
Definition at line 74 of file PlayaEpetraVector.cpp.
References epetraVec().
Referenced by operator[]().
void EpetraVector::getElements | ( | const int * | globalIndices, | |
int | numElems, | |||
Teuchos::Array< double > & | elems | |||
) | const |
double EpetraVector::norm2 | ( | ) | const [virtual] |
Reimplemented from Playa::SingleChunkVector< double >.
Definition at line 191 of file PlayaEpetraVector.cpp.
References epetraVec_.
double & EpetraVector::operator[] | ( | int | globalIndex | ) | [virtual] |
writable access to the element at the given global index
Reimplemented from Playa::SingleChunkVector< double >.
Definition at line 53 of file PlayaEpetraVector.cpp.
References epetraVec().
virtual const double& Playa::EpetraVector::operator[] | ( | int | globalIndex | ) | const [inline, virtual] |
read the element at the given global index
Reimplemented from Playa::SingleChunkVector< double >.
Definition at line 49 of file PlayaEpetraVector.hpp.
References getElement().
void EpetraVector::print | ( | std::ostream & | os | ) | const [virtual] |
Print to a stream
Implements Playa::Printable.
Definition at line 118 of file PlayaEpetraVector.cpp.
References epetraVec().
void EpetraVector::setElement | ( | int | globalIndex, | |
const double & | value | |||
) | [virtual] |
set a single element
Implements Playa::LoadableVector< double >.
Definition at line 59 of file PlayaEpetraVector.cpp.
References epetraVec().
void EpetraVector::setElements | ( | int | numElems, | |
const int * | globalIndices, | |||
const double * | values | |||
) | [virtual] |
set a group of elements
Reimplemented from Playa::LoadableVector< double >.
Definition at line 93 of file PlayaEpetraVector.cpp.
References epetraVec().
RCP< const VectorSpaceBase<double> > Playa::EpetraVector::space | ( | ) | const [inline, virtual] |
Return the space in which this vector lives
Implements Playa::VectorBase< double >.
Definition at line 43 of file PlayaEpetraVector.hpp.
References Playa::Handle< PointerType >::ptr(), and vecSpace_.
void EpetraVector::update | ( | const double & | alpha, | |
const VectorBase< double > * | x, | |||
const double & | beta, | |||
const VectorBase< double > * | y, | |||
const double & | gamma | |||
) | [virtual] |
Reimplemented from Playa::SingleChunkVector< double >.
Definition at line 166 of file PlayaEpetraVector.cpp.
References epetraVec_.
void EpetraVector::update | ( | const double & | alpha, | |
const VectorBase< double > * | other, | |||
const double & | gamma | |||
) | [virtual] |
Reimplemented from Playa::SingleChunkVector< double >.
Definition at line 156 of file PlayaEpetraVector.cpp.
References epetraVec_.
RCP<Epetra_Vector> Playa::EpetraVector::epetraVec_ [private] |
Definition at line 142 of file PlayaEpetraVector.hpp.
Referenced by dataPtr(), dot(), epetraVec(), EpetraVector(), norm2(), and update().
int Playa::EpetraVector::numLocalElements_ [private] |
VectorSpace<double> Playa::EpetraVector::vecSpace_ [private] |