Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
450728ea
Commit
450728ea
authored
Apr 25, 2016
by
Henry Weller
Browse files
Standardized cell, patch, face and processor loop index names
parent
43beb060
Changes
525
Hide whitespace changes
Inline
Side-by-side
applications/test/fieldMapping/Test-fieldMapping.C
View file @
450728ea
...
...
@@ -163,11 +163,11 @@ int main(int argc, char *argv[])
}
// Remove face
label
candidateFace
I
=
rndGen
.
integer
(
0
,
mesh
.
nInternalFaces
()
-
1
);
Info
<<
"Wanting to delete face "
<<
mesh
.
faceCentres
()[
candidateFace
I
]
label
candidateFace
i
=
rndGen
.
integer
(
0
,
mesh
.
nInternalFaces
()
-
1
);
Info
<<
"Wanting to delete face "
<<
mesh
.
faceCentres
()[
candidateFace
i
]
<<
nl
<<
endl
;
labelList
candidates
(
1
,
candidateFace
I
);
labelList
candidates
(
1
,
candidateFace
i
);
// Get compatible set of faces and connected sets of cells.
...
...
applications/test/globalIndex/Test-globalIndex.C
View file @
450728ea
...
...
@@ -69,23 +69,23 @@ int main(int argc, char *argv[])
for
(
label
celli
=
0
;
celli
<
mesh
.
nCells
();
celli
++
)
{
// to global index
label
globalCell
I
=
globalNumbering
.
toGlobal
(
celli
);
label
globalCell
i
=
globalNumbering
.
toGlobal
(
celli
);
// and back
label
proc
I
=
globalNumbering
.
whichProcID
(
globalCell
I
);
label
localCell
I
=
globalNumbering
.
toLocal
(
globalCell
I
);
label
proc
i
=
globalNumbering
.
whichProcID
(
globalCell
i
);
label
localCell
i
=
globalNumbering
.
toLocal
(
globalCell
i
);
if
(
proc
I
!=
Pstream
::
myProcNo
()
||
localCell
I
!=
celli
)
if
(
proc
i
!=
Pstream
::
myProcNo
()
||
localCell
i
!=
celli
)
{
FatalErrorInFunction
<<
"Problem. celli:"
<<
celli
<<
" localCell
I
:"
<<
localCell
I
<<
" proc
I
:"
<<
proc
I
<<
abort
(
FatalError
);
<<
"Problem. celli:"
<<
celli
<<
" localCell
i
:"
<<
localCell
i
<<
" proc
i
:"
<<
proc
i
<<
abort
(
FatalError
);
}
if
(
!
globalNumbering
.
isLocal
(
globalCell
I
))
if
(
!
globalNumbering
.
isLocal
(
globalCell
i
))
{
FatalErrorInFunction
<<
"Problem. celli:"
<<
celli
<<
" globalCell
I
:"
<<
globalCell
I
<<
"Problem. celli:"
<<
celli
<<
" globalCell
i
:"
<<
globalCell
i
<<
" not local"
<<
abort
(
FatalError
);
}
}
...
...
@@ -104,30 +104,30 @@ int main(int argc, char *argv[])
{
// We already checked that toGlobal(0) maps back correctly to myProcNo
// so now check that the index one before maps to the previous processor
label
prevProcCell
I
=
globalNumbering
.
toGlobal
(
0
)
-
1
;
label
proc
I
=
globalNumbering
.
whichProcID
(
prevProcCell
I
);
label
prevProcCell
i
=
globalNumbering
.
toGlobal
(
0
)
-
1
;
label
proc
i
=
globalNumbering
.
whichProcID
(
prevProcCell
i
);
if
(
proc
I
!=
Pstream
::
myProcNo
()
-
1
)
if
(
proc
i
!=
Pstream
::
myProcNo
()
-
1
)
{
FatalErrorInFunction
<<
"Problem. global:"
<<
prevProcCell
I
<<
"Problem. global:"
<<
prevProcCell
i
<<
" expected on processor:"
<<
Pstream
::
myProcNo
()
-
1
<<
" but is calculated to be on proc
I
:"
<<
proc
I
<<
" but is calculated to be on proc
i
:"
<<
proc
i
<<
abort
(
FatalError
);
}
if
(
globalNumbering
.
isLocal
(
prevProcCell
I
))
if
(
globalNumbering
.
isLocal
(
prevProcCell
i
))
{
FatalErrorInFunction
<<
"Problem. globalCell
I
:"
<<
prevProcCell
I
<<
"Problem. globalCell
i
:"
<<
prevProcCell
i
<<
" calculated as local"
<<
abort
(
FatalError
);
}
if
(
!
globalNumbering
.
isLocal
(
proc
I
,
prevProcCell
I
))
if
(
!
globalNumbering
.
isLocal
(
proc
i
,
prevProcCell
i
))
{
FatalErrorInFunction
<<
"Problem. globalCell
I
:"
<<
prevProcCell
I
<<
" not calculated as local on processor:"
<<
proc
I
<<
"Problem. globalCell
i
:"
<<
prevProcCell
i
<<
" not calculated as local on processor:"
<<
proc
i
<<
abort
(
FatalError
);
}
}
...
...
@@ -135,30 +135,30 @@ int main(int argc, char *argv[])
if
(
Pstream
::
myProcNo
()
<
Pstream
::
nProcs
()
-
1
)
{
label
nextProcCell
I
=
globalNumbering
.
toGlobal
(
mesh
.
nCells
()
-
1
)
+
1
;
label
proc
I
=
globalNumbering
.
whichProcID
(
nextProcCell
I
);
label
nextProcCell
i
=
globalNumbering
.
toGlobal
(
mesh
.
nCells
()
-
1
)
+
1
;
label
proc
i
=
globalNumbering
.
whichProcID
(
nextProcCell
i
);
if
(
proc
I
!=
Pstream
::
myProcNo
()
+
1
)
if
(
proc
i
!=
Pstream
::
myProcNo
()
+
1
)
{
FatalErrorInFunction
<<
"Problem. global:"
<<
nextProcCell
I
<<
"Problem. global:"
<<
nextProcCell
i
<<
" expected on processor:"
<<
Pstream
::
myProcNo
()
+
1
<<
" but is calculated to be on proc
I
:"
<<
proc
I
<<
" but is calculated to be on proc
i
:"
<<
proc
i
<<
abort
(
FatalError
);
}
if
(
globalNumbering
.
isLocal
(
nextProcCell
I
))
if
(
globalNumbering
.
isLocal
(
nextProcCell
i
))
{
FatalErrorInFunction
<<
"Problem. globalCell
I
:"
<<
nextProcCell
I
<<
"Problem. globalCell
i
:"
<<
nextProcCell
i
<<
" calculated as local"
<<
abort
(
FatalError
);
}
if
(
!
globalNumbering
.
isLocal
(
proc
I
,
nextProcCell
I
))
if
(
!
globalNumbering
.
isLocal
(
proc
i
,
nextProcCell
i
))
{
FatalErrorInFunction
<<
"Problem. globalCell
I
:"
<<
nextProcCell
I
<<
" not calculated as local on processor:"
<<
proc
I
<<
"Problem. globalCell
i
:"
<<
nextProcCell
i
<<
" not calculated as local on processor:"
<<
proc
i
<<
abort
(
FatalError
);
}
}
...
...
applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C
View file @
450728ea
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-201
5
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-201
6
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -151,9 +151,9 @@ int main(int argc, char *argv[])
{
PstreamBuffers
pBufs
(
Pstream
::
nonBlocking
);
for
(
label
proc
I
=
0
;
proc
I
<
Pstream
::
nProcs
();
proc
I
++
)
for
(
label
proc
i
=
0
;
proc
i
<
Pstream
::
nProcs
();
proc
i
++
)
{
UOPstream
toProc
(
proc
I
,
pBufs
);
UOPstream
toProc
(
proc
i
,
pBufs
);
toProc
<<
Pstream
::
myProcNo
();
}
...
...
@@ -161,17 +161,17 @@ int main(int argc, char *argv[])
pBufs
.
finishedSends
();
// Consume
for
(
label
proc
I
=
0
;
proc
I
<
Pstream
::
nProcs
();
proc
I
++
)
for
(
label
proc
i
=
0
;
proc
i
<
Pstream
::
nProcs
();
proc
i
++
)
{
UIPstream
fromProc
(
proc
I
,
pBufs
);
UIPstream
fromProc
(
proc
i
,
pBufs
);
label
data
;
fromProc
>>
data
;
if
(
data
!=
proc
I
)
if
(
data
!=
proc
i
)
{
FatalErrorInFunction
<<
"From processor "
<<
proc
I
<<
" received "
<<
data
<<
" but expected "
<<
proc
I
<<
"From processor "
<<
proc
i
<<
" received "
<<
data
<<
" but expected "
<<
proc
i
<<
exit
(
FatalError
);
}
}
...
...
applications/test/parallel/Test-parallel.C
View file @
450728ea
...
...
@@ -76,21 +76,21 @@ int main(int argc, char *argv[])
labelList
nSend
(
Pstream
::
nProcs
(),
0
);
forAll
(
complexData
,
i
)
{
label
proc
I
=
complexData
[
i
].
first
();
nSend
[
proc
I
]
++
;
label
proc
i
=
complexData
[
i
].
first
();
nSend
[
proc
i
]
++
;
}
// Collect items to be sent
labelListList
sendMap
(
Pstream
::
nProcs
());
forAll
(
sendMap
,
proc
I
)
forAll
(
sendMap
,
proc
i
)
{
sendMap
[
proc
I
].
setSize
(
nSend
[
proc
I
]);
sendMap
[
proc
i
].
setSize
(
nSend
[
proc
i
]);
}
nSend
=
0
;
forAll
(
complexData
,
i
)
{
label
proc
I
=
complexData
[
i
].
first
();
sendMap
[
proc
I
][
nSend
[
proc
I
]
++
]
=
i
;
label
proc
i
=
complexData
[
i
].
first
();
sendMap
[
proc
i
][
nSend
[
proc
i
]
++
]
=
i
;
}
// Sync how many to send
...
...
@@ -99,9 +99,9 @@ int main(int argc, char *argv[])
// Collect items to be received
labelListList
recvMap
(
Pstream
::
nProcs
());
forAll
(
recvMap
,
proc
I
)
forAll
(
recvMap
,
proc
i
)
{
recvMap
[
proc
I
].
setSize
(
nRecv
[
proc
I
]);
recvMap
[
proc
i
].
setSize
(
nRecv
[
proc
i
]);
}
label
constructSize
=
0
;
...
...
@@ -111,13 +111,13 @@ int main(int argc, char *argv[])
recvMap
[
Pstream
::
myProcNo
()][
i
]
=
constructSize
++
;
}
// Construct from other processors
forAll
(
recvMap
,
proc
I
)
forAll
(
recvMap
,
proc
i
)
{
if
(
proc
I
!=
Pstream
::
myProcNo
())
if
(
proc
i
!=
Pstream
::
myProcNo
())
{
forAll
(
recvMap
[
proc
I
],
i
)
forAll
(
recvMap
[
proc
i
],
i
)
{
recvMap
[
proc
I
][
i
]
=
constructSize
++
;
recvMap
[
proc
i
][
i
]
=
constructSize
++
;
}
}
}
...
...
applications/test/patchRegion/Test-patchRegion.C
View file @
450728ea
...
...
@@ -80,14 +80,14 @@ int main(int argc, char *argv[])
{
const
labelList
&
fEdges
=
patch
.
faceEdges
()[
facei
];
label
globalFace
I
=
globalNumbering
.
toGlobal
(
facei
);
label
globalFace
i
=
globalNumbering
.
toGlobal
(
facei
);
forAll
(
fEdges
,
i
)
{
changedEdges
.
append
(
fEdges
[
i
]);
changedInfo
.
append
(
patchEdgeFaceRegions
(
labelPair
(
globalFace
I
,
globalFace
I
))
patchEdgeFaceRegions
(
labelPair
(
globalFace
i
,
globalFace
i
))
);
}
}
...
...
applications/test/router/Test-processorRouter.C
View file @
450728ea
...
...
@@ -142,20 +142,20 @@ int main(int argc, char *argv[])
OFstream
objFile
(
fName
);
// Write processors as single vertex in centre of mesh
forAll
(
meshCentres
,
proc
I
)
forAll
(
meshCentres
,
proc
i
)
{
const
point
&
pt
=
meshCentres
[
proc
I
];
const
point
&
pt
=
meshCentres
[
proc
i
];
objFile
<<
"v "
<<
pt
.
x
()
<<
' '
<<
pt
.
y
()
<<
' '
<<
pt
.
z
()
<<
endl
;
}
// Write connections as lines between processors (duplicated)
forAll
(
connections
,
proc
I
)
forAll
(
connections
,
proc
i
)
{
const
labelList
&
nbs
=
connections
[
proc
I
];
const
labelList
&
nbs
=
connections
[
proc
i
];
forAll
(
nbs
,
nbI
)
{
objFile
<<
"l "
<<
proc
I
+
1
<<
' '
<<
nbs
[
nbI
]
+
1
<<
endl
;
objFile
<<
"l "
<<
proc
i
+
1
<<
' '
<<
nbs
[
nbI
]
+
1
<<
endl
;
}
}
...
...
@@ -196,9 +196,9 @@ int main(int argc, char *argv[])
OFstream
objFile
(
fName
);
forAll
(
meshCentres
,
proc
I
)
forAll
(
meshCentres
,
proc
i
)
{
const
point
&
pt
=
meshCentres
[
proc
I
];
const
point
&
pt
=
meshCentres
[
proc
i
];
objFile
<<
"v "
<<
pt
.
x
()
<<
' '
<<
pt
.
y
()
<<
' '
<<
pt
.
z
()
<<
endl
;
...
...
applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C
View file @
450728ea
...
...
@@ -71,7 +71,7 @@ void modifyOrAddFace
const
label
facei
,
const
label
own
,
const
bool
flipFaceFlux
,
const
label
newPatch
I
,
const
label
newPatch
i
,
const
label
zoneID
,
const
bool
zoneFlip
,
...
...
@@ -90,7 +90,7 @@ void modifyOrAddFace
own
,
// owner
-
1
,
// neighbour
flipFaceFlux
,
// face flip
newPatch
I
,
// patch for face
newPatch
i
,
// patch for face
false
,
// remove from zone
zoneID
,
// zone for face
zoneFlip
// face flip in zone
...
...
@@ -112,7 +112,7 @@ void modifyOrAddFace
-
1
,
// master edge
facei
,
// master face
flipFaceFlux
,
// face flip
newPatch
I
,
// patch for face
newPatch
i
,
// patch for face
zoneID
,
// zone for face
zoneFlip
// face flip in zone
)
...
...
@@ -160,9 +160,9 @@ void subsetVolFields
label
newStart
=
fld
.
patch
().
patch
().
start
();
label
oldPatch
I
=
subsetter
.
patchMap
()[
patchi
];
label
oldPatch
i
=
subsetter
.
patchMap
()[
patchi
];
if
(
oldPatch
I
==
-
1
)
if
(
oldPatch
i
==
-
1
)
{
// New patch. Reset whole value.
fld
=
exposedValue
;
...
...
@@ -171,17 +171,17 @@ void subsetVolFields
{
// Reset those faces that originate from different patch
// or internal faces.
label
oldSize
=
volField
.
boundaryField
()[
oldPatch
I
].
size
();
label
oldSize
=
volField
.
boundaryField
()[
oldPatch
i
].
size
();
label
oldStart
=
volField
.
boundaryField
()
[
oldPatch
I
oldPatch
i
].
patch
().
patch
().
start
();
forAll
(
fld
,
j
)
{
label
oldFace
I
=
subsetter
.
faceMap
()[
newStart
+
j
];
label
oldFace
i
=
subsetter
.
faceMap
()[
newStart
+
j
];
if
(
oldFace
I
<
oldStart
||
oldFace
I
>=
oldStart
+
oldSize
)
if
(
oldFace
i
<
oldStart
||
oldFace
i
>=
oldStart
+
oldSize
)
{
fld
[
j
]
=
exposedValue
;
}
...
...
@@ -233,9 +233,9 @@ void subsetSurfaceFields
label
newStart
=
fld
.
patch
().
patch
().
start
();
label
oldPatch
I
=
subsetter
.
patchMap
()[
patchi
];
label
oldPatch
i
=
subsetter
.
patchMap
()[
patchi
];
if
(
oldPatch
I
==
-
1
)
if
(
oldPatch
i
==
-
1
)
{
// New patch. Reset whole value.
fld
=
exposedValue
;
...
...
@@ -244,17 +244,17 @@ void subsetSurfaceFields
{
// Reset those faces that originate from different patch
// or internal faces.
label
oldSize
=
volField
.
boundaryField
()[
oldPatch
I
].
size
();
label
oldSize
=
volField
.
boundaryField
()[
oldPatch
i
].
size
();
label
oldStart
=
volField
.
boundaryField
()
[
oldPatch
I
oldPatch
i
].
patch
().
patch
().
start
();
forAll
(
fld
,
j
)
{
label
oldFace
I
=
subsetter
.
faceMap
()[
newStart
+
j
];
label
oldFace
i
=
subsetter
.
faceMap
()[
newStart
+
j
];
if
(
oldFace
I
<
oldStart
||
oldFace
I
>=
oldStart
+
oldSize
)
if
(
oldFace
i
<
oldStart
||
oldFace
i
>=
oldStart
+
oldSize
)
{
fld
[
j
]
=
exposedValue
;
}
...
...
@@ -706,7 +706,7 @@ int main(int argc, char *argv[])
}
// Exposed faces patch
label
defaultPatch
I
=
findPatch
(
mesh
.
boundaryMesh
(),
defaultPatch
);
label
defaultPatch
i
=
findPatch
(
mesh
.
boundaryMesh
(),
defaultPatch
);
//
...
...
@@ -725,7 +725,7 @@ int main(int argc, char *argv[])
blockedCells
.
invert
(
mesh
.
nCells
());
// Create subsetted mesh.
subsetter
.
setLargeCellSubset
(
blockedCells
,
defaultPatch
I
,
true
);
subsetter
.
setLargeCellSubset
(
blockedCells
,
defaultPatch
i
,
true
);
}
...
...
@@ -783,7 +783,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
scalar
(
Zero
),
volScalarField
::
typeName
,
scalarFlds
...
...
@@ -795,7 +795,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
vector
(
Zero
),
volVectorField
::
typeName
,
vectorFlds
...
...
@@ -813,7 +813,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
sphericalTensor
(
Zero
),
volSphericalTensorField
::
typeName
,
sphericalTensorFlds
...
...
@@ -825,7 +825,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
symmTensor
(
Zero
),
volSymmTensorField
::
typeName
,
symmTensorFlds
...
...
@@ -837,7 +837,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
tensor
(
Zero
),
volTensorField
::
typeName
,
tensorFlds
...
...
@@ -851,7 +851,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
scalar
(
Zero
),
surfaceScalarField
::
typeName
,
surfScalarFlds
...
...
@@ -863,7 +863,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
vector
(
Zero
),
surfaceVectorField
::
typeName
,
surfVectorFlds
...
...
@@ -881,7 +881,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
sphericalTensor
(
Zero
),
surfaceSphericalTensorField
::
typeName
,
surfSphericalTensorFlds
...
...
@@ -901,7 +901,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
symmTensor
(
Zero
),
surfaceSymmTensorField
::
typeName
,
surfSymmTensorFlds
...
...
@@ -913,7 +913,7 @@ int main(int argc, char *argv[])
(
subsetter
,
objects
,
defaultPatch
I
,
defaultPatch
i
,
tensor
(
Zero
),
surfaceTensorField
::
typeName
,
surfTensorFlds
...
...
applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
View file @
450728ea
...
...
@@ -458,15 +458,15 @@ void doRefinement
const
labelListList
&
addedCells
=
multiRef
.
addedCells
();
forAll
(
addedCells
,
oldCell
I
)
forAll
(
addedCells
,
oldCell
i
)
{
const
labelList
&
added
=
addedCells
[
oldCell
I
];
const
labelList
&
added
=
addedCells
[
oldCell
i
];
if
(
added
.
size
())
{
// Give all cells resulting from split the refinement level
// of the master.
label
masterLevel
=
++
refLevel
[
oldCell
I
];
label
masterLevel
=
++
refLevel
[
oldCell
i
];
forAll
(
added
,
i
)
{
...
...
@@ -629,7 +629,7 @@ int main(int argc, char *argv[])
#include
"createPolyMesh.H"
// If nessecary add oldInternalFaces patch
label
newPatch
I
=
addPatch
(
mesh
,
"oldInternalFaces"
);
label
newPatch
i
=
addPatch
(
mesh
,
"oldInternalFaces"
);
//
...
...
@@ -854,7 +854,7 @@ int main(int argc, char *argv[])
{
// Subset mesh to remove inside cells altogether. Updates cutCells,
// refLevel.
subsetMesh
(
mesh
,
writeMesh
,
newPatch
I
,
inside
,
cutCells
,
refLevel
);
subsetMesh
(
mesh
,
writeMesh
,
newPatch
i
,
inside
,
cutCells
,
refLevel
);
}
...
...
applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C
View file @
450728ea
...
...
@@ -208,7 +208,7 @@ void Foam::cellSplitter::setRefinement
// Add other pyramids
for
(
label
i
=
1
;
i
<
cFaces
.
size
();
i
++
)
{
label
addedCell
I
=
label
addedCell
i
=
meshMod
.
setAction
(
polyAddCell
...
...
@@ -221,7 +221,7 @@ void Foam::cellSplitter::setRefinement
)
);
newCells
[
i
]
=
addedCell
I
;
newCells
[
i
]
=
addedCell
i
;
}
cellToCells
.
insert
(
celli
,
newCells
);
...
...
@@ -469,17 +469,17 @@ void Foam::cellSplitter::updateMesh(const mapPolyMesh& morphMap)
forAllConstIter
(
Map
<
label
>
,
addedPoints_
,
iter
)
{
label
oldCell
I
=
iter
.
key
();
label
oldCell
i
=
iter
.
key
();
label
newCell
I
=
morphMap
.
reverseCellMap
()[
oldCell
I
];
label
newCell
i
=
morphMap
.
reverseCellMap
()[
oldCell
i
];
label
oldPointI
=
iter
();
label
newPointI
=
morphMap
.
reversePointMap
()[
oldPointI
];
if
(
newCell
I
>=
0
&&
newPointI
>=
0
)
if
(
newCell
i
>=
0
&&
newPointI
>=
0
)
{
newAddedPoints
.
insert
(
newCell
I
,
newPointI
);
newAddedPoints
.
insert
(
newCell
i
,
newPointI
);
}
}
...
...
applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
View file @
450728ea
...
...
@@ -223,9 +223,9 @@ label findFace
scalar
almostMinDist
=
GREAT
;
label
almostMinI
=
-
1
;
forAll
(
pp
,
patchFace
I
)
forAll
(
pp
,
patchFace
i
)
{
pointHit
pHit
(
pp
[
patchFace
I
].
nearestPoint
(
nearPoint
,
points
));
pointHit
pHit
(
pp
[
patchFace
i
].
nearestPoint
(
nearPoint
,
points
));
if
(
pHit
.
hit
())
{
...
...
@@ -235,12 +235,12 @@ label findFace
almostMinI
=
minI
;
minDist
=
pHit
.
distance
();
minI
=
patchFace
I
+
mesh
.
nInternalFaces
();
minI
=
patchFace
i
+
mesh
.
nInternalFaces
();
}
else
if
(
pHit
.
distance
()
<
almostMinDist
)
{
almostMinDist
=
pHit
.
distance
();
almostMinI
=
patchFace
I
+
mesh
.
nInternalFaces
();
almostMinI
=
patchFace
i
+
mesh
.
nInternalFaces
();
}
}
}
...
...
applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C
View file @
450728ea
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
5
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -120,9 +120,9 @@ int main(int argc, char *argv[])
const
labelList
&
pCells
=
mesh
.
pointCells
()[
meshPointI
];