USERD_get_nfaced_conn.H
Go to the documentation of this file.
1 
3 (
4  int part_number,
5  int *nfaced_conn_array
6 )
7 {
8 #ifdef ENSIGHTDEBUG
9  Info<< "Entering: USERD_get_nfaced_conn"
10  << ", part_number = " << part_number
11  << endl
12  << flush;
13 #endif
14 
15  if (part_number == 1)
16  {
17  label nPoint = 0;
18  const cellShapeList& cellShapes = meshPtr->cellShapes();
19  const cellList& cells = meshPtr->cells();
20  const faceList& faces = meshPtr->faces();
21  label nCells = cellShapes.size();
22 
23  for (label n=0; n<nCells; n++)
24  {
25  label nFacesInCell = cells[n].size();
26  labelList points = cellShapes[n];
27  if ((nFacesInCell == 6) && (points.size() == 8))
28  {}
29  else if ((nFacesInCell == 4) && (points.size() == 4))
30  {}
31  else if (nFacesInCell == 5)
32  {
33  if (points.size() == 6)
34  {}
35  else if (points.size() == 5)
36  {}
37  else
38  {
39  for (label i=0; i<nFacesInCell; i++)
40  {
41  label facei = cells[n][i];
42  label nPoints = faces[facei].size();
43  for (label j=0; j<nPoints; j++)
44  {
45  nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
46  }
47  }
48  }
49  }
50  else
51  {
52  for (label i=0; i<nFacesInCell; i++)
53  {
54  label facei = cells[n][i];
55  label nPoints = faces[facei].size();
56  for (label j=0; j<nPoints; j++)
57  {
58  nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
59  }
60  }
61  }
62  }
63 
64  }
65  else if (part_number < nPatches+2)
66  {
67 
68  }
69  else
70  {
71  return Z_ERR;
72  }
73 
74 #ifdef ENSIGHTDEBUG
75  Info<< "Exiting: USERD_get_nfaced_conn" << endl
76  << flush;
77 #endif
78  return Z_OK;
79 }
label nPatches
Definition: readKivaGrid.H:402
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
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:256
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:248
messageStream Info
label n
int USERD_get_nfaced_conn(int part_number, int *nfaced_conn_array)
List< cell > cellList
list of cells
Definition: cellList.H:42