Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Abhishek Yenpure
VTK-m
Commits
272ff48b
Commit
272ff48b
authored
Apr 28, 2022
by
Abhishek Yenpure
Browse files
Adding updates
parent
587cb341
Changes
3
Hide whitespace changes
Inline
Side-by-side
vtkm/Particle.h
View file @
272ff48b
...
...
@@ -100,6 +100,7 @@ public:
,
Time
(
time
)
{
this
->
Direction
=
1
;
this
->
DirChanged
=
false
;
}
VTKM_EXEC_CONT
...
...
@@ -108,6 +109,7 @@ public:
,
ID
(
p
.
ID
)
,
NumSteps
(
p
.
NumSteps
)
,
Direction
(
p
.
Direction
)
,
DirChanged
(
p
.
DirChanged
)
,
Status
(
p
.
Status
)
,
Time
(
p
.
Time
)
{
...
...
@@ -149,6 +151,7 @@ public:
vtkm
::
Id
ID
=
-
1
;
vtkm
::
Id
NumSteps
=
0
;
vtkm
::
Id
Direction
=
1
;
bool
DirChanged
=
0
;
vtkm
::
ParticleStatus
Status
;
vtkm
::
FloatDefault
Time
=
0
;
};
...
...
vtkm/worklet/particleadvection/Particles.h
View file @
272ff48b
...
...
@@ -62,6 +62,7 @@ public:
newParticle
.
Pos
=
pt
;
newParticle
.
Time
=
time
;
newParticle
.
NumSteps
++
;
newParticle
.
DirChanged
=
false
;
this
->
Particles
.
Set
(
idx
,
newParticle
);
}
...
...
vtkm/worklet/particleadvection/Termination.h
View file @
272ff48b
...
...
@@ -36,17 +36,19 @@ public:
/// -- Check if the particle is out of spatial boundaries
/// -- Check if the particle has reached the maximum number of steps
/// -- Check if the particle is in a zero velocity region
auto
&
status
=
particle
.
Status
;
auto
&
status
=
particle
.
Status
;
auto
&
changed
=
particle
.
DirChanged
;
if
(
particle
.
NumSteps
==
this
->
MaxSteps
)
{
status
.
SetTerminate
();
}
if
(
this
->
ReverseDirection
&&
(
status
.
CheckSpatialBounds
()
||
status
.
CheckTemporalBounds
()))
if
(
!
changed
&&
this
->
ReverseDirection
&&
(
status
.
CheckSpatialBounds
()
||
status
.
CheckTemporalBounds
()))
{
status
.
SetOk
();
status
.
ClearSpatialBounds
();
status
.
ClearTemporalBounds
();
particle
.
Direction
*=
-
1
;
particle
.
DirChanged
=
true
;
}
bool
terminate
=
status
.
CheckOk
()
&&
!
status
.
CheckTerminate
()
...
...
Write
Preview
Supports
Markdown
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