@@ -199,3 +199,110 @@ def download_multi_stage_cyclic_result() -> str:
199199
200200 """
201201 return _download_file ('multistage' , 'multistage.rst' )
202+
203+
204+ def download_sub_file () -> str :
205+ """Download an example .sub result file containing matrices and return the
206+ download path.
207+
208+ Examples files are downloaded to a persistent cache to avoid
209+ re-downloading the same file twice.
210+
211+ Returns
212+ -------
213+ str
214+ Path to the example file.
215+
216+ Examples
217+ --------
218+ Download an example result file and return the path of the file
219+
220+ >>> from ansys.dpf.core import examples
221+ >>> path = examples.download_sub_file()
222+ >>> path
223+ 'C:\\ Users\\ user\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ sub\\ cp56.sub'
224+
225+ """
226+ return _download_file ('sub' , 'cp56.sub' )
227+
228+
229+ def download_msup_files_to_dict () -> dict :
230+ """Download all the files necessary for a msup expansion and return the
231+ download paths into a dictionnary extension->path.
232+
233+ Examples files are downloaded to a persistent cache to avoid
234+ re-downloading the same file twice.
235+
236+ Returns
237+ -------
238+ dict[str:str]
239+ Path to the example files.
240+
241+ Examples
242+ --------
243+ Download an example result file and return the path of the file
244+
245+ >>> from ansys.dpf.core import examples
246+ >>> paths = examples.download_msup_files_to_dict()
247+ >>> paths
248+ {'rfrq': 'C:\\ Users\\ user\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ msup\\ file.rfrq',
249+ 'mode': 'C:\\ Users\\ user\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ msup\\ file.mode',
250+ 'rst': 'C:\\ Users\\ user\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ msup\\ file.rst'}
251+
252+ """
253+ return {"rfrq" :_download_file ('msup' , 'file.rfrq' ),
254+ "mode" :_download_file ('msup' , 'file.mode' ),
255+ "rst" :_download_file ('msup' , 'file.rst' )}
256+
257+
258+ def download_distributed_files () -> dict :
259+ """Download distributed rst files and return the
260+ download paths into a dictionnary domain id->path.
261+
262+ Examples files are downloaded to a persistent cache to avoid
263+ re-downloading the same file twice.
264+
265+ Returns
266+ -------
267+ dict[int:str]
268+ Path to the example files.
269+
270+ Examples
271+ --------
272+ Download an example result file and return the path of the file
273+
274+ >>> from ansys.dpf.core import examples
275+ >>> paths = examples.download_distributed_files()
276+ >>> paths
277+ {0: 'C:\\ Users\\ user\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ distributed\\ file0.rst',
278+ 1: 'C:\\ Users\\ user\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ distributed\\ file1.rst'}
279+
280+ """
281+ return {0 :_download_file ('distributed' , 'file0.rst' ),
282+ 1 :_download_file ('distributed' , 'file1.rst' )}
283+
284+ def download_fluent_files ()-> dict :
285+ """Download the cas and dat file of a fluent analysis and return the
286+ download paths into a dictionnary extension->path.
287+
288+ Examples files are downloaded to a persistent cache to avoid
289+ re-downloading the same file twice.
290+
291+ Returns
292+ -------
293+ dict[str:str]
294+ Path to the example files.
295+
296+ Examples
297+ --------
298+ Download an example result file and return the path of the file
299+
300+ >>> from ansys.dpf.core import examples
301+ >>> paths = examples.download_fluent_files()
302+ >>> paths
303+ {'cas': 'C:\\ Users\\ cbellot\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ fluent\\ FFF.cas.h5',
304+ 'dat': 'C:\\ Users\\ cbellot\\ AppData\\ Local\\ ansys-dpf-core\\ ansys-dpf-core\\ examples\\ fluent\\ FFF.dat.h5'}
305+
306+ """
307+ return {"cas" :_download_file ('fluent' , 'FFF.cas.h5' ),
308+ "dat" :_download_file ('fluent' , 'FFF.dat.h5' )}
0 commit comments