Skip to content

Commit

Permalink
Fix bug in L2 pullback (#85)
Browse files Browse the repository at this point in the history
* Fix bug in L2 pullback: divide function by determinant instead of multiplying it
* Some cleanup in PullBack constructor
* Update version.py
  • Loading branch information
yguclu authored Dec 15, 2020
1 parent 769cfb3 commit 42b567b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions sympde/topology/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,18 +543,18 @@ def __new__(cls, u, mapping=None):
else:
mapping = space.domain.mapping

J = mapping.jacobian
J = mapping.jacobian
if isinstance(kind, (UndefinedSpaceType, H1SpaceType)):
expr = el
expr = el

elif isinstance(kind , HcurlSpaceType):
expr = J.inv().T*el
elif isinstance(kind, HcurlSpaceType):
expr = el * J.inv().T

elif isinstance(kind, HdivSpaceType):
expr = (J/J.det())*el
expr = el * (J/J.det())

elif isinstance(kind, L2SpaceType):
expr = J.det()*el
expr = el / J.det()

# elif isinstance(kind, UndefinedSpaceType):
# raise ValueError('kind must be specified in order to perform the pull-back transformation')
Expand Down
2 changes: 1 addition & 1 deletion sympde/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.10.2"
__version__ = "0.10.3"

0 comments on commit 42b567b

Please sign in to comment.