diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase.geom b/python/tests/reference/Result/6grains6x7x8_single_phase.geom new file mode 100644 index 000000000..14cae0973 --- /dev/null +++ b/python/tests/reference/Result/6grains6x7x8_single_phase.geom @@ -0,0 +1,61 @@ +4 header +grid a 6 b 7 c 8 +size x 0.75 y 0.875 z 1.0 +origin x 0.0 y 0.0 z 0.0 +homogenization 1 +3 3 3 4 3 3 +3 1 1 1 3 3 +3 5 1 1 1 3 +1 5 5 1 1 1 +1 5 5 1 1 1 +6 3 3 4 1 6 +6 3 3 4 4 6 +6 3 3 1 3 3 +3 1 1 1 3 3 +3 1 1 1 1 1 +1 1 1 1 1 1 +6 6 3 1 1 1 +6 3 3 3 6 6 +6 3 3 3 6 6 +6 3 3 1 1 6 +3 1 1 1 1 3 +6 1 1 1 2 2 +1 6 2 2 2 2 +6 6 2 2 2 6 +6 3 3 3 6 6 +6 3 3 3 6 6 +5 6 6 6 1 6 +6 6 6 6 2 2 +6 6 6 2 2 2 +2 6 2 2 2 2 +6 5 2 2 2 2 +6 5 5 2 2 6 +5 5 5 3 6 6 +5 5 6 6 6 5 +6 6 6 6 6 6 +6 6 6 6 2 2 +4 4 6 2 2 2 +4 4 2 2 2 2 +5 5 5 2 2 2 +5 5 5 5 2 5 +5 5 5 4 4 5 +6 6 6 6 4 4 +4 4 5 5 2 4 +4 4 5 2 2 4 +4 4 2 2 2 2 +5 5 5 2 2 2 +5 5 5 4 4 5 +5 5 4 4 4 3 +4 5 5 5 4 3 +4 4 5 5 5 4 +4 4 5 5 2 4 +4 4 2 2 2 2 +5 5 2 2 2 2 +5 5 4 4 4 4 +3 4 4 4 4 3 +3 5 5 4 3 3 +4 5 5 5 3 3 +4 5 5 5 1 1 +4 4 5 2 1 1 +6 4 4 4 4 1 +3 4 4 4 4 3 diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 b/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 new file mode 100644 index 000000000..7812f82e8 Binary files /dev/null and b/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 differ diff --git a/python/tests/test_Result.py b/python/tests/test_Result.py index 11395b23f..77f651b2a 100644 --- a/python/tests/test_Result.py +++ b/python/tests/test_Result.py @@ -20,6 +20,13 @@ def default(tmp_path,reference_dir): f.pick('times',20.0) return f +@pytest.fixture +def single_phase(tmp_path,reference_dir): + """Single phase Result file in temp location for modification.""" + fname = '6grains6x7x8_single_phase_tensionY.hdf5' + shutil.copy(os.path.join(reference_dir,fname),tmp_path) + return Result(os.path.join(tmp_path,fname)) + @pytest.fixture def reference_dir(reference_dir_base): """Directory containing reference results.""" @@ -296,3 +303,7 @@ class TestResult: def test_vtk(self,tmp_path,default,output): os.chdir(tmp_path) default.to_vtk(output) + + def test_XDMF(self,tmp_path,single_phase): + os.chdir(tmp_path) + single_phase.write_XDMF