Skip to content

Commit

Permalink
FEAT: Create custom array file (.sarr) (#5156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Sep 11, 2024
1 parent 91482d4 commit ce3b625
Show file tree
Hide file tree
Showing 2 changed files with 268 additions and 114 deletions.
22 changes: 22 additions & 0 deletions _unittest/test_04_SBR.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,28 @@ def test_12_import_map(self):
for part in parts_dict["parts"]:
assert os.path.exists(parts_dict["parts"][part]["file_name"])

def test_13_create_custom_array(self, aedtapp, local_scratch):
output_file1 = aedtapp.create_sbr_custom_array()
assert os.path.isfile(output_file1)

output_file2 = aedtapp.create_sbr_custom_array(
frequencies=[1.0, 2.0, 5.0],
element_number=4,
state_number=2,
position=[[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 1.0, 1.0]],
x_axis=[[1.0, 0.0, 0.0]] * 4,
y_axis=[[0.0, 1.0, 0.0]] * 4,
weight=[
[complex(1.0, 0.0), complex(1.0, 0.0), complex(1.1, 0.0), complex(1.0, 0.0)],
[complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0)],
[complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 1.0), complex(1.0, 0.0)],
[complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0)],
[complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0)],
[complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0), complex(1.0, 0.0)],
],
)
assert os.path.isfile(output_file2)

@pytest.mark.skipif(is_linux, reason="feature supported in Cpython")
def test_16_read_hdm(self):
self.aedtapp.insert_design("hdm")
Expand Down
Loading

0 comments on commit ce3b625

Please sign in to comment.