Memosa-FVM  0.2
NcDataWriter.cpp
Go to the documentation of this file.
1 // This file os part of FVM
2 // Copyright (c) 2012 FVM Authors
3 // See LICENSE file for terms.
4 
5 #include <iostream>
6 #include <cassert>
7 #include <numeric>
8 
9 #include "NcDataWriter.h"
10 #include "netcdfcpp.h"
11 #include "StorageSite.h"
12 #include "Array.h"
13 #include "OneToOneIndexMap.h"
14 #include "CRConnectivity.h"
15 
17 
18 NcDataWriter::NcDataWriter( const MeshList& meshes, const string& fname )
19 : _meshList( meshes ), _fname( fname ), _ncFile(NULL), _xVals(NULL), _yVals(NULL), _zVals(NULL),
20 _gatherIndicesVals(NULL), _scatterIndicesVals(NULL), MAX_CHAR(40), BOUN_TYPE_DIM(false), NEIGH_MESH( false ), INTERFACE( false )
21 {
22 
23  init();
24 }
25 
26 
28 {
29  if ( _xVals ) delete [] _xVals;
30  if ( _yVals ) delete [] _yVals;
31  if ( _zVals ) delete [] _zVals;
32 
33  if ( _gatherIndicesVals ) delete [] _gatherIndicesVals;
35 
36  if ( _ncFile ) delete _ncFile;
37 
38 }
39 
40 
41 void
43 {
44  setNcFile();
45  setDims();
46  setVars();
48 
49  _ncFile->close();
50 }
51 
52  //PRIVATE FUNCTIONS
53 
54 void
56 {
57  _writeAction++;
58 }
59 
60 //setting NcFile
61 void
63 {
64  assert( !_ncFile );
65  _ncFile = new NcFile( _fname.c_str(), NcFile::Replace );
66  assert ( _ncFile->is_valid() );
67 
68 }
69 
70 //set NcDims
71 //set NcDims
72 void
74 {
75 
76  _nmesh = _ncFile->add_dim("nmesh", _meshList.size() );
77  assert( _ncFile->add_att("nmesh", "number of total meshes") );
78  int index_boun = 0;
79  int index_interface = 0;
80  int nnodes = 0;
81  int nfaces = 0;
82  int ncells = 0;
83  int nface_row = 0;
84  int nfaceCells_col = 0;
85  int nfaceNodes_col = 0;
86  int ninterface = 0;
87 
88  //summing up values from all meshes
89  for ( int id = 0; id < _nmesh->size(); id++ ){
90  index_boun += _meshList.at(id)->getBoundaryGroupCount();
91  index_interface += _meshList.at(id)->getInterfaceGroupCount();
92  nnodes += _meshList.at(id)->getNodes().getCount();
93  nfaces += _meshList.at(id)->getFaces().getCount();
94  ncells += _meshList.at(id)->getCells().getCount();
95  nface_row += _meshList.at(id)->getAllFaceCells().getRow().getLength();
96  nfaceCells_col += _meshList.at(id)->getAllFaceCells().getCol().getLength();
97  nfaceNodes_col += _meshList.at(id)->getAllFaceNodes().getCol().getLength();
98 
99  const StorageSite::ScatterMap& scatterMap = _meshList.at(id)->getCells().getScatterMap();
100  //loop over neighbour mesh to count interfaces
101  StorageSite::ScatterMap::const_iterator it;
102  for ( it = scatterMap.begin(); it != scatterMap.end(); it++ )
103  ninterface += it->second->getLength();
104 
105  }
106 
107 
108  if ( index_boun > 0 ){
109  BOUN_TYPE_DIM = true;
110  _nBoun = _ncFile->add_dim("boun_type_dim", index_boun );
111  assert( _ncFile->add_att("boun_type_dim", "total count of boundary types") );
112  }
113 
114 
115  _charSize = _ncFile->add_dim("char_dim", MAX_CHAR );
116  assert( _ncFile->add_att("char_dim", "maximum capacity of char variable" ) );
117 
118  if ( index_interface > 0 ){
119  NEIGH_MESH = true;
120  _nNeighMesh= _ncFile->add_dim("nNeighMesh", index_interface );
121  assert( _ncFile->add_att("nNeighMesh", "count of neighbour meshes") );
122  }
123 
124  _nnodes = _ncFile->add_dim("nnodes", nnodes);
125  _nfaces = _ncFile->add_dim("nfaces", nfaces);
126  _ncells = _ncFile->add_dim("ncells", ncells);
127  assert( _ncFile->add_att("nnodes", "number of nodes" ) );
128  assert( _ncFile->add_att("nfaces", "number of faces" ) );
129  assert( _ncFile->add_att("ncells", "number of cells" ) );
130 
131 
132  _nfaceRow = _ncFile->add_dim("nface_row", nface_row);
133  _nfaceCellsCol = _ncFile->add_dim("nfaceCells_col", nfaceCells_col);
134  _nfaceNodesCol = _ncFile->add_dim("nfaceNodes_col", nfaceNodes_col);
135  assert( _ncFile->add_att("nface_row", "row dimension of face connectivity" ) );
136  assert( _ncFile->add_att("nfaceCells_col", "col dimension of faceCells connectivity" ) );
137  assert( _ncFile->add_att("nfaceNodes_col", "col dimension of faceNodes connectivity" ) );
138 
139  if ( ninterface > 0 ){
140  INTERFACE = true;
141  _nInterface = _ncFile->add_dim("nInterface", ninterface);
142  assert( _ncFile->add_att("nInterface", "total interfaces") );
143  }
144 
145 
146 }
147 
148 //set NcVars
149 void
151 {
152 
153  _dimension = _ncFile->add_var("dimension", ncInt, _nmesh );
154  _meshID = _ncFile->add_var("mesh_id" , ncInt, _nmesh );
155  _facesCount = _ncFile->add_var("faces_count", ncInt, _nmesh );
156  _cellsCount = _ncFile->add_var("cells_count", ncInt, _nmesh );
157  _ghostCellsCount = _ncFile->add_var("ghost_cells_count", ncInt, _nmesh);
158  _nodesCount = _ncFile->add_var("nodes_count", ncInt, _nmesh );
159  _mapCount = _ncFile->add_var("map_count", ncInt, _nmesh );
160  _interiorFaceGroup = _ncFile->add_var("interior_faces_group", ncInt, _nmesh);
161 
162  _boundaryGroup = _ncFile->add_var("boundary_group", ncInt, _nmesh);
163  if ( BOUN_TYPE_DIM ){
164  _boundarySize = _ncFile->add_var("boundary_size", ncInt, _nBoun);
165  _boundaryOffset = _ncFile->add_var("boundary_offset", ncInt, _nBoun);
166  _boundaryID = _ncFile->add_var("boundary_id", ncInt, _nBoun);
167  _boundaryType = _ncFile->add_var("boundary_type", ncChar, _nBoun, _charSize );
168  }
169 
170  _interfaceGroup = _ncFile->add_var("interface_group" , ncInt, _nmesh );
171  if ( NEIGH_MESH ){
172  _interfaceSize = _ncFile->add_var("interface_size" , ncInt, _nNeighMesh );
173  _interfaceOffset = _ncFile->add_var("interface_offset", ncInt, _nNeighMesh );
174  _interfaceID = _ncFile->add_var("interface_id" , ncInt, _nNeighMesh );
175  }
176 
177  _x = _ncFile->add_var("x", ncDouble, _nnodes );
178  _y = _ncFile->add_var("y", ncDouble, _nnodes );
179  _z = _ncFile->add_var("z", ncDouble, _nnodes );
180 
181  _faceCellsRowCount = _ncFile->add_var("face_cells_row_count", ncInt, _nmesh );
182  _faceCellsColCount = _ncFile->add_var("face_cells_col_count", ncInt, _nmesh );
183  _faceNodesRowCount = _ncFile->add_var("face_nodes_row_count", ncInt, _nmesh );
184  _faceNodesColCount = _ncFile->add_var("face_nodes_col_count", ncInt, _nmesh );
185 
186  _faceCellsRow = _ncFile->add_var("face_cells_row", ncInt, _nfaceRow );
187  _faceCellsCol = _ncFile->add_var("face_cells_col", ncInt, _nfaceCellsCol );
188  _faceNodesRow = _ncFile->add_var("face_nodes_row", ncInt, _nfaceRow );
189  _faceNodesCol = _ncFile->add_var("face_nodes_col", ncInt, _nfaceNodesCol );
190 
191  if ( INTERFACE ){
192  _gatherIndices = _ncFile->add_var("gather_indices", ncInt, _nInterface);
193  _scatterIndices = _ncFile->add_var("scatter_indices" , ncInt, _nInterface);
194  }
195 
196  _bounBoolVar = _ncFile->add_var("is_bounTypeDim_Valid", ncInt);
197  _neighMeshBoolVar = _ncFile->add_var("is_neighMesh_Valid", ncInt);
198  _interfaceBoolVar = _ncFile->add_var("is_interface_Valid", ncInt);
199 
200 
201 
202 }
203 
204 //assign values to NcVars
205 void
207 {
208  //get variable values from meshes
209  get_var_values();
210 
211  //adding attirbutes
212  add_attributes();
213 
214  //write values
215  write_values();
216 
217 
218 }
219 
220 
221 
222 //getting values from meshes
223 //getting values from meshes
224 void
226 {
227 
228  assert( !_xVals );
229  assert( !_yVals );
230  assert( !_zVals );
231  assert( !_gatherIndicesVals );
232  assert( !_scatterIndicesVals );
233 
234  _xVals = new double [ _nnodes->size() ];
235  _yVals = new double [ _nnodes->size() ];
236  _zVals = new double [ _nnodes->size() ];
237 
238  if ( INTERFACE ){
239  _gatherIndicesVals = new int [ _nInterface->size() ];
240  _scatterIndicesVals = new int [ _nInterface->size() ];
241  }
242 
243  for ( long id = 0; id < _nmesh->size(); id++ ){
244  //dimension-s
245  _dimensionVals.push_back( _meshList.at(id)->getDimension() );
246 
247  //mesh id-s
248  _meshIDVals.push_back( _meshList.at(id)->getID() );
249 
250  //faces, cell, and node counts
251  _facesCountVals.push_back( _meshList.at(id)->getFaces().getSelfCount() );
252  _cellsCountVals.push_back( _meshList.at(id)->getCells().getSelfCount() );
253  _ghostCellsCountVals.push_back( _meshList.at(id)->getCells().getCount() -
254  _meshList.at(id)->getCells().getSelfCount() );
255  _nodesCountVals.push_back( _meshList.at(id)->getNodes().getSelfCount() );
256 
257  //neighbour counts
258  const Mesh::GhostCellSiteMap& ghostCellSiteScatterMap = _meshList.at(id)->getGhostCellSiteScatterMap();
259 
260  _mapCountVals.push_back( ghostCellSiteScatterMap.size() );
261 
262  //interior face counts
263  _interiorFaceGroupVals.push_back( _meshList.at(id)->getInteriorFaceGroup().site.getCount() );
264 
265  //boundary values
266  get_boundary_vals( id );
267 
268  //interface values
269  get_interface_vals( id );
270 
271  //x, y, z
272  get_coords( id );
273 
274  //connectivities
275  connectivities( id );
276 
277  //mappers
278  if ( INTERFACE )
279  mappers( id );
280 
281  }
282 }
283 //boundary face data
284 void
286 {
287  //boundary face
288  const FaceGroupList& bounFaceList = _meshList.at(id)->getBoundaryFaceGroups();
289  _boundaryGroupVals.push_back ( bounFaceList.size() );
290  if ( BOUN_TYPE_DIM ) {
291  for ( int boun = 0; boun < int(bounFaceList.size()); boun++ ) {
292  _boundarySizeVals.push_back( bounFaceList.at(boun)->site.getCount() );
293  _boundaryOffsetVals.push_back( bounFaceList.at(boun)->site.getOffset() );
294  _boundaryIDVals.push_back( bounFaceList.at(boun)->id );
295  _boundaryTypeVals.push_back( bounFaceList.at(boun)->groupType.c_str() );
296  //assign values
297  _boundaryType->set_cur(boun);
298  assert( int(bounFaceList.at(boun)->groupType.size()) < MAX_CHAR );
299  _boundaryType->put( _boundaryTypeVals[boun], 1, bounFaceList.at(boun)->groupType.size() );
300  }
301  }
302 
303 }
304 
305 //interface data
306 void
308 {
309  //interface
310  const FaceGroupList& interfaceList = _meshList.at(id)->getInterfaceGroups();
311  _interfaceGroupVals.push_back ( interfaceList.size() );
312  if ( NEIGH_MESH ){
313  for ( int interface = 0; interface < int( interfaceList.size() ); interface++ ){
314  _interfaceSizeVals.push_back ( interfaceList.at(interface)->site.getCount() );
315  _interfaceOffsetVals.push_back( interfaceList.at(interface)->site.getOffset() );
316  _interfaceIDVals.push_back ( interfaceList.at(interface)->id );
317  }
318  }
319 
320 }
321 
322 //coordinate values
323 void
325 {
326  int nn = _nodesCountVals.at(id);
327  const Mesh& mesh = *(_meshList.at(id));
328  const Array<Mesh::VecD3>& coord = mesh.getNodeCoordinates();
329  for ( int n = 0; n < nn; n++ ){
330  _xVals[n] = coord[n][0];
331  _yVals[n] = coord[n][1];
332  _zVals[n] = coord[n][2];
333  }
334 
335  _x->put( _xVals, nn );
336  _y->put( _yVals, nn );
337  _z->put( _zVals, nn );
338 
339  _x->set_cur( nn );
340  _y->set_cur( nn );
341  _z->set_cur( nn );
342 }
343 
344 //connectivities
345 void
347 {
348  //rows
349  const Mesh& mesh = *(_meshList.at(id));
350  const CRConnectivity& faceCells = mesh.getAllFaceCells();
351  const CRConnectivity& faceNodes = mesh.getAllFaceNodes();
352 
353  int nRow = faceCells.getRow().getLength();
354  _faceCellsRowCountVals.push_back( nRow );
355  _faceNodesRowCountVals.push_back( nRow );
356  _faceCellsRow->put( reinterpret_cast<int*> (faceCells.getRow().getData()), nRow );
357  _faceNodesRow->put( reinterpret_cast<int*> (faceNodes.getRow().getData()), nRow );
358  _faceCellsRow->set_cur( nRow );
359  _faceNodesRow->set_cur( nRow );
360 
361  //cols
362  int coldim = faceCells.getCol().getLength();
363  _faceCellsColCountVals.push_back ( coldim );
364  _faceCellsCol->put( reinterpret_cast<int*> (faceCells.getCol().getData()), coldim );
365  _faceCellsCol->set_cur( coldim );
366 
367  //cols (faceNodes)
368  coldim = faceNodes.getCol().getLength();
369  _faceNodesColCountVals.push_back( coldim );
370  _faceNodesCol->put( reinterpret_cast<int*> (faceNodes.getCol().getData()), coldim );
371  _faceNodesCol->set_cur( coldim );
372 
373 }
374 
375 
376 //MappersMap
377 void
379 {
380  const StorageSite::ScatterMap& cellScatterMap = _meshList.at(id)->getCells().getScatterMap();
381  const Mesh::GhostCellSiteMap & ghostCellSiteScatterMap = _meshList.at(id)->getGhostCellSiteScatterMap();
382 
383 
384  StorageSite::ScatterMap::const_iterator it_scatterMap;
385  Mesh::GhostCellSiteMap::const_iterator it_siteScatter;
386 
387  int indx = mappers_index( id );
388 
389  for ( it_siteScatter = ghostCellSiteScatterMap.begin(); it_siteScatter != ghostCellSiteScatterMap.end(); it_siteScatter++ ){
390  const StorageSite* site = it_siteScatter->second.get();
391  it_scatterMap = cellScatterMap.find( site );
392  int nend = it_scatterMap->second->getLength();
393 
394  for ( int n = 0; n < nend; n++ ){
395  _scatterIndicesVals[indx] = (*it_scatterMap->second)[n];
396  indx++;
397  }
398  }
399 
400  const StorageSite::GatherMap& cellGatherMap = _meshList.at(id)->getCells().getGatherMap();
401  const Mesh::GhostCellSiteMap & ghostCellSiteGatherMap = _meshList.at(id)->getGhostCellSiteGatherMap();
402  StorageSite::GatherMap ::const_iterator it_gatherMap;
403  Mesh::GhostCellSiteMap::const_iterator it_siteGather;
404  indx = mappers_index( id );
405  for ( it_siteGather = ghostCellSiteGatherMap.begin(); it_siteGather != ghostCellSiteGatherMap.end(); it_siteGather++ ){
406  const StorageSite* site = it_siteGather->second.get();
407  it_gatherMap = cellGatherMap.find( site );
408  int nend = it_gatherMap->second->getLength();
409 
410  for ( int n = 0; n < nend; n++ ){
411  _gatherIndicesVals[indx] = (*it_gatherMap->second)[n];
412  indx++;
413  }
414  }
415 
416 
417 }
418 
419 //mappers index
420 int
422 {
423  int ninterface = 0;
424  for ( int id = 0; id < mesh_end; id++ ){
425  const StorageSite::ScatterMap& scatterMap = _meshList.at(id)->getCells().getScatterMap();
426  //loop over neighbour mesh to count interfaces
427  StorageSite::ScatterMap::const_iterator it;
428  for ( it = scatterMap.begin(); it != scatterMap.end(); it++ )
429  ninterface += it->second->getLength();
430 
431  }
432 
433  return ninterface;
434 }
435 
436 //attributes
437 void
439 {
440  //add attributies
441  assert( _dimension->add_att("dim", "dimension of meshes, 1:1D, 2:2D, 3:3D." ) );
442  assert( _meshID->add_att("id", " mesh identificaton index" ) );
443  assert( _facesCount->add_att("StorageSite", "number of faces") );
444  assert( _cellsCount->add_att("StorageSite", "number of cells ") );
445  assert( _ghostCellsCount->add_att("StorageSite", "number of ghost cells") );
446  assert( _nodesCount->add_att("StorageSite", "number of nodes") );
447  assert( _mapCount->add_att("neigh_count", "total neighboorhood mesh counts") );
448  assert( _interiorFaceGroup->add_att("interior_face_group", "total interior faces") );
449 
450  assert( _boundaryGroup->add_att("boundary_group", " total boundary faces") );
451  if ( BOUN_TYPE_DIM ){
452  assert( _boundarySize->add_att("boundary_size", " size of boundary" ) );
453  assert( _boundaryOffset->add_att("boundary_offset", " offset of boundary" ) );
454  assert( _boundaryID->add_att("boundary_id", " boundary id " ) );
455  assert( _boundaryType->add_att("boundary_type", " type of boundary condition ") );
456  }
457 
458  assert( _interfaceGroup->add_att("interface_group", " total interfaces") );
459 
460  if ( NEIGH_MESH ){
461  assert( _interfaceSize->add_att("interface_size", " size of interface" ) );
462  assert( _interfaceOffset->add_att("interface_offset", " offset of interface" ) );
463  assert( _interfaceID->add_att("interface_id", " interface id " ) );
464  }
465 
466  assert( _x->add_att("x", "x-coordinate") );
467  assert( _y->add_att("y", "y-coordinate") );
468  assert( _z->add_att("z", "z-coordinate") );
469 
470  assert( _faceCellsRowCount->add_att("face_cells_row_count", "count of row values of faceCells CRconnctivities") );
471  assert( _faceNodesRowCount->add_att("face_nodes_row_count", "count of row values of faceNodes CRconnctivities") );
472  assert( _faceCellsColCount->add_att("face_cells_col_count", "count of col values of faceCells CRconnctivities") );
473  assert( _faceNodesColCount->add_att("face_nodes_col_count", "count of col values of faceNodes CRconnctivities") );
474 
475  assert( _faceCellsRow->add_att("face_cells_row", "row values of faceCells CRconnctivities") );
476  assert( _faceNodesRow->add_att("face_nodes_row", "row values of faceNodes CRconnctivities") );
477  assert( _faceCellsCol->add_att("face_cells_col", "col values of faceCells CRconnctivities") );
478  assert( _faceNodesCol->add_att("face_nodes_col", "col values of faceNodes CRconnctivities") );
479  if ( INTERFACE ){
480  assert( _gatherIndices->add_att("from_indices", "trom indices from other neightbour mesh " ) );
481  assert( _scatterIndices->add_att("to_indices", "to indices in current mesh") );
482  }
483 
484 }
485 
486 
487 
488 //write values
489 void
491 {
492  _dimension->put( &_dimensionVals[0], _nmesh->size() );
493  _meshID->put( &_meshIDVals[0], _nmesh->size() );
494  _facesCount->put( &_facesCountVals[0], _nmesh->size() );
495  _cellsCount->put( &_cellsCountVals[0], _nmesh->size() );
496  _ghostCellsCount->put( &_ghostCellsCountVals[0], _nmesh->size() );
497  _nodesCount->put( &_nodesCountVals[0], _nmesh->size() );
498  _mapCount->put( &_mapCountVals[0], _nmesh->size() );
499  _interiorFaceGroup->put( &_interiorFaceGroupVals[0], _nmesh->size() );
500 
501  _boundaryGroup->put(&_boundaryGroupVals[0], _nmesh->size() );
502  if ( BOUN_TYPE_DIM ){
505  _boundaryID->put( &_boundaryIDVals[0], _boundaryIDVals.size() );
506  }
507 
508  _interfaceGroup->put(&_interfaceGroupVals[0], _nmesh->size() );
509 
510  if ( NEIGH_MESH ){
513  _interfaceID->put( &_interfaceIDVals[0], _interfaceIDVals.size() );
514  }
515 
516  _faceCellsRowCount->put( &_faceCellsRowCountVals[0], _nmesh->size() );
517  _faceCellsColCount->put( &_faceCellsColCountVals[0], _nmesh->size() );
518  _faceNodesRowCount->put( &_faceNodesRowCountVals[0], _nmesh->size() );
519  _faceNodesColCount->put( &_faceNodesColCountVals[0], _nmesh->size() );
520 
521  if ( INTERFACE ){
524  }
525 
526  int boun_bool = int( BOUN_TYPE_DIM );
527  int neigh_bool= int( NEIGH_MESH );
528  int interface_bool = int ( INTERFACE );
529  _bounBoolVar->put( &boun_bool );
530  _neighMeshBoolVar->put( &neigh_bool );
531  _interfaceBoolVar->put( &interface_bool );
532 
533 
534 }
vector< int > _facesCountVals
Definition: NcDataWriter.h:119
const CRConnectivity & getAllFaceNodes() const
Definition: Mesh.cpp:368
const Array< int > & getCol() const
int * _scatterIndicesVals
Definition: NcDataWriter.h:148
const Array< int > & getRow() const
vector< int > _boundarySizeVals
Definition: NcDataWriter.h:127
vector< int > _meshIDVals
Definition: NcDataWriter.h:117
NcDim * _nInterface
Definition: NcDataWriter.h:70
NcVar * _mapCount
Definition: NcDataWriter.h:79
NcVar * _faceNodesColCount
Definition: NcDataWriter.h:100
NcVar * _boundaryType
Definition: NcDataWriter.h:86
vector< int > _faceNodesColCountVals
Definition: NcDataWriter.h:145
vector< int > _faceCellsRowCountVals
Definition: NcDataWriter.h:142
NcVar * _neighMeshBoolVar
Definition: NcDataWriter.h:112
NcVar * _bounBoolVar
Definition: NcDataWriter.h:111
NcVar * _faceCellsRow
Definition: NcDataWriter.h:102
vector< int > _interiorFaceGroupVals
Definition: NcDataWriter.h:124
NcVar * _faceCellsColCount
Definition: NcDataWriter.h:98
string _fname
Definition: NcDataWriter.h:54
vector< int > _boundaryIDVals
Definition: NcDataWriter.h:129
NcDim * _nfaceRow
Definition: NcDataWriter.h:66
Definition: Mesh.h:49
void connectivities(int id)
int mappers_index(int mesh_end)
NcVar * _meshID
Definition: NcDataWriter.h:74
void get_coords(int id)
NcDim * _nfaceNodesCol
Definition: NcDataWriter.h:68
bool BOUN_TYPE_DIM
Definition: NcDataWriter.h:151
NcVar * _gatherIndices
Definition: NcDataWriter.h:107
NcDim * _nnodes
Definition: NcDataWriter.h:62
NcVar * _x
Definition: NcDataWriter.h:93
NcVar * _dimension
Definition: NcDataWriter.h:73
NcVar * _nodesCount
Definition: NcDataWriter.h:78
NcVar * _interfaceID
Definition: NcDataWriter.h:91
NcDim * _nmesh
Definition: NcDataWriter.h:58
const MeshList _meshList
Definition: NcDataWriter.h:53
NcVar * _interiorFaceGroup
Definition: NcDataWriter.h:80
vector< int > _faceCellsColCountVals
Definition: NcDataWriter.h:143
NcVar * _faceNodesCol
Definition: NcDataWriter.h:105
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
vector< int > _mapCountVals
Definition: NcDataWriter.h:123
vector< int > _interfaceOffsetVals
Definition: NcDataWriter.h:135
void mappers(int id)
NcDim * _nfaces
Definition: NcDataWriter.h:63
NcFile * _ncFile
Definition: NcDataWriter.h:56
vector< int > _boundaryGroupVals
Definition: NcDataWriter.h:126
const Array< VecD3 > & getNodeCoordinates() const
Definition: Mesh.h:218
NcDim * _charSize
Definition: NcDataWriter.h:60
virtual void * getData() const
Definition: Array.h:275
NcVar * _interfaceGroup
Definition: NcDataWriter.h:88
NcVar * _boundaryID
Definition: NcDataWriter.h:85
NcVar * _interfaceSize
Definition: NcDataWriter.h:89
vector< FaceGroupPtr > FaceGroupList
Definition: Mesh.h:47
map< PartIDMeshIDPair, shared_ptr< StorageSite > > GhostCellSiteMap
Definition: Mesh.h:63
NcVar * _boundaryGroup
Definition: NcDataWriter.h:82
NcVar * _facesCount
Definition: NcDataWriter.h:75
NcVar * _cellsCount
Definition: NcDataWriter.h:76
vector< const char * > _boundaryTypeVals
Definition: NcDataWriter.h:130
void set_var_values()
NcDim * _nNeighMesh
Definition: NcDataWriter.h:61
NcVar * _z
Definition: NcDataWriter.h:95
vector< int > _ghostCellsCountVals
Definition: NcDataWriter.h:121
NcVar * _ghostCellsCount
Definition: NcDataWriter.h:77
double * _yVals
Definition: NcDataWriter.h:139
NcDim * _nBoun
Definition: NcDataWriter.h:59
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
void get_boundary_vals(int id)
vector< int > _interfaceGroupVals
Definition: NcDataWriter.h:133
NcVar * _faceNodesRowCount
Definition: NcDataWriter.h:99
Definition: Array.h:14
NcVar * _y
Definition: NcDataWriter.h:94
int * _gatherIndicesVals
Definition: NcDataWriter.h:147
double * _zVals
Definition: NcDataWriter.h:140
NcDim * _nfaceCellsCol
Definition: NcDataWriter.h:67
vector< int > _boundaryOffsetVals
Definition: NcDataWriter.h:128
NcVar * _interfaceBoolVar
Definition: NcDataWriter.h:113
vector< int > _faceNodesRowCountVals
Definition: NcDataWriter.h:144
double * _xVals
Definition: NcDataWriter.h:138
NcVar * _scatterIndices
Definition: NcDataWriter.h:108
vector< int > _nodesCountVals
Definition: NcDataWriter.h:122
NcDataWriter(const MeshList &meshes, const string &fname)
NcVar * _interfaceOffset
Definition: NcDataWriter.h:90
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
void write_values()
vector< int > _dimensionVals
Definition: NcDataWriter.h:116
NcVar * _faceCellsRowCount
Definition: NcDataWriter.h:97
void get_var_values()
const int MAX_CHAR
Definition: NcDataWriter.h:150
NcDim * _ncells
Definition: NcDataWriter.h:64
NcVar * _boundarySize
Definition: NcDataWriter.h:83
void setNcFile()
NcVar * _faceCellsCol
Definition: NcDataWriter.h:103
vector< int > _interfaceSizeVals
Definition: NcDataWriter.h:134
vector< int > _interfaceIDVals
Definition: NcDataWriter.h:136
void get_interface_vals(int id)
vector< int > _cellsCountVals
Definition: NcDataWriter.h:120
void add_attributes()
vector< Mesh * > MeshList
Definition: Mesh.h:439
NcVar * _faceNodesRow
Definition: NcDataWriter.h:104
int getLength() const
Definition: Array.h:87
static int _writeAction
Definition: NcDataWriter.h:26
NcVar * _boundaryOffset
Definition: NcDataWriter.h:84