Skip to main content

DPF Cpp Client Library 2026 R1

Class ansys::dpf::ScopingsContainer

Last update: 25.03.2026

Contains a group of scopings.

The scopings container is designed as a set of scopings ordered through labels and ids. Labels identify how the fields are filtered. The most common scopings container have the label "body" with ids corresponding to each body entity.

Generally, a defined ScopingsContainer will contain Scoping entities to apply on the MeshedRegion entities of a corresponding MeshesContainer.

See also: Scoping

Inherits from:

  • ansys::dpf::CollectionBase

Members

Friends

Public functions

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer()

Return type:

Function ~ScopingsContainer

virtual ansys::dpf::ScopingsContainer::~ScopingsContainer()

Return type:

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer(ScopingsContainer const &)

Parameters:

  • ScopingsContainer const &

Return type:

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer(ScopingsContainer &&) noexcept

Parameters:

  • ScopingsContainer &&

Return type:

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer(Client const *const client)

Create a new scopings container on a server.

Parameters:

  • Client const *const client: [in] Client instance designating the IP, port and protocol to use.

Return type:

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer(Client const *const client, std::vector< std::string > const &labels)

Create a group of scopings with the given labels on a server.

Parameters:

  • Client const *const client: [in] Client instance designating the IP, port and protocol to use.
  • std::vector< std::string > const & labels: [in] Labels for group of scopings.

Return type:

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer(int id, Client const *const client)

Retrieve an existing instance of ScopingsContainer on a server.

Parameters:

  • int id: [in] Id of the ScopingsContainer object on the server's database.
  • Client const *const client: [in] Client instance designating the IP, port and protocol to use.

Return type:

Function ScopingsContainer

ansys::dpf::ScopingsContainer::ScopingsContainer(std::vector< std::string > const &labels)

Create a group of scopings with the given labels.

Parameters:

  • std::vector< std::string > const & labels: [in] Labels for group of scopings.

Return type:

Function operator=

ScopingsContainer & ansys::dpf::ScopingsContainer::operator=(ScopingsContainer const &)

Parameters:

  • ScopingsContainer const &

Return type: ScopingsContainer &

Function operator=

ScopingsContainer & ansys::dpf::ScopingsContainer::operator=(ScopingsContainer &&) noexcept

Parameters:

  • ScopingsContainer &&

Return type: ScopingsContainer &

Function operator[]

Scoping ansys::dpf::ScopingsContainer::operator[](dp_int index)

Returns:

Scoping at given index.

Parameters:

  • dp_int index: [in] Index of scoping.

Return type: Scoping

Function at

Scoping ansys::dpf::ScopingsContainer::at(dp_index index)

Returns:

Scoping at given index.

Parameters:

  • dp_index index: [in] Index of scoping to get.

Return type: Scoping

Function at

const Scoping ansys::dpf::ScopingsContainer::at(dp_index index) const

Returns:

Scoping at given index.

Parameters:

  • dp_index index: [in] Index of scoping to get.

Return type: const Scoping

Function update

void ansys::dpf::ScopingsContainer::update(Scoping &f, dp_index index)

Update Scoping at given index.

Parameters:

  • Scoping & f: [in] New scoping.
  • dp_index index: [in] Index of scoping to update.

Return type: void

Function add

void ansys::dpf::ScopingsContainer::add(LabelSpace const &labels, Scoping const &f, bool can_replace=true)

Add new scoping with given labels to group.

Parameters:

  • LabelSpace const & labels: [in] Label space to use for new scoping.
  • Scoping const & f: [in] Scoping to add to group.
  • bool can_replace = true : [in] if can_replace is false, then, the entity is pushed back without checking if the label space already exists.

Return type: void

Function getScopings

std::vector< Scoping > ansys::dpf::ScopingsContainer::getScopings(LabelSpace const &labels) const

Returns:

Vector of scopings for given label space.

Parameters:

Return type: std::vector< Scoping >

Function getScopingsIndices

std::vector< dp_index > ansys::dpf::ScopingsContainer::getScopingsIndices(LabelSpace const &lab_space) const

Returns:

Scoping indices for scopings given by LabelSpace

Parameters:

Return type: std::vector< dp_index >

Function getScoping

Scoping ansys::dpf::ScopingsContainer::getScoping(LabelSpace const &labels) const

Returns:

First scoping for given label space.

Parameters:

  • LabelSpace const & labels: [in] Label space for which to get first scoping.

Return type: Scoping

Function getMatchingScoping

Scoping ansys::dpf::ScopingsContainer::getMatchingScoping(LabelSpace const &label_space) const

Returns:

First matching Scoping for given label space.

Parameters:

Return type: Scoping

Function getMatchingScopingIndices

DpfVector< dp_index > ansys::dpf::ScopingsContainer::getMatchingScopingIndices(LabelSpace const &label_space) const

Returns:

Vector of matching Scoping to the given label space.

Parameters:

  • LabelSpace const & label_space: [in] Label space for which to get entries.

Return type: DpfVector< dp_index >

Function createSubScopingsContainer

ScopingsContainer ansys::dpf::ScopingsContainer::createSubScopingsContainer(LabelSpace const &lab_space) const

Create a new ScopingsContainer with all the scopings corresponding to the label space in input

Parameters:

  • LabelSpace const & lab_space: [in] Label space for which to create new scopings container.

Return type: ScopingsContainer

Function deep_copy

ScopingsContainer ansys::dpf::ScopingsContainer::deep_copy(ansys::dpf::Client const *const client=nullptr) const

Create a new ScopingsContainer on a server by copying all the data of this ScopingsContainer.

Parameters:

Return type: ScopingsContainer

Function getHashableKey

std::string ansys::dpf::ScopingsContainer::getHashableKey() const

Set and get an simpler hashable entity (here a topoloy identifier) instead of the full scoppings container to save time

Return type: std::string

Function setHashableKey

void ansys::dpf::ScopingsContainer::setHashableKey(const std::string &unique_identifier) const

Parameters:

  • const std::string & unique_identifier

Return type: void

Function getHash

size_t ansys::dpf::ScopingsContainer::getHash() const

Compute and get the hash of a scopings_container

Return type: size_t

Public static functions

Function emptyScopingsContainer

static ScopingsContainer ansys::dpf::ScopingsContainer::emptyScopingsContainer()

Create an empty scopings container. Returns:

Empty ScopingsContainer.

Return type: ScopingsContainer

Connect with Ansys