FreeFOAM The Cross-Platform CFD Toolkit
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  for
39  (
40  Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
41  elmnt != sprayPtr->end();
42  ++elmnt
43  )
44  {
45  nodeid_array[indx] = indx + 1;
46  indx++;
47  }
48  }
49  else
50  {
51  return Z_ERR;
52  }
53 
54 #ifdef ENSIGHTDEBUG
55  Info << "Leaving: USERD_get_part_node_ids" << endl
56  << flush;
57 #endif
58 
59  return Z_OK;
60 }
61 
62 // ************************ vim: set sw=4 sts=4 et: ************************ //