Commit 4fd8c4e8 authored by Philipp Arras's avatar Philipp Arras
Browse files

Implemente pre-nonlineariaties

parent 75760266
Pipeline #96679 passed with stages
in 12 minutes and 22 seconds
......@@ -330,6 +330,9 @@ class Operator(metaclass=NiftyMeta):
def ptw(self, op, *args, **kwargs):
return _OpChain.make((_FunctionApplier(self.target, op, *args, **kwargs), self))
def ptw_pre(self, op, *args, **kwargs):
return _OpChain.make((self, _FunctionApplier(self.domain, op, *args, **kwargs)))
for f in pointwise.ptw_dict.keys():
def func(f):
......@@ -337,6 +340,11 @@ for f in pointwise.ptw_dict.keys():
return self.ptw(f, *args, **kwargs)
return func2
setattr(Operator, f, func(f))
def func(f):
def func2(self, *args, **kwargs):
return self.ptw_pre(f, *args, **kwargs)
return func2
setattr(Operator, f + "_pre", func(f))
class _FunctionApplier(Operator):
......
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