dune-fem
2.4.1-rc
|
This is the reference implementation of a block vector as it is expected as the second template parameter to Dune::Fem::BlockVectorDiscreteFunction. More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/blockvectors/defaultblockvectors.hh>
Public Types | |
enum | { blockSize = BlockSize } |
Size of each block. More... | |
typedef ArrayType | DofContainerType |
typedef ArrayType::value_type | FieldType |
Type of the field the dofs lie in. More... | |
typedef ArrayType::iterator | IteratorType |
Iterator to iterate over the dofs. More... | |
typedef ArrayType::const_iterator | ConstIteratorType |
Constant iterator to iterate over the dofs. More... | |
typedef ArrayType::size_type | SizeType |
Used for indexing the blocks, for example. More... | |
typedef FieldType | value_type |
Typedef to make this class STL-compatible. More... | |
typedef SizeType | size_type |
Typedef to make this class STL-compatible. More... | |
typedef SimpleBlockVectorBlock< ThisType > | DofBlockType |
Type of one (mutable) block. More... | |
typedef SimpleBlockVectorBlock< ThisType > | ConstDofBlockType |
Type of one constant block. More... | |
typedef Fem::Envelope< DofBlockType > | DofBlockPtrType |
typedef Fem::Envelope< ConstDofBlockType > | ConstDofBlockPtrType |
Public Member Functions | |
SimpleBlockVector (ArrayType &array) | |
Constructor; use this to create a block vector with 'size' blocks. More... | |
const ThisType & | operator= (const ThisType &other) |
Copy assignment operator. More... | |
ConstDofBlockType | operator[] (const unsigned int i) const |
Accessor for a constant block. More... | |
DofBlockType | operator[] (const unsigned int i) |
Accessor for a block. More... | |
ConstDofBlockPtrType | blockPtr (const unsigned int i) const |
Accessor for a constant block. More... | |
DofBlockPtrType | blockPtr (const unsigned int i) |
Accessor for a block. More... | |
IteratorType | begin () |
Iterator pointing to the first dof. More... | |
ConstIteratorType | begin () const |
Const-iterator pointing to the first dof. More... | |
IteratorType | end () |
Iterator pointing to the last dof. More... | |
ConstIteratorType | end () const |
Const-iterator pointing to the last dof. More... | |
SizeType | size () const |
Returns the number of blocks. More... | |
SizeType | numDofs () const |
Returns the number of dofs in the block vector. More... | |
FieldType * | data () |
const FieldType * | data () const |
const ArrayType & | array () const |
ArrayType & | array () |
const ThisType & | operator+= (const ThisType &other) |
Add another block vector to *this. More... | |
const ThisType & | operator-= (const ThisType &other) |
Subtract another block vector from *this. More... | |
FieldType | operator* (const ThisType &other) const |
Scalar product *this with another block vector. More... | |
const ThisType & | operator*= (const FieldType &scalar) |
Scale this block vector. More... | |
void | axpy (const FieldType &scalar, const ThisType &other) |
Add a scalar multiple of another block vector to this block vector. More... | |
void | clear () |
Clear this block vector, i.e. set each dof to 0. More... | |
Protected Member Functions | |
void | assign (const ThisType &other) |
ThisType & | asImp () |
const ThisType & | asImp () const |
Protected Attributes | |
ArrayType & | array_ |
CounterType | sequence_ |
This is the reference implementation of a block vector as it is expected as the second template parameter to Dune::Fem::BlockVectorDiscreteFunction.
F | The ground fields. All dofs are elements of this field. |
BlockSize | Size of the blocks |
typedef Fem::Envelope< ConstDofBlockType > Dune::Fem::SimpleBlockVector< Container, BlockSize >::ConstDofBlockPtrType |
typedef SimpleBlockVectorBlock< ThisType > Dune::Fem::SimpleBlockVector< Container, BlockSize >::ConstDofBlockType |
Type of one constant block.
typedef ArrayType::const_iterator Dune::Fem::SimpleBlockVector< Container, BlockSize >::ConstIteratorType |
Constant iterator to iterate over the dofs.
typedef Fem::Envelope< DofBlockType > Dune::Fem::SimpleBlockVector< Container, BlockSize >::DofBlockPtrType |
typedef SimpleBlockVectorBlock< ThisType > Dune::Fem::SimpleBlockVector< Container, BlockSize >::DofBlockType |
Type of one (mutable) block.
typedef ArrayType Dune::Fem::SimpleBlockVector< Container, BlockSize >::DofContainerType |
typedef ArrayType::value_type Dune::Fem::SimpleBlockVector< Container, BlockSize >::FieldType |
Type of the field the dofs lie in.
typedef ArrayType::iterator Dune::Fem::SimpleBlockVector< Container, BlockSize >::IteratorType |
Iterator to iterate over the dofs.
typedef SizeType Dune::Fem::SimpleBlockVector< Container, BlockSize >::size_type |
Typedef to make this class STL-compatible.
typedef ArrayType::size_type Dune::Fem::SimpleBlockVector< Container, BlockSize >::SizeType |
Used for indexing the blocks, for example.
typedef FieldType Dune::Fem::SimpleBlockVector< Container, BlockSize >::value_type |
Typedef to make this class STL-compatible.
|
inlineexplicit |
Constructor; use this to create a block vector with 'size' blocks.
The dofs are not initialized.
[in] | size | Number of blocks |
|
inline |
|
inline |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
Add a scalar multiple of another block vector to this block vector.
Semantic in pseudocode: " *this = *this + scalar*v "
[in] | scalar | Scalar factor by which v is multiplied before it is added to *this |
[in] | other | The other block vector |
|
inline |
Iterator pointing to the first dof.
Referenced by Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::assign(), Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::axpy(), Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::operator*(), Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::operator+=(), and Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::operator-=().
|
inline |
Const-iterator pointing to the first dof.
|
inline |
Accessor for a constant block.
[in] | i | Index of the block |
|
inline |
Accessor for a block.
[in] | i | Index of the block |
|
inlineinherited |
Clear this block vector, i.e. set each dof to 0.
|
inline |
|
inline |
|
inline |
Iterator pointing to the last dof.
Referenced by Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::assign().
|
inline |
Const-iterator pointing to the last dof.
|
inline |
Returns the number of dofs in the block vector.
|
inlineinherited |
Scalar product *this with another block vector.
[in] | other | Other block vector |
|
inlineinherited |
Scale this block vector.
[in] | scalar | Factor for the scaling |
|
inlineinherited |
Add another block vector to *this.
[in] | other | Other block vector to add |
|
inlineinherited |
Subtract another block vector from *this.
[in] | other | Other block vector to subtract |
|
inline |
Copy assignment operator.
|
inline |
Accessor for a constant block.
[in] | i | Index of the block |
|
inline |
Accessor for a block.
[in] | i | Index of the block |
|
inline |
Returns the number of blocks.
Referenced by Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::assign(), Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::axpy(), Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::operator*(), Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::operator+=(), and Dune::Fem::BlockVectorInterface< SimpleBlockVector< std::vector< F >, BlockSize >, std::vector< F >::value_type >::operator-=().
|
protected |
|
mutableprotectedinherited |