USERD_get_part_node_ids.H
Go to the documentation of this file.
2 (
3  int part_number,
4  int *nodeid_array
5 )
6 {
7 #ifdef ENSIGHTDEBUG
8  Info<< "Entering: USERD_get_part_node_ids" << endl
9  << "part_number = " << part_number << endl
10  << flush;
11 #endif
12 
13  if (part_number == 1)
14  {
15  for (label indx=0; indx<Num_global_nodes; indx++)
16  {
17  nodeid_array[indx] = indx + 1;
18  }
19  }
20  else if (part_number < nPatches+2)
21  {
22 
23  label patchi = part_number-2;
24  const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
25  const vectorField& points = bMesh[patchi].points();
26 
27  label nPoints = points.size();
28 
29  for (label indx=0; indx<nPoints; indx++)
30  {
31  nodeid_array[indx] = indx + 1;
32  }
33 
34  }
35  else if (part_number == nPatches+2)
36  {
37  label indx = 0;
38 
39  forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
40  {
41  nodeid_array[indx] = indx + 1;
42  indx++;
43  }
44  }
45  else
46  {
47  return Z_ERR;
48  }
49 
50 #ifdef ENSIGHTDEBUG
51  Info<< "Leaving: USERD_get_part_node_ids" << endl
52  << flush;
53 #endif
54 
55  return Z_OK;
56 }
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
int USERD_get_part_node_ids(int part_number, int *nodeid_array)
static fvMesh * meshPtr
Definition: globalFoam.H:52
static Cloud< passiveParticle > * sprayPtr
Definition: globalFoam.H:53
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
static int Num_global_nodes
Definition: globalFoam.H:19
volVectorField vectorField(fieldObject, mesh)
const pointField & points
label nPoints
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:29
label patchi
Ostream & flush(Ostream &os)
Flush stream.
Definition: Ostream.H:243
const polyBoundaryMesh & bMesh
messageStream Info