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
Modules
Visualization
Commits
dd242fff
Commit
dd242fff
authored
Nov 20, 2018
by
Mark OLESEN
Browse files
COMP: replace deprecated methods for ParaView-5.6
parent
0fb443f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/catalyst/catalystTools.C
View file @
dd242fff
...
...
@@ -28,6 +28,7 @@ License
#include
<vtkCPDataDescription.h>
#include
<vtkCPInputDataDescription.h>
#include
<vtkCPProcessor.h>
#include
<vtkDataObject.h>
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -175,10 +176,16 @@ Foam::label Foam::catalyst::dataQuery::query(vtkCPProcessor* coproc)
descrip
->
AddInput
(
channel
.
c_str
());
auto
*
input
=
descrip
->
GetInputDescriptionByName
(
channel
.
c_str
());
for
(
const
word
&
f
ie
ldName
:
dataq
.
fields
(
channel
))
for
(
const
word
&
fldName
:
dataq
.
fields
(
channel
))
{
input
->
AddPointField
(
fieldName
.
c_str
());
input
->
AddCellField
(
fieldName
.
c_str
());
#if (PARAVIEW_VERSION_MAJOR == 5) && \
(PARAVIEW_VERSION_MINOR < 6)
input
->
AddPointField
(
fldName
.
c_str
());
input
->
AddCellField
(
fldName
.
c_str
());
#else
input
->
AddField
(
fldName
.
c_str
(),
vtkDataObject
::
CELL
);
input
->
AddField
(
fldName
.
c_str
(),
vtkDataObject
::
POINT
);
#endif
}
}
...
...
@@ -200,12 +207,24 @@ Foam::label Foam::catalyst::dataQuery::query(vtkCPProcessor* coproc)
{
wordHashSet
requestedFields
;
for
(
const
word
&
f
ie
ldName
:
dataq
.
fields
(
channel
))
for
(
const
word
&
fldName
:
dataq
.
fields
(
channel
))
{
if
(
input
->
IsFieldNeeded
(
fieldName
.
c_str
()))
#if (PARAVIEW_VERSION_MAJOR == 5) && \
(PARAVIEW_VERSION_MINOR < 6)
if
(
input
->
IsFieldNeeded
(
fldName
.
c_str
()))
{
requestedFields
.
insert
(
f
ie
ldName
);
requestedFields
.
insert
(
fldName
);
}
#else
if
(
input
->
IsFieldNeeded
(
fldName
.
c_str
(),
vtkDataObject
::
CELL
)
||
input
->
IsFieldNeeded
(
fldName
.
c_str
(),
vtkDataObject
::
POINT
)
)
{
requestedFields
.
insert
(
fldName
);
}
#endif
}
dataq
.
set
(
channel
,
requestedFields
);
...
...
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