:class:`ScopingsContainer` ========================== .. py:class:: ansys.dpf.core.scopings_container.ScopingsContainer(scopings_container=None, server=None) Bases: :py:obj:`ansys.dpf.core.collection_base.CollectionBase`\ [\ :py:obj:`ansys.dpf.core.scoping.Scoping`\ ] A class used to represent a ScopingsContainer which contains scopings split on a given space. :param scopings_container: ansys.dpf.core.ScopingsContainer, optional Create a scopings container from a Collection message or create a copy from an existing scopings container :type scopings_container: ansys.grpc.dpf.collection_pb2.Collection or :param server: Server with channel connected to the remote or local instance. When ``None``, attempts to use the global server. :type server: server.DPFServer, optional .. py:currentmodule:: ScopingsContainer Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~create_subtype` - Create a Scoping subtype. * - :py:attr:`~get_scopings` - Return the scopings at a requested label space. * - :py:attr:`~get_scoping` - Return the scoping at a requested index or label space. * - :py:attr:`~add_scoping` - Update or add the scoping at a requested label space. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~entries_type` - .. tab-item:: Special methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~__getitem__` - Return the scoping at a requested index. Import detail ------------- .. code-block:: python from ansys.dpf.core.scopings_container import ScopingsContainer Attribute detail ---------------- .. py:attribute:: entries_type Method detail ------------- .. py:method:: create_subtype(obj_by_copy) Create a Scoping subtype. .. py:method:: get_scopings(label_space) Return the scopings at a requested label space. :param label_space_or_index: Scopings corresponding to the filter (label space) in input, for example: ``{"elshape":1, "body":12}`` :type label_space_or_index: dict[str,int] , int :returns: **scopings** -- scopings corresponding to the request :rtype: list[Scoping] .. py:method:: get_scoping(label_space_or_index) Return the scoping at a requested index or label space. Throws if the request returns several scoping :param label_space_or_index: Scopings corresponding to the filter (label space) in input, for example: ``{"elshape":1, "body":12}`` or Index of the scoping. :type label_space_or_index: dict[str,int] , int :returns: **scopings** -- scoping corresponding to the request :rtype: Scoping .. py:method:: __getitem__(key) Return the scoping at a requested index. :param key: the index :type key: int :returns: **scoping** -- scoping corresponding to the request :rtype: Scoping .. py:method:: add_scoping(label_space, scoping) Update or add the scoping at a requested label space. :param label_space: label_space of the requested scopings, ex : {"elshape":1, "body":12} :type label_space: dict[str,int] :param scoping: DPF scoping to add. :type scoping: Scoping