Skip to content

Commit a17b2b4

Browse files
updates in the DataSources api reference
1 parent 5542b14 commit a17b2b4

File tree

1 file changed

+0
-57
lines changed

1 file changed

+0
-57
lines changed

src/ansys/dpf/core/data_sources.py

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -566,63 +566,6 @@ def result_files(self):
566566
list :
567567
List of result files.
568568
569-
Examples
570-
--------
571-
>>> # If you use the :func:`set_result_file_path() <ansys.dpf.core.data_sources.DataSources.set_result_file_path>`
572-
>>> # function, it will return only the file path given as an argument to this function.
573-
>>>
574-
>>> from ansys.dpf import core as dpf
575-
>>>
576-
>>> # Create the DataSources object
577-
>>> my_data_sources = dpf.DataSources()
578-
>>> # Define the path where the main result file can be found
579-
>>> my_data_sources.set_result_file_path(filepath='/tmp/file.cas', key='cas')
580-
>>> # Add the additional result file to the DataSources object
581-
>>> my_data_sources.add_file_path(filepath='/tmp/ds.dat', key='dat')
582-
>>> # Get the path to the main result file
583-
>>> my_data_sources.result_files
584-
['/tmp/file.cas']
585-
586-
>>> # If you added an upstream result file, it is not listed in the main ``DataSources`` object. You have to
587-
>>> # check directly in the ``DataSources`` object created to define the upstream data.
588-
>>>
589-
>>> from ansys.dpf import core as dpf
590-
>>>
591-
>>> # Create the main DataSources object with a main file path
592-
>>> my_data_sources = dpf.DataSources(result_path='/tmp/file.rfrq')
593-
>>>
594-
>>> # Create the DataSources object for the upstream data
595-
>>> my_data_sources_upstream = dpf.DataSources(result_path='/tmp/file.mode')
596-
>>> # Add the additional upstream data to the upstream DataSources object
597-
>>> my_data_sources_upstream.add_file_path(filepath='/tmp/file.rst', key='rst')
598-
>>>
599-
>>> # Add the upstream DataSources to the main DataSources object
600-
>>> my_data_sources.add_upstream(upstream_data_sources=my_data_sources_upstream)
601-
>>>
602-
>>> # Get the path to the main result file of the main DataSources object
603-
>>> my_data_sources.result_files
604-
['/tmp/file.rfrq']
605-
606-
>>> # If you are checking the DataSources object created to define the upstream data, only the first one is listed.
607-
>>>
608-
>>> # Get the path to the upstream file of the upstream DataSources object
609-
>>> my_data_sources_upstream.result_files
610-
['/tmp/file.mode']
611-
612-
>>> #If you have a ``DataSources`` object with more than one domain, a empty list is returned.
613-
>>>
614-
>>> from ansys.dpf import core as dpf
615-
>>>
616-
>>> # Create the DataSources object
617-
>>> my_data_sources = dpf.DataSources()
618-
>>> # Define the path where the main result data can be found and specify its domain
619-
>>> my_data_sources.set_domain_result_file_path(path='/tmp/file0.rst', key='rst', domain_id=0)
620-
>>> my_data_sources.set_domain_result_file_path(path='/tmp/file1.rst', key='rst', domain_id=1)
621-
>>>
622-
>>> # Get the path to the main result files of the DataSources object
623-
>>> my_data_sources.result_files
624-
[None, None]
625-
626569
"""
627570
result_key = self.result_key
628571
if result_key == "":

0 commit comments

Comments
 (0)