Cleanup/better readability
This commit is contained in:
parent
fcd0028b83
commit
c8701a4665
|
@ -144,25 +144,31 @@ class TestGridFilters:
|
|||
['np.cos(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]','0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0']),
|
||||
(['0.0', 'np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0' ],
|
||||
['0.0', '0.0', '0.0',
|
||||
'0.0', '-np.pi*2/size[1]*np.sin(np.pi*2*nodes[...,1]/size[1])', '0.0',
|
||||
'0.0', '0.0', '0.0' ]),
|
||||
(['1.0', '0.0', '2.0*np.cos(np.pi*2*nodes[...,2]/size[2])'],
|
||||
['0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '-2.0*np.pi*2/size[2]*np.sin(np.pi*2*nodes[...,2]/size[2])']),
|
||||
|
||||
(['0.0', 'np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0' ],
|
||||
['0.0', '0.0', '0.0',
|
||||
'0.0', '-np.pi*2/size[1]*np.sin(np.pi*2*nodes[...,1]/size[1])', '0.0',
|
||||
'0.0', '0.0', '0.0' ]),
|
||||
|
||||
(['1.0', '0.0', '2.0*np.cos(np.pi*2*nodes[...,2]/size[2])'],
|
||||
['0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '-2.0*np.pi*2/size[2]*np.sin(np.pi*2*nodes[...,2]/size[2])']),
|
||||
|
||||
(['np.cos(np.pi*2*nodes[...,2]/size[2])', '3.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])'],
|
||||
['0.0', '0.0', '-np.sin(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', 'np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]']),
|
||||
|
||||
(['np.sin(np.pi*2*nodes[...,0]/size[0])','np.sin(np.pi*2*nodes[...,1]/size[1])',\
|
||||
'np.sin(np.pi*2*nodes[...,2]/size[2])'],
|
||||
'np.sin(np.pi*2*nodes[...,2]/size[2])'],
|
||||
['np.cos(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]', '0.0', '0.0',
|
||||
'0.0', 'np.cos(np.pi*2*nodes[...,1]/size[1])*np.pi*2/size[1]', '0.0',
|
||||
'0.0', '0.0', 'np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]']),
|
||||
|
||||
(['np.sin(np.pi*2*nodes[...,0]/size[0])' ],
|
||||
['np.cos(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]', '0.0', '0.0' ]),
|
||||
|
||||
(['8.0' ],
|
||||
['0.0', '0.0', '0.0' ])]
|
||||
|
||||
|
@ -187,36 +193,41 @@ class TestGridFilters:
|
|||
|
||||
|
||||
curl_test_data =[
|
||||
(['np.sin(np.pi*2*nodes[...,2]/size[2])', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0' ],
|
||||
(['np.sin(np.pi*2*nodes[...,2]/size[2])', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0'],
|
||||
['0.0' , '0.0', '0.0',
|
||||
'np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0']),
|
||||
(['np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'np.cos(np.pi*2*nodes[...,0]/size[0])', '0.0', '0.0'],
|
||||
|
||||
(['np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'np.cos(np.pi*2*nodes[...,0]/size[0])', '0.0', '0.0'],
|
||||
['0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'np.sin(np.pi*2*nodes[...,1]/size[1])*np.pi*2/size[1]', '0.0', '0.0']),
|
||||
|
||||
(['np.sin(np.pi*2*nodes[...,0]/size[0])','np.cos(np.pi*2*nodes[...,1]/size[1])','np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'np.sin(np.pi*2*nodes[...,0]/size[0])','np.cos(np.pi*2*nodes[...,1]/size[1])','np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'np.sin(np.pi*2*nodes[...,0]/size[0])','np.cos(np.pi*2*nodes[...,1]/size[1])','np.sin(np.pi*2*nodes[...,2]/size[2])'],
|
||||
['0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0']),
|
||||
|
||||
(['5.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '2*np.cos(np.pi*2*nodes[...,1]/size[1])'],
|
||||
['0.0', '0.0', '-2*np.pi*2/size[1]*np.sin(np.pi*2*nodes[...,1]/size[1])',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0']),
|
||||
|
||||
(['4*np.sin(np.pi*2*nodes[...,2]/size[2])', \
|
||||
'8*np.sin(np.pi*2*nodes[...,0]/size[0])', \
|
||||
'16*np.sin(np.pi*2*nodes[...,1]/size[1])'],
|
||||
['16*np.pi*2/size[1]*np.cos(np.pi*2*nodes[...,1]/size[1])', \
|
||||
'4*np.pi*2/size[2]*np.cos(np.pi*2*nodes[...,2]/size[2])', \
|
||||
'8*np.pi*2/size[0]*np.cos(np.pi*2*nodes[...,0]/size[0])']),
|
||||
'4*np.pi*2/size[2]*np.cos(np.pi*2*nodes[...,2]/size[2])', \
|
||||
'8*np.pi*2/size[0]*np.cos(np.pi*2*nodes[...,0]/size[0])']),
|
||||
|
||||
(['0.0', 'np.cos(np.pi*2*nodes[...,0]/size[0])+5*np.cos(np.pi*2*nodes[...,2]/size[2])', '0.0'],
|
||||
['5*np.sin(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]',\
|
||||
'0.0',\
|
||||
|
@ -240,35 +251,41 @@ class TestGridFilters:
|
|||
|
||||
|
||||
div_test_data =[
|
||||
(['np.sin(np.pi*2*nodes[...,0]/size[0])', '0.0', '0.0',
|
||||
'0.0' , '0.0', '0.0',
|
||||
'0.0' , '0.0', '0.0'],
|
||||
(['np.sin(np.pi*2*nodes[...,0]/size[0])', '0.0', '0.0',
|
||||
'0.0' , '0.0', '0.0',
|
||||
'0.0' , '0.0', '0.0'],
|
||||
['np.cos(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]' ,'0.0', '0.0']),
|
||||
(['0.0', '0.0', '0.0',
|
||||
'0.0', 'np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0',
|
||||
'0.0', '0.0', '0.0'],
|
||||
|
||||
(['0.0', '0.0', '0.0',
|
||||
'0.0', 'np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0',
|
||||
'0.0', '0.0', '0.0'],
|
||||
['0.0', '-np.sin(np.pi*2*nodes[...,1]/size[1])*np.pi*2/size[1]', '0.0']),
|
||||
(['1.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '2*np.cos(np.pi*2*nodes[...,2]/size[2])' ],
|
||||
['0.0', '0.0', '-2.0*np.pi*2/size[2]*np.sin(np.pi*2*nodes[...,2]/size[2])']
|
||||
|
||||
(['1.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '0.0',
|
||||
'0.0', '0.0', '2*np.cos(np.pi*2*nodes[...,2]/size[2])' ],
|
||||
['0.0', '0.0', '-2.0*np.pi*2/size[2]*np.sin(np.pi*2*nodes[...,2]/size[2])']
|
||||
),
|
||||
([ '23.0', '0.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'0.0', '100.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'0.0', '0.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])'],
|
||||
|
||||
([ '23.0', '0.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'0.0', '100.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'0.0', '0.0', 'np.sin(np.pi*2*nodes[...,2]/size[2])'],
|
||||
['np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]',\
|
||||
'np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]', \
|
||||
'np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]']),
|
||||
|
||||
(['400.0', '0.0', '0.0',
|
||||
'np.sin(np.pi*2*nodes[...,0]/size[0])', \
|
||||
'np.sin(np.pi*2*nodes[...,1]/size[1])', \
|
||||
'np.sin(np.pi*2*nodes[...,2]/size[2])',
|
||||
'0.0', '10.0', '6.0' ],
|
||||
'0.0', '10.0', '6.0'],
|
||||
['0.0','np.cos(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]'\
|
||||
'+np.cos(np.pi*2*nodes[...,1]/size[1])*np.pi*2/size[1]'\
|
||||
'+np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]','0.0' ]),
|
||||
'+np.cos(np.pi*2*nodes[...,1]/size[1])*np.pi*2/size[1]'\
|
||||
'+np.cos(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]', '0.0' ]),
|
||||
|
||||
(['np.sin(np.pi*2*nodes[...,0]/size[0])', '0.0', '0.0'],
|
||||
['np.cos(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]',]),
|
||||
|
||||
(['0.0', 'np.cos(np.pi*2*nodes[...,1]/size[1])', '0.0' ],
|
||||
['-np.sin(np.pi*2*nodes[...,1]/size[1])*np.pi*2/size[1]'])
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue