1 #ifndef DUNE_AMIRAMESH_WRITER_HH
2 #define DUNE_AMIRAMESH_WRITER_HH
6 #include <dune/common/array.hh>
9 #include <amiramesh/AmiraMesh.h>
18 template<
class Gr
idView>
44 template <
class Gr
idType2>
45 void addLevelGrid(
const GridType2& grid,
int level,
bool splitAll=
false);
55 template <
class Gr
idType2>
56 void addLeafGrid(
const GridType2& grid,
bool splitAll=
false);
64 template <
class DataContainer>
65 void addCellData(
const DataContainer& data,
const GridView& gridView,
bool GridSplitUp=
false);
73 template <
class DataContainer>
80 void write(
const std::string& filename,
bool ascii=
false)
const;
84 template <
class DataContainer>
86 const array<unsigned int, dim>& n,
87 const DataContainer& data);
101 const std::string& filename);
105 #if HAVE_AMIRAMESH // better: use a pointer here and forward-declare AmiraMesh
106 AmiraMesh amiramesh_;
114 template<
class Gr
idType>
126 this->
addGrid(grid.levelView(level));
136 const std::string& filename,
139 amiramesh.
write(filename);
150 template <
class VectorType>
153 const std::string& filename,
155 bool GridSplitUp=
false) {
157 if (f.size()==grid.size(level,GridType::dimension))
158 amiramesh.
addVertexData(f, grid.levelView(level),GridSplitUp);
160 amiramesh.
addCellData(f, grid.levelView(level),GridSplitUp);
161 amiramesh.
write(filename);
170 template<
class Gr
idType>
191 const std::string& filename) {
193 amiramesh.
write(filename);
202 template <
class VectorType>
205 const std::string& filename,
206 bool GridSplitUp =
false) {
208 if (f.size()==grid.size(GridType::dimension))
211 amiramesh.
addCellData(f, grid.leafView(),GridSplitUp);
213 amiramesh.
write(filename);