Commit b0f8dc8a authored by Reimar H Leike's avatar Reimar H Leike
Browse files

now testing DOFProjection

parent fcbd1ea9
......@@ -35,6 +35,22 @@ _pow_spaces = [ift.PowerSpace(ift.RGSpace((17, 38), harmonic=True))]
class Consistency_Tests(unittest.TestCase):
@expand(product(_h_spaces + _p_RG_spaces + _p_spaces
+ _pow_spaces,
[np.float64, np.complex128]))
def testDOFDistributor(self, sp, dtype):
if sp.size < 4:
return
while True:
try:
dofdex = np.random.choice(np.arange(3), size=sp.shape)
dofdex = ift.Field.from_global_data(sp, dofdex)
op = ift.DOFDistributor(dofdex)
break
except ValueError:
pass
ift.extra.consistency_check(op, dtype, dtype)
@expand(product(_h_spaces, [np.float64, np.complex128]))
def testPPO(self, sp, dtype):
op = ift.PowerDistributor(target=sp)
......
Markdown is supported
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