mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Apply coding style recommendations:
- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
This commit is contained in:
@ -75,7 +75,7 @@ void writeBytes(char* start, int nBytes)
|
||||
|
||||
cout<< start << " : ";
|
||||
|
||||
for(int i = 0; i < nBytes; i++)
|
||||
for (int i = 0; i < nBytes; i++)
|
||||
{
|
||||
cout<< " " << start[i];
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ int main()
|
||||
|
||||
fwrite(ibuf, sizeof(int), 3, outfp);
|
||||
|
||||
for(i = 0; i < num_faces_trim_cell; ++i) /* loop over the faces */
|
||||
for (i = 0; i < num_faces_trim_cell; ++i) /* loop over the faces */
|
||||
fwrite(trim_cell_face[i], sizeof(int), trim_cell_face[i][0] + 1,
|
||||
outfp);
|
||||
|
||||
@ -433,7 +433,7 @@ int main()
|
||||
|
||||
fwrite(ibuf, sizeof(int), 3, outfp);
|
||||
|
||||
for(i = 0; i < num_faces_hang_cell; ++i) /* loop over the faces */
|
||||
for (i = 0; i < num_faces_hang_cell; ++i) /* loop over the faces */
|
||||
fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
|
||||
outfp);
|
||||
|
||||
@ -519,7 +519,7 @@ int main()
|
||||
ibuf[0] = A_WALL; /* wall value */
|
||||
ibuf[1] = 0; /* number of hanging nodes */
|
||||
|
||||
for(i = 0; i < num_faces_trim_cell; ++i) /* write out face info */
|
||||
for (i = 0; i < num_faces_trim_cell; ++i) /* write out face info */
|
||||
{
|
||||
fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
|
||||
fwrite(trim_cell_face[i], sizeof(int), trim_cell_face[i][0] + 1,
|
||||
@ -541,7 +541,7 @@ int main()
|
||||
ibuf[2] = 1; /* number of hanging nodes for face 3 */
|
||||
ibuf[3] = 31; /* the node number for the hanging node on face 3*/
|
||||
|
||||
for(i = 0; i < 2; ++i) /* write out face info for first 2 faces */
|
||||
for (i = 0; i < 2; ++i) /* write out face info for first 2 faces */
|
||||
{
|
||||
fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
|
||||
fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
|
||||
@ -555,7 +555,7 @@ int main()
|
||||
fwrite(&ibuf[2], sizeof(int), 2, outfp);
|
||||
|
||||
/* write out face info for last 3 faces */
|
||||
for(i = 3; i < num_faces_hang_cell; ++i)
|
||||
for (i = 3; i < num_faces_hang_cell; ++i)
|
||||
{
|
||||
fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
|
||||
fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
|
||||
|
||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
||||
Info<< TimeList << endl;
|
||||
label nTimes = TimeList.size();
|
||||
|
||||
for(label n=1; n < nTimes; n++)
|
||||
for (label n=1; n < nTimes; n++)
|
||||
{
|
||||
if (TimeList[n].value() > startTime)
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ for (label i=0; i < nTypes; i++)
|
||||
{
|
||||
volScalarField gmvScalarField(fieldObject, mesh);
|
||||
gmvFile << fieldName << " 0" << nl;
|
||||
for(label indx=0;indx<mesh.nCells();indx++)
|
||||
for (label indx=0;indx<mesh.nCells();indx++)
|
||||
{
|
||||
gmvFile << gmvScalarField[indx] << " ";
|
||||
}
|
||||
|
||||
@ -4,29 +4,29 @@ const cellShapeList& cells = mesh.cellShapes();
|
||||
|
||||
gmvFile << "gmvinput " << format << nl;
|
||||
gmvFile << "nodes " << nPoints << nl;
|
||||
for(label indx=0;indx<nPoints;indx++)
|
||||
for (label indx=0;indx<nPoints;indx++)
|
||||
{
|
||||
gmvFile << points[indx].x() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for(label indx=0;indx<nPoints;indx++)
|
||||
for (label indx=0;indx<nPoints;indx++)
|
||||
{
|
||||
gmvFile << points[indx].y() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for(label indx=0;indx<nPoints;indx++)
|
||||
for (label indx=0;indx<nPoints;indx++)
|
||||
{
|
||||
gmvFile << points[indx].z() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
gmvFile << "cells " << cells.size() << nl;
|
||||
for(label indx=0;indx<cells.size();indx++)
|
||||
for (label indx=0;indx<cells.size();indx++)
|
||||
{
|
||||
label nNodes = cells[indx].size();
|
||||
if (nNodes == 8)
|
||||
{
|
||||
gmvFile << "hex " << 8 << " ";
|
||||
for(label ip=0; ip<nNodes; ip++)
|
||||
for (label ip=0; ip<nNodes; ip++)
|
||||
{
|
||||
gmvFile << cells[indx][ip] + 1 << " ";
|
||||
}
|
||||
@ -35,7 +35,7 @@ for(label indx=0;indx<cells.size();indx++)
|
||||
else if (nNodes == 4)
|
||||
{
|
||||
gmvFile << "tet " << 4 << " ";
|
||||
for(label ip=0; ip<nNodes; ip++)
|
||||
for (label ip=0; ip<nNodes; ip++)
|
||||
{
|
||||
gmvFile << cells[indx][ip] + 1 << " ";
|
||||
}
|
||||
@ -44,7 +44,7 @@ for(label indx=0;indx<cells.size();indx++)
|
||||
else if (nNodes == 6)
|
||||
{
|
||||
gmvFile << "prism " << 6 << " ";
|
||||
for(label ip=0; ip<nNodes; ip++)
|
||||
for (label ip=0; ip<nNodes; ip++)
|
||||
{
|
||||
gmvFile << cells[indx][ip] + 1 << " ";
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ word itoa(const label n)
|
||||
|
||||
label leftOfN = n;
|
||||
|
||||
for(label i=0; i<length; i++)
|
||||
for (label i=0; i<length; i++)
|
||||
{
|
||||
label j = label(leftOfN/pow(10, length-i-1));
|
||||
leftOfN -= j*pow(10,length-i-1);
|
||||
|
||||
Reference in New Issue
Block a user