[Dune-devel] [Dune-Commit] [Commit] dune-grid - 56d05da: [cleanup] Simplify code by using initializer lists
Markus Blatt
markus at dr-blatt.de
Mon Mar 9 22:50:13 CET 2015
Hi,
this seems to have broken the build for g++-4.4:
g++ -std=c++0x -DHAVE_CONFIG_H -I. -I../../../../.. -pthread
-I/home/mblatt/buildbot-slave1/DUNE-1/git/master/dune-common
-I/home/mblatt/buildbot-slave1/DUNE-1/git/master/dune-common
-I/home/mblatt/buildbot-slave1/DUNE-1/git/master/dune-geometry
-I/home/mblatt/buildbot-slave1/DUNE-1/git/master/dune-geometry
-I../../../../.. -DDUNE_GRID_EXAMPLE_GRIDS_PATH=\"../../../../../doc/grids/\"
-g -O2 -MT subsamplingvtktest-subsamplingvtktest.o -MD -MP -MF
.deps/subsamplingvtktest-subsamplingvtktest.Tpo -c -o
subsamplingvtktest-subsamplingvtktest.o `test -f
'subsamplingvtktest.cc' || echo './'`subsamplingvtktest.cc
subsamplingvtktest.cc: In function ‘int main(int, char**)’:
subsamplingvtktest.cc:115: error: no matching function for call to
‘vtkCheck(<brace-enclosed initializer list>, <brace-enclosed
initializer list>)’
subsamplingvtktest.cc:116: error: no matching function for call to
‘vtkCheck(<brace-enclosed initializer list>, <brace-enclosed
initializer list>)’
subsamplingvtktest.cc:117: error: no matching function for call to
‘vtkCheck(<brace-enclosed initializer list>, <brace-enclosed
initializer list>)’
make[6]: *** [subsamplingvtktest-subsamplingvtktest.o] Fehler 1
Cheers,
Markus
On Mon, Mar 09, 2015 at 05:06:17PM +0100, Oliver Sander wrote:
> New commit, appeared at Mon Mar 9 17:06:17 2015 +0100
> as part of the following ref changes:
>
> branch refs/heads/master updated from a64a70a -> 55a91ba
>
> Browsable version: http://cgit.dune-project.org/repositories/dune-grid/commit/?id=56d05dafdc46b20f41fb449796c33303e4fe1a18
>
> ======================================================================
>
> commit 56d05dafdc46b20f41fb449796c33303e4fe1a18
> Author: Oliver Sander <sander at igpm.rwth-aachen.de>
> Date: Mon Mar 9 16:55:44 2015 +0100
>
> [cleanup] Simplify code by using initializer lists
>
> dune/grid/io/file/test/subsamplingvtktest.cc | 19 ++++++-------------
> 1 file changed, 6 insertions(+), 13 deletions(-)
>
>
>
> diff --git a/dune/grid/io/file/test/subsamplingvtktest.cc b/dune/grid/io/file/test/subsamplingvtktest.cc
> index 2630231..184dd82 100644
> --- a/dune/grid/io/file/test/subsamplingvtktest.cc
> +++ b/dune/grid/io/file/test/subsamplingvtktest.cc
> @@ -89,14 +89,10 @@ void doWrite( const GridView &gridView, bool coerceToSimplex)
> }
>
> template<int dim>
> -void vtkCheck(int* n, double* h)
> +void vtkCheck(const Dune::array<int, dim>& elements,
> + const Dune::FieldVector<double, dim>& upperRight)
> {
> - Dune::FieldVector<double, dim> L(0);
> - std::copy(h, h+dim, L.begin());
> - Dune::array<int, dim> s;
> - std::copy(n, n+dim, s.begin());
> -
> - Dune::YaspGrid<dim> g(L, s);
> + Dune::YaspGrid<dim> g(upperRight, elements);
>
> if(g.comm().rank() == 0)
> std::cout << std::endl
> @@ -121,12 +117,9 @@ int main(int argc, char **argv)
>
> Dune::MPIHelper::instance(argc, argv);
>
> - int n[] = { 5, 5, 5, 5 };
> - double h[] = { 1.0, 2.0, 3.0, 4.0 };
> -
> - vtkCheck<1>(n,h);
> - vtkCheck<2>(n,h);
> - vtkCheck<3>(n,h);
> + vtkCheck<1>({5}, {1.0});
> + vtkCheck<2>({5,5}, {1.0, 2.0});
> + vtkCheck<3>({5,5,5}, {1.0, 2.0, 3.0});
>
> } catch (Dune::Exception &e) {
> std::cerr << e << std::endl;
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20150309/c6da9c63/attachment.sig>
More information about the Dune-devel
mailing list