3 #ifndef DUNE_AMIRAMESH_WRITER_HH
4 #define DUNE_AMIRAMESH_WRITER_HH
8 #include <dune/common/array.hh>
11 #include <amiramesh/AmiraMesh.h>
20 template<
class Gr
idView>
46 template <
class Gr
idType2>
47 void addLevelGrid(
const GridType2& grid,
int level,
bool splitAll=
false);
57 template <
class Gr
idType2>
58 void addLeafGrid(
const GridType2& grid,
bool splitAll=
false);
66 template <
class DataContainer>
67 void addCellData(
const DataContainer& data,
const GridView& gridView,
bool GridSplitUp=
false);
75 template <
class DataContainer>
82 void write(
const std::string& filename,
bool ascii=
false)
const;
86 template <
class DataContainer>
88 const array<unsigned int, dim>& n,
89 const DataContainer& data);
103 const std::string& filename);
107 #if HAVE_AMIRAMESH // better: use a pointer here and forward-declare AmiraMesh
108 AmiraMesh amiramesh_;
116 template<
class Gr
idType>
128 this->
addGrid(grid.levelGridView(level));
138 const std::string& filename,
141 amiramesh.
write(filename);
152 template <
class VectorType>
155 const std::string& filename,
157 bool GridSplitUp=
false) {
159 if (f.size()==grid.size(level,GridType::dimension))
160 amiramesh.
addVertexData(f, grid.levelGridView(level),GridSplitUp);
162 amiramesh.
addCellData(f, grid.levelGridView(level),GridSplitUp);
163 amiramesh.
write(filename);
172 template<
class Gr
idType>
193 const std::string& filename) {
195 amiramesh.
write(filename);
204 template <
class VectorType>
207 const std::string& filename,
208 bool GridSplitUp =
false) {
210 if (f.size()==grid.size(GridType::dimension))
213 amiramesh.
addCellData(f, grid.leafView(),GridSplitUp);
215 amiramesh.
write(filename);