LifeV
VectorEpetraStructuredView Class Reference

VectorEpetraStructuredView - class representing a block in a VectorEpetraStructuredView. More...

#include <VectorEpetraStructuredView.hpp>

+ Collaboration diagram for VectorEpetraStructuredView:

Private Attributes

UInt M_blockSize
 
UInt M_firstIndex
 
UInt M_lastValidIndex
 
vector_TypeM_vector
 

Public Types

typedef VectorEpetra vector_Type
 Typedef for the underlying vector type. More...
 

Constructor & Destructor

 VectorEpetraStructuredView ()
 Default constructor. More...
 
 VectorEpetraStructuredView (const VectorEpetraStructuredView &otherView)
 Copy constructor. More...
 
 ~VectorEpetraStructuredView ()
 Default destructor. More...
 

Methods

void showMe (std::ostream &output=std::cout) const
 Print the informations about the VectorEpetraStructuredView. More...
 
Int sumIntoGlobalValues (const Int GID, const Real value) const
 Assembly procedure. More...
 

Set Methods

void setup (const UInt &firstIndex, const UInt &blockSize, vector_Type *vector)
 

Get Methods

UInt blockSize () const
 Returns the size of the block. More...
 
UInt firstIndex () const
 Returns the index in the block. More...
 
UInt lastValidIndex () const
 Returns the last index in the block. More...
 
vector_TypevectorPtr () const
 Return the shared_pointer of the Epetra_FEVector. More...
 

Private Methods

VectorEpetraStructuredView operator= (const VectorEpetraStructuredView &otherView)
 No assignement operator. More...
 

Detailed Description

VectorEpetraStructuredView - class representing a block in a VectorEpetraStructuredView.

Author
Samuel Quinodoz

The VectorEpetraStructuredView class contains data related to block of a vector. It is useful to setup a clean and easy-to-use blocks management.

For more information about the block structures in LifeV, see this page.

Definition at line 54 of file VectorEpetraStructuredView.hpp.

Member Typedef Documentation

◆ vector_Type

Typedef for the underlying vector type.

Definition at line 62 of file VectorEpetraStructuredView.hpp.

Constructor & Destructor Documentation

◆ VectorEpetraStructuredView() [1/2]

Default constructor.

Definition at line 45 of file VectorEpetraStructuredView.cpp.

◆ VectorEpetraStructuredView() [2/2]

Copy constructor.

Beware that using the copy constructor, the view is copied but not the underlying vector (both views still look at the same vector, not at different copies).

Definition at line 53 of file VectorEpetraStructuredView.cpp.

◆ ~VectorEpetraStructuredView()

Default destructor.

Definition at line 61 of file VectorEpetraStructuredView.cpp.

Member Function Documentation

◆ showMe()

void showMe ( std::ostream &  output = std::cout) const

Print the informations about the VectorEpetraStructuredView.

Parameters
outputStream where to print the informations

Definition at line 70 of file VectorEpetraStructuredView.cpp.

◆ sumIntoGlobalValues()

Int sumIntoGlobalValues ( const Int  GID,
const Real  value 
) const

Assembly procedure.

This procedure should always have the same behaviour and the same syntax than the corresponding method in MatrixEpetra.

Parameters
GIDthe global index of the element within the block viewed.
valuethe value to be added

Definition at line 80 of file VectorEpetraStructuredView.cpp.

◆ setup()

void setup ( const UInt firstIndex,
const UInt blockSize,
vector_Type vector 
)

Set all the informations relative to the block

Parameters
firstIndexFirst index in the block
blockSizeNumber of indices in the block
vectorVector from which the view has to be extracted

Definition at line 96 of file VectorEpetraStructuredView.cpp.

◆ blockSize()

UInt blockSize ( ) const
inline

Returns the size of the block.

Definition at line 128 of file VectorEpetraStructuredView.hpp.

◆ firstIndex()

UInt firstIndex ( ) const
inline

Returns the index in the block.

Definition at line 134 of file VectorEpetraStructuredView.hpp.

◆ lastValidIndex()

UInt lastValidIndex ( ) const
inline

Returns the last index in the block.

Definition at line 140 of file VectorEpetraStructuredView.hpp.

◆ vectorPtr()

vector_Type* vectorPtr ( ) const
inline

Return the shared_pointer of the Epetra_FEVector.

Definition at line 146 of file VectorEpetraStructuredView.hpp.

◆ operator=()

VectorEpetraStructuredView operator= ( const VectorEpetraStructuredView otherView)
private

No assignement operator.

The assignement operator is disabled in order to avoid confusing notation like vector.block(0) = vector.block(1), that would only copy the views and not the blocks.

Field Documentation

◆ M_blockSize

UInt M_blockSize
private

Definition at line 169 of file VectorEpetraStructuredView.hpp.

◆ M_firstIndex

UInt M_firstIndex
private

Definition at line 170 of file VectorEpetraStructuredView.hpp.

◆ M_lastValidIndex

UInt M_lastValidIndex
private

Definition at line 171 of file VectorEpetraStructuredView.hpp.

◆ M_vector

vector_Type* M_vector
private

Definition at line 172 of file VectorEpetraStructuredView.hpp.


The documentation for this class was generated from the following files: