1 // Note: coord_array is 1-based.
3 int USERD_get_part_coords
11 Info<< "Entering: USERD_get_part_coords" << endl <<
12 "part_number = " << part_number << endl << flush;
18 //# include "checkForNewMesh.H"
20 const vectorField& points = meshPtr->points();
21 label nPoints = points.size();
23 for (label indx=0; indx<nPoints; indx++)
25 coord_array[0][indx+1] = (float)points[indx].x();
26 coord_array[1][indx+1] = (float)points[indx].y();
27 coord_array[2][indx+1] = (float)points[indx].z();
30 else if (part_number < nPatches+2)
33 //# include "checkForNewMesh.H"
35 label patchi = part_number-2;
36 const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
37 const vectorField& points = bMesh[patchi].points();
38 label nPoints = points.size();
40 for (label indx=0; indx<nPoints; indx++)
42 coord_array[0][indx+1] = (float)points[indx].x();
43 coord_array[1][indx+1] = (float)points[indx].y();
44 coord_array[2][indx+1] = (float)points[indx].z();
48 else if (part_number == nPatches+2)
52 forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
54 coord_array[0][indx] = (float)iter().position().x();
55 coord_array[1][indx] = (float)iter().position().y();
56 coord_array[2][indx] = (float)iter().position().z();
67 Info<< "Leaving: USERD_get_part_coords" << endl << flush;