dune-grid
2.1.1
|
00001 #ifndef DUNE_AMIRAMESH_READER_HH 00002 #define DUNE_AMIRAMESH_READER_HH 00003 00004 #include <string> 00005 00006 #include <dune/grid/common/gridfactory.hh> 00007 00008 #if HAVE_AMIRAMESH 00009 #include <amiramesh/AmiraMesh.h> 00010 #else 00011 // forward declaration so we can at least compile the header without libamiramesh 00012 class AmiraMesh; 00013 #endif 00014 00015 namespace Dune { 00016 00021 template<class GridType> 00022 class AmiraMeshReader { 00023 00025 static void createDomain(GridFactory<GridType>& factory, const std::string& filename); 00026 00028 static void buildGrid(GridFactory<GridType>& factory, AmiraMesh* am); 00029 00031 static void build2dGrid(GridFactory<GridType>& factory, AmiraMesh* am); 00032 00033 public: 00034 00039 static GridType* read(const std::string& filename); 00040 00046 static void read(GridType& grid, 00047 const std::string& filename); 00048 00068 static GridType* read(const std::string& filename, 00069 const std::string& domainFilename); 00070 00077 static void read(GridType& grid, 00078 const std::string& filename, 00079 const std::string& domainFilename); 00080 00088 template<class DiscFuncType> 00089 static void readFunction(DiscFuncType& f, const std::string& filename); 00090 00091 }; 00092 00093 } 00094 00095 #if HAVE_AMIRAMESH 00096 #include "amiramesh/amirameshreader.cc" 00097 #endif 00098 00099 #endif