From 04f9842428a3907fd1003bb66c9c5c6ab7af3b24 Mon Sep 17 00:00:00 2001 From: Samuel Burbulla <samuel.burbulla@mathematik.uni-stuttgart.de> Date: Tue, 2 Jul 2019 11:18:06 +0200 Subject: [PATCH] [1d][facet] Initialize this pointer in vertex entity correctly using emplace_back. --- dune/foamgrid/foamgrid/foamgridfactory.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dune/foamgrid/foamgrid/foamgridfactory.hh b/dune/foamgrid/foamgrid/foamgridfactory.hh index 9db12da..caacf37 100644 --- a/dune/foamgrid/foamgrid/foamgridfactory.hh +++ b/dune/foamgrid/foamgrid/foamgridfactory.hh @@ -69,9 +69,11 @@ template <int dimgrid, int dimworld> /** \brief Insert a vertex into the coarse grid */ void insertVertex(const FieldVector<ctype,dimworld>& pos) override { - std::get<0>(grid_->entityImps_[0]).push_back(FoamGridEntityImp<0, dimgrid, dimworld> (0, // level - pos, // position - grid_->getNextFreeId())); + std::get<0>(grid_->entityImps_[0]).emplace_back( + 0, // level + pos, // position + grid_->getNextFreeId() + ); vertexArray_.push_back(&*std::get<0>(grid_->entityImps_[0]).rbegin()); } -- GitLab