Skip to content

Commit c972fd0

Browse files
committed
Merge branch 'main' into release/0.4
2 parents 8cf5532 + e3a5055 commit c972fd0

37 files changed

+5569
-45
lines changed

examples/Airbag/airbag_deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@
4646
#
4747
from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric
4848
from ansys.dyna.core.pre import examples
49+
from ansys.dyna.core.pre.misc import check_valid_ip
4950
# sphinx_gallery_thumbnail_path = '_static/pre/airbag/airbag.png'
5051

5152
hostname = "localhost"
52-
if len(sys.argv) > 1:
53+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
5354
hostname = sys.argv[1]
5455

5556
###############################################################################

examples/EM/em_resistive_heating.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
from ansys.dyna.core.pre.dynamaterial import MatElastic,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1
2626
from em_set_data import *
2727
from ansys.dyna.core.pre import examples
28+
from ansys.dyna.core.pre.misc import check_valid_ip
2829
# sphinx_gallery_thumbnail_path = '_static/pre/em/em_resistive_heating.png'
2930

3031
hostname = "localhost"
31-
if len(sys.argv) > 1:
32+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
3233
hostname = sys.argv[1]
3334

3435
solution = launch_dynapre(ip = hostname)

examples/EM/em_resistive_heating_2d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
)
2727
from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1
2828
from ansys.dyna.core.pre import examples
29+
from ansys.dyna.core.pre.misc import check_valid_ip
2930
# sphinx_gallery_thumbnail_path = '_static/pre/em/resistive_heating_2d.png'
3031

3132
hostname = "localhost"
32-
if len(sys.argv) > 1:
33+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
3334
hostname = sys.argv[1]
3435

3536
solution = launch_dynapre(ip = hostname)

examples/EM/em_resistive_heating_2d_isopots.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1
3333
from em_set_data import rogoseg
3434
from ansys.dyna.core.pre import examples
35+
from ansys.dyna.core.pre.misc import check_valid_ip
3536
# sphinx_gallery_thumbnail_path = '_static/pre/em/resistive_heating_2d_isopots.png'
3637

3738
hostname = "localhost"
38-
if len(sys.argv) > 1:
39+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
3940
hostname = sys.argv[1]
4041

4142
solution = launch_dynapre(ip = hostname)

examples/EM/em_resistive_heating_2d_multi_isopots.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE
3131
from em_set_data import rogoseg
3232
from ansys.dyna.core.pre import examples
33+
from ansys.dyna.core.pre.misc import check_valid_ip
3334
# sphinx_gallery_thumbnail_path = '_static/pre/em/resistive_heating_2d_isopots.png'
3435

3536
hostname = "localhost"
36-
if len(sys.argv) > 1:
37+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
3738
hostname = sys.argv[1]
3839

3940
solution = launch_dynapre(ip = hostname)

examples/EM/em_rlc_define_func.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
)
2626
from ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE
2727
from ansys.dyna.core.pre import examples
28+
from ansys.dyna.core.pre.misc import check_valid_ip
2829
# sphinx_gallery_thumbnail_path = '_static/pre/em/rlc_isopotential.png'
2930

3031
hostname = "localhost"
31-
if len(sys.argv) > 1:
32+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
3233
hostname = sys.argv[1]
3334

3435
solution = launch_dynapre(ip = hostname)

examples/EM/em_rlc_isopotential.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
from ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE
2727
from em_set_data import rlc_rogoseg
2828
from ansys.dyna.core.pre import examples
29+
from ansys.dyna.core.pre.misc import check_valid_ip
2930
# sphinx_gallery_thumbnail_path = '_static/pre/em/rlc_isopotential.png'
3031

3132
hostname = "localhost"
32-
if len(sys.argv) > 1:
33+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
3334
hostname = sys.argv[1]
3435

3536
solution = launch_dynapre(ip = hostname)

examples/Explicit/ball_plate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
MatPiecewiseLinearPlasticity,
3535
)
3636
from ansys.dyna.core.pre import examples
37+
from ansys.dyna.core.pre.misc import check_valid_ip
3738
# sphinx_gallery_thumbnail_path = '_static/pre/explicit/ball_plate.png'
3839

3940
###############################################################################
@@ -52,7 +53,7 @@
5253
# (``"localhost"`` and ``"50051"`` respectively).
5354
#
5455
hostname = "localhost"
55-
if len(sys.argv) > 1:
56+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
5657
hostname = sys.argv[1]
5758
solution = launch_dynapre(ip = hostname)
5859

examples/Explicit/belted_dummy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
)
4242
from belted_dummy_data import *
4343
from ansys.dyna.core.pre import examples
44+
from ansys.dyna.core.pre.misc import check_valid_ip
4445
# sphinx_gallery_thumbnail_path = '_static/pre/explicit/belted_dummy.png'
4546

4647
###############################################################################
@@ -59,7 +60,7 @@
5960
# (``"localhost"`` and ``"50051"`` respectively).
6061
#
6162
hostname = "localhost"
62-
if len(sys.argv) > 1:
63+
if len(sys.argv) > 1 and check_valid_ip(sys.argv[1]):
6364
hostname = sys.argv[1]
6465
dummy_solution = launch_dynapre(ip = hostname)
6566

examples/Explicit/output/ball_plate.k

Lines changed: 5466 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)