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:
@ -1404,7 +1404,11 @@ int main(int argc, char *argv[])
|
|||||||
//it will be put in a default wall boundary
|
//it will be put in a default wall boundary
|
||||||
//internal boundaries are simply ignored
|
//internal boundaries are simply ignored
|
||||||
|
|
||||||
if(patchTypes[patchI] != "internal" && !pShapeMesh.isInternalFace(meshFaces[0]))
|
if
|
||||||
|
(
|
||||||
|
patchTypes[patchI] != "internal"
|
||||||
|
&& !pShapeMesh.isInternalFace(meshFaces[0])
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//first face is external and has valid non-internal type
|
//first face is external and has valid non-internal type
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,12 @@
|
|||||||
|
|
||||||
*** General
|
*** General
|
||||||
+ 80 character lines max
|
+ 80 character lines max
|
||||||
+ The body of control statements (eg, if, else, while, etc).
|
|
||||||
always delineated with brace brackets
|
|
||||||
+ Use spaces for indentation, not tab characters.
|
|
||||||
+ The normal indentation is 4 spaces per logical level.
|
+ The normal indentation is 4 spaces per logical level.
|
||||||
|
+ Use spaces for indentation, not tab characters.
|
||||||
+ Avoid trailing whitespace.
|
+ Avoid trailing whitespace.
|
||||||
|
+ The body of control statements (eg, if, else, while, etc).
|
||||||
|
always delineated with brace brackets. A possible exception can be
|
||||||
|
made with 'break' or 'continue' as part of a control structure.
|
||||||
|
|
||||||
+ stream output
|
+ stream output
|
||||||
=<<= is always four characters after the start of the stream,
|
=<<= is always four characters after the start of the stream,
|
||||||
@ -152,7 +153,7 @@
|
|||||||
: code;
|
: code;
|
||||||
:}
|
:}
|
||||||
|
|
||||||
*** =for= Loops
|
*** =for= and =while= Loops
|
||||||
:for (i = 0; i < maxI; i++)
|
:for (i = 0; i < maxI; i++)
|
||||||
:{
|
:{
|
||||||
: code;
|
: code;
|
||||||
@ -180,7 +181,7 @@
|
|||||||
Note that when indexing through iterators, it is often slightly more
|
Note that when indexing through iterators, it is often slightly more
|
||||||
efficient to use the pre-increment form. Eg, =++iter= instead of =iter++=
|
efficient to use the pre-increment form. Eg, =++iter= instead of =iter++=
|
||||||
|
|
||||||
*** =forAll= loops
|
*** =forAll= , =forAllIter=, etc. loops
|
||||||
like =for= loops, but
|
like =for= loops, but
|
||||||
|
|
||||||
:forAll(
|
:forAll(
|
||||||
|
|||||||
@ -114,7 +114,7 @@ void Foam::patchZones::markZone(label faceI)
|
|||||||
// Zones on all edges.
|
// Zones on all edges.
|
||||||
labelList edgeZone(pp_.nEdges(), -1);
|
labelList edgeZone(pp_.nEdges(), -1);
|
||||||
|
|
||||||
while(1)
|
while (true)
|
||||||
{
|
{
|
||||||
changedEdges = faceToEdge(changedFaces, edgeZone);
|
changedEdges = faceToEdge(changedFaces, edgeZone);
|
||||||
|
|
||||||
|
|||||||
@ -390,7 +390,7 @@ void Foam::boundaryMesh::markZone
|
|||||||
// Zones on all edges.
|
// Zones on all edges.
|
||||||
labelList edgeZone(mesh().nEdges(), -1);
|
labelList edgeZone(mesh().nEdges(), -1);
|
||||||
|
|
||||||
while(1)
|
while (true)
|
||||||
{
|
{
|
||||||
changedEdges = faceToEdge
|
changedEdges = faceToEdge
|
||||||
(
|
(
|
||||||
|
|||||||
@ -142,7 +142,7 @@ void parcel::setRelaxationTimes
|
|||||||
|
|
||||||
if (liquidCore_> 0.5)
|
if (liquidCore_> 0.5)
|
||||||
{
|
{
|
||||||
// no drag for parcels in the liquid core..
|
// no drag for parcels in the liquid core.
|
||||||
tauMomentum = GREAT;
|
tauMomentum = GREAT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -35,13 +35,9 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
defineTypeNameAndDebug(setsToFaceZone, 0);
|
defineTypeNameAndDebug(setsToFaceZone, 0);
|
||||||
|
|
||||||
addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, word);
|
addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, word);
|
||||||
|
|
||||||
addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, istream);
|
addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, istream);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user