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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Alexandru Fikl
grudge
Commits
2a553e5a
Commit
2a553e5a
authored
7 years ago
by
Bogdan Enache
Browse files
Options
Downloads
Patches
Plain Diff
Forgot to lint
parent
255f2659
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grudge/models/wave.py
+10
-8
10 additions, 8 deletions
grudge/models/wave.py
with
10 additions
and
8 deletions
grudge/models/wave.py
+
10
−
8
View file @
2a553e5a
...
@@ -369,13 +369,15 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
...
@@ -369,13 +369,15 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
normal
=
sym
.
normal
(
w
.
dd
,
self
.
ambient_dim
)
normal
=
sym
.
normal
(
w
.
dd
,
self
.
ambient_dim
)
if
self
.
flux_type
==
"
central
"
:
if
self
.
flux_type
==
"
central
"
:
return
join_fields
(
return
-
0.5
*
join_fields
(
np
.
dot
(
v
.
int
*
c
.
int
+
v
.
ext
*
c
.
ext
,
normal
),
np
.
dot
(
v
.
int
*
c
.
int
+
v
.
ext
*
c
.
ext
,
normal
),
(
u
.
int
*
c
.
int
+
u
.
ext
*
c
.
ext
)
*
normal
)
*
-
0.5
(
u
.
int
*
c
.
int
+
u
.
ext
*
c
.
ext
)
*
normal
)
elif
self
.
flux_type
==
"
upwind
"
:
elif
self
.
flux_type
==
"
upwind
"
:
return
join_fields
(
np
.
dot
(
normal
,
c
.
ext
*
v
.
ext
+
c
.
int
*
v
.
int
)
+
c
.
ext
*
u
.
ext
-
c
.
int
*
u
.
int
,
return
-
0.5
*
join_fields
(
np
.
dot
(
normal
,
c
.
ext
*
v
.
ext
+
c
.
int
*
v
.
int
)
normal
*
(
np
.
dot
(
normal
,
c
.
ext
*
v
.
ext
-
c
.
int
*
v
.
int
)
+
c
.
ext
*
u
.
ext
+
c
.
int
*
u
.
int
)
)
*
-
0.5
+
c
.
ext
*
u
.
ext
-
c
.
int
*
u
.
int
,
normal
*
(
np
.
dot
(
normal
,
c
.
ext
*
v
.
ext
-
c
.
int
*
v
.
int
)
+
c
.
ext
*
u
.
ext
+
c
.
int
*
u
.
int
))
else
:
else
:
raise
ValueError
(
"
invalid flux type
'
%s
'"
%
self
.
flux_type
)
raise
ValueError
(
"
invalid flux type
'
%s
'"
%
self
.
flux_type
)
...
@@ -386,7 +388,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
...
@@ -386,7 +388,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
w
=
sym
.
make_sym_array
(
"
w
"
,
d
+
1
)
w
=
sym
.
make_sym_array
(
"
w
"
,
d
+
1
)
u
=
w
[
0
]
u
=
w
[
0
]
v
=
w
[
1
:]
v
=
w
[
1
:]
flux_w
=
join_fields
(
self
.
c
,
w
)
flux_w
=
join_fields
(
self
.
c
,
w
)
# boundary conditions -------------------------------------------------
# boundary conditions -------------------------------------------------
...
@@ -401,9 +403,9 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
...
@@ -401,9 +403,9 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
"
are still having issues.
"
)
"
are still having issues.
"
)
dir_g
=
sym
.
Field
(
"
dir_bc_u
"
)
dir_g
=
sym
.
Field
(
"
dir_bc_u
"
)
dir_bc
=
join_fields
(
dir_c
,
2
*
dir_g
-
dir_u
,
dir_v
)
dir_bc
=
join_fields
(
dir_c
,
2
*
dir_g
-
dir_u
,
dir_v
)
else
:
else
:
dir_bc
=
join_fields
(
dir_c
,
-
dir_u
,
dir_v
)
dir_bc
=
join_fields
(
dir_c
,
-
dir_u
,
dir_v
)
dir_bc
=
sym
.
cse
(
dir_bc
,
"
dir_bc
"
)
dir_bc
=
sym
.
cse
(
dir_bc
,
"
dir_bc
"
)
...
@@ -411,7 +413,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
...
@@ -411,7 +413,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator):
neu_c
=
sym
.
cse
(
sym
.
interp
(
"
vol
"
,
self
.
neumann_tag
)(
self
.
c
))
neu_c
=
sym
.
cse
(
sym
.
interp
(
"
vol
"
,
self
.
neumann_tag
)(
self
.
c
))
neu_u
=
sym
.
cse
(
sym
.
interp
(
"
vol
"
,
self
.
neumann_tag
)(
u
))
neu_u
=
sym
.
cse
(
sym
.
interp
(
"
vol
"
,
self
.
neumann_tag
)(
u
))
neu_v
=
sym
.
cse
(
sym
.
interp
(
"
vol
"
,
self
.
neumann_tag
)(
v
))
neu_v
=
sym
.
cse
(
sym
.
interp
(
"
vol
"
,
self
.
neumann_tag
)(
v
))
neu_bc
=
sym
.
cse
(
join_fields
(
neu_c
,
neu_u
,
-
neu_v
),
"
neu_bc
"
)
neu_bc
=
sym
.
cse
(
join_fields
(
neu_c
,
neu_u
,
-
neu_v
),
"
neu_bc
"
)
# radiation BCs -------------------------------------------------------
# radiation BCs -------------------------------------------------------
rad_normal
=
sym
.
normal
(
self
.
radiation_tag
,
d
)
rad_normal
=
sym
.
normal
(
self
.
radiation_tag
,
d
)
...
...
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