Dune Core Modules (2.6.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#include <memory>
7#include <string>
8
10
11#if HAVE_PSURFACE
13
14#if HAVE_AMIRAMESH
15#include <amiramesh/AmiraMesh.h>
16#else
17// forward declaration so we can at least compile the header without libamiramesh
18class AmiraMesh;
19#endif
20
21namespace Dune {
22
27 template<class GridType>
28 class AmiraMeshReader {
29
31 enum {dim = GridType::dimension};
32
34 static void createDomain(GridFactory<GridType>& factory, const std::shared_ptr<PSurfaceBoundary<dim-1> >& boundary);
35
37 static void buildGrid(GridFactory<GridType>& factory, AmiraMesh* am);
38
40 static void build2dGrid(GridFactory<GridType>& factory, AmiraMesh* am);
41
42 public:
43
48 static GridType* read(const std::string& filename);
49
55 static void read(GridType& grid,
56 const std::string& filename);
57
67 static GridType* read(const std::string& filename,
68 const std::shared_ptr<PSurfaceBoundary<dim-1> >& boundary);
69
70 private:
80 static void read(GridType& grid,
81 const std::string& filename,
82 const std::shared_ptr<PSurfaceBoundary<dim-1> >& boundary);
83
84 public:
92 template<class DiscFuncType>
93 static void readFunction(DiscFuncType& f, const std::string& filename);
94
95 };
96
97}
98
99#if HAVE_AMIRAMESH
100#include "amiramesh/amirameshreader.cc"
101#endif
102
103#endif // #if HAVE_PSURFACE
104#endif
Provide a generic factory class for unstructured grids.
Dune namespace.
Definition: alignedallocator.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 (Nov 24, 23:30, 2024)