VectorBase implementation of serial vectors.
More...
#include <Thyra_SerialVectorStdDecl.hpp>
Inheritance diagram for Thyra::SerialVectorStd< Scalar >:
Constructors/initializers | |
| SerialVectorStd (const Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > &vecSpc) | |
Calls this->initialize(vecSpc). | |
| SerialVectorStd (const Index dim=0) | |
Calls this->initialize(dim). | |
| SerialVectorStd (const Teuchos::RefCountPtr< Scalar > &v, const Index vs, const Index dim, const Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > &vecSpc=Teuchos::null) | |
Calls this->initialize(v,vs,dim,vecSpc). | |
| void | initialize (const Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > &vecSpc) |
Call this->initialize(v,vs,vecSpc) with internally dynamically allocated data v. | |
| void | initialize (const Index dim) |
Call this->initialize(v,vs,true) with internally dynamically allocated data v. | |
| virtual void | initialize (const Teuchos::RefCountPtr< Scalar > &v, const Index vs, const Index dim, const Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > &vecSpc=Teuchos::null) |
| Initialize with storage. | |
Accessors (inlined for minimal overhead) | |
| Teuchos::RefCountPtr< Scalar > | getRCPtr () |
Return non-const smart pointer to underlying data. | |
| Teuchos::RefCountPtr< const Scalar > | getRCPtr () const |
Return const smart pointer to underlying data. | |
| Scalar * | getPtr () |
Return non-const raw pointer to underlying data. | |
| const Scalar * | getPtr () const |
Return const raw pointer to underlying data. | |
| Index | getStride () const |
Return the stride between entries returned from getPtr(). | |
| Index | getDim () const |
| Inline call to return dimension. | |
Overridden from SerialVectorBase | |
| void | getData (Scalar **values, Index *stride) |
| | |
| void | commitData (Scalar **values) |
| | |
| void | getData (const Scalar **values, Index *stride) const |
| | |
| void | freeData (const Scalar **values) const |
| | |
Overridden from VectorBase | |
| Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > | space () const |
| | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
| | |
VectorBase implementation of serial vectors.
This class can be used either as a view of a vector data or as a storage for vector data (with any underlying storage type).
To create with storage with the dimension of dim just call the constructor SerialVectorStd(dim) or after construction you can call this->initialize(dim).
To simply create a view of a vector v with stride vs, without ownership just call SerialVectorStd(Teuchos::rcp(v,false),vs) or after construction call this->initialize(Teuchos::rcp(v,false),vs).
To use another storage type, such as an std::vector<Scalar>, construct as:
template<class Scalar> Teuchos::RefCountPtr<VectorBase<Scalar> > STLVectorSpace<Scalar>::createMember() const { Teuchos::RefCountPtr<std::vector<Scalar> > stl_v = Teuchos::rcp( new std::vector<Scalar>(dim_) ); Teuchos::RefCountPtr<Scalar> v = Teuchos::rcp(&(*stl_v)[0],false); Teuchos::set_extra_data( stl_v, "stl::vector", &v ); return Teuchos::rcp( new SerialVectorStd<Scalar>( v, 1, dim_, Teuchos::rcp(this,false) ) ); }
Definition at line 70 of file Thyra_SerialVectorStdDecl.hpp.
|
||||||||||
|
Calls
Definition at line 41 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||
|
Calls
Definition at line 49 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||||||||||||||||
|
Calls
Definition at line 57 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||
|
Call
Definition at line 68 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||
|
Call
Definition at line 82 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||||||||||||||||
|
Initialize with storage.
Postconditions:
Note that this function is declared virtual so that subclasses can override it to be informed whenever Definition at line 94 of file Thyra_SerialVectorStd.hpp. |
|
|||||||||
|
Return non-
Definition at line 216 of file Thyra_SerialVectorStdDecl.hpp. |
|
|||||||||
|
Return
Definition at line 223 of file Thyra_SerialVectorStdDecl.hpp. |
|
|||||||||
|
Return non-
Definition at line 230 of file Thyra_SerialVectorStdDecl.hpp. |
|
|||||||||
|
Return
Definition at line 237 of file Thyra_SerialVectorStdDecl.hpp. |
|
|||||||||
|
Return the stride between entries returned from
Definition at line 244 of file Thyra_SerialVectorStdDecl.hpp. |
|
|||||||||
|
Inline call to return dimension.
Definition at line 251 of file Thyra_SerialVectorStdDecl.hpp. |
|
||||||||||||||||
|
Implements Thyra::SerialVectorBase< Scalar >. Definition at line 118 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||
|
Implements Thyra::SerialVectorBase< Scalar >. Definition at line 128 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||||||||
|
Reimplemented from Thyra::SerialVectorBase< Scalar >. Definition at line 138 of file Thyra_SerialVectorStd.hpp. |
|
||||||||||
|
Reimplemented from Thyra::SerialVectorBase< Scalar >. Definition at line 148 of file Thyra_SerialVectorStd.hpp. |
|
|||||||||
|
Definition at line 161 of file Thyra_SerialVectorStd.hpp. |
|
|||||||||
|
Definition at line 169 of file Thyra_SerialVectorStd.hpp. |
1.3.9.1