Dune Core Modules (2.4.2)

amirameshreader.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_AMIRAMESH_READER_HH
4#define DUNE_AMIRAMESH_READER_HH
5
6#include <string>
7
9
10#if HAVE_PSURFACE
12
13#if HAVE_AMIRAMESH
14#include <amiramesh/AmiraMesh.h>
15#else
16// forward declaration so we can at least compile the header without libamiramesh
17class AmiraMesh;
18#endif
19
20namespace Dune {
21
26 template<class GridType>
27 class AmiraMeshReader {
28
30 enum {dim = GridType::dimension};
31
33 static void createDomain(GridFactory<GridType>& factory, const shared_ptr<PSurfaceBoundary<dim-1> >& boundary);
34
36 static void buildGrid(GridFactory<GridType>& factory, AmiraMesh* am);
37
39 static void build2dGrid(GridFactory<GridType>& factory, AmiraMesh* am);
40
41 public:
42
47 static GridType* read(const std::string& filename);
48
54 static void read(GridType& grid,
55 const std::string& filename);
56
66 static GridType* read(const std::string& filename,
67 const shared_ptr<PSurfaceBoundary<dim-1> >& boundary);
68
69 private:
79 static void read(GridType& grid,
80 const std::string& filename,
81 const shared_ptr<PSurfaceBoundary<dim-1> >& boundary);
82
83 public:
91 template<class DiscFuncType>
92 static void readFunction(DiscFuncType& f, const std::string& filename);
93
94 };
95
96}
97
98#if HAVE_AMIRAMESH
99#include "amiramesh/amirameshreader.cc"
100#endif
101
102#endif // #if HAVE_PSURFACE
103#endif
Provide a generic factory class for unstructured grids.
Dune namespace.
Definition: alignment.hh:10
A domain boundary implemented by the psurface library.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)