Apply coding style recommendations:

- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
This commit is contained in:
Mark Olesen
2009-11-30 08:55:03 +01:00
parent 6bdb7fb7b5
commit 909e6b27e4
148 changed files with 343 additions and 342 deletions

View File

@ -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];
}

View File

@ -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,

View File

@ -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)
{

View File

@ -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] << " ";
}

View File

@ -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 << " ";
}

View File

@ -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);