LifeV
ETVectorElemental Class Reference

class ETVectorElemental A class for describing an elemental vector More...

#include <ETVectorElemental.hpp>

+ Collaboration diagram for ETVectorElemental:

Private Attributes

std::vector< IntM_rowIndices
 
UInt M_nbRow
 
RealM_rawData
 

Constructors & Destructor

 ETVectorElemental (const UInt &nbRow)
 Constructor with the minimal interface: number of rows has to be provided. More...
 
 ETVectorElemental (const ETVectorElemental &vec)
 Copy constructor (including deep copy of the data) More...
 
 ~ETVectorElemental ()
 Destructor. More...
 

Operators

const Realoperator[] (const UInt &iloc) const
 Operator to access (read-only) the iloc-th element. More...
 
Realoperator[] (const UInt &iloc)
 Operator to access (read-write) the iloc-th element. More...
 

Methods

void zero ()
 Put zero all the data stored. More...
 
template<typename VectorType >
void pushToGlobal (VectorType &vec)
 Assembly procedure for a vector or a block of a vector. More...
 
template<typename VectorType >
void globalAssembly (std::shared_ptr< VectorType > vec)
 Assembly procedure for a vector or a block of a vector passed in a shared_ptr. More...
 
void showMe (std::ostream &out=std::cout) const
 Ouput method for the sizes and the stored values. More...
 

Set Methods

Realelement (const UInt &iloc)
 Setter for the value in the local position (iloc) More...
 
void setRowIndex (const UInt &iloc, const UInt &iglobal)
 Setter for the global index corresponding to the iloc row of the local vector. More...
 
void setRowIndex (const std::vector< Int > &indicesVector)
 Setter for all the global indices using a std::vector. More...
 

Get Methods

const Realelement (const UInt &iloc) const
 Getter for the data stored in the given elemental position. More...
 
RealrawData () const
 Getter for the full set of data. More...
 
const std::vector< Int > & rowIndices () const
 Getter for the global indices of the rows. More...
 

Private Methods

 ETVectorElemental ()
 No empty constructor, as we want at least the sizes to be defined. More...
 
ETVectorElemental operator= (const ETVectorElemental &)
 No need for an assignement operator. More...
 

Detailed Description

class ETVectorElemental A class for describing an elemental vector

Author
Samuel Quinodoz samue.nosp@m.l.qu.nosp@m.inodo.nosp@m.z@ep.nosp@m.fl.ch

This class is meant to represent an ETVectorElemental. It contains mainly:

  1. Simple constructors
  2. Methods to access and modify the indexes
  3. Methods to store and access the entries
  4. Assembly methods to put the local entries in a global vector

Definition at line 62 of file ETVectorElemental.hpp.

Constructor & Destructor Documentation

◆ ETVectorElemental() [1/3]

ETVectorElemental ( const UInt nbRow)
inlineexplicit

Constructor with the minimal interface: number of rows has to be provided.

Definition at line 71 of file ETVectorElemental.hpp.

+ Here is the caller graph for this function:

◆ ETVectorElemental() [2/3]

ETVectorElemental ( const ETVectorElemental vec)
inline

Copy constructor (including deep copy of the data)

Definition at line 80 of file ETVectorElemental.hpp.

+ Here is the caller graph for this function:

◆ ~ETVectorElemental()

~ETVectorElemental ( )
inline

Destructor.

Definition at line 92 of file ETVectorElemental.hpp.

◆ ETVectorElemental() [3/3]

ETVectorElemental ( )
private

No empty constructor, as we want at least the sizes to be defined.

Member Function Documentation

◆ operator[]() [1/2]

const Real& operator[] ( const UInt iloc) const
inline

Operator to access (read-only) the iloc-th element.

Definition at line 104 of file ETVectorElemental.hpp.

◆ operator[]() [2/2]

Real& operator[] ( const UInt iloc)
inline

Operator to access (read-write) the iloc-th element.

Definition at line 111 of file ETVectorElemental.hpp.

◆ zero()

void zero ( )
inline

Put zero all the data stored.

Definition at line 124 of file ETVectorElemental.hpp.

+ Here is the caller graph for this function:

◆ pushToGlobal()

void pushToGlobal ( VectorType &  vec)
inline

Assembly procedure for a vector or a block of a vector.

This method puts the values stored in this elemental vector into the global vector passed as arguement, using the positions given in the global indices stored in this elemental vector.

Definition at line 139 of file ETVectorElemental.hpp.

◆ globalAssembly()

void globalAssembly ( std::shared_ptr< VectorType >  vec)
inline

Assembly procedure for a vector or a block of a vector passed in a shared_ptr.

This method puts the values stored in this elemental vector into the global vector passed as argument, using the positions given in the global indices stored in this elemental vector.

This is a partial specialization of the other assembly procedure of this class.

Definition at line 156 of file ETVectorElemental.hpp.

◆ showMe()

void showMe ( std::ostream &  out = std::cout) const
inline

Ouput method for the sizes and the stored values.

Definition at line 166 of file ETVectorElemental.hpp.

◆ element() [1/2]

Real& element ( const UInt iloc)
inline

Setter for the value in the local position (iloc)

Definition at line 182 of file ETVectorElemental.hpp.

◆ setRowIndex() [1/2]

void setRowIndex ( const UInt iloc,
const UInt iglobal 
)
inline

Setter for the global index corresponding to the iloc row of the local vector.

Definition at line 189 of file ETVectorElemental.hpp.

◆ setRowIndex() [2/2]

void setRowIndex ( const std::vector< Int > &  indicesVector)
inline

Setter for all the global indices using a std::vector.

Definition at line 195 of file ETVectorElemental.hpp.

◆ element() [2/2]

const Real& element ( const UInt iloc) const
inline

Getter for the data stored in the given elemental position.

Definition at line 207 of file ETVectorElemental.hpp.

◆ rawData()

Real* rawData ( ) const
inline

Getter for the full set of data.

Definition at line 214 of file ETVectorElemental.hpp.

◆ rowIndices()

const std::vector<Int>& rowIndices ( ) const
inline

Getter for the global indices of the rows.

Definition at line 221 of file ETVectorElemental.hpp.

◆ operator=()

ETVectorElemental operator= ( const ETVectorElemental )
private

No need for an assignement operator.

Field Documentation

◆ M_rowIndices

std::vector<Int> M_rowIndices
private

Definition at line 243 of file ETVectorElemental.hpp.

◆ M_nbRow

UInt M_nbRow
private

Definition at line 246 of file ETVectorElemental.hpp.

◆ M_rawData

Real* M_rawData
private

Definition at line 249 of file ETVectorElemental.hpp.


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