-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mnale/bugs/25.1/element__volume_tests
- Loading branch information
Showing
14 changed files
with
184 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
changelog: | ||
categories: | ||
- title: Enhancements | ||
labels: | ||
- enhancement | ||
- title: Bug fixes | ||
labels: | ||
- bug | ||
- title: Documentation | ||
labels: | ||
- documentation | ||
- examples | ||
- title: CI/CD | ||
labels: | ||
- CI/CD | ||
- title: Maintenance | ||
labels: | ||
- maintenance | ||
- dependencies | ||
exclude: | ||
authors: | ||
- dependabot[bot] | ||
categories: | ||
- title: Enhancements | ||
labels: | ||
- enhancement | ||
- title: Bug fixes | ||
labels: | ||
- bug | ||
- title: Documentation | ||
labels: | ||
- documentation | ||
- title: Examples | ||
labels: | ||
- examples | ||
- title: CI/CD | ||
labels: | ||
- CI/CD | ||
- title: Maintenance | ||
labels: | ||
- maintenance | ||
- dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
black==24.4.2 | ||
build==1.2.1 | ||
black==24.8.0 | ||
build==1.2.2 | ||
chevron==0.14.0 | ||
wheel==0.43.0 | ||
wheel==0.44.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
ansys_sphinx_theme==0.16.5 | ||
ansys_sphinx_theme==1.0.10 | ||
enum-tools[sphinx]==0.12.0 | ||
graphviz==0.20.1 | ||
imageio==2.35.1 | ||
imageio-ffmpeg==0.4.7 | ||
nbsphinx==0.9.3 | ||
imageio-ffmpeg==0.5.1 | ||
nbsphinx==0.9.5 | ||
pypandoc==1.13 | ||
pytest-sphinx==0.6.3 | ||
pyvista==0.44.1 | ||
sphinx==7.1.0 | ||
sphinx-autobuild==2024.2.4 | ||
sphinx-copybutton==0.5.2 | ||
sphinx-gallery==0.17.0 | ||
sphinx-notfound-page==1.0.0 | ||
sphinx-gallery==0.17.1 | ||
sphinx-notfound-page==1.0.4 | ||
sphinx-reredirects==0.1.3 | ||
sphinx_design==0.6.0 | ||
sphinx_design==0.6.1 | ||
sphinxcontrib-napoleon==0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
importlib-metadata==7.1.0 | ||
importlib-metadata==8.5.0 | ||
numpy==1.26.4 | ||
packaging==24.0 | ||
psutil==6.0.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
ansys-platform-instancemanagement==1.1.2 | ||
coverage==7.6.0 | ||
coverage==7.6.1 | ||
imageio==2.35.1 | ||
imageio-ffmpeg==0.4.7 | ||
imageio-ffmpeg==0.5.1 | ||
pytest==7.4.2 | ||
pytest-cov==5.0.0 | ||
pytest-order==1.2.1 | ||
pytest-order==1.3.0 | ||
pytest-rerunfailures==14.0 | ||
pyvista==0.44.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright (C) 2020 - 2024 ANSYS, Inc. and/or its affiliates. | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
# Tests the result.coordinate_system operator | ||
import ansys.dpf.core as dpf | ||
from ansys.dpf.core import examples | ||
import conftest | ||
import numpy as np | ||
|
||
|
||
def test_operator_coordinate_system_rst(server_type): | ||
model = dpf.Model(examples.download_hemisphere(server=server_type), server=server_type) | ||
if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1: | ||
# Starting with DPF 2025.1.pre1 | ||
cs = dpf.operators.result.coordinate_system(server=server_type) | ||
cs.inputs.data_sources.connect(model) | ||
else: | ||
# For previous DPF versions | ||
cs = model.operator(r"mapdl::rst::CS") | ||
cs.inputs.cs_id.connect(12) | ||
cs_rot_mat = cs.outputs.field().data | ||
ref = np.array( | ||
[ | ||
[ | ||
-0.18966565, | ||
0.91517569, | ||
0.35564083, | ||
-0.91517569, | ||
-0.03358143, | ||
-0.40165376, | ||
-0.35564083, | ||
-0.40165376, | ||
0.84391579, | ||
4.74164122, | ||
22.87939222, | ||
8.89102077, | ||
] | ||
] | ||
) | ||
assert np.allclose(cs_rot_mat.data, ref) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright (C) 2020 - 2024 ANSYS, Inc. and/or its affiliates. | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
import ansys.dpf.core as dpf | ||
|
||
|
||
def test_label_space_(server_type): | ||
reference = {"test": 1, "various": 2} | ||
ls = dpf.LabelSpace(label_space=reference) | ||
assert dict(ls) == reference | ||
assert str(ls) | ||
reference = {"test": 1, "various": 2} | ||
ls.fill(label_space=reference) |