Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFOAM-plus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Development
OpenFOAM-plus
Commits
bcfc9cea
Commit
bcfc9cea
authored
6 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
ENH: use average value for ensight faceZone on proc boundary (
#1176
)
parent
4bf0ac06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conversion/ensight/mesh/ensightMesh.C
+15
-7
15 additions, 7 deletions
src/conversion/ensight/mesh/ensightMesh.C
src/conversion/ensight/output/ensightOutputTemplates.C
+20
-22
20 additions, 22 deletions
src/conversion/ensight/output/ensightOutputTemplates.C
with
35 additions
and
29 deletions
src/conversion/ensight/mesh/ensightMesh.C
+
15
−
7
View file @
bcfc9cea
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-201
8
OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-201
9
OpenCFD Ltd.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
This file is part of OpenFOAM.
This file is part of OpenFOAM.
...
@@ -27,6 +27,7 @@ License
...
@@ -27,6 +27,7 @@ License
#include
"fvMesh.H"
#include
"fvMesh.H"
#include
"globalMeshData.H"
#include
"globalMeshData.H"
#include
"PstreamCombineReduceOps.H"
#include
"PstreamCombineReduceOps.H"
#include
"emptyPolyPatch.H"
#include
"processorPolyPatch.H"
#include
"processorPolyPatch.H"
#include
"mapDistribute.H"
#include
"mapDistribute.H"
#include
"stringListOps.H"
#include
"stringListOps.H"
...
@@ -209,16 +210,23 @@ void Foam::ensightMesh::correct()
...
@@ -209,16 +210,23 @@ void Foam::ensightMesh::correct()
if
(
option
().
useFaceZones
())
if
(
option
().
useFaceZones
())
{
{
// Mark boundary faces to be excluded from export
// Mark boundary faces to be excluded from export
bitSet
excludeFace
(
mesh_
.
nFaces
());
// all false
bitSet
excludeFace
(
mesh_
.
nFaces
());
for
(
const
polyPatch
&
pp
:
mesh_
.
boundaryMesh
())
for
(
const
polyPatch
&
pp
:
mesh_
.
boundaryMesh
())
{
{
if
#if OPENFOAM >= 1906
(
const
auto
*
procPatch
=
isA
<
processorPolyPatch
>
(
pp
);
isA
<
processorPolyPatch
>
(
pp
)
#else
&&
!
refCast
<
const
processorPolyPatch
>
(
pp
).
owner
()
const
auto
*
procPatch
=
dynamic_cast
<
const
processorPolyPatch
*>
(
&
pp
);
)
#endif
if
(
isA
<
emptyPolyPatch
>
(
pp
))
{
excludeFace
.
set
(
pp
.
range
());
}
else
if
(
procPatch
&&
!
procPatch
->
owner
())
{
{
// Exclude neighbour-side, retain owner-side only
excludeFace
.
set
(
pp
.
range
());
excludeFace
.
set
(
pp
.
range
());
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/conversion/ensight/output/ensightOutputTemplates.C
+
20
−
22
View file @
bcfc9cea
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-201
7
OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-201
9
OpenCFD Ltd.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
This file is part of OpenFOAM.
This file is part of OpenFOAM.
...
@@ -38,6 +38,7 @@ License
...
@@ -38,6 +38,7 @@ License
#include
"uindirectPrimitivePatch.H"
#include
"uindirectPrimitivePatch.H"
#include
"interpolation.H"
#include
"interpolation.H"
#include
"linear.H"
#include
"linear.H"
#include
"processorFvPatch.H"
// * * * * * * * * * * Static Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * Static Private Member Functions * * * * * * * * * * * //
...
@@ -119,10 +120,8 @@ bool Foam::ensightOutput::writeFaceField
...
@@ -119,10 +120,8 @@ bool Foam::ensightOutput::writeFaceField
return
true
;
return
true
;
}
}
else
{
return
false
;
return
false
;
}
}
}
...
@@ -257,37 +256,36 @@ bool Foam::ensightOutput::writeField
...
@@ -257,37 +256,36 @@ bool Foam::ensightOutput::writeField
);
);
// flat boundary field
// flat boundary field
//
as per
volPointInterpolation::flatBoundaryField()
//
similar to
volPointInterpolation::flatBoundaryField()
Field
<
Type
>
flat
(
mesh
.
nBoundaryFaces
());
Field
<
Type
>
flat
(
mesh
.
nBoundaryFaces
()
,
Zero
);
const
fvBoundaryMesh
&
bm
=
mesh
.
boundary
();
const
fvBoundaryMesh
&
bm
=
mesh
.
boundary
();
forAll
(
vf
.
boundaryField
(),
patch
I
)
forAll
(
vf
.
boundaryField
(),
patch
i
)
{
{
const
polyPatch
&
pp
=
bm
[
patch
I
].
patch
();
const
polyPatch
&
pp
=
bm
[
patch
i
].
patch
();
const
label
bFaceI
=
pp
.
start
()
-
mesh
.
nInternalFaces
()
;
const
auto
&
bf
=
vf
.
boundaryField
()[
patchi
]
;
if
if
(
isA
<
processorFvPatch
>
(
bm
[
patchi
]))
(
isA
<
emptyFvPatch
>
(
bm
[
patchI
])
||
vf
.
boundaryField
()[
patchI
].
coupled
()
)
{
{
// Use average value for processor faces
// own cell value = patchInternalField
// nei cell value = evaluated boundary values
SubList
<
Type
>
SubList
<
Type
>
(
(
flat
,
flat
,
pp
.
size
(),
bf
.
size
(),
bFaceI
pp
.
offset
()
)
=
Zero
;
)
=
(
0
.
5
*
(
bf
.
patchInternalField
()
+
bf
))
;
}
}
else
else
if
(
!
isA
<
emptyFvPatch
>
(
bm
[
patchi
]))
{
{
SubList
<
Type
>
SubList
<
Type
>
(
(
flat
,
flat
,
vf
.
boundaryField
()[
patchI
]
.
size
(),
bf
.
size
(),
bFaceI
pp
.
offset
()
)
=
vf
.
boundaryField
()[
patchI
]
;
)
=
bf
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment