Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Scott Wittenburg
VTK
Commits
d44754cc
Commit
d44754cc
authored
Dec 20, 2013
by
Berk Geveci
Committed by
Code Review
Dec 20, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge topic '0014453-fix-for-streamtracer' into master
921fac16
bug 14453 fix for stream tracer
parents
0664ec35
921fac16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
Filters/FlowPaths/vtkStreamTracer.cxx
Filters/FlowPaths/vtkStreamTracer.cxx
+15
-20
No files found.
Filters/FlowPaths/vtkStreamTracer.cxx
View file @
d44754cc
...
...
@@ -947,25 +947,6 @@ void vtkStreamTracer::Integrate(vtkPointData *input0Data,
break
;
}
// It is not enough to use the starting point for stagnation calculation
// Use delX/stepSize to calculate speed and check if it is below
// stagnation threshold
double
disp
[
3
];
for
(
i
=
0
;
i
<
3
;
i
++
)
{
disp
[
i
]
=
point2
[
i
]
-
point1
[
i
];
}
if
(
(
stepSize
.
Interval
==
0
)
||
(
vtkMath
::
Norm
(
disp
)
/
fabs
(
stepSize
.
Interval
)
<=
this
->
TerminalSpeed
)
)
{
retVal
=
STAGNATION
;
break
;
}
accumTime
+=
stepTaken
/
speed
;
// Calculate propagation (using the same units as MaximumPropagation
propagation
+=
fabs
(
stepSize
.
Interval
);
// This is the next starting point
for
(
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -979,6 +960,20 @@ void vtkStreamTracer::Integrate(vtkPointData *input0Data,
memcpy
(
lastPoint
,
point2
,
3
*
sizeof
(
double
));
break
;
}
// It is not enough to use the starting point for stagnation calculation
// Use average speed to check if it is below stagnation threshold
double
speed2
=
vtkMath
::
Norm
(
velocity
);
if
(
(
speed
+
speed2
)
/
2
<=
this
->
TerminalSpeed
)
{
retVal
=
STAGNATION
;
break
;
}
accumTime
+=
stepTaken
/
speed
;
// Calculate propagation (using the same units as MaximumPropagation
propagation
+=
fabs
(
stepSize
.
Interval
);
// Make sure we use the dataset found by the vtkAbstractInterpolatedVelocityField
input
=
func
->
GetLastDataSet
();
inputPD
=
input
->
GetPointData
();
...
...
@@ -994,7 +989,7 @@ void vtkStreamTracer::Integrate(vtkPointData *input0Data,
// Calculate cell length and speed to be used in unit conversions
input
->
GetCell
(
func
->
GetLastCellId
(),
cell
);
cellLength
=
sqrt
(
static_cast
<
double
>
(
cell
->
GetLength2
()));
speed
=
vtkMath
::
Norm
(
velocity
)
;
speed
=
speed2
;
// Interpolate all point attributes on current point
func
->
GetLastWeights
(
weights
);
InterpolatePoint
(
outputPD
,
inputPD
,
nextPoint
,
cell
->
PointIds
,
weights
,
this
->
HasMatchingPointAttributes
);
...
...
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