dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
gmshreader.hh
Go to the documentation of this file.
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>
14
15// MMesh includes
17
18namespace Dune {
19
20// GmshReader for MMesh
21// --------------------
22template <int dim>
23struct GmshReader<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
47};
48
49} // end namespace Dune
50
51#endif
The MMesh class templatized by the CGAL host grid type and the dimension. .
Definition grid/mmesh.hh:158
Definition gmshgridfactory.hh:28
std::shared_ptr< Grid > grid() const
return grid pointer
Definition gmshgridfactory.hh:75
static std::shared_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:26
std::vector< int > elementsIDs
Definition gmshreader.hh:46
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)
Definition gmshreader.hh:39
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:33