Loading [MathJax]/extensions/tex2jax.js

dune-mmesh (unstable)

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// GmshReader for MMesh
21// --------------------
22template <int dim>
23struct GmshReader<Dune::MovingMesh<dim> > {
24 using Grid = Dune::MovingMesh<dim>;
25
26 static std::shared_ptr<Grid> read(const std::string& fileName,
27 bool verbose = true,
28 bool insertBoundarySegments = true) {
29 Dune::GmshGridFactory<Grid> gmshFactory(fileName);
30 return gmshFactory.grid();
31 }
32
33 static void read(Dune::GridFactory<Grid>& factory,
34 const std::string& fileName, bool verbose = true,
35 bool insertBoundarySegments = true) {
36 Dune::GmshGridFactory<Grid> gmshFactory(factory, fileName);
37 }
38
39 static void read(Dune::GridFactory<Grid>& factory,
40 const std::string& fileName, std::vector<int>& boundaryIDs,
41 std::vector<int>& elementsIDs, bool verbose = false,
42 bool boundarySegments = false) {
43 Dune::GmshGridFactory<Grid> gmshFactory(factory, fileName);
44 }
45
46 std::vector<int> elementsIDs;
47};
48
49} // end namespace Dune
50
51#endif
The MMesh class templatized by the CGAL host grid type and the dimension. .
Definition: mmesh.hh:158
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Mar 16, 23:47, 2025)