MOAB: Mesh Oriented datABase  (version 5.4.1)
NCHelperScrip.hpp
Go to the documentation of this file.
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 
00014 class NCHelperScrip : public ScdNCHelper
00015 {
00016   public:
00017     NCHelperScrip( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet )
00018         : ScdNCHelper( readNC, fileId, opts, fileSet ), grid_corners( 0 ), grid_size( 0 ), nLocalCells( 0 ),
00019           degrees( true )
00020     {
00021     }
00022     static bool can_read_file( ReadNC* readNC, int fileId );
00023 
00024     ErrorCode create_mesh( Range& faces );
00025 
00026 #ifdef MOAB_HAVE_MPI
00027     //! Redistribute local cells after trivial partition (e.g. Zoltan partition, if applicable)
00028     ErrorCode redistribute_local_cells( int start_cell_index );
00029 #endif
00030 
00031   private:
00032     virtual ErrorCode init_mesh_vals();
00033     virtual std::string get_mesh_type_name()
00034     {
00035         return "SCRIP";
00036     }
00037 
00038     int grid_corners;  // number of vertices per cell
00039     int grid_size;
00040     int nLocalCells;      // in parallel, number of local cells, initially, and after repartition
00041     Range localGidCells;  // will store the ids after repartitioning;
00042     bool degrees;         // if false, it means it is radians
00043 };
00044 
00045 } /* namespace moab */
00046 
00047 #endif /* SRC_IO_NCHELPERSCRIP_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines