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
60088e39
Commit
60088e39
authored
3 years ago
by
Thomas Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Catch QTAG_NONE tags in op.project
parent
0767f758
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grudge/op.py
+17
-0
17 additions, 0 deletions
grudge/op.py
with
17 additions
and
0 deletions
grudge/op.py
+
17
−
0
View file @
60088e39
...
@@ -62,6 +62,8 @@ from meshmode.dof_array import freeze, flatten, unflatten
...
@@ -62,6 +62,8 @@ from meshmode.dof_array import freeze, flatten, unflatten
from
grudge.symbolic.primitives
import
TracePair
from
grudge.symbolic.primitives
import
TracePair
from
warnings
import
warn
# def interp(dcoll, src, tgt, vec):
# def interp(dcoll, src, tgt, vec):
# from warnings import warn
# from warnings import warn
...
@@ -82,6 +84,21 @@ def project(dcoll, src, tgt, vec):
...
@@ -82,6 +84,21 @@ def project(dcoll, src, tgt, vec):
"""
"""
src
=
dof_desc
.
as_dofdesc
(
src
)
src
=
dof_desc
.
as_dofdesc
(
src
)
tgt
=
dof_desc
.
as_dofdesc
(
tgt
)
tgt
=
dof_desc
.
as_dofdesc
(
tgt
)
# FIXME: QTAG_NONE hunting
if
src
.
discretization_tag
is
dof_desc
.
QTAG_NONE
:
warn
(
"
`DOFDesc.QTAG_NONE` is deprecated and will be dropped
"
"
in version 2022.x. Use `DOFDesc.DISCR_TAG_BASE` instead.
"
,
DeprecationWarning
,
stacklevel
=
2
)
src
=
src
.
with_discr_tag
(
dof_desc
.
DISCR_TAG_BASE
)
# FIXME: QTAG_NONE hunting
if
tgt
.
discretization_tag
is
dof_desc
.
QTAG_NONE
:
warn
(
"
`DOFDesc.QTAG_NONE` is deprecated and will be dropped
"
"
in version 2022.x. Use `DOFDesc.DISCR_TAG_BASE` instead.
"
,
DeprecationWarning
,
stacklevel
=
2
)
tgt
=
tgt
.
with_discr_tag
(
dof_desc
.
DISCR_TAG_BASE
)
if
src
==
tgt
:
if
src
==
tgt
:
return
vec
return
vec
...
...
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