Go to the documentation of this file. 1
2
3
4
5
6
7
8
9 #ifndef NCHELPERMPAS_HPP
10 #define NCHELPERMPAS_HPP
11
12 #include "NCHelper.hpp"
13
14 namespace moab
15 {
16 #ifdef MOAB_HAVE_MPI
17 class ParallelComm;
18 #endif
19
20 class NCHelperMPAS : public UcdNCHelper
21 {
22 public:
23 NCHelperMPAS( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet );
24 static bool can_read_file( ReadNC* readNC );
25
26 private:
27
28 virtual ErrorCode init_mesh_vals();
29
30 virtual ErrorCode check_existing_mesh();
31
32 virtual ErrorCode create_mesh( Range& faces );
33
34 virtual std::string get_mesh_type_name()
35 {
36 return "MPAS";
37 }
38
39
40 virtual ErrorCode read_ucd_variables_to_nonset_allocate( std::vector< ReadNC::VarData >& vdatas,
41 std::vector< int >& tstep_nums );
42 #ifdef MOAB_HAVE_PNETCDF
43
44 virtual ErrorCode read_ucd_variables_to_nonset_async( std::vector< ReadNC::VarData >& vdatas,
45 std::vector< int >& tstep_nums );
46 #else
47
48 virtual ErrorCode read_ucd_variables_to_nonset( std::vector< ReadNC::VarData >& vdatas,
49 std::vector< int >& tstep_nums );
50 #endif
51
52 #ifdef MOAB_HAVE_MPI
53
54 ErrorCode redistribute_local_cells( int start_cell_index, ParallelComm* pco );
55 #endif
56
57
58 ErrorCode create_local_vertices( const std::vector< int >& vertices_on_local_cells, EntityHandle& start_vertex );
59
60
61 ErrorCode create_local_edges( EntityHandle start_vertex, const std::vector< int >& num_edges_on_local_cells );
62
63
64
65 ErrorCode create_local_cells( const std::vector< int >& vertices_on_local_cells,
66 const std::vector< int >& num_edges_on_local_cells,
67 EntityHandle start_vertex,
68 Range& faces );
69
70
71 ErrorCode create_padded_local_cells( const std::vector< int >& vertices_on_local_cells,
72 EntityHandle start_vertex,
73 Range& faces );
74
75
76 ErrorCode create_gather_set_vertices( EntityHandle gather_set, EntityHandle& gather_set_start_vertex );
77
78
79 ErrorCode create_gather_set_edges( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
80
81
82
83 ErrorCode create_gather_set_cells( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
84
85
86 ErrorCode create_padded_gather_set_cells( EntityHandle gather_set, EntityHandle gather_set_start_vertex );
87
88 private:
89 int maxEdgesPerCell;
90 int numCellGroups;
91 bool createGatherSet;
92 std::map< EntityHandle, int > cellHandleToGlobalID;
93 Range facesOwned;
94 };
95
96 }
97
98 #endif