Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ To open a result file and explore what's inside, do:
```py
>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.simple_bar)
>>> model = dpf.Model(examples.find_simple_bar())
>>> print(model)

DPF Model
Expand Down
6 changes: 3 additions & 3 deletions ansys/dpf/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def upload_file_in_tmp_folder(file_path, new_file_name=None, server=None):
>>> from ansys.dpf.core import examples
>>> server = dpf.start_local_server(config=dpf.AvailableServerConfigs.GrpcServer,
... as_global=False)
>>> file_path = dpf.upload_file_in_tmp_folder(examples.static_rst, server=server)
>>> file_path = dpf.upload_file_in_tmp_folder(examples.find_static_rst(), server=server)

Notes
-----
Expand Down Expand Up @@ -161,8 +161,8 @@ def download_file(server_file_path, to_client_file_path, server=None):
>>> from ansys.dpf.core import examples
>>> server = dpf.start_local_server(config=dpf.AvailableServerConfigs.GrpcServer,
... as_global=False)
>>> file_path = dpf.upload_file_in_tmp_folder(examples.static_rst, server=server)
>>> dpf.download_file(file_path, examples.static_rst, server=server)
>>> file_path = dpf.upload_file_in_tmp_folder(examples.find_static_rst(), server=server)
>>> dpf.download_file(file_path, examples.find_static_rst(), server=server)
<BLANKLINE>
...

Expand Down
12 changes: 6 additions & 6 deletions ansys/dpf/core/dpf_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Operator:

>>> from ansys.dpf.core import Model
>>> from ansys.dpf.core import examples
>>> model = Model(examples.static_rst)
>>> model = Model(examples.find_static_rst())
>>> disp_oper = model.results.displacement()

"""
Expand Down Expand Up @@ -142,7 +142,7 @@ def _add_sub_res_operators(self, sub_results):
--------
>>> from ansys.dpf.core import Model
>>> from ansys.dpf.core import examples
>>> model = Model(examples.static_rst)
>>> model = Model(examples.find_static_rst())
>>> disp_oper = model.results.displacement()
>>> disp_oper = model.results.displacement()
>>> disp_x = model.results.displacement().X()
Expand Down Expand Up @@ -200,7 +200,7 @@ def connect(self, pin, inpt, pin_out=0):

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> data_src = dpf.DataSources(examples.find_multishells_rst())
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> max_fc_op = dpf.operators.min_max.min_max_fc()
Expand Down Expand Up @@ -430,7 +430,7 @@ def inputs(self):

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> data_src = dpf.DataSources(examples.find_multishells_rst())
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)

Expand All @@ -453,7 +453,7 @@ def outputs(self):

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> data_src = dpf.DataSources(examples.find_multishells_rst())
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> disp_fc = disp_op.outputs.fields_container()
Expand Down Expand Up @@ -532,7 +532,7 @@ def eval(self, pin=None):
>>> from ansys.dpf import core as dpf
>>> import ansys.dpf.core.operators.math as math
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> data_src = dpf.DataSources(examples.find_multishells_rst())
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> normfc = math.norm_fc(disp_op).eval()
Expand Down
26 changes: 13 additions & 13 deletions ansys/dpf/core/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Element:

>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> element = elements[0]

Expand Down Expand Up @@ -69,7 +69,7 @@ def node_ids(self):
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> element = elements[0]
>>> element.node_ids
Expand Down Expand Up @@ -117,7 +117,7 @@ def nodes(self):
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> element = elements[0]
>>> first_node = element.nodes[0]
Expand Down Expand Up @@ -161,7 +161,7 @@ def type(self) -> int:
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> element = elements[0]
>>> element.type
Expand Down Expand Up @@ -191,7 +191,7 @@ def shape(self) -> str:
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> element = elements[0]
>>> element.shape
Expand Down Expand Up @@ -240,7 +240,7 @@ class Elements:
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> elements.n_elements
8
Expand Down Expand Up @@ -480,7 +480,7 @@ def scoping(self) -> scoping.Scoping:
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> my_scoping = elements.scoping

Expand All @@ -501,7 +501,7 @@ def element_types_field(self):
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> field = elements.element_types_field
>>> print(field.data)
Expand Down Expand Up @@ -539,7 +539,7 @@ def materials_field(self):

>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> print(elements.materials_field.data)
[1 1 1 1 1 1 1 1]
Expand Down Expand Up @@ -574,7 +574,7 @@ def connectivities_field(self):
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> field = elements.connectivities_field
>>> field.get_entity_data(1)
Expand Down Expand Up @@ -621,7 +621,7 @@ def mapping_id_to_index(self) -> dict:
--------
>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.simple_bar)
>>> model = dpf.Model(examples.find_simple_bar())
>>> meshed_region = model.metadata.meshed_region
>>> map = meshed_region.nodes.mapping_id_to_index

Expand Down Expand Up @@ -654,7 +654,7 @@ def map_scoping(self, external_scope):

>>> import ansys.dpf.core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> vol = model.results.elemental_volume()
>>> field = vol.outputs.fields_container()[0]
Expand Down Expand Up @@ -1286,7 +1286,7 @@ def descriptor(element_type):
--------
>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.static_rst)
>>> model = dpf.Model(examples.find_static_rst())
>>> elements = model.metadata.meshed_region.elements
>>> element = elements[0]
>>> type_of_element = element.type
Expand Down
Loading