BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / graphics / ensightFoamReader / USERD_get_part_node_ids.H
blobb270a1b57b0658ebb3208c7277f90d5fc1724890
1 int USERD_get_part_node_ids
3     int part_number,
4     int *nodeid_array
7 #ifdef ENSIGHTDEBUG
8     Info<< "Entering: USERD_get_part_node_ids" << endl
9         << "part_number = " << part_number << endl
10         << flush;
11 #endif
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     {
23         label patchi = part_number-2;
24         const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
25         const vectorField& points = bMesh[patchi].points();
27         label nPoints = points.size();
29         for (label indx=0; indx<nPoints; indx++)
30         {
31             nodeid_array[indx] = indx + 1;
32         }
34     }
35     else if (part_number == nPatches+2)
36     {
37         label indx = 0;
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     }
50 #ifdef ENSIGHTDEBUG
51     Info<< "Leaving: USERD_get_part_node_ids" << endl
52         << flush;
53 #endif
55     return Z_OK;