Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
00001 /* 00002 * NCHelperScrip.hpp 00003 * Purpose : Climate NC file helper for Scrip grid 00004 */ 00005 00006 #ifndef SRC_IO_NCHELPERSCRIP_HPP_ 00007 #define SRC_IO_NCHELPERSCRIP_HPP_ 00008 00009 #include "NCHelper.hpp" 00010 00011 namespace moab 00012 { 00013 #ifdef MOAB_HAVE_MPI 00014 class ParallelComm; 00015 #endif 00016 class NCHelperScrip : public ScdNCHelper 00017 { 00018 public: 00019 NCHelperScrip( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet ) 00020 : ScdNCHelper( readNC, fileId, opts, fileSet ), grid_corners( 0 ), grid_size( 0 ), nLocalCells( 0 ), 00021 degrees( true ) 00022 { 00023 } 00024 static bool can_read_file( ReadNC* readNC, int fileId ); 00025 00026 ErrorCode create_mesh( Range& faces ); 00027 00028 #ifdef MOAB_HAVE_MPI 00029 //! Redistribute local cells after trivial partition (e.g. Zoltan partition, if applicable) 00030 ErrorCode redistribute_local_cells( int start_cell_index, ParallelComm * pco ); 00031 #endif 00032 00033 private: 00034 virtual ErrorCode init_mesh_vals(); 00035 virtual std::string get_mesh_type_name() 00036 { 00037 return "SCRIP"; 00038 } 00039 00040 int grid_corners; // number of vertices per cell 00041 int grid_size; 00042 int nLocalCells; // in parallel, number of local cells, initially, and after repartition 00043 Range localGidCells; // will store the ids after repartitioning; 00044 bool degrees; // if false, it means it is radians 00045 }; 00046 00047 } /* namespace moab */ 00048 00049 #endif /* SRC_IO_NCHELPERSCRIP_HPP_ */