Skip to content

Commit

Permalink
Added periods to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
JennaPaikowsky authored Jan 10, 2025
1 parent e6859d0 commit 35a626d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ansys/dpf/core/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,28 @@ class Field(_FieldBase):
>>> field_with_classic_api = dpf.Field()
>>> field_with_classic_api.location = locations.nodal
Create a symmetrical matrix elemental field from scratch
Create a symmetrical matrix elemental field from scratch.
>>> from ansys.dpf import core as dpf
>>> num_entities = 2
>>> my_field = dpf.Field(num_entities, dpf.natures.symmatrix, locations.elemental)
>>> my_scoping = dpf.Scoping(location=locations.elemental, ids=[1, 2])
>>> my_field.scoping = my_scoping
Add all the data at once
Add all the data at once.
>>> from ansys.dpf import core as dpf
>>> my_data = [1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0]
>>> my_field.data = my_data
Add data entity by entity
Add data entity by entity.
>>> from ansys.dpf import core as dpf
>>> my_elem_data = [1.0,1.0,1.0,0.0,0.0,0.0]
>>> my_field.append(my_elem_data, scopingid=1)
>>> my_field.append(my_elem_data, scopingid=2)
Create a nodal scalar field using the fields factory
Create a nodal scalar field using the fields factory.
>>> from ansys.dpf.core import fields_factory
>>> from ansys.dpf import core as dpf
Expand Down

0 comments on commit 35a626d

Please sign in to comment.