ansys.dpf.core.ScopingsContainer#

class ansys.dpf.core.ScopingsContainer(scopings_container=None, server=None)#

Bases: ansys.dpf.core.collection_base.CollectionBase[ansys.dpf.core.scoping.Scoping]

A class used to represent a ScopingsContainer which contains scopings split on a given space.

Parameters:
  • scopings_container (ansys.grpc.dpf.collection_message_pb2.Collection or) – ansys.dpf.core.ScopingsContainer, optional Create a scopings container from a Collection message or create a copy from an existing scopings container

  • server (server.DPFServer, optional) – Server with channel connected to the remote or local instance. When None, attempts to use the global server.

entries_type#
create_subtype(obj_by_copy)#

Create a Scoping subtype.

get_scopings(label_space)#

Return the scopings at a requested label space.

Parameters:

label_space_or_index (dict[str,int] , int) – Scopings corresponding to the filter (label space) in input, for example: {"elshape":1, "body":12}

Returns:

scopings – scopings corresponding to the request

Return type:

list[Scoping]

get_scoping(label_space_or_index)#

Return the scoping at a requested index or label space.

Throws if the request returns several scoping

Parameters:

label_space_or_index (dict[str,int] , int) – Scopings corresponding to the filter (label space) in input, for example: {"elshape":1, "body":12} or Index of the scoping.

Returns:

scopings – scoping corresponding to the request

Return type:

Scoping

__getitem__(key)#

Return the scoping at a requested index.

Parameters:

key (int) – the index

Returns:

scoping – scoping corresponding to the request

Return type:

Scoping

add_scoping(label_space, scoping)#

Update or add the scoping at a requested label space.

Parameters:
  • label_space (dict[str,int]) – label_space of the requested scopings, ex : {“elshape”:1, “body”:12}

  • scoping (Scoping) – DPF scoping to add.