From fdc7c4de801646c8479fb86d9d96d6d27e8addbd Mon Sep 17 00:00:00 2001 From: e-moral-sanchez <88042165+e-moral-sanchez@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:02:09 +0200 Subject: [PATCH] GLT symbol of bilinear forms containing boundary integrals (#122) The GLT symbol was not computed correctly when a bilinear form contained a boundary integral. The desired behaviour is: - `gelatize` of a bilinear form involving only boundary integrals should return zero. - in the case of having a bilinear form involving the sum of boundary integrals and domain integrals, `gelatize` should only be applied to the sum of domain integrals. --- sympde/expr/evaluation.py | 4 ++-- sympde/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sympde/expr/evaluation.py b/sympde/expr/evaluation.py index 7cd02bbe..e75189be 100644 --- a/sympde/expr/evaluation.py +++ b/sympde/expr/evaluation.py @@ -1140,7 +1140,7 @@ def eval(cls, *_args, **kwargs): return ImmutableDenseMatrix(lines) - elif isinstance(expr, DomainExpression): + elif isinstance(expr, (DomainExpression, BoundaryExpression)): # TODO to be removed return cls.eval(expr.expr, d_atoms=d_atoms, domain=domain) @@ -1160,7 +1160,7 @@ def eval(cls, *_args, **kwargs): # ... # ... - if domain is not None and domain.mapping is not None: + if domain is not None and getattr(domain, 'mapping', None): terminal_expr = LogicalExpr(terminal_expr.expr, domain) variables = [LogicalExpr(e, domain) for e in variables ] trials = [LogicalExpr(e, domain) for e in trials ] diff --git a/sympde/version.py b/sympde/version.py index fd86b3ee..c6eae9f8 100644 --- a/sympde/version.py +++ b/sympde/version.py @@ -1 +1 @@ -__version__ = "0.17.0" +__version__ = "0.17.1"