]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add constructor to GridIn that directly attaches the Triangulation
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 11 Sep 2020 20:45:34 +0000 (20:45 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 11 Sep 2020 20:45:34 +0000 (20:45 +0000)
include/deal.II/grid/grid_in.h
source/grid/grid_in.cc

index 17062b68ff97e2ad0222638eb6112561500a7650..56bacfe3fd0ecca9156ce241bad051cea653cab5 100644 (file)
@@ -341,6 +341,11 @@ public:
    */
   GridIn();
 
+  /**
+   * Constructor. Attach this triangulation to be fed with the grid data.
+   */
+  GridIn(Triangulation<dim, spacedim> &tria);
+
   /**
    * Attach this triangulation to be fed with the grid data.
    */
index e60737bf9317aaf716d0e9bed5e3e70a3b820711..421e30db9c2287bc95478b86e7b72ba19d491884 100644 (file)
@@ -96,6 +96,15 @@ GridIn<dim, spacedim>::GridIn()
 {}
 
 
+
+template <int dim, int spacedim>
+GridIn<dim, spacedim>::GridIn(Triangulation<dim, spacedim> &t)
+  : tria(&t, typeid(*this).name())
+  , default_format(ucd)
+{}
+
+
+
 template <int dim, int spacedim>
 void
 GridIn<dim, spacedim>::attach_triangulation(Triangulation<dim, spacedim> &t)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.