USERD_get_nfaced_nodes_per_face.H
Go to the documentation of this file.
1 
3 (
4  int part_number,
5  int *nfaced_npf_array
6 )
7 {
8 #ifdef ENSIGHTDEBUG
9  Info<< "Entering: USERD_get_nfaced_nodes_per_face"
10  << ", part_number = " << part_number
11  << endl
12  << flush;
13 #endif
14 
15  if (part_number == 1)
16  {
17  const cellShapeList& cellShapes = meshPtr->cellShapes();
18  const cellList& cells = meshPtr->cells();
19  const faceList& faces = meshPtr->faces();
20 
21  label nCells = cellShapes.size();
22  label nFaced = 0;
23  for (label n=0; n<nCells; n++)
24  {
25  label nFacesInCell = cells[n].size();
26  labelList points = cellShapes[n];
27  label nPoints = points.size();
28 
29  if ((nFacesInCell == 6) && (nPoints == 8))
30  {}
31  else if ((nFacesInCell == 4) && (nPoints == 4))
32  {}
33  else if (nFacesInCell == 5)
34  {
35  if (nPoints == 6)
36  {}
37  else if (nPoints == 5)
38  {}
39  else
40  {
41  for (label i=0; i<nFacesInCell; i++)
42  {
43  label facei = cells[n][i];
44  label nFacePoints = faces[facei].size();
45  nfaced_npf_array[nFaced++] = nFacePoints;
46  }
47  }
48  }
49  else
50  {
51  for (label i=0; i<nFacesInCell; i++)
52  {
53  label facei = cells[n][i];
54  label nFacePoints = faces[facei].size();
55  nfaced_npf_array[nFaced++] = nFacePoints;
56  }
57  }
58  }
59 
60  }
61  else if (part_number < nPatches+2)
62  {
63  return Z_ERR;
64  }
65  else
66  {
67  return Z_ERR;
68  }
69 #ifdef ENSIGHTDEBUG
70  Info<< "Exiting: USERD_get_nfaced_nodes_per_face" << endl
71  << flush;
72 #endif
73  return Z_OK;
74 }
label nPatches
Definition: readKivaGrid.H:402
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static fvMesh * meshPtr
Definition: globalFoam.H:52
List< face > faceList
Definition: faceListFwd.H:43
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
int USERD_get_nfaced_nodes_per_face(int part_number, int *nfaced_npf_array)
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
Definition: cellShapeList.H:43
const cellShapeList & cells
const pointField & points
label nPoints
const cellShapeList & cellShapes
List< label > labelList
A List of labels.
Definition: labelList.H:56
Ostream & flush(Ostream &os)
Flush stream.
Definition: Ostream.H:243
messageStream Info
label n
List< cell > cellList
list of cells
Definition: cellList.H:42