mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use forAllIter, forAllConstIter instead of long-hand version
STYLE: use 'forAll(' NOT 'forAll (', as per coding guide
This commit is contained in:
@ -47,19 +47,13 @@ int USERD_get_part_coords
|
||||
}
|
||||
else if (part_number == nPatches+2)
|
||||
{
|
||||
|
||||
label indx = 1;
|
||||
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
|
||||
elmnt != sprayPtr->end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
|
||||
{
|
||||
coord_array[0][indx] = (float)elmnt().position().x();
|
||||
coord_array[1][indx] = (float)elmnt().position().y();
|
||||
coord_array[2][indx] = (float)elmnt().position().z();
|
||||
coord_array[0][indx] = (float)iter().position().x();
|
||||
coord_array[1][indx] = (float)iter().position().y();
|
||||
coord_array[2][indx] = (float)iter().position().z();
|
||||
indx++;
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ int USERD_get_part_node_ids
|
||||
nodeid_array[indx] = indx + 1;
|
||||
}
|
||||
}
|
||||
else if (part_number < nPatches+2)
|
||||
else if (part_number < nPatches+2)
|
||||
{
|
||||
|
||||
label patchi = part_number-2;
|
||||
@ -32,18 +32,14 @@ int USERD_get_part_node_ids
|
||||
}
|
||||
|
||||
}
|
||||
else if (part_number == nPatches+2)
|
||||
else if (part_number == nPatches+2)
|
||||
{
|
||||
label indx = 0;
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
|
||||
elmnt != sprayPtr->end();
|
||||
++elmnt
|
||||
)
|
||||
|
||||
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
|
||||
{
|
||||
nodeid_array[indx] = indx + 1;
|
||||
indx++;
|
||||
nodeid_array[indx] = indx + 1;
|
||||
indx++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user