LCOV - code coverage report
Current view: top level - src/io - NCHelperMPAS.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 0 3 0.0 %
Date: 2020-12-16 07:07:30 Functions: 0 2 0.0 %
Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : //-------------------------------------------------------------------------
       2                 :            : // Filename      : NCHelperMPAS.hpp
       3                 :            : //
       4                 :            : // Purpose       : Climate NC file helper for MPAS grid
       5                 :            : //
       6                 :            : // Creator       : Danqing Wu
       7                 :            : //-------------------------------------------------------------------------
       8                 :            : 
       9                 :            : #ifndef NCHELPERMPAS_HPP
      10                 :            : #define NCHELPERMPAS_HPP
      11                 :            : 
      12                 :            : #include "NCHelper.hpp"
      13                 :            : 
      14                 :            : namespace moab
      15                 :            : {
      16                 :            : 
      17                 :            : //! Child helper class for MPAS grid
      18         [ #  # ]:          0 : class NCHelperMPAS : public UcdNCHelper
      19                 :            : {
      20                 :            :   public:
      21                 :            :     NCHelperMPAS( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet );
      22                 :            :     static bool can_read_file( ReadNC* readNC );
      23                 :            : 
      24                 :            :   private:
      25                 :            :     //! Implementation of NCHelper::init_mesh_vals()
      26                 :            :     virtual ErrorCode init_mesh_vals();
      27                 :            :     //! Implementation of NCHelper::check_existing_mesh()
      28                 :            :     virtual ErrorCode check_existing_mesh();
      29                 :            :     //! Implementation of NCHelper::create_mesh()
      30                 :            :     virtual ErrorCode create_mesh( Range& faces );
      31                 :            :     //! Implementation of NCHelper::get_mesh_type_name()
      32                 :          0 :     virtual std::string get_mesh_type_name()
      33                 :            :     {
      34         [ #  # ]:          0 :         return "MPAS";
      35                 :            :     }
      36                 :            : 
      37                 :            :     //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
      38                 :            :     virtual ErrorCode read_ucd_variables_to_nonset_allocate( std::vector< ReadNC::VarData >& vdatas,
      39                 :            :                                                              std::vector< int >& tstep_nums );
      40                 :            : #ifdef MOAB_HAVE_PNETCDF
      41                 :            :     //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_async()
      42                 :            :     virtual ErrorCode read_ucd_variables_to_nonset_async( std::vector< ReadNC::VarData >& vdatas,
      43                 :            :                                                           std::vector< int >& tstep_nums );
      44                 :            : #else
      45                 :            :     //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
      46                 :            :     virtual ErrorCode read_ucd_variables_to_nonset( std::vector< ReadNC::VarData >& vdatas,
      47                 :            :                                                     std::vector< int >& tstep_nums );
      48                 :            : #endif
      49                 :            : 
      50                 :            : #ifdef MOAB_HAVE_MPI
      51                 :            :     //! Redistribute local cells after trivial partition (e.g. Zoltan partition, if applicable)
      52                 :            :     ErrorCode redistribute_local_cells( int start_cell_index );
      53                 :            : #endif
      54                 :            : 
      55                 :            :     //! Create local vertices
      56                 :            :     ErrorCode create_local_vertices( const std::vector< int >& vertices_on_local_cells, EntityHandle& start_vertex );
      57                 :            : 
      58                 :            :     //! Create local edges (optional)
      59                 :            :     ErrorCode create_local_edges( EntityHandle start_vertex, const std::vector< int >& num_edges_on_local_cells );
      60                 :            : 
      61                 :            :     //! Create local cells without padding (cells are divided into groups based on the number of
      62                 :            :     //! edges)
      63                 :            :     ErrorCode create_local_cells( const std::vector< int >& vertices_on_local_cells,
      64                 :            :                                   const std::vector< int >& num_edges_on_local_cells, EntityHandle start_vertex,
      65                 :            :                                   Range& faces );
      66                 :            : 
      67                 :            :     //! Create local cells with padding (padded cells will have the same number of edges)
      68                 :            :     ErrorCode create_padded_local_cells( const std::vector< int >& vertices_on_local_cells, EntityHandle start_vertex,
      69                 :            :                                          Range& faces );
      70                 :            : 
      71                 :            :     //! Create gather set vertices
      72                 :            :     ErrorCode create_gather_set_vertices( EntityHandle gather_set, EntityHandle& gather_set_start_vertex );
      73                 :            : 
      74                 :            :     //! Create gather set edges (optional)
      75                 :            :     ErrorCode create_gather_set_edges( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
      76                 :            : 
      77                 :            :     //! Create gather set cells without padding (cells are divided into groups based on the number
      78                 :            :     //! of edges)
      79                 :            :     ErrorCode create_gather_set_cells( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
      80                 :            : 
      81                 :            :     //! Create gather set cells with padding (padded cells will have the same number of edges)
      82                 :            :     ErrorCode create_padded_gather_set_cells( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
      83                 :            : 
      84                 :            :   private:
      85                 :            :     int maxEdgesPerCell;
      86                 :            :     int numCellGroups;
      87                 :            :     bool createGatherSet;
      88                 :            :     std::map< EntityHandle, int > cellHandleToGlobalID;
      89                 :            :     Range facesOwned;
      90                 :            : };
      91                 :            : 
      92                 :            : }  // namespace moab
      93                 :            : 
      94                 :            : #endif

Generated by: LCOV version 1.11