diff --git a/grudge/geometry/__init__.py b/grudge/geometry/__init__.py index f5d058ad5be789b46a706e6fd06262a6deb13860..c5a83ba531f6bcf52371befc11c0401a4474df23 100644 --- a/grudge/geometry/__init__.py +++ b/grudge/geometry/__init__.py @@ -1,2 +1,31 @@ +__copyright__ = """ +Copyright (C) 2021 University of Illinois Board of Trustees +""" -from grudge.geometry.metrics import * +__license__ = """ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + + +from grudge.geometry.metrics import ( + forward_metric_derivative_mat, + inverse_metric_derivative_mat, + inverse_surface_metric_derivative, + area_element +) diff --git a/grudge/geometry/metrics.py b/grudge/geometry/metrics.py index 4e7b07ff3c6a1161a4194ce8f7b5b16c299c2a15..c4f66da2aa9743e89c5992b053a01d85a9e889d4 100644 --- a/grudge/geometry/metrics.py +++ b/grudge/geometry/metrics.py @@ -1,3 +1,27 @@ +__copyright__ = """ +Copyright (C) 2021 University of Illinois Board of Trustees +""" + +__license__ = """ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + import numpy as np @@ -168,9 +192,7 @@ def inverse_metric_derivative(actx, dcoll, rst_axis, xyz_axis, dd): for rst_axis in range(dim) ).inv() - # NOTE: this always produces a DOFArray of shape (1,). - # the thing we want is actually inside - result, = (outprod_with_unit(xyz_axis, rst_axis) + result = (outprod_with_unit(xyz_axis, rst_axis) * volume_pseudoscalar_inv).as_scalar() return result