User-level vector class. More...
Public Member Functions | |
| VectorSpace< Scalar > | space () const |
| int | dim () const |
| Return the dimension of the vector. | |
| Vector< Scalar > | eval () const |
| bool | containsVector (const Thyra::VectorBase< Scalar > *vec) const |
| void | evalInto (Vector< Scalar > &other) const |
| void | addInto (Vector< Scalar > &other, TSFExtendedOps::LCSign sign) const |
| std::string | description () const |
| Describe the vector. | |
| void | print (std::ostream &os) const |
| Print to a stream using the Printable interface. | |
Constructors, Destructors, and Assignment Operators | |
| Vector () | |
| Empty ctor. | |
| Vector (Handleable< Thyra::VectorBase< Scalar > > *rawPtr) | |
| Construct a Vector<Scalar> with a raw pointer to a Thyra::VectorBase<Scalar> | |
| Vector (const RefCountPtr< Thyra::VectorBase< Scalar > > &smartPtr) | |
| Construct a Vector<Scalar> with a smart pointer to a Thyra::VectorBase<Scalar> | |
| template<class Node1 , class Node2 > | |
| Vector (const TSFExtendedOps::LC2< Scalar, Node1, Node2 > &x) | |
| Construct a vector from a 2-term LC. | |
| template<class Node > | |
| Vector (const TSFExtendedOps::OpTimesLC< Scalar, Node > &x) | |
| Construct a vector from an operator times a linear combination. | |
| template<class Node1 , class Node2 > | |
| Vector & | operator= (const TSFExtendedOps::LC2< Scalar, Node1, Node2 > &x) |
| Assign a linear combination of vectors to this vector. | |
| template<class Node > | |
| Vector & | operator= (const TSFExtendedOps::OpTimesLC< Scalar, Node > &x) |
| Assign a scaled linear combination to this vector. | |
ProductVector operations | |
| void | setBlock (int i, const Vector< Scalar > &v) |
| set block | |
| Vector< Scalar > | getBlock (int i) const |
| get block | |
Math operations | |
| Vector< Scalar > & | scale (const Scalar &alpha) |
| Multiply this vector by a constant scalar factor. | |
| Vector< Scalar > & | update (const Scalar &alpha, const Vector< Scalar > &x) |
| Add a scaled vector to this vector: | |
| Vector< Scalar > & | update (const Scalar &alpha, const Vector< Scalar > &x, const Scalar &gamma) |
| Add a scaled vector to this vector times a constant: | |
| Vector< Scalar > & | update (const Scalar &alpha, const Vector< Scalar > &x, const Scalar &beta, const Vector< Scalar > &y, const Scalar &gamma) |
| Add two scaled vectors to this vector times a constant: | |
| Vector< Scalar > & | acceptCopyOf (const Vector< Scalar > &x) |
| Copy the values of another vector into this vector. | |
| Vector< Scalar > | copy () const |
| Create a new vector that is a copy of this vector. | |
| Vector< Scalar > | dotStar (const Vector< Scalar > &other) const |
| Element-by-element product (Matlab dot-star operator) | |
| void | dotStarInto (const Vector< Scalar > &a, const Vector< Scalar > &b) const |
Write the elementwise product of and into <t>this. | |
| Vector< Scalar > | dotSlash (const Vector< Scalar > &other) const |
| Element-by-element division (Matlab dot-slash operator) | |
| Vector< Scalar > | reciprocal () const |
| Return element-by-element reciprocal as a new vector. | |
| Vector< Scalar > | abs () const |
| Return element-by-element absolute value as a new vector. | |
| Vector< Scalar > & | reciprocal () |
| Overwrite self with element-by-element reciprocal. | |
| Vector< Scalar > & | abs () |
| Overwrite self with element-by-element absolute value. | |
| void | setToConstant (const Scalar &alpha) |
| Set all elements to a constant value. | |
| Scalar | dot (const Vector< Scalar > &other) const |
| Take dot product with another vector. | |
| Scalar | operator* (const Vector< Scalar > &other) const |
| Overloaded operator for dot product. | |
| Scalar | norm1 () const |
| Compute the 1-norm of this vector. | |
| Scalar | norm2 () const |
| Compute the 2-norm of this vector. | |
| Scalar | norm2 (const Vector< Scalar > &weights) const |
| Compute the weighted 2-norm of this vector. | |
| Scalar | normInf () const |
| Compute the infinity-norm of this vector. | |
| void | zero () |
| Set all elements to zero. | |
| Scalar | max () const |
| Retuen the max element. | |
| Scalar | max (int &index) const |
| Return the max element and the corresponding index. | |
| Scalar | max (const Scalar &bound, int &index) const |
| Return the max element less than bound and the corresponding index. | |
| Scalar | min () const |
| Retuen the min element. | |
| Scalar | min (int &index) const |
| Return the min element and the corresponding index. | |
| Scalar | min (const Scalar &bound, int &index) const |
| Return the min element greater than bound and the corresponding index. | |
Element loading interface | |
| void | setElement (OrdType globalIndex, const Scalar &value) |
| set a single element at the given global index | |
| void | addToElement (OrdType globalIndex, const Scalar &value) |
| add to the existing value of a single element at the given global index | |
| void | setElements (OrdType numElems, const OrdType *globalIndices, const Scalar *values) |
| set a group of elements | |
| void | addToElements (OrdType numElems, const OrdType *globalIndices, const Scalar *values) |
| add to a group of elements | |
| void | finalizeAssembly () |
| Do whatever finalization steps are needed by the implementation, for instance, synchronizing border elements. | |
Element access interface | |
| Scalar | getElement (OrdType globalIndex) const |
| get the element at the given global index | |
| void | getElements (const int *globalIndices, int numElems, Teuchos::Array< Scalar > &elems) const |
| Get a batch of elements. | |
| const Scalar & | operator[] (const SequentialIterator< Scalar > &index) const |
| const bracket operator | |
| Scalar & | operator[] (const SequentialIterator< Scalar > &index) |
| non - const bracket operator | |
Raw data access interface | |
| const Scalar * | dataPtr () const |
| Scalar * | dataPtr () |
Static Public Member Functions | |
| static RCP< Time > & | opTimer () |
| Get a stopwtach for timing vector operations. | |
Private Member Functions | |
| const AccessibleVector< Scalar > * | castToAccessible () const |
| Cross-cast vector pointer to an accessible vector. | |
| LoadableVector< Scalar > * | castToLoadable () |
| Cross-cast vector to a loadable vector. | |
| const RawDataAccessibleVector < Scalar > * | castToRawDataAccessible () const |
| Cross-cast vector pointer to a raw data accessible vector. | |
| RawDataAccessibleVector< Scalar > * | castToRawDataAccessible () |
| Cross-cast vector to a raw data accessible vector. | |
| void | boundscheck (OrdType i, int dim) const |
| Test for valid index. | |
| const Scalar & | localElement (const OrdType &blockIndex, const OrdType &indexInBlock) const |
| Scalar & | localElement (const OrdType &blockIndex, const OrdType &indexInBlock) |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar > | |
| void | randomize (Vector< Scalar > &x) |
User-level vector class.
Ordinarily, you will never construct a Vector directly from a derived type. Rather, the createMember() method of VectorSpace is used to build a vector of the appropriate type, for example,
VectorType<double> vecType = new EpetraVectorType(); int dimension = 100; VectorSpace<double> space = vecType.createSpace(dimension); Vector<double> x = space.createMember(); Vector<double> y = space.createMember();
This hides from you all the ugly details of creating a particular concrete type.
You will frequently create an empty vector to be filled in later, for example,
Vector<double> y;
Note that this vector isn't just empty, it's null. Not only does it have no values assigned, it does not have a concrete type. An call a method on a null vector will result in an error. What you <it>can</it> do with a null vector is
Vector<double> x = space.createVector(); Vector<Scalar> y; y = x.copy();
Vector<Scalar> z = a*x + b*y;
Definition at line 105 of file TSFVectorDecl.hpp.
| TSFExtended::Vector< Scalar >::Vector | ( | ) | [inline] |
Empty ctor.
Definition at line 110 of file TSFVectorDecl.hpp.
| TSFExtended::Vector< Scalar >::Vector | ( | Handleable< Thyra::VectorBase< Scalar > > * | rawPtr | ) | [inline] |
Construct a Vector<Scalar> with a raw pointer to a Thyra::VectorBase<Scalar>
Definition at line 110 of file TSFVectorDecl.hpp.
| TSFExtended::Vector< Scalar >::Vector | ( | const RefCountPtr< Thyra::VectorBase< Scalar > > & | smartPtr | ) | [inline] |
Construct a Vector<Scalar> with a smart pointer to a Thyra::VectorBase<Scalar>
Definition at line 110 of file TSFVectorDecl.hpp.
| TSFExtended::Vector< Scalar >::Vector | ( | const TSFExtendedOps::LC2< Scalar, Node1, Node2 > & | x | ) | [inline] |
Construct a vector from a 2-term LC.
Definition at line 574 of file TSFLinearCombinationImpl.hpp.
| TSFExtended::Vector< Scalar >::Vector | ( | const TSFExtendedOps::OpTimesLC< Scalar, Node > & | x | ) | [inline] |
Construct a vector from an operator times a linear combination.
Definition at line 580 of file TSFLinearCombinationImpl.hpp.
| Vector< Scalar > TSFExtended::Vector< Scalar >::abs | ( | ) | const [inline] |
Return element-by-element absolute value as a new vector.
Definition at line 298 of file TSFVectorImpl.hpp.
References TSFExtended::Vector< Scalar >::abs(), and TSFExtended::Vector< Scalar >::acceptCopyOf().
Referenced by TSFExtended::Vector< Scalar >::abs().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::abs | ( | ) | [inline] |
Overwrite self with element-by-element absolute value.
Definition at line 330 of file TSFVectorImpl.hpp.
| Vector< Scalar > & TSFExtended::Vector< Scalar >::acceptCopyOf | ( | const Vector< Scalar > & | x | ) | [inline] |
Copy the values of another vector into this vector.
this = x
Definition at line 223 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr(), and TSFExtended::Vector< Scalar >::space().
Referenced by TSFExtended::Vector< Scalar >::abs(), TSFExtended::SimpleIdentityOp< Scalar >::applyOp(), TSFExtended::SimpleDiagonalOp< Scalar >::applyOp(), TSFExtended::SimpleComposedOp< Scalar >::applyOp(), TSFExtended::SimpleAddedOp< Scalar >::applyOp(), Sundance::NLOp::computeFunctionValue(), Sundance::NLOp::computeJacobianAndFunction(), TSFExtended::Vector< Scalar >::copy(), TSFExtended::Vector< double >::evalInto(), and TSFExtended::Vector< Scalar >::reciprocal().
| void TSFExtended::Vector< Scalar >::addInto | ( | Vector< Scalar > & | other, |
| TSFExtendedOps::LCSign | sign | ||
| ) | const [inline] |
Definition at line 377 of file TSFVectorDecl.hpp.
| void TSFExtended::Vector< Scalar >::addToElement | ( | OrdType | globalIndex, |
| const Scalar & | value | ||
| ) | [inline] |
add to the existing value of a single element at the given global index
Definition at line 801 of file TSFVectorImpl.hpp.
References TSFExtended::Vector< Scalar >::addToElement().
Referenced by TSFExtended::Vector< Scalar >::addToElement(), TSFExtended::LoadableBlockVector::addToElement(), TSFExtended::MultiVectorOperator< Scalar >::generalApply(), and Sundance::AToCDensitySampler::sample().
| void TSFExtended::Vector< Scalar >::addToElements | ( | OrdType | numElems, |
| const OrdType * | globalIndices, | ||
| const Scalar * | values | ||
| ) | [inline] |
add to a group of elements
Definition at line 317 of file TSFVectorDecl.hpp.
| void TSFExtended::Vector< Scalar >::boundscheck | ( | OrdType | i, |
| int | dim | ||
| ) | const [inline, private] |
Test for valid index.
Definition at line 875 of file TSFVectorImpl.hpp.
| const AccessibleVector< Scalar > * TSFExtended::Vector< Scalar >::castToAccessible | ( | ) | const [inline, private] |
Cross-cast vector pointer to an accessible vector.
Definition at line 131 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::Vector< double >::getElements().
| LoadableVector< Scalar > * TSFExtended::Vector< Scalar >::castToLoadable | ( | ) | [inline, private] |
Cross-cast vector to a loadable vector.
Definition at line 143 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::Vector< double >::addToElements(), TSFExtended::Vector< double >::finalizeAssembly(), and TSFExtended::Vector< double >::setElements().
| RawDataAccessibleVector< Scalar > * TSFExtended::Vector< Scalar >::castToRawDataAccessible | ( | ) | [inline, private] |
Cross-cast vector to a raw data accessible vector.
Definition at line 169 of file TSFVectorImpl.hpp.
| const RawDataAccessibleVector< Scalar > * TSFExtended::Vector< Scalar >::castToRawDataAccessible | ( | ) | const [inline, private] |
Cross-cast vector pointer to a raw data accessible vector.
Definition at line 156 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::Vector< double >::dataPtr().
| bool TSFExtended::Vector< Scalar >::containsVector | ( | const Thyra::VectorBase< Scalar > * | vec | ) | const [inline] |
Definition at line 372 of file TSFVectorDecl.hpp.
| Vector< Scalar > TSFExtended::Vector< Scalar >::copy | ( | ) | const [inline] |
Create a new vector that is a copy of this vector.
Definition at line 238 of file TSFVectorImpl.hpp.
References TSFExtended::Vector< Scalar >::acceptCopyOf().
Referenced by TSFExtended::SimpleComposedOp< Scalar >::applyOp(), TSFExtended::SimpleAddedOp< Scalar >::applyOp(), TSFExtended::denseSolve(), TSFExtended::Vector< double >::eval(), Sundance::FunctionalEvaluator::fdGradientCheck(), NOX::TSF::Vector::operator=(), TSFExtended::LinearCombinationTester< Scalar >::selfModifyingOpTests(), TSFExtended::NonlinearOperatorBase< double >::setEvalPt(), Sundance::NLOp::setInitialGuess(), TSFExtended::BelosSolver::solve(), TSFExtended::AztecSolver::solve(), TSFExtended::AmesosSolver::solve(), Sundance::StochBlockJacobiSolver::solve(), TSFExtended::GMRESSolver< Scalar >::solveUnprec(), TSFExtended::BICGSTABSolver< Scalar >::solveUnprec(), and NOX::TSF::Vector::Vector().
| const Scalar* TSFExtended::Vector< Scalar >::dataPtr | ( | ) | const [inline] |
Definition at line 350 of file TSFVectorDecl.hpp.
| Scalar* TSFExtended::Vector< Scalar >::dataPtr | ( | ) | [inline] |
Definition at line 354 of file TSFVectorDecl.hpp.
| std::string TSFExtended::Vector< Scalar >::description | ( | ) | const [inline] |
Describe the vector.
Reimplemented from Sundance::Handle< Thyra::VectorBase< Scalar > >.
Definition at line 383 of file TSFVectorDecl.hpp.
Referenced by TSFExtended::LinearOperator< Scalar >::apply(), and TSFExtended::LinearOperator< Scalar >::applyTranspose().
| int TSFExtended::Vector< Scalar >::dim | ( | ) | const [inline] |
Return the dimension of the vector.
Definition at line 134 of file TSFVectorDecl.hpp.
| Scalar TSFExtended::Vector< Scalar >::dot | ( | const Vector< Scalar > & | other | ) | const [inline] |
Take dot product with another vector.
Definition at line 405 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
Referenced by TSFExtended::MultiVectorOperator< Scalar >::generalApply(), TSFExtended::GMRESSolver< Scalar >::solveUnprec(), and TSFExtended::BICGSTABSolver< Scalar >::solveUnprec().
| Vector< Scalar > TSFExtended::Vector< Scalar >::dotSlash | ( | const Vector< Scalar > & | other | ) | const [inline] |
Element-by-element division (Matlab dot-slash operator)
Definition at line 281 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
Referenced by TSFExtended::VectorTester< Scalar >::dotSlashTest().
| Vector< Scalar > TSFExtended::Vector< Scalar >::dotStar | ( | const Vector< Scalar > & | other | ) | const [inline] |
Element-by-element product (Matlab dot-star operator)
Definition at line 252 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
Referenced by TSFExtended::SimpleDiagonalOp< Scalar >::applyOp(), TSFExtended::CompoundTester< Scalar >::diagTest(), and TSFExtended::VectorTester< Scalar >::dotStarTest().
| void TSFExtended::Vector< Scalar >::dotStarInto | ( | const Vector< Scalar > & | a, |
| const Vector< Scalar > & | b | ||
| ) | const [inline] |
Write the elementwise product of
and
into <t>this.
</t>
Definition at line 267 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
| Vector<Scalar> TSFExtended::Vector< Scalar >::eval | ( | ) | const [inline] |
Definition at line 370 of file TSFVectorDecl.hpp.
Referenced by TSFExtendedOps::LC2< Scalar, Node1, Node2 >::eval(), and TSFExtendedOps::OpTimesLC< Scalar, Node >::eval().
| void TSFExtended::Vector< Scalar >::evalInto | ( | Vector< Scalar > & | other | ) | const [inline] |
Definition at line 375 of file TSFVectorDecl.hpp.
| void TSFExtended::Vector< Scalar >::finalizeAssembly | ( | ) | [inline] |
Do whatever finalization steps are needed by the implementation, for instance, synchronizing border elements.
The default implementation is a no-op.
Definition at line 324 of file TSFVectorDecl.hpp.
| Vector< Scalar > TSFExtended::Vector< Scalar >::getBlock | ( | int | i | ) | const |
get block
Definition at line 72 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::SimpleBlockOp< Scalar >::applyOp(), TSFExtended::InverseLTIOp< Scalar >::applyOp(), TSFExtended::PartitionedToMonolithicConverter::convert(), Sundance::FunctionalEvaluator::evalGradient(), TSFExtended::LoadableBlockVector::LoadableBlockVector(), TSFExtended::BlockTriangularSolver< Scalar >::solve(), and Sundance::VectorFillingAssemblyKernel::VectorFillingAssemblyKernel().
| Scalar TSFExtended::Vector< Scalar >::getElement | ( | OrdType | globalIndex | ) | const [inline] |
get the element at the given global index
Definition at line 580 of file TSFVectorImpl.hpp.
References TSFExtended::Vector< Scalar >::getElement().
Referenced by Sundance::AToCDensitySampler::addToCounts(), TSFExtended::MultiVectorOperator< Scalar >::generalApply(), TSFExtended::Vector< Scalar >::getElement(), TSFExtended::makeEpetraDiagonalMatrix(), Sundance::AToCDensitySampler::sample(), TSFExtended::PoissonBoltzmannJacobian::setEvalPoint(), Sundance::unfoldPeriodicDiscreteFunction(), and Sundance::CToAInterpolator::updateField().
| void TSFExtended::Vector< Scalar >::getElements | ( | const int * | globalIndices, |
| int | numElems, | ||
| Teuchos::Array< Scalar > & | elems | ||
| ) | const [inline] |
Get a batch of elements.
Definition at line 334 of file TSFVectorDecl.hpp.
| const Scalar & TSFExtended::Vector< Scalar >::localElement | ( | const OrdType & | blockIndex, |
| const OrdType & | indexInBlock | ||
| ) | const [inline, private] |
Definition at line 741 of file TSFVectorImpl.hpp.
| Scalar & TSFExtended::Vector< Scalar >::localElement | ( | const OrdType & | blockIndex, |
| const OrdType & | indexInBlock | ||
| ) | [inline, private] |
Definition at line 767 of file TSFVectorImpl.hpp.
References TSFExtended::RawDataAccessibleVector< Scalar >::dataPtr().
| Scalar TSFExtended::Vector< Scalar >::max | ( | int & | index | ) | const [inline] |
Return the max element and the corresponding index.
Definition at line 507 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::max | ( | ) | const [inline] |
Retuen the max element.
Definition at line 498 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::max | ( | const Scalar & | bound, |
| int & | index | ||
| ) | const [inline] |
Return the max element less than bound and the corresponding index.
Definition at line 522 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::min | ( | const Scalar & | bound, |
| int & | index | ||
| ) | const [inline] |
Return the min element greater than bound and the corresponding index.
Definition at line 562 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::min | ( | int & | index | ) | const [inline] |
Return the min element and the corresponding index.
Definition at line 547 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::min | ( | ) | const [inline] |
Retuen the min element.
Definition at line 538 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::norm1 | ( | ) | const [inline] |
Compute the 1-norm of this vector.
Definition at line 425 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::norm2 | ( | const Vector< Scalar > & | weights | ) | const [inline] |
Compute the weighted 2-norm of this vector.
Definition at line 448 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
| Scalar TSFExtended::Vector< Scalar >::norm2 | ( | ) | const [inline] |
Compute the 2-norm of this vector.
Definition at line 437 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::LinearCombinationTester< Scalar >::selfModifyingOpTests(), TSFExtended::GMRESSolver< Scalar >::solveUnprec(), and TSFExtended::BICGSTABSolver< Scalar >::solveUnprec().
| Scalar TSFExtended::Vector< Scalar >::normInf | ( | ) | const [inline] |
Compute the infinity-norm of this vector.
Definition at line 461 of file TSFVectorImpl.hpp.
| Scalar TSFExtended::Vector< Scalar >::operator* | ( | const Vector< Scalar > & | other | ) | const [inline] |
Overloaded operator for dot product.
Definition at line 415 of file TSFVectorImpl.hpp.
| Vector< Scalar > & TSFExtended::Vector< Scalar >::operator= | ( | const TSFExtendedOps::OpTimesLC< Scalar, Node > & | x | ) | [inline] |
Assign a scaled linear combination to this vector.
Definition at line 523 of file TSFLinearCombinationImpl.hpp.
References TSFExtendedOps::OpTimesLC< Scalar, Node >::containsVector(), TSFExtendedOps::OpTimesLC< Scalar, Node >::eval(), and TSFExtendedOps::OpTimesLC< Scalar, Node >::evalInto().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::operator= | ( | const TSFExtendedOps::LC2< Scalar, Node1, Node2 > & | x | ) | [inline] |
Assign a linear combination of vectors to this vector.
Definition at line 545 of file TSFLinearCombinationImpl.hpp.
References TSFExtendedOps::LC2< Scalar, Node1, Node2 >::containsVector(), TSFExtendedOps::LC2< Scalar, Node1, Node2 >::eval(), and TSFExtendedOps::LC2< Scalar, Node1, Node2 >::evalInto().
| Scalar & TSFExtended::Vector< Scalar >::operator[] | ( | const SequentialIterator< Scalar > & | index | ) | [inline] |
non - const bracket operator
Definition at line 718 of file TSFVectorImpl.hpp.
References TSFExtended::SequentialIterator< Scalar >::blockIndex(), and TSFExtended::SequentialIterator< Scalar >::indexInBlock().
| const Scalar & TSFExtended::Vector< Scalar >::operator[] | ( | const SequentialIterator< Scalar > & | index | ) | const [inline] |
const bracket operator
Definition at line 730 of file TSFVectorImpl.hpp.
References TSFExtended::SequentialIterator< Scalar >::blockIndex(), and TSFExtended::SequentialIterator< Scalar >::indexInBlock().
| static RCP<Time>& TSFExtended::Vector< Scalar >::opTimer | ( | ) | [inline, static] |
Get a stopwtach for timing vector operations.
Definition at line 361 of file TSFVectorDecl.hpp.
| void TSFExtended::Vector< Scalar >::print | ( | std::ostream & | os | ) | const |
Print to a stream using the Printable interface.
If the contents of the handle cannot be downcasted or crosscasted to a Printable*, an exception will be thrown
Reimplemented from Sundance::Handle< Thyra::VectorBase< Scalar > >.
Definition at line 92 of file TSFVectorImpl.hpp.
References Sundance::Printable::print().
Referenced by NOX::TSF::Group::applyJacobianInverse(), TSFExtended::NonlinearOperatorBase< double >::getFunctionValue(), and TSFExtended::NonlinearOperatorBase< double >::setEvalPt().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::reciprocal | ( | ) | [inline] |
Overwrite self with element-by-element reciprocal.
Definition at line 345 of file TSFVectorImpl.hpp.
| Vector< Scalar > TSFExtended::Vector< Scalar >::reciprocal | ( | ) | const [inline] |
Return element-by-element reciprocal as a new vector.
Definition at line 315 of file TSFVectorImpl.hpp.
References TSFExtended::Vector< Scalar >::acceptCopyOf(), and TSFExtended::Vector< Scalar >::reciprocal().
Referenced by TSFExtended::Vector< Scalar >::reciprocal().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::scale | ( | const Scalar & | alpha | ) | [inline] |
Multiply this vector by a constant scalar factor.
this = alpha * this;
Definition at line 188 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::SimpleScaledOp< Scalar >::applyOp(), TSFExtendedOps::OpTimesLC< Scalar, Node >::eval(), TSFExtendedOps::OpTimesLC< Scalar, Node >::evalInto(), TSFExtended::SimplifiedLinearOpBase< Scalar >::generalApply(), and TSFExtended::MultiVectorOperator< Scalar >::generalApply().
| void TSFExtended::Vector< Scalar >::setBlock | ( | int | i, |
| const Vector< Scalar > & | v | ||
| ) |
set block
Definition at line 59 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
Referenced by TSFExtended::InverseLTIOp< Scalar >::applyOp(), Sundance::Assembler::convertToMonolithicVector(), and TSFExtended::BlockTriangularSolver< Scalar >::solve().
| void TSFExtended::Vector< Scalar >::setElement | ( | OrdType | globalIndex, |
| const Scalar & | value | ||
| ) | [inline] |
set a single element at the given global index
Definition at line 649 of file TSFVectorImpl.hpp.
References TSFExtended::Vector< Scalar >::setElement().
Referenced by TSFExtended::PoissonBoltzmannOp::computeJacobianAndFunction(), TSFExtended::PartitionedToMonolithicConverter::convert(), TSFExtended::PoissonBoltzmannOp::exactSoln(), Sundance::FunctionalEvaluator::fdGradientCheck(), Sundance::AToCDensitySampler::init(), Sundance::readNodalFields(), Sundance::readSerialGridField(), TSFExtended::Vector< Scalar >::setElement(), TSFExtended::LoadableBlockVector::setElement(), and Sundance::unfoldPeriodicDiscreteFunction().
| void TSFExtended::Vector< Scalar >::setElements | ( | OrdType | numElems, |
| const OrdType * | globalIndices, | ||
| const Scalar * | values | ||
| ) | [inline] |
set a group of elements
Definition at line 312 of file TSFVectorDecl.hpp.
| void TSFExtended::Vector< Scalar >::setToConstant | ( | const Scalar & | alpha | ) | [inline] |
Set all elements to a constant value.
Definition at line 485 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::VectorSpace< Scalar >::createMember(), Sundance::DiscreteFunctionData::DiscreteFunctionData(), TSFExtended::PoissonBoltzmannOp::getInitialGuess(), Sundance::LinearEigenproblem::lumpedOperator(), and Anasazi::MultiVecTraits< double, SimpleMV >::MvTimesMatAddMv().
| VectorSpace<Scalar> TSFExtended::Vector< Scalar >::space | ( | ) | const [inline] |
Definition at line 130 of file TSFVectorDecl.hpp.
Referenced by TSFExtended::Vector< Scalar >::acceptCopyOf(), TSFExtended::InverseLTIOp< Scalar >::applyOp(), TSFExtended::VectorSpace< Scalar >::contains(), TSFExtended::PartitionedToMonolithicConverter::convert(), Sundance::FunctionalEvaluator::fdGradientCheck(), TSFExtended::LoadableBlockVector::LoadableBlockVector(), TSFExtended::makeEpetraDiagonalMatrix(), TSFExtended::randomize(), TSFExtended::KrylovSolver< Scalar >::solve(), TSFExtended::BlockTriangularSolver< Scalar >::solve(), TSFExtended::GMRESSolver< Scalar >::solveUnprec(), and TSFExtended::BICGSTABSolver< Scalar >::solveUnprec().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::update | ( | const Scalar & | alpha, |
| const Vector< Scalar > & | x, | ||
| const Scalar & | gamma | ||
| ) | [inline] |
Add a scaled vector to this vector times a constant:
this = gamma*this + alpha*x
Definition at line 357 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::update | ( | const Scalar & | alpha, |
| const Vector< Scalar > & | x, | ||
| const Scalar & | beta, | ||
| const Vector< Scalar > & | y, | ||
| const Scalar & | gamma | ||
| ) | [inline] |
Add two scaled vectors to this vector times a constant:
this = alpha*x + beta*y + gamma*this
Definition at line 377 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
| Vector< Scalar > & TSFExtended::Vector< Scalar >::update | ( | const Scalar & | alpha, |
| const Vector< Scalar > & | x | ||
| ) | [inline] |
Add a scaled vector to this vector:
this = this + alpha*x
Definition at line 202 of file TSFVectorImpl.hpp.
References Sundance::Handle< Thyra::VectorBase< Scalar > >::ptr().
Referenced by TSFExtended::Vector< double >::addInto(), TSFExtendedOps::OpTimesLC< Scalar, Node >::addInto(), TSFExtended::SimplifiedLinearOpBase< Scalar >::generalApply(), and TSFExtended::MultiVectorOperator< Scalar >::generalApply().
| void TSFExtended::Vector< Scalar >::zero | ( | ) | [inline] |
Set all elements to zero.
Definition at line 473 of file TSFVectorImpl.hpp.
Referenced by TSFExtended::SimpleZeroOp< Scalar >::applyOp(), TSFExtended::SimpleBlockOp< Scalar >::applyOp(), TSFExtended::SimpleAddedOp< Scalar >::applyOp(), TSFExtended::MultiVectorOperator< Scalar >::generalApply(), Sundance::StochBlockJacobiSolver::solve(), TSFExtended::GMRESSolver< Scalar >::solveUnprec(), TSFExtended::BICGSTABSolver< Scalar >::solveUnprec(), TSFExtended::VectorTester< Scalar >::sumTest(), and Sundance::VectorFillingAssemblyKernel::VectorFillingAssemblyKernel().
| void randomize | ( | Vector< Scalar > & | x | ) | [related] |
Definition at line 43 of file TSFVectorOpsImpl.hpp.