Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FluEgg
fluegg
Commits
fc194bdd
Commit
fc194bdd
authored
Jun 25, 2020
by
Berutti, Michael (Contractor) Charles
Browse files
Completed eggs out of domain indicator
parent
3c9ca876
Changes
1
Hide whitespace changes
Inline
Side-by-side
fluegg/results.py
View file @
fc194bdd
...
...
@@ -117,7 +117,6 @@ class Results(ABC):
int
Number of particles
"""
return
int
(
self
.
_configuration
[
"num_eggs"
])
@
abstractmethod
...
...
@@ -304,6 +303,9 @@ class FullResults(Results):
particles_in_domain
=
positions_at_time
[:,
0
]
<=
self
.
_domain_length
new_config
=
self
.
configuration
()
new_config
[
'num_eggs'
]
=
sum
(
x
for
x
in
particles_in_domain
)
if
np
.
any
(
particles_in_domain
):
cls
=
self
.
__class__
res
=
cls
.
__new__
(
cls
)
...
...
@@ -311,7 +313,7 @@ class FullResults(Results):
res
.
_depth
=
self
.
_depth
[:,
particles_in_domain
]
res
.
_width
=
self
.
_width
[:,
particles_in_domain
]
res
.
_domain_length
=
self
.
_domain_length
res
.
_configuration
=
self
.
config
uration
()
res
.
_configuration
=
new_
config
res
.
_time
=
self
.
_time
.
copy
()
else
:
res
=
None
...
...
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