Skip to content

Commit

Permalink
Merge pull request #99 from janheindejong/bugfix-write-uff15
Browse files Browse the repository at this point in the history
Fixed a bug that caused UFF15 to be written incorrectly
  • Loading branch information
jankoslavic authored Jan 16, 2025
2 parents 82b9f7c + e67a864 commit f75c41c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
16 0 0 0 0.00000E+00 0.00000E+00 0.00000E+00
17 0 0 0 1.53000E+00 0.00000E+00 0.00000E+00
18 0 0 0 0.00000E+00 3.84000E+00 0.00000E+00
19 0 0 0 1.53000E+00 3.84000E+00 0.00000E+00
19 0 0 0 -1.53000E+00 3.84000E+00 0.00000E+00
20 0 0 0 0.00000E+00 0.00000E+00 1.83000E+00
21 0 0 0 1.53000E+00 0.00000E+00 1.83000E+00
22 0 0 0 0.00000E+00 3.84000E+00 1.83000E+00
Expand Down
2 changes: 1 addition & 1 deletion pyuff/datasets/dataset_15.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_structure_15(raw=False):
print(out)

FORMATS = [
['10.0f', '10.0f', '10.0f', '10.0f', '13.5f', '13.5f', '13.5f'],
['10.0f', '10.0f', '10.0f', '10.0f', '13.5E', '13.5E', '13.5E'],
]

def _write15(fh, dset):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_15.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_read():
uff_ascii = pyuff.UFF('./data/Artemis export - Geometry RPBC_setup_05_14102016_105117.uff')
a = uff_ascii.read_sets(0)
np.testing.assert_array_equal(a['node_nums'][:4],[16.0, 17.0, 18.0, 19.0])
x = [0.0, 1.53, 0.0, 1.53, 0.0, 1.53, 0.0, 1.53, 4.296, 5.616, 4.296]
x = [0.0, 1.53, 0.0,-1.53, 0.0, 1.53, 0.0, 1.53, 4.296, 5.616, 4.296]
y = [0.0, 0.0, 3.84, 3.84, 0.0, 0.0, 3.84, 3.84, 0.382, 0.382, 1.102]
z = [0.0, 0.0, 0.0, 0.0, 1.83, 1.83, 1.83, 1.83, 0.4]
np.testing.assert_array_equal(a['x'][:len(x)],x)
Expand Down

0 comments on commit f75c41c

Please sign in to comment.