Loading [MathJax]/extensions/tex2jax.js

dune-mmesh (1.4)

dgfparser.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_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>
15#include <dune/grid/io/file/dgfparser/parser.hh>
16
17// MMesh includes
18#include <dune/mmesh/grid/explicitgridfactory.hh>
19
20namespace Dune
21{
22
23 // External Forward Declarations
24 // -----------------------------
25 template< class GridImp, class IntersectionImp >
26 class Intersection;
27
28 // dummy specialization of DGFGridFactory for MMeshInterfaceGrid
29 // -------------------------------------------------------------
30 template< class MMeshImp >
31 struct DGFGridFactory< MMeshInterfaceGrid<MMeshImp> >
32 {
33 typedef MMeshInterfaceGrid<MMeshImp> Grid;
34 const static int dimension = Grid::dimension;
35 typedef MPIHelper::MPICommunicator MPICommunicatorType;
36 typedef typename Grid::template Codim<0>::Entity Element;
37 typedef typename Grid::template Codim<dimension>::Entity Vertex;
38
39 explicit DGFGridFactory ( std::istream &input,
40 MPICommunicatorType comm = MPIHelper::getCommunicator() );
41 explicit DGFGridFactory ( const std::string &filename,
42 MPICommunicatorType comm = MPIHelper::getCommunicator() );
43
45 Grid* grid() const
46 {
47 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
48 return grid_;
49 }
50
52 template< class Intersection >
53 bool wasInserted ( const Intersection &intersection ) const
54 {
55 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
56 return false;
57 }
58
60 template< class Intersection >
61 int boundaryId ( const Intersection &intersection ) const
62 {
63 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
64 return 0;
65 }
66
68 std::vector< double > parameter ( const Element &element )
69 {
70 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
71 return {0.0};
72 }
73
75 std::vector< double > parameter ( const Vertex &vertex )
76 {
77 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
78 return {0.0};
79 }
80
82 bool haveBoundaryParameters () const
83 {
84 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
85 return false;
86 }
87
88 template < class GG, class II >
89 const DGFBoundaryParameter::type
90 boundaryParameter ( const Intersection< GG, II > & intersection ) const
91 {
92 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
93 return DGFBoundaryParameter::type();
94 }
95
96 template< int codim >
97 int numParameters () const
98 {
99 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
100 return 0;
101 }
102
103 private:
104 Grid* grid_;
105 DuneGridFormatParser dgf_;
106 };
107
108
109 // Implementation of DGFGridFactory for MMeshInterfaceGrid
110 // -------------------------------------------------------
111
113 template< class MMeshImp >
114 inline DGFGridFactory< MMeshInterfaceGrid<MMeshImp> >
115 ::DGFGridFactory ( std::istream &input, MPICommunicatorType comm )
116 : dgf_( 0, 1 )
117 {
118 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
119 }
120
122 template< class MMeshImp >
123 inline DGFGridFactory< MMeshInterfaceGrid<MMeshImp> >
124 ::DGFGridFactory ( const std::string &filename, MPICommunicatorType comm )
125 : dgf_( 0, 1 )
126 {
127 DUNE_THROW(NotImplemented, "DGFGridFactory for MMeshInterfaceGrid");
128 }
129
130} // namespace Dune
131
132#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 6, 22:49, 2025)