ScopingsContainer#

class ansys.dpf.core.scopings_container.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_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.

Overview#

create_subtype

Create a Scoping subtype.

get_scopings

Return the scopings at a requested label space.

get_scoping

Return the scoping at a requested index or label space.

add_scoping

Update or add the scoping at a requested label space.

__getitem__

Return the scoping at a requested index.

Import detail#

from ansys.dpf.core.scopings_container import ScopingsContainer

Attribute detail#

ScopingsContainer.entries_type#

Method detail#

ScopingsContainer.create_subtype(obj_by_copy)#

Create a Scoping subtype.

ScopingsContainer.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]

ScopingsContainer.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

ScopingsContainer.__getitem__(key)#

Return the scoping at a requested index.

Parameters:

key (int) – the index

Returns:

scoping – scoping corresponding to the request

Return type:

Scoping

ScopingsContainer.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.