Loading [MathJax]/extensions/tex2jax.js

dune-mmesh (1.4)

gmshreader.hh
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_MMESH_GRID_GMSHREADER_HH
4#define DUNE_MMESH_GRID_GMSHREADER_HH
5
6// System includes
7#include <memory>
8#include <utility>
9#include <vector>
10
11// Dune includes
12#include <dune/grid/common/intersection.hh>
13#include <dune/grid/io/file/gmshreader.hh>
14
15// MMesh includes
16#include <dune/mmesh/grid/gmshgridfactory.hh>
17
18namespace Dune
19{
20
21 // GmshReader for MMesh
22 // --------------------
23 template<int dim>
24 struct GmshReader< Dune::MovingMesh< dim > >
25 {
26 using Grid = Dune::MovingMesh< dim >;
27
28 static std::shared_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments = true)
29 {
30 Dune::GmshGridFactory<Grid> gmshFactory( fileName );
31 return gmshFactory.grid();
32 }
33
34 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName,
35 bool verbose = true, bool insertBoundarySegments = true)
36 {
37 Dune::GmshGridFactory<Grid> gmshFactory( factory, fileName );
38 }
39
40 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName, std::vector<int>& boundaryIDs, std::vector<int>& elementsIDs, bool verbose = false, bool boundarySegments = false)
41 {
42 Dune::GmshGridFactory<Grid> gmshFactory( factory, fileName );
43 }
44
45 std::vector<int> elementsIDs;
46 };
47
48} // end namespace Dune
49
50#endif
The MMesh class templatized by the CGAL host grid type and the dimension.
Definition: mmesh.hh:140
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 9, 22:44, 2025)