dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
interface/dgfparser.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_INTERFACE_DGFPARSER_HH
4#define DUNE_MMESH_INTERFACE_DGFPARSER_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/dgfparser/blocks/projection.hh>
14#include <dune/grid/io/file/dgfparser/dgfparser.hh>
16
17// MMesh includes
19
20namespace Dune {
21
22// External Forward Declarations
23// -----------------------------
24template <class GridImp, class IntersectionImp>
25class Intersection;
26
27// dummy specialization of DGFGridFactory for MMeshInterfaceGrid
28// -------------------------------------------------------------
29template <class MMeshImp>
32 const static int dimension = Grid::dimension;
34 typedef typename Grid::template Codim<0>::Entity Element;
35 typedef typename Grid::template Codim<dimension>::Entity Vertex;
36
37 explicit DGFGridFactory(
38 std::istream &input,
40 explicit DGFGridFactory(
41 const std::string &filename,
43
45 Grid *grid() const {
46 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
47 return grid_;
48 }
49
51 template <class Intersection>
52 bool wasInserted(const Intersection &intersection) const {
53 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
54 return false;
55 }
56
58 template <class Intersection>
59 int boundaryId(const Intersection &intersection) const {
60 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
61 return 0;
62 }
63
66 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
67 return {0.0};
68 }
69
72 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
73 return {0.0};
74 }
75
78 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
79 return false;
80 }
81
82 template <class GG, class II>
84 const Intersection<GG, II> &intersection) const {
85 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
87 }
88
89 template <int codim>
90 int numParameters() const {
91 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
92 return 0;
93 }
94
95 private:
96 Grid *grid_;
98};
99
100// Implementation of DGFGridFactory for MMeshInterfaceGrid
101// -------------------------------------------------------
102
104template <class MMeshImp>
107 : dgf_(0, 1) {
108 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
109}
110
112template <class MMeshImp>
114 const std::string &filename, MPICommunicatorType comm)
115 : dgf_(0, 1) {
116 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
117}
118
119} // namespace Dune
120
121#endif
#define DUNE_THROW(E,...)
MPI_Comm MPICommunicator
static MPICommunicator getCommunicator()
static const int dimension
bool wasInserted(const Intersection &intersection) const
Returns if intersection was inserted.
Definition interface/dgfparser.hh:52
int numParameters() const
Definition interface/dgfparser.hh:90
Grid::template Codim< 0 >::Entity Element
Definition interface/dgfparser.hh:34
Grid::template Codim< dimension >::Entity Vertex
Definition interface/dgfparser.hh:35
const DGFBoundaryParameter::type boundaryParameter(const Intersection< GG, II > &intersection) const
Definition interface/dgfparser.hh:83
MPIHelper::MPICommunicator MPICommunicatorType
Definition interface/dgfparser.hh:33
bool haveBoundaryParameters() const
Returns true if boundary parameters found.
Definition interface/dgfparser.hh:77
std::vector< double > parameter(const Element &element)
Returns dgf element parameters for given element.
Definition interface/dgfparser.hh:65
Grid * grid() const
return grid pointer
Definition interface/dgfparser.hh:45
MMeshInterfaceGrid< MMeshImp > Grid
Definition interface/dgfparser.hh:31
std::vector< double > parameter(const Vertex &vertex)
Returns dgf vertex parameters for given vertex.
Definition interface/dgfparser.hh:71
int boundaryId(const Intersection &intersection) const
Return boundary id of intersection.
Definition interface/dgfparser.hh:59
Provides a DUNE grid interface class for the interface of a MMesh interface grid .
Definition mmesh/interface/grid.hh:90