MOAB: Mesh Oriented datABase  (version 5.2.1)
NCHelperHOMME.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : NCHelperHOMME.hpp
00003 //
00004 // Purpose       : Climate NC file helper for HOMME grid
00005 //
00006 // Creator       : Danqing Wu
00007 //-------------------------------------------------------------------------
00008 
00009 #ifndef NCHELPERHOMME_HPP
00010 #define NCHELPERHOMME_HPP
00011 
00012 #include "NCHelper.hpp"
00013 
00014 namespace moab
00015 {
00016 
00017 //! Child helper class for HOMME grid (CAM_SE)
00018 class NCHelperHOMME : public UcdNCHelper
00019 {
00020   public:
00021     NCHelperHOMME( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet );
00022     static bool can_read_file( ReadNC* readNC, int fileId );
00023 
00024   private:
00025     //! Implementation of NCHelper::init_mesh_vals()
00026     virtual ErrorCode init_mesh_vals();
00027     //! Implementation of NCHelper::check_existing_mesh()
00028     virtual ErrorCode check_existing_mesh();
00029     //! Implementation of NCHelper::create_mesh()
00030     virtual ErrorCode create_mesh( Range& faces );
00031     //! Implementation of NCHelper::get_mesh_type_name()
00032     virtual std::string get_mesh_type_name()
00033     {
00034         return "CAM_SE";
00035     }
00036 
00037     //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
00038     virtual ErrorCode read_ucd_variables_to_nonset_allocate( std::vector< ReadNC::VarData >& vdatas,
00039                                                              std::vector< int >& tstep_nums );
00040 #ifdef MOAB_HAVE_PNETCDF
00041     //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_async()
00042     virtual ErrorCode read_ucd_variables_to_nonset_async( std::vector< ReadNC::VarData >& vdatas,
00043                                                           std::vector< int >& tstep_nums );
00044 #else
00045     //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
00046     virtual ErrorCode read_ucd_variables_to_nonset( std::vector< ReadNC::VarData >& vdatas,
00047                                                     std::vector< int >& tstep_nums );
00048 #endif
00049 
00050   private:
00051     int _spectralOrder;  // Read from variable 'np'
00052     int connectId;       // For connectivity file
00053     bool isConnFile;     // Is the data file being read actually a connectivity file in disguise?
00054 };
00055 
00056 }  // namespace moab
00057 
00058 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines