Implementation of the Handle for the Vector class. More...
Public Member Functions | |
| VectorSpace () | |
| Empty ctor. | |
| VectorSpace (Handleable< const Thyra::VectorSpaceBase< Scalar > > *rawPtr) | |
| Construct a VectorSpace<Scalar> with a raw pointer to a const Thyra::VectorSpaceBase<Scalar> | |
| VectorSpace (const RefCountPtr< const Thyra::VectorSpaceBase< Scalar > > &smartPtr) | |
| Construct a VectorSpace<Scalar> with a smart pointer to a const Thyra::VectorSpaceBase<Scalar> | |
| Vector< Scalar > | createMember () const |
| Create a new element of this vector space. | |
| int | dim () const |
| Return the dimension of the space. | |
| int | lowestLocallyOwnedIndex () const |
| Return the lowest global index accessible on this processor. | |
| int | numLocalElements () const |
| Return the number of elements owned by this processor. | |
| bool | isCompatible (const VectorSpace< Scalar > &vecSpc) const |
| Check compatibility with another space. | |
| bool | operator== (const VectorSpace< Scalar > &other) const |
| test equality between two spaces | |
| bool | operator!= (const VectorSpace< Scalar > &other) const |
| test inequality of two spaces | |
| bool | contains (const Vector< Scalar > &vec) const |
| test whether the space contains a given vector | |
| int | numBlocks () const |
| return the number of subblocks. | |
| VectorSpace< Scalar > | getBlock (int i) const |
| get the i-th subblock | |
| void | setBlock (int i, const VectorSpace< Scalar > &space) |
| set the i-th subblock | |
| SequentialIterator< Scalar > | begin () const |
| SequentialIterator< Scalar > | end () const |
| bool | advanceIndex (OrdType &blockIndex, OrdType &indexInCurrentBlock, OrdType &globalIndex) const |
Implementation of the Handle for the Vector class.
This wraps a TSFCoreVector
Definition at line 50 of file TSFVectorSpaceDecl.hpp.
| TSFExtended::VectorSpace< Scalar >::VectorSpace | ( | ) | [inline] |
Empty ctor.
Definition at line 53 of file TSFVectorSpaceDecl.hpp.
| TSFExtended::VectorSpace< Scalar >::VectorSpace | ( | Handleable< const Thyra::VectorSpaceBase< Scalar > > * | rawPtr | ) | [inline] |
Construct a VectorSpace<Scalar> with a raw pointer to a const Thyra::VectorSpaceBase<Scalar>
Definition at line 53 of file TSFVectorSpaceDecl.hpp.
| TSFExtended::VectorSpace< Scalar >::VectorSpace | ( | const RefCountPtr< const Thyra::VectorSpaceBase< Scalar > > & | smartPtr | ) | [inline] |
Construct a VectorSpace<Scalar> with a smart pointer to a const Thyra::VectorSpaceBase<Scalar>
Definition at line 53 of file TSFVectorSpaceDecl.hpp.
| bool VectorSpace::advanceIndex | ( | OrdType & | blockIndex, |
| OrdType & | indexInCurrentBlock, | ||
| OrdType & | globalIndex | ||
| ) | const [inline] |
Definition at line 247 of file TSFVectorSpaceImpl.hpp.
| SequentialIterator< Scalar > VectorSpace::begin | ( | ) | const [inline] |
Definition at line 214 of file TSFVectorSpaceImpl.hpp.
Referenced by TSFExtended::PartitionedToMonolithicConverter::convert(), Sundance::FunctionalEvaluator::fdGradientCheck(), TSFExtended::randomize(), and TSFExtended::tsfVectorSpace2EpetraMap().
| bool VectorSpace::contains | ( | const Vector< Scalar > & | vec | ) | const |
test whether the space contains a given vector
Definition at line 158 of file TSFVectorSpaceImpl.hpp.
References TSFExtended::Vector< Scalar >::space().
| Vector< Scalar > VectorSpace::createMember | ( | ) | const |
Create a new element of this vector space.
Definition at line 76 of file TSFVectorSpaceImpl.hpp.
References createVecTimer(), and TSFExtended::Vector< Scalar >::setToConstant().
Referenced by TSFExtended::PoissonBoltzmannOp::computeJacobianAndFunction(), Sundance::Assembler::configureVector(), Sundance::Assembler::configureVectorBlock(), Sundance::Assembler::convertToMonolithicVector(), Sundance::DiscreteSpace::createVector(), TSFExtended::denseSVD(), TSFExtended::PoissonBoltzmannOp::exactSoln(), TSFExtended::getEpetraDiagonal(), TSFExtended::PoissonBoltzmannOp::getInitialGuess(), Sundance::LinearEigenproblem::lumpedOperator(), TSFExtended::InitTraits< SimpleMV, LinearOperator< double > >::makeMV(), TSFExtended::LinearCombinationTester< Scalar >::nonModifyingOpTests(), TSFExtended::LinearCombinationTester< Scalar >::selfModifyingOpTests(), and TSFExtended::AnasaziEigensolver< Scalar >::solve().
| int TSFExtended::VectorSpace< Scalar >::dim | ( | ) | const [inline] |
Return the dimension of the space.
Definition at line 59 of file TSFVectorSpaceDecl.hpp.
Referenced by TSFExtended::PoissonBoltzmannOp::computeJacobianAndFunction(), TSFExtended::LTIProblemFactoryBase< Scalar >::createBigF(), Sundance::FunctionalEvaluator::fdGradientCheck(), TSFExtended::HeatOperator1D::HeatOperator1D(), TSFExtended::MatrixLaplacian1D::init(), and TSFExtended::tsfVectorSpace2EpetraMap().
| SequentialIterator< Scalar > VectorSpace::end | ( | ) | const [inline] |
Definition at line 237 of file TSFVectorSpaceImpl.hpp.
Referenced by TSFExtended::PartitionedToMonolithicConverter::convert(), Sundance::FunctionalEvaluator::fdGradientCheck(), TSFExtended::randomize(), and TSFExtended::tsfVectorSpace2EpetraMap().
| VectorSpace< Scalar > VectorSpace::getBlock | ( | int | i | ) | const |
get the i-th subblock
Definition at line 181 of file TSFVectorSpaceImpl.hpp.
Referenced by TSFExtended::getComm(), and TSFExtended::SimpleBlockOp< Scalar >::SimpleBlockOp().
| bool VectorSpace::isCompatible | ( | const VectorSpace< Scalar > & | vecSpc | ) | const |
Check compatibility with another space.
Implementation note: we don't know if the argument vec space is a handle to another vector space or the contents of a handle, and we want the operation to work the same in either case. We can make this work as follows: have the argument check compatibility with the contents of this handle. If the argument is a handle, the process will be repeated, interchanging places again so that both handles are dereferenced. If the argument is not a handle, then it ends up comparing to the concrete contents of this handle, giving the same results.
Definition at line 145 of file TSFVectorSpaceImpl.hpp.
References Sundance::Handle< const Thyra::VectorSpaceBase< Scalar > >::ptr().
| int VectorSpace::lowestLocallyOwnedIndex | ( | ) | const |
Return the lowest global index accessible on this processor.
Definition at line 88 of file TSFVectorSpaceImpl.hpp.
Referenced by TSFExtended::PoissonBoltzmannOp::computeJacobianAndFunction(), TSFExtended::PoissonBoltzmannOp::exactSoln(), Sundance::FunctionalEvaluator::fdGradientCheck(), TSFExtended::makeEpetraDiagonalMatrix(), TSFExtended::PartitionedToMonolithicConverter::PartitionedToMonolithicConverter(), and TSFExtended::PoissonBoltzmannOp::PoissonBoltzmannOp().
| int VectorSpace::numBlocks | ( | ) | const |
return the number of subblocks.
Definition at line 166 of file TSFVectorSpaceImpl.hpp.
Referenced by TSFExtended::PartitionedToMonolithicConverter::convert(), TSFExtended::getComm(), TSFExtended::LoadableBlockVector::LoadableBlockVector(), and TSFExtended::SimpleBlockOp< Scalar >::SimpleBlockOp().
| int VectorSpace::numLocalElements | ( | ) | const |
Return the number of elements owned by this processor.
Definition at line 110 of file TSFVectorSpaceImpl.hpp.
Referenced by TSFExtended::PoissonBoltzmannOp::computeJacobianAndFunction(), TSFExtended::PoissonBoltzmannOp::exactSoln(), Sundance::FunctionalEvaluator::fdGradientCheck(), TSFExtended::makeEpetraDiagonalMatrix(), TSFExtended::PartitionedMatrixFactory::PartitionedMatrixFactory(), TSFExtended::PartitionedToMonolithicConverter::PartitionedToMonolithicConverter(), and TSFExtended::PoissonBoltzmannOp::PoissonBoltzmannOp().
| bool VectorSpace::operator!= | ( | const VectorSpace< Scalar > & | other | ) | const |
test inequality of two spaces
Definition at line 67 of file TSFVectorSpaceImpl.hpp.
| bool VectorSpace::operator== | ( | const VectorSpace< Scalar > & | other | ) | const |
test equality between two spaces
Definition at line 59 of file TSFVectorSpaceImpl.hpp.
| void TSFExtended::VectorSpace< Scalar >::setBlock | ( | int | i, |
| const VectorSpace< Scalar > & | space | ||
| ) |
set the i-th subblock