Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
NCHelperDomain.hpp
Go to the documentation of this file.
1 //-------------------------------------------------------------------------
2 // Filename : NCHelperFV.hpp
3 //
4 // Purpose : Climate NC file helper for Domain grid
5 
6 //-----------------------
7 #ifndef NCHELPERDOMAIN_HPP
8 #define NCHELPERDOMAIN_HPP
9 
10 #include "NCHelper.hpp"
11 
12 namespace moab
13 {
14 #ifdef MOAB_HAVE_MPI
15 class ParallelComm;
16 #endif
17 //! Child helper class for Domain grid
19 {
20  public:
21  NCHelperDomain( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet )
22  : ScdNCHelper( readNC, fileId, opts, fileSet )
23  {
24  }
25  static bool can_read_file( ReadNC* readNC, int fileId );
26 
27  ErrorCode create_mesh( Range& faces );
28 
29  private:
30  virtual ErrorCode init_mesh_vals();
31  virtual std::string get_mesh_type_name()
32  {
33  return "DOMAIN";
34  }
35 #ifdef MOAB_HAVE_MPI
36  ErrorCode redistribute_cells( moab::ParallelComm* myPcomm,
37  std::vector< double >& xc,
38  std::vector< double >& yc,
39  std::vector< double >& xv,
40  std::vector< double >& yv,
41  std::vector< double >& frac,
42  std::vector< int >& mask,
43  std::vector< double >& area,
44  std::vector< int >& gids,
45  int nv, // number of vertices per cell
46  bool nv_last );
47 #endif
48  int nv; // number of vertices per cell
49  int nvDim; // index of nv dim
50 };
51 
52 #endif /* NCHELPERDOMAIN_HPP */
53 } // namespace moab