39 #ifndef _SIMPLEARRAY_HH_ 40 #define _SIMPLEARRAY_HH_ 42 #include <lifev/core/LifeV.hpp> 61 template <
typename DataType>
94 explicit ArraySimple ( vectorSize_Type vectorSize );
102 explicit ArraySimple ( vectorSize_Type numberOfRows, vectorSize_Type numberOfColumns );
121 return * (
this->begin() + ( i ) );
132 return * (
this->begin() + ( i ) );
143 return * (
this->begin() + ( j ) * M_numberOfRows + ( i ) );
154 return * (
this->begin() + ( j ) * M_numberOfRows + ( i ) );
188 return i >= 0 && i + ( j ) * M_numberOfRows <
this->size();
233 template <
typename DataType>
241 template <
typename DataType>
249 template <
typename DataType>
260 template <
typename DataType>
275 template <
typename DataType>
277 ArraySimple<DataType>::reshape ( vectorSize_Type numberOfRows, vectorSize_Type numberOfColumns )
279 vector_Type::resize ( numberOfRows * numberOfColumns );
280 M_numberOfRows = numberOfRows;
281 M_numberOfColumns = numberOfColumns;
284 template <
typename DataType>
292 M_numberOfColumns = 0;
295 template <
typename DataType>
299 std::cout <<
" Number of rows: " << M_numberOfRows << std::endl;
300 std::cout <<
" Number of columns: " << M_numberOfColumns << std::endl;
ArraySimple(vectorSize_Type numberOfRows, vectorSize_Type numberOfColumns)
Constructor.
vectorConstReference_Type operator()(vectorSize_Type const i, vectorSize_Type const j) const
Const access operator.
ArraySimple()
Empty Constructor.
void showMe() const
Show the contents of the ArraySimple vector.
std::vector< DataType > vector_Type
ArraySimple< DataType >::iterator columnIterator(vectorSize_Type const column)
Return the iterator of the column passed by argument.
vectorReference_Type operator()(vectorSize_Type const i, vectorSize_Type const j)
Access operator.
void updateInverseJacobian(const UInt &iQuadPt)
void reshape(vectorSize_Type const numberOfRows, vectorSize_Type const numberOfColumns)
Resize the ArraySimple vector.
bool checkIndex(vectorSize_Type const i, vectorSize_Type const j) const
Check if the MeshEntityContainer vector contains an element with row index i and column index j...
~ArraySimple()
Destructor.
vectorSize_Type const numberOfColumns() const
Return the number of columns.
ArraySimple(vectorSize_Type vectorSize)
Constructor.
void clearArray()
Completely clear out the container, returning memory to the system.
vectorSize_Type M_numberOfColumns
Number of columns.