ansys.dpf.core.scoping._LocalScoping#
- class ansys.dpf.core.scoping._LocalScoping(scoping)#
Bases:
Scoping
Caches the internal data of the scoping so that it can be modified locally.
A single update request is sent to the server when the local scoping is deleted.
- Parameters:
scoping (Scoping) – Scoping to copy locally.
- __cache_data__(owner_scoping)#
- __init_map__()#
- _count()#
Return the number of scoping ids.
- Returns:
count – Number of scoping IDs.
- Return type:
int
- _get_location()#
Retrieve the location of the IDs.
- Returns:
location – Location of the IDs.
- Return type:
str
- _set_location(loc=locations.nodal)#
Set the location.
- Parameters:
loc (str or core.locations enum) – Location needed.
- _set_ids(ids)#
Set scoping ids.
- Parameters:
ids (list of int) – IDs to set.
Notes
Print a progress bar.
- _get_ids(np_array=False)#
Return the scoping ids.
- Returns:
ids – List of IDs.
- Return type:
list[int], numpy.array (if np_array==True)
Notes
Print a progress bar.
- set_id(index, scopingid)#
Set the ID of a scoping’s index.
- Parameters:
index (int) – Index of the scoping.
scopingid (int) – ID of the scoping.
- append(id)#
- _get_id(index)#
Retrieve the index that the scoping ID is located on.
- Parameters:
index (int) – Index of the scoping
- Returns:
id – ID of the scoping’s index.
- Return type:
int
- _get_index(scopingid)#
Retrieve an ID corresponding to an ID in the scoping.
- Parameters:
id (int) – ID to retrieve.
- Returns:
index – Index of the ID.
- Return type:
int
- release_data()#
Release the data.
- __enter__()#
- __exit__(type, value, tb)#
- __del__()#
Clean up resources associated with the instance.
This method calls the deleter function to release resources. If an exception occurs during deletion, a warning is issued.
- Raises:
Warning – If an exception occurs while attempting to delete resources.