Skip to content

Commit

Permalink
Merge pull request #13364 from peterrum/table_3_reinit
Browse files Browse the repository at this point in the history
Implement new Table<3, T>::reinit()
  • Loading branch information
tamiko committed Feb 13, 2022
2 parents 856625e + 08912e4 commit 62b27da
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions include/deal.II/base/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,18 @@ class Table<3, T> : public TableBase<3, T>
InputIterator entries,
const bool C_style_indexing = true);

/**
* Reinitialize the object. Passes down to the base class
* by converting the arguments to the data type requested by the base class.
*/
void
reinit(const size_type size1,
const size_type size2,
const size_type size3,
const bool omit_default_initialization = false);

using TableBase<3, T>::reinit;

/**
* Access operator. Generate an object that accesses the requested two-
* dimensional subobject of this three-dimensional table. Range checks are
Expand Down Expand Up @@ -3238,6 +3250,19 @@ inline Table<3, T>::Table(const size_type size1,



template <typename T>
inline void
Table<3, T>::reinit(const size_type size1,
const size_type size2,
const size_type size3,
const bool omit_default_initialization)
{
this->TableBase<3, T>::reinit(TableIndices<3>(size1, size2, size3),
omit_default_initialization);
}



template <typename T>
inline dealii::internal::TableBaseAccessors::Accessor<3, T, true, 2>
Table<3, T>::operator[](const size_type i) const
Expand Down

0 comments on commit 62b27da

Please sign in to comment.