better looking test fields
This commit is contained in:
parent
bd518b2806
commit
8b4baecdee
|
@ -6,8 +6,7 @@ from damask import grid_filters
|
||||||
class TestGridFilters:
|
class TestGridFilters:
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('field_def,curl_def',
|
curl_test_data =[(['np.sin(np.pi*2*nodes[...,2]/size[2])', '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' ],
|
'0.0', '0.0', '0.0' ],
|
||||||
['0.0' , '0.0', '0.0',
|
['0.0' , '0.0', '0.0',
|
||||||
|
@ -43,9 +42,11 @@ class TestGridFilters:
|
||||||
(['0.0', 'np.cos(np.pi*2*nodes[...,0]/size[0])+5*np.cos(np.pi*2*nodes[...,2]/size[2])', '0.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]',\
|
['5*np.sin(np.pi*2*nodes[...,2]/size[2])*np.pi*2/size[2]',\
|
||||||
'0.0',\
|
'0.0',\
|
||||||
'-np.sin(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]']
|
'-np.sin(np.pi*2*nodes[...,0]/size[0])*np.pi*2/size[0]'])]
|
||||||
)
|
|
||||||
])
|
|
||||||
|
@pytest.mark.parametrize('field_def,curl_def',curl_test_data)
|
||||||
|
|
||||||
def test_curl(self,field_def,curl_def):
|
def test_curl(self,field_def,curl_def):
|
||||||
size = np.random.random(3)+1.0
|
size = np.random.random(3)+1.0
|
||||||
grid = np.random.randint(8,32,(3))
|
grid = np.random.randint(8,32,(3))
|
||||||
|
|
Loading…
Reference in New Issue