Commit 024b3725 authored by Philipp Arras's avatar Philipp Arras
Browse files

Improvements for domain checks

parent acb3d258
Pipeline #63109 passed with stages
in 7 minutes and 32 seconds
...@@ -95,7 +95,7 @@ def _actual_domain_check(op, domain_dtype=None, inp=None): ...@@ -95,7 +95,7 @@ def _actual_domain_check(op, domain_dtype=None, inp=None):
assert_(op(inp).domain is assert_(op(inp).domain is
def _actual_domain_check_nonlinear(op, loc, target_dtype=np.float64): def _actual_domain_check_nonlinear(op, loc):
assert isinstance(loc, (Field, MultiField)) assert isinstance(loc, (Field, MultiField))
assert_(loc.domain is op.domain) assert_(loc.domain is op.domain)
lin = Linearization.make_var(loc, False) lin = Linearization.make_var(loc, False)
...@@ -112,7 +112,7 @@ def _actual_domain_check_nonlinear(op, loc, target_dtype=np.float64): ...@@ -112,7 +112,7 @@ def _actual_domain_check_nonlinear(op, loc, target_dtype=np.float64):
assert_(reslin.jac.domain is reslin.domain) assert_(reslin.jac.domain is reslin.domain)
assert_( is assert_( is
_actual_domain_check(reslin.jac, inp=loc) _actual_domain_check(reslin.jac, inp=loc)
_actual_domain_check(reslin.jac.adjoint, domain_dtype=target_dtype) _actual_domain_check(reslin.jac.adjoint, inp=reslin.jac(loc))
def _domain_check(op): def _domain_check(op):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment