36 #ifndef ET_VECTOR_ELEMENTAL_HPP 37 #define ET_VECTOR_ELEMENTAL_HPP 41 #include <boost/shared_ptr.hpp> 43 #include <lifev/core/LifeV.hpp> 106 ASSERT (iloc < M_nbRow,
"Access out of range");
113 ASSERT (iloc < M_nbRow,
"Access out of range");
138 template <
typename VectorType>
143 vec.sumIntoGlobalValues ( M_rowIndices[iRow], M_rawData[iRow] );
155 template <
typename VectorType>
160 vec->sumIntoGlobalValues ( M_rowIndices[iRow], M_rawData[iRow] );
166 void showMe ( std::ostream& out = std::cout )
const 168 out <<
" Elemental vector : Size " << M_nbRow << std::endl;
171 out <<
"[" << i <<
"] " << M_rawData[i] <<
" ";
184 ASSERT (iloc < M_nbRow,
"Access out of range");
191 M_rowIndices[iloc] = iglobal;
197 M_rowIndices = indicesVector;
209 ASSERT (iloc < M_nbRow,
"Access out of range");
void showMe(std::ostream &out=std::cout) const
Ouput method for the sizes and the stored values.
class ETVectorElemental A class for describing an elemental vector
const Real & element(const UInt &iloc) const
Getter for the data stored in the given elemental position.
ETVectorElemental(const UInt &nbRow)
Constructor with the minimal interface: number of rows has to be provided.
Real * rawData() const
Getter for the full set of data.
void globalAssembly(std::shared_ptr< VectorType > vec)
Assembly procedure for a vector or a block of a vector passed in a shared_ptr.
const Real & operator[](const UInt &iloc) const
Operator to access (read-only) the iloc-th element.
Real & element(const UInt &iloc)
Setter for the value in the local position (iloc)
void updateInverseJacobian(const UInt &iQuadPt)
void zero()
Put zero all the data stored.
Real & operator[](const UInt &iloc)
Operator to access (read-write) the iloc-th element.
ETVectorElemental()
No empty constructor, as we want at least the sizes to be defined.
void pushToGlobal(VectorType &vec)
Assembly procedure for a vector or a block of a vector.
void setRowIndex(const UInt &iloc, const UInt &iglobal)
Setter for the global index corresponding to the iloc row of the local vector.
double Real
Generic real data.
ETVectorElemental(const ETVectorElemental &vec)
Copy constructor (including deep copy of the data)
~ETVectorElemental()
Destructor.
const std::vector< Int > & rowIndices() const
Getter for the global indices of the rows.
ETVectorElemental operator=(const ETVectorElemental &)
No need for an assignement operator.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void setRowIndex(const std::vector< Int > &indicesVector)
Setter for all the global indices using a std::vector.
std::vector< Int > M_rowIndices