![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
00001 //-------------------------------------------------------------------------
00002 // Filename : NCHelperGCRM.hpp
00003 //
00004 // Purpose : Climate NC file helper for GCRM grid
00005 //
00006 // Creator : Danqing Wu
00007 //-------------------------------------------------------------------------
00008
00009 #ifndef NCHELPERGCRM_HPP
00010 #define NCHELPERGCRM_HPP
00011
00012 #include "NCHelper.hpp"
00013
00014 namespace moab
00015 {
00016 #ifdef MOAB_HAVE_MPI
00017 class ParallelComm;
00018 #endif
00019 //! Child helper class for GCRM grid
00020 class NCHelperGCRM : public UcdNCHelper
00021 {
00022 public:
00023 NCHelperGCRM( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet );
00024 static bool can_read_file( ReadNC* readNC );
00025
00026 private:
00027 //! Implementation of NCHelper::init_mesh_vals()
00028 virtual ErrorCode init_mesh_vals();
00029 //! Implementation of NCHelper::check_existing_mesh()
00030 virtual ErrorCode check_existing_mesh();
00031 //! Implementation of NCHelper::create_mesh()
00032 virtual ErrorCode create_mesh( Range& faces );
00033 //! Implementation of NCHelper::get_mesh_type_name()
00034 virtual std::string get_mesh_type_name()
00035 {
00036 return "GCRM";
00037 }
00038
00039 //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
00040 virtual ErrorCode read_ucd_variables_to_nonset_allocate( std::vector< ReadNC::VarData >& vdatas,
00041 std::vector< int >& tstep_nums );
00042 #ifdef MOAB_HAVE_PNETCDF
00043 //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_async()
00044 virtual ErrorCode read_ucd_variables_to_nonset_async( std::vector< ReadNC::VarData >& vdatas,
00045 std::vector< int >& tstep_nums );
00046 #else
00047 //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
00048 virtual ErrorCode read_ucd_variables_to_nonset( std::vector< ReadNC::VarData >& vdatas,
00049 std::vector< int >& tstep_nums );
00050 #endif
00051
00052 #ifdef MOAB_HAVE_MPI
00053 //! Redistribute local cells after trivial partition (e.g. Zoltan partition, if applicable)
00054 ErrorCode redistribute_local_cells( int start_cell_index, ParallelComm * pco );
00055 #endif
00056
00057 //! Create local vertices
00058 ErrorCode create_local_vertices( const std::vector< int >& vertices_on_local_cells, EntityHandle& start_vertex );
00059
00060 //! Create local edges (optional)
00061 ErrorCode create_local_edges( EntityHandle start_vertex );
00062
00063 //! Create local cells with padding (pentagons are padded to hexagons)
00064 ErrorCode create_padded_local_cells( const std::vector< int >& vertices_on_local_cells,
00065 EntityHandle start_vertex,
00066 Range& faces );
00067
00068 //! Create gather set vertices
00069 ErrorCode create_gather_set_vertices( EntityHandle gather_set, EntityHandle& gather_set_start_vertex );
00070
00071 //! Create gather set edges (optional)
00072 ErrorCode create_gather_set_edges( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
00073
00074 //! Create gather set cells with padding (pentagons are padded to hexagons)
00075 ErrorCode create_padded_gather_set_cells( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
00076
00077 private:
00078 bool createGatherSet;
00079 Range facesOwned;
00080 };
00081
00082 } // namespace moab
00083
00084 #endif