Dune Core Modules (2.8.0)

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#warning Support for AmiraMesh is deprecated and will be removed after Dune 2.8.
7
8#include <memory>
9#include <string>
10
12
13#if HAVE_PSURFACE
15
16#if HAVE_AMIRAMESH
17#include <amiramesh/AmiraMesh.h>
18#else
19// forward declaration so we can at least compile the header without libamiramesh
20class AmiraMesh;
21#endif
22
23namespace Dune {
24
29 template<class GridType>
30 class AmiraMeshReader {
31
32 using ctype = typename GridType::ctype;
33
35 enum {dim = GridType::dimension};
36
38 static void createDomain(GridFactory<GridType>& factory, const std::shared_ptr<PSurfaceBoundary<dim-1, ctype> >& boundary);
39
41 static void buildGrid(GridFactory<GridType>& factory, AmiraMesh* am);
42
44 static void build2dGrid(GridFactory<GridType>& factory, AmiraMesh* am);
45
46 public:
47
56 static std::unique_ptr<GridType> read(const std::string& filename);
57
63 static void read(GridType& grid,
64 const std::string& filename);
65
79 static std::unique_ptr<GridType> read(const std::string& filename,
80 const std::shared_ptr<PSurfaceBoundary<dim-1, ctype> >& boundary);
81
82 private:
92 static void read(GridType& grid,
93 const std::string& filename,
94 const std::shared_ptr<PSurfaceBoundary<dim-1, ctype> >& boundary);
95
96 public:
104 template<class DiscFuncType>
105 static void readFunction(DiscFuncType& f, const std::string& filename);
106
107 };
108
109}
110
111#if HAVE_AMIRAMESH
112#include "amiramesh/amirameshreader.cc"
113#endif
114
115#endif // #if HAVE_PSURFACE
116#endif
Provide a generic factory class for unstructured grids.
Dune namespace.
Definition: alignedallocator.hh:11
A domain boundary implemented by the psurface library.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)