36 #ifndef ET_MATRIX_ELEMENTAL_HPP 37 #define ET_MATRIX_ELEMENTAL_HPP 41 #include <boost/shared_ptr.hpp> 43 #include <lifev/core/LifeV.hpp> 46 #include <lifev/core/array/MatrixEpetra.hpp> 115 template <
typename MatrixType>
118 mat.addToCoefficients ( M_nbRow, M_nbColumn,
119 rowIndices(), columnIndices(),
120 M_rawData, Epetra_FECrsMatrix::ROW_MAJOR);
132 template <
typename MatrixType>
135 mat.sumIntoCoefficients ( M_nbRow, M_nbColumn,
136 rowIndices(), columnIndices(),
137 M_rawData, Epetra_FECrsMatrix::ROW_MAJOR);
150 template <
typename MatrixType>
153 mat->addToCoefficients ( M_nbRow, M_nbColumn,
154 rowIndices(), columnIndices(),
155 M_rawData, Epetra_FECrsMatrix::ROW_MAJOR);
169 template <
typename MatrixType>
172 mat->sumIntoCoefficients ( M_nbRow, M_nbColumn,
173 rowIndices(), columnIndices(),
174 M_rawData, Epetra_FECrsMatrix::ROW_MAJOR);
178 void showMe ( std::ostream& out = std::cout )
const;
188 ASSERT (iloc < M_nbRow,
"Try to access an element out of the elemental matrix (row)");
189 ASSERT (jloc < M_nbColumn,
"Try to access an element out of the elemental matrix (column)");
196 ASSERT (iloc < M_nbRow,
"Try to set an index out of the elemental matrix (row)");
197 M_rowIndices[iloc] = iglobal;
203 M_rowIndices = indicesVector;
209 ASSERT (jloc < M_nbColumn,
"Try to set an index out of the elemental matrix (row)");
210 M_columnIndices[jloc] = jglobal;
216 M_columnIndices = indicesVector;
229 ASSERT (iloc < M_nbRow,
"Try to get an element out of the elemental matrix (row)");
230 ASSERT (jloc < M_nbColumn,
"Try to get an element out of the elemental matrix (column)");
249 return M_columnIndices;
Real *const * rawData() const
Getter for the full set of data.
const std::vector< Int > & columnIndices() const
Getter for the global indices of the columns.
const std::vector< Int > & rowIndices() const
Getter for the global indices of the rows.
void pushToClosedGlobal(MatrixType &mat)
Assembly procedure for a matrix or a block of a matrix.
void setRowIndex(const std::vector< Int > &indicesVector)
Setter for the global index of the rows of the local matrix.
std::vector< Int > M_columnIndices
void updateInverseJacobian(const UInt &iQuadPt)
void setRowIndex(const UInt &iloc, const UInt &iglobal)
Setter for the global index corresponding to the iloc row of the local matrix.
void showMe(std::ostream &out=std::cout) const
Ouput method for the sizes and the stored values.
ETMatrixElemental()
No empty constructor, as we want at least the sizes to be defined.
void zero()
Put zero all the data stored.
virtual ~ETMatrixElemental()
Destructor.
std::vector< Int > M_rowIndices
const Real & element(const UInt &iloc, const UInt &jloc) const
Getter for the data stored in the given elemental position.
void pushToGlobal(std::shared_ptr< MatrixType > mat)
Assembly procedure for a matrix or a block of a matrix passed in a shared_ptr.
ETMatrixElemental(const UInt &nbRow, const UInt &nbCol)
Constructor with the minimal interface: number of columns and of rows are provided.
void setColumnIndex(const UInt &jloc, const UInt &jglobal)
Setter for the global index corresponding to the jloc column of the local matrix. ...
ETMatrixElemental operator=(const ETMatrixElemental &)
No need for an assignement operator.
double Real
Generic real data.
ETMatrixElemental(const ETMatrixElemental &mat)
Copy constructor (including deep copy of the data)
void setColumnIndex(const std::vector< Int > &indicesVector)
Setter for the global index of the columns of the local matrix.
void pushToClosedGlobal(std::shared_ptr< MatrixType > mat)
Assembly procedure for a matrix or a block of a matrix passed in a shared_ptr.
Real & element(const UInt &iloc, const UInt &jloc)
Setter for the value in the local position (iloc,jloc)
void pushToGlobal(MatrixType &mat)
Assembly procedure for a matrix or a block of a matrix.
class ETMatrixElemental A class for describing an elemental matrix
uint32_type UInt
generic unsigned integer (used mainly for addressing)