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;
17 //# include "checkForNewMesh.H"
19 const vectorField& points = meshPtr->points();
20 label nPoints = points.size();
22 for (label indx=0; indx<nPoints; indx++)
24 coord_array[0][indx+1] = scalingFactor*(float)points[indx].x();
25 coord_array[1][indx+1] = scalingFactor*(float)points[indx].y();
26 coord_array[2][indx+1] = scalingFactor*(float)points[indx].z();
29 else if (part_number < nPatches+2)
31 //# include "checkForNewMesh.H"
33 label patchi = part_number-2;
34 const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
35 const vectorField& points = bMesh[patchi].points();
36 label nPoints = points.size();
38 for (label indx=0; indx<nPoints; indx++)
40 coord_array[0][indx+1] = scalingFactor*(float)points[indx].x();
41 coord_array[1][indx+1] = scalingFactor*(float)points[indx].y();
42 coord_array[2][indx+1] = scalingFactor*(float)points[indx].z();
46 else if (sprayPtr && part_number == nPatches+2)
52 Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
53 elmnt != sprayPtr->end();
57 coord_array[0][indx] = scalingFactor*(float)elmnt().position().x();
58 coord_array[1][indx] = scalingFactor*(float)elmnt().position().y();
59 coord_array[2][indx] = scalingFactor*(float)elmnt().position().z();
66 && part_number == secondMeshPartNum
69 const vectorField& points = secondMeshPtr->points();
70 label nPoints = points.size();
72 for (label indx=0; indx<nPoints; indx++)
74 coord_array[0][indx+1] = scalingFactor*(float)points[indx].x();
75 coord_array[1][indx+1] = scalingFactor*(float)points[indx].y();
76 coord_array[2][indx+1] = scalingFactor*(float)points[indx].z();
82 && part_number <= secondMeshPartNum + nSecondMeshPatches
85 label patchi = part_number - secondMeshPartNum - 1;
87 const polyBoundaryMesh& bMesh = secondMeshPtr->boundaryMesh();
88 const vectorField& points = bMesh[patchi].points();
89 label nPoints = points.size();
91 for (label indx=0; indx<nPoints; indx++)
93 coord_array[0][indx+1] = scalingFactor*(float)points[indx].x();
94 coord_array[1][indx+1] = scalingFactor*(float)points[indx].y();
95 coord_array[2][indx+1] = scalingFactor*(float)points[indx].z();
101 && part_number == Numparts_available
104 const vectorField& points = faMeshPtr->points();
105 label nPoints = points.size();
107 for (label indx=0; indx<nPoints; indx++)
109 coord_array[0][indx+1] = scalingFactor*(float)points[indx].x();
110 coord_array[1][indx+1] = scalingFactor*(float)points[indx].y();
111 coord_array[2][indx+1] = scalingFactor*(float)points[indx].z();
120 Info << "Leaving: USERD_get_part_coords" << endl << flush;