From: Denis Davydov Date: Tue, 23 Jun 2015 17:46:12 +0000 (+0200) Subject: fixed Table<2,T>::reinit(TableIndices<2>) X-Git-Tag: v8.3.0-rc1~97^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1036%2Fhead;p=dealii.git fixed Table<2,T>::reinit(TableIndices<2>) --- diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 50301c7c3d..3dc6ec75d1 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -866,6 +866,8 @@ public: const unsigned int size2, const bool fast = false); + using TableBase<2,T>::reinit; + /** * Access operator. Generate an object that accesses the requested row of * this two-dimensional table. Range checks are performed. diff --git a/tests/base/table_05.cc b/tests/base/table_05.cc new file mode 100644 index 0000000000..00a0b12b66 --- /dev/null +++ b/tests/base/table_05.cc @@ -0,0 +1,59 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 1998 - 2015 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// check that Table<{1,2,3},T>::reinit(TableIndices) work + +#include "../tests.h" +#include +#include +#include +#include + +#include +#include + +template +void test() +{ + dealii::TableIndices new_size; + for (unsigned int d = 0; d < dim; d++) + new_size[d] = 5; + + dealii::Table unrolled; + unrolled.reinit(new_size); + + deallog<<"OK"<(); + test<2>(); + test<3>(); + +} + + + diff --git a/tests/base/table_05.output b/tests/base/table_05.output new file mode 100644 index 0000000000..fb71de2867 --- /dev/null +++ b/tests/base/table_05.output @@ -0,0 +1,4 @@ + +DEAL::OK +DEAL::OK +DEAL::OK