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
a1525f01
Commit
a1525f01
authored
Feb 20, 2009
by
mattijs
Browse files
extrapolate to any non-constraint patch
parent
ef8ac6ff
Changes
5
Hide whitespace changes
Inline
Side-by-side
applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
View file @
a1525f01
...
...
@@ -30,16 +30,16 @@
<!-- Global settings -->
<!-- Extrapolate
Wall
s check-box -->
<!-- Extrapolate
Patche
s check-box -->
<IntVectorProperty
name=
"Extrapolate
Wall
s"
command=
"SetExtrapolate
Wall
s"
name=
"Extrapolate
Patche
s"
command=
"SetExtrapolate
Patche
s"
number_of_elements=
"1"
default_values=
"0"
animateable=
"0"
>
<BooleanDomain
name=
"bool"
/>
<Documentation>
Extrapolate internalField to
wall and empty
patches
Extrapolate internalField to
non-constraint
patches
</Documentation>
</IntVectorProperty>
...
...
applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
View file @
a1525f01
...
...
@@ -64,7 +64,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
CacheMesh
=
1
;
Extrapolate
Wall
s
=
0
;
Extrapolate
Patche
s
=
0
;
IncludeSets
=
0
;
IncludeZones
=
0
;
ShowPatchNames
=
0
;
...
...
applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
View file @
a1525f01
...
...
@@ -65,9 +65,9 @@ public:
vtkGetMacro
(
CacheMesh
,
int
);
// Description:
// FOAM extrapolate internal values onto the
wall
s
vtkSetMacro
(
Extrapolate
Wall
s
,
int
);
vtkGetMacro
(
Extrapolate
Wall
s
,
int
);
// FOAM extrapolate internal values onto the
patche
s
vtkSetMacro
(
Extrapolate
Patche
s
,
int
);
vtkGetMacro
(
Extrapolate
Patche
s
,
int
);
// FOAM read sets control
vtkSetMacro
(
IncludeSets
,
int
);
...
...
@@ -183,7 +183,7 @@ private:
int
TimeStepRange
[
2
];
int
CacheMesh
;
int
Extrapolate
Wall
s
;
int
Extrapolate
Patche
s
;
int
IncludeSets
;
int
IncludeZones
;
int
ShowPatchNames
;
...
...
applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
View file @
a1525f01
...
...
@@ -659,29 +659,55 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
}
}
// Count number of zones we're actually going to display. This is truncated
// to a max per patch
const
label
MAXPATCHZONES
=
20
;
label
displayZoneI
=
0
;
forAll
(
pbMesh
,
patchI
)
{
displayZoneI
+=
min
(
MAXPATCHZONES
,
nZones
[
patchI
]);
}
zoneCentre
.
shrink
();
if
(
debug
)
{
Info
<<
"patch zone centres = "
<<
zoneCentre
<<
nl
<<
"displayed zone centres = "
<<
displayZoneI
<<
nl
<<
"zones per patch = "
<<
nZones
<<
endl
;
}
// Set the size of the patch labels to max number of zones
patchTextActorsPtrs_
.
setSize
(
zoneCentre
.
size
()
);
patchTextActorsPtrs_
.
setSize
(
displayZoneI
);
if
(
debug
)
{
Info
<<
"constructing patch labels"
<<
endl
;
}
// Actor index
displayZoneI
=
0
;
// Index in zone centres
label
globalZoneI
=
0
;
forAll
(
pbMesh
,
patchI
)
{
const
polyPatch
&
pp
=
pbMesh
[
patchI
];
// Only selected patches will have a non-zero number of zones
for
(
label
i
=
0
;
i
<
nZones
[
patchI
];
i
++
)
label
nDisplayZones
=
min
(
MAXPATCHZONES
,
nZones
[
patchI
]);
label
increment
=
1
;
if
(
nZones
[
patchI
]
>=
MAXPATCHZONES
)
{
increment
=
nZones
[
patchI
]
/
MAXPATCHZONES
;
}
for
(
label
i
=
0
;
i
<
nDisplayZones
;
i
++
)
{
if
(
debug
)
{
...
...
@@ -719,14 +745,15 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
// Maintain a list of text labels added so that they can be
// removed later
patchTextActorsPtrs_
[
global
ZoneI
]
=
txt
;
patchTextActorsPtrs_
[
display
ZoneI
]
=
txt
;
globalZoneI
++
;
globalZoneI
+=
increment
;
displayZoneI
++
;
}
}
// Resize the patch names list to the actual number of patch names added
patchTextActorsPtrs_
.
setSize
(
global
ZoneI
);
patchTextActorsPtrs_
.
setSize
(
display
ZoneI
);
if
(
debug
)
{
...
...
applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
View file @
a1525f01
...
...
@@ -132,8 +132,8 @@ void Foam::vtkPV3Foam::convertVolFields
isType
<
emptyFvPatchField
<
Type
>
>
(
ptf
)
||
(
typeid
(
patches
[
patchId
])
==
typeid
(
wallPoly
Patch
)
&&
reader_
->
GetExtrapolateWalls
()
reader_
->
GetExtrapolate
Patch
es
(
)
&&
!
polyPatch
::
constraintType
(
patches
[
patchId
].
type
()
)
)
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment