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):
158
158
Returns
159
159
-------
160
160
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 .
162
162
``dpf.locations.nodal`` or ``dpf.locations.elemental``.
163
163
164
164
Examples
165
165
--------
166
166
Create a property field and request the location.
167
167
168
168
>>> from ansys.dpf import core as dpf
169
+ >>> from ansys.dpf.core.check_version import meets_version
169
170
>>> 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
171
176
>>> pfield.location
172
- 'Nodal '
177
+ 'Elemental '
173
178
174
179
"""
175
180
if meets_version (self ._server .version , "11.0" ):
176
181
if self ._field_definition :
177
182
return self ._field_definition .location
178
- elif self .scoping :
183
+ elif self .scoping is not None :
179
184
return self .scoping .location
180
185
else :
181
186
return None
You can’t perform that action at this time.
0 commit comments