File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -158,24 +158,29 @@ def location(self):
158158 Returns
159159 -------
160160 location : str
161- Location string, can be found in :class:`ansys.dpf.core.locations`: ie .
161+ Location string, can be found in :class:`ansys.dpf.core.locations`: i.e .
162162 ``dpf.locations.nodal`` or ``dpf.locations.elemental``.
163163
164164 Examples
165165 --------
166166 Create a property field and request the location.
167167
168168 >>> from ansys.dpf import core as dpf
169+ >>> from ansys.dpf.core.check_version import meets_version
169170 >>> pfield = dpf.PropertyField()
170- >>> pfield.location = dpf.locations.nodal
171+ >>> if meets_version(dpf.SERVER.version, "11.0"):
172+ ... pfield.location = dpf.locations.elemental
173+ ... else:
174+ ... pfield.scoping = dpf.Scoping()
175+ ... pfield.scoping.location = dpf.locations.elemental
171176 >>> pfield.location
172- 'Nodal '
177+ 'Elemental '
173178
174179 """
175180 if meets_version (self ._server .version , "11.0" ):
176181 if self ._field_definition :
177182 return self ._field_definition .location
178- elif self .scoping :
183+ elif self .scoping is not None :
179184 return self .scoping .location
180185 else :
181186 return None
You can’t perform that action at this time.
0 commit comments