@@ -79,8 +79,8 @@ def download_transient_result(should_upload: bool = True, server=None,
79
79
return_local_path = False ) -> str :
80
80
"""Download an example transient result file and return the download path
81
81
available server side.
82
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
83
- server side.
82
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
83
+ on the server side.
84
84
85
85
Examples files are downloaded to a persistent cache to avoid
86
86
re-downloading the same file twice.
@@ -118,8 +118,8 @@ def download_all_kinds_of_complexity(should_upload: bool = True, server=None
118
118
, return_local_path = False ) -> str :
119
119
"""Download an example static result and return the download path
120
120
available server side.
121
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
122
- server side.
121
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
122
+ on the server side.
123
123
124
124
Examples files are downloaded to a persistent cache to avoid
125
125
re-downloading the same file twice.
@@ -158,8 +158,8 @@ def download_all_kinds_of_complexity_modal(should_upload: bool = True, server=No
158
158
return_local_path = False ) -> str :
159
159
"""Download an example result file from a static modal analysis and
160
160
return the download path available server side.
161
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
162
- server side.
161
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
162
+ on the server side.
163
163
164
164
Examples files are downloaded to a persistent cache to avoid
165
165
re-downloading the same file twice.
@@ -197,8 +197,8 @@ def download_all_kinds_of_complexity_modal(should_upload: bool = True, server=No
197
197
def download_pontoon (should_upload : bool = True , server = None , return_local_path = False ) -> str :
198
198
"""Download an example result file from a static modal analsys and
199
199
return the download path available server side.
200
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
201
- server side.
200
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
201
+ on the server side.
202
202
203
203
Examples files are downloaded to a persistent cache to avoid
204
204
re-downloading the same file twice.
@@ -236,8 +236,8 @@ def download_multi_harmonic_result(should_upload: bool = True, server=None,
236
236
return_local_path = False ) -> str :
237
237
"""Download an example multi-harmonic result file and return the
238
238
download path available server side.
239
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
240
- server side.
239
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
240
+ on the server side.
241
241
242
242
Examples files are downloaded to a persistent cache to avoid
243
243
re-downloading the same file twice.
@@ -273,10 +273,10 @@ def download_multi_harmonic_result(should_upload: bool = True, server=None,
273
273
274
274
def download_multi_stage_cyclic_result (should_upload : bool = True , server = None ,
275
275
return_local_path = False ) -> str :
276
- """Download an example multi stage result file and return the
276
+ """Download an example multi- stage result file and return the
277
277
download path available server side.
278
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
279
- server side.
278
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
279
+ on the server side.
280
280
281
281
Examples files are downloaded to a persistent cache to avoid
282
282
re-downloading the same file twice.
@@ -313,8 +313,8 @@ def download_multi_stage_cyclic_result(should_upload: bool = True, server=None,
313
313
def download_sub_file (should_upload : bool = True , server = None , return_local_path = False ) -> str :
314
314
"""Download an example .sub result file containing matrices and return the
315
315
download path available server side.
316
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
317
- server side.
316
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
317
+ on the server side.
318
318
319
319
Examples files are downloaded to a persistent cache to avoid
320
320
re-downloading the same file twice.
@@ -352,8 +352,8 @@ def download_msup_files_to_dict(should_upload: bool = True, server=None,
352
352
return_local_path = False ) -> dict :
353
353
"""Download all the files necessary for a msup expansion and return the
354
354
download paths available server side into a dictionary extension->path.
355
- If the server is remote (or doesn't share the memory), the files are uploaded or made available
356
- server side.
355
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
356
+ on the server side.
357
357
358
358
Examples files are downloaded to a persistent cache to avoid
359
359
re-downloading the same file twice.
@@ -397,8 +397,8 @@ def download_distributed_files(should_upload: bool = True, server=None,
397
397
return_local_path = False ) -> dict :
398
398
"""Download distributed rst files and return the
399
399
download paths into a dictionary domain id->path.
400
- If the server is remote (or doesn't share the memory), the files are uploaded or made available
401
- server side.
400
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
401
+ on the server side.
402
402
403
403
Examples files are downloaded to a persistent cache to avoid
404
404
re-downloading the same file twice.
@@ -439,8 +439,8 @@ def download_distributed_files(should_upload: bool = True, server=None,
439
439
def download_fluent_files (should_upload : bool = True , server = None , return_local_path = False ) -> dict :
440
440
"""Download the cas and dat file of a fluent analysis and return the
441
441
download paths into a dictionary extension->path.
442
- If the server is remote (or doesn't share the memory), the files are uploaded or made available
443
- server side.
442
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
443
+ on the server side.
444
444
445
445
Examples files are downloaded to a persistent cache to avoid
446
446
re-downloading the same file twice.
@@ -481,9 +481,9 @@ def download_fluent_files(should_upload: bool = True, server=None, return_local_
481
481
def download_extrapolation_3d_result (should_upload : bool = True , server = None ,
482
482
return_local_path = False ) -> dict :
483
483
"""Download example static results of reference and integrated points
484
- for extrapolation of 3d-element and return return the dictionary of 2 download paths.
485
- If the server is remote (or doesn't share the memory), the files are uploaded or made available
486
- server side.
484
+ for extrapolation of 3d-element and return the dictionary of 2 download paths.
485
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
486
+ on the server side.
487
487
488
488
Examples files are downloaded to a persistent cache to avoid
489
489
re-downloading the same file twice.
@@ -532,8 +532,8 @@ def download_extrapolation_2d_result(should_upload: bool = True, server=None,
532
532
return_local_path = False ) -> dict :
533
533
"""Download example static results of reference and integrated points
534
534
for extrapolation of 2d-element and return the dictionary of 2 download paths.
535
- If the server is remote (or doesn't share the memory), the files are uploaded or made available
536
- server side.
535
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
536
+ on the server side.
537
537
538
538
Examples files are downloaded to a persistent cache to avoid
539
539
re-downloading the same file twice.
@@ -581,8 +581,8 @@ def download_extrapolation_2d_result(should_upload: bool = True, server=None,
581
581
def download_hemisphere (should_upload : bool = True , server = None , return_local_path = False ) -> str :
582
582
"""Download an example result file from a static analysis and
583
583
return the download path available server side.
584
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
585
- server side.
584
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
585
+ on the server side.
586
586
587
587
Examples files are downloaded to a persistent cache to avoid
588
588
re-downloading the same file twice.
@@ -620,8 +620,8 @@ def download_example_asme_result(should_upload: bool = True, server=None,
620
620
return_local_path = False ) -> str :
621
621
"""Download an example result file from a static analysis and
622
622
return the download path available server side.
623
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
624
- server side.
623
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
624
+ on the server side.
625
625
626
626
Examples files are downloaded to a persistent cache to avoid
627
627
re-downloading the same file twice.
@@ -657,8 +657,8 @@ def download_example_asme_result(should_upload: bool = True, server=None,
657
657
def download_crankshaft (should_upload : bool = True , server = None , return_local_path = False ) -> str :
658
658
"""Download the result file of an example of a crankshaft
659
659
under load and return the download path available server side.
660
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
661
- server side.
660
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
661
+ on the server side.
662
662
663
663
Examples files are downloaded to a persistent cache to avoid
664
664
re-downloading the same file twice.
@@ -695,8 +695,8 @@ def download_crankshaft(should_upload: bool = True, server=None, return_local_pa
695
695
def download_piston_rod (should_upload : bool = True , server = None , return_local_path = False ) -> str :
696
696
"""Download the result file of an example of a piston rod
697
697
under load and return the download path available server side.
698
- If the server is remote (or doesn't share the memory), the file is uploaded or made available
699
- server side.
698
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
699
+ on the server side.
700
700
701
701
Examples files are downloaded to a persistent cache to avoid
702
702
re-downloading the same file twice.
@@ -846,3 +846,44 @@ def download_binout_glstat(should_upload: bool = True, server=None, return_local
846
846
847
847
"""
848
848
return _download_file ("binout" , "binout_glstat" , should_upload , server , return_local_path )
849
+
850
+
851
+ def download_cycles_to_failure (should_upload : bool = True ,
852
+ server = None ,
853
+ return_local_path = False ) -> str :
854
+ """Download an example result file from a cyclic analysis and
855
+ return the download path.
856
+ If the server is remote (or doesn't share memory), the file is uploaded or made available
857
+ on the server side.
858
+
859
+ Examples files are downloaded to a persistent cache to avoid
860
+ re-downloading the same file twice.
861
+
862
+ Parameters
863
+ ----------
864
+ should_upload : bool, optional (default True)
865
+ Whether the file should be uploaded server side when the server is remote.
866
+ server : server.DPFServer, optional
867
+ Server with channel connected to the remote or local instance. When
868
+ ``None``, attempts to use the global server.
869
+ return_local_path: bool, optional
870
+ If ``True``, the local path is returned as is, without uploading, nor searching
871
+ for mounted volumes.
872
+
873
+ Returns
874
+ -------
875
+ str
876
+ Path to the example file.
877
+
878
+ Examples
879
+ --------
880
+ Download an example result file and return the path of the file
881
+
882
+ >>> from ansys.dpf.core import examples
883
+ >>> path = examples.download_cycles_to_failure()
884
+ >>> path
885
+ 'C:/Users/user/AppData/local/temp/cycles_to_failure.rst'
886
+
887
+ """
888
+ return _download_file ("cyclic" , "cyclic_to_failure.rst" ,
889
+ should_upload , server , return_local_path )
0 commit comments