Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
0ad7b2cd
Commit
0ad7b2cd
authored
Oct 21, 2010
by
mattijs
Browse files
STYLE: foamToEnsight : indentation
parent
497daa30
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
View file @
0ad7b2cd
...
...
@@ -575,99 +575,99 @@ void ensightPointField
}
label
ensightPatchI
=
eMesh
.
patchPartOffset
();
forAll
(
allPatchNames
,
patchi
)
{
const
word
&
patchName
=
allPatchNames
[
patchi
];
eMesh
.
barrier
();
if
(
patchNames
.
empty
()
||
patchNames
.
found
(
patchName
))
{
const
fvPatch
&
p
=
mesh
.
boundary
()[
patchi
];
if
(
returnReduce
(
p
.
size
(),
sumOp
<
label
>
())
>
0
)
{
// Renumber the patch points/faces into unique points
labelList
pointToGlobal
;
labelList
uniqueMeshPointLabels
;
autoPtr
<
globalIndex
>
globalPointsPtr
=
mesh
.
globalData
().
mergePoints
(
p
.
patch
().
meshPoints
(),
p
.
patch
().
meshPointMap
(),
pointToGlobal
,
uniqueMeshPointLabels
);
if
(
Pstream
::
master
())
{
ensightFile
.
writePartHeader
(
ensightPatchI
);
}
writeField
(
"coordinates"
,
Field
<
Type
>
(
pf
.
internalField
(),
uniqueMeshPointLabels
),
ensightFile
);
ensightPatchI
++
;
}
}
}
// write faceZones, if requested
if
(
faceZoneNames
.
size
())
{
forAllConstIter
(
wordHashSet
,
faceZoneNames
,
iter
)
{
const
word
&
faceZoneName
=
iter
.
key
();
label
ensightPatchI
=
eMesh
.
patchPartOffset
();
eMesh
.
barrier
();
forAll
(
allPatchNames
,
patchi
)
{
const
word
&
patchName
=
allPatchNames
[
patchi
];
label
zoneID
=
mesh
.
faceZones
().
findZoneID
(
faceZoneName
);
eMesh
.
barrier
(
);
const
faceZone
&
fz
=
mesh
.
faceZones
()[
zoneID
];
if
(
patchNames
.
empty
()
||
patchNames
.
found
(
patchName
))
{
const
fvPatch
&
p
=
mesh
.
boundary
()[
patchi
];
if
(
returnReduce
(
p
.
size
(),
sumOp
<
label
>
())
>
0
)
{
// Renumber the patch points/faces into unique points
labelList
pointToGlobal
;
labelList
uniqueMeshPointLabels
;
autoPtr
<
globalIndex
>
globalPointsPtr
=
mesh
.
globalData
().
mergePoints
(
p
.
patch
().
meshPoints
(),
p
.
patch
().
meshPointMap
(),
pointToGlobal
,
uniqueMeshPointLabels
);
if
(
returnReduce
(
fz
().
nPoints
(),
sumOp
<
label
>
())
>
0
)
{
// Renumber the faceZone points/faces into unique points
labelList
pointToGlobal
;
labelList
uniqueMeshPointLabels
;
autoPtr
<
globalIndex
>
globalPointsPtr
=
mesh
.
globalData
().
mergePoints
(
fz
().
meshPoints
(),
fz
().
meshPointMap
(),
pointToGlobal
,
uniqueMeshPointLabels
);
if
(
Pstream
::
master
())
{
ensightFile
.
writePartHeader
(
ensightPatchI
);
}
if
(
Pstream
::
master
())
{
ensightFile
.
writePartHeader
(
ensightPatchI
);
}
writeField
(
"coordinates"
,
Field
<
Type
>
(
pf
.
internalField
(),
uniqueMeshPointLabels
),
ensightFile
);
writeField
(
"coordinates"
,
Field
<
Type
>
(
pf
.
internalField
(),
uniqueMeshPointLabels
),
ensightFile
);
ensightPatchI
++
;
}
}
}
ensightPatchI
++
;
}
}
}
// write faceZones, if requested
if
(
faceZoneNames
.
size
())
{
forAllConstIter
(
wordHashSet
,
faceZoneNames
,
iter
)
{
const
word
&
faceZoneName
=
iter
.
key
();
eMesh
.
barrier
();
label
zoneID
=
mesh
.
faceZones
().
findZoneID
(
faceZoneName
);
const
faceZone
&
fz
=
mesh
.
faceZones
()[
zoneID
];
if
(
returnReduce
(
fz
().
nPoints
(),
sumOp
<
label
>
())
>
0
)
{
// Renumber the faceZone points/faces into unique points
labelList
pointToGlobal
;
labelList
uniqueMeshPointLabels
;
autoPtr
<
globalIndex
>
globalPointsPtr
=
mesh
.
globalData
().
mergePoints
(
fz
().
meshPoints
(),
fz
().
meshPointMap
(),
pointToGlobal
,
uniqueMeshPointLabels
);
if
(
Pstream
::
master
())
{
ensightFile
.
writePartHeader
(
ensightPatchI
);
}
writeField
(
"coordinates"
,
Field
<
Type
>
(
pf
.
internalField
(),
uniqueMeshPointLabels
),
ensightFile
);
ensightPatchI
++
;
}
}
}
if
(
Pstream
::
master
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment