Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grudge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
grudge
Commits
63c15e6d
Commit
63c15e6d
authored
3 years ago
by
Thomas Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Make advection and maxwell operators parallel-safe
parent
187d5e97
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grudge/models/advection.py
+22
-2
22 additions, 2 deletions
grudge/models/advection.py
grudge/models/em.py
+4
-0
4 additions, 0 deletions
grudge/models/em.py
with
26 additions
and
2 deletions
grudge/models/advection.py
+
22
−
2
View file @
63c15e6d
...
...
@@ -121,7 +121,12 @@ class StrongAdvectionOperator(AdvectionOperatorBase):
dcoll
,
op
.
face_mass
(
dcoll
,
flux
(
op
.
interior_trace_pair
(
dcoll
,
u
))
+
inflow_flux
flux
(
op
.
interior_trace_pair
(
dcoll
,
u
))
# communication of interface fluxes between
# parallel boundaries
+
sum
(
flux
(
tpair
)
for
tpair
in
op
.
cross_rank_trace_pairs
(
dcoll
,
u
))
+
inflow_flux
# FIXME: Add support for inflow/outflow tags
# + flux(TracePair(self.inflow_tag,
...
...
@@ -166,7 +171,12 @@ class WeakAdvectionOperator(AdvectionOperatorBase):
np
.
dot
(
self
.
v
,
op
.
weak_local_grad
(
dcoll
,
u
))
-
op
.
face_mass
(
dcoll
,
flux
(
op
.
interior_trace_pair
(
dcoll
,
u
))
+
inflow_flux
flux
(
op
.
interior_trace_pair
(
dcoll
,
u
))
# communication of interface fluxes between
# parallel boundaries
+
sum
(
flux
(
tpair
)
for
tpair
in
op
.
cross_rank_trace_pairs
(
dcoll
,
u
))
+
inflow_flux
# FIXME: Add support for inflow/outflow tags
# + flux(TracePair(self.inflow_tag,
...
...
@@ -269,6 +279,11 @@ class VariableCoefficientAdvectionOperator(AdvectionOperatorBase):
dcoll
,
face_dd
,
flux
(
to_quad_int_tpair
(
dcoll
,
u
,
self
.
quad_tag
))
# communication of interface fluxes between
# parallel boundaries
+
sum
(
flux
(
tpair
)
for
tpair
in
op
.
cross_rank_trace_pairs
(
dcoll
,
u
,
self
.
quad_tag
))
+
inflow_flux
# FIXME: Add support for inflow/outflow tags
...
...
@@ -371,6 +386,11 @@ class SurfaceAdvectionOperator(AdvectionOperatorBase):
dcoll
,
face_dd
,
flux
(
to_quad_int_tpair
(
dcoll
,
u
,
self
.
quad_tag
))
# communication of interface fluxes between
# parallel boundaries
+
sum
(
flux
(
tpair
)
for
tpair
in
op
.
cross_rank_trace_pairs
(
dcoll
,
u
,
self
.
quad_tag
))
)
)
)
...
...
This diff is collapsed.
Click to expand it.
grudge/models/em.py
+
4
−
0
View file @
63c15e6d
...
...
@@ -301,6 +301,10 @@ class MaxwellOperator(HyperbolicOperator):
op
.
face_mass
(
dcoll
,
flux
(
op
.
interior_trace_pair
(
dcoll
,
w
))
# communication of interface fluxes between
# parallel boundaries
+
sum
(
flux
(
tpair
)
for
tpair
in
op
.
cross_rank_trace_pairs
(
dcoll
,
w
))
+
sum
(
flux
(
bv_tpair
(
tag
,
w
,
bc
))
for
tag
,
bc
in
tags_and_bcs
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment