From b7a6f998a75556861185728faabbf2cf7b79a4e7 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Fri, 11 Sep 2020 20:45:34 +0000 Subject: [PATCH] Add constructor to GridIn that directly attaches the Triangulation --- include/deal.II/grid/grid_in.h | 5 +++++ source/grid/grid_in.cc | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/include/deal.II/grid/grid_in.h b/include/deal.II/grid/grid_in.h index 17062b68ff..56bacfe3fd 100644 --- a/include/deal.II/grid/grid_in.h +++ b/include/deal.II/grid/grid_in.h @@ -341,6 +341,11 @@ public: */ GridIn(); + /** + * Constructor. Attach this triangulation to be fed with the grid data. + */ + GridIn(Triangulation &tria); + /** * Attach this triangulation to be fed with the grid data. */ diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index e60737bf93..421e30db9c 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -96,6 +96,15 @@ GridIn::GridIn() {} + +template +GridIn::GridIn(Triangulation &t) + : tria(&t, typeid(*this).name()) + , default_format(ucd) +{} + + + template void GridIn::attach_triangulation(Triangulation &t) -- 2.39.5