Skip to main content

DPF Cpp Client Library 2026 R1

Class ansys::dpf::Scoping

Last update: 25.03.2026

Define a set of entities by ids.

The scoping is entities ids representing a subset of the model's support. Typically, scoping can represent node ids, element ids, time steps, frequencies, joints... Its location indicates what kind of entity the scoping is referring to. Scopings are used to identify the entities where a field is scoped or to choose (through an input pin) a subset on which an operator should compute its result.

Inherits from:

Members

Friends

Public functions

Function Scoping

ansys::dpf::Scoping::Scoping()

Create a new scoping.

Return type:

Function Scoping

ansys::dpf::Scoping::Scoping(std::vector< dp_id > const &ids, ansys::dpf::Location location)

Create a scoping of ids at a location.

Parameters:

Return type:

Function Scoping

ansys::dpf::Scoping::Scoping(std::vector< dp_id > const &ids, ansys::dpf::Location location, Client const *const client)

Create a scoping of ids at a location.

Parameters:

Return type:

Function Scoping

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

Create a new scoping on a server.

Parameters:

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

Return type:

Function Scoping

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

Retrieve an existing instance of Scoping on a server.

Parameters:

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

Return type:

Function ~Scoping

virtual ansys::dpf::Scoping::~Scoping()

Return type:

Function Scoping

ansys::dpf::Scoping::Scoping(Scoping const &)

Parameters:

  • Scoping const &

Return type:

Function Scoping

ansys::dpf::Scoping::Scoping(Scoping &&) noexcept

Parameters:

  • Scoping &&

Return type:

Function operator=

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

Parameters:

  • Scoping const &

Return type: Scoping &

Function operator=

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

Parameters:

  • Scoping &&

Return type: Scoping &

Function location

ansys::dpf::Location ansys::dpf::Scoping::location() const

Returns:

Location of ids.

Return type: ansys::dpf::Location

Function setLocation

void ansys::dpf::Scoping::setLocation(ansys::dpf::Location location)

Set location of scoping.

Parameters:

Return type: void

Function setIds

void ansys::dpf::Scoping::setIds(std::vector< dp_id > const &ids)

Update scoping to vector of new ids.

Parameters:

  • std::vector< dp_id > const & ids: [in] New ids.

Return type: void

Function setIds

void ansys::dpf::Scoping::setIds(dp_id *ids, dp_int size)

Update scoping to list of new ids.

Parameters:

Return type: void

Function identicalPointers

bool ansys::dpf::Scoping::identicalPointers(Scoping const &f) const

Compare scoping with input scoping f.

Parameters:

  • Scoping const & f: [in] Scoping with which to compare.

Return type: bool

Function size

dp_int ansys::dpf::Scoping::size() const

Returns:

Number of entries in scoping.

Return type: dp_int

Function idByIndex

dp_id ansys::dpf::Scoping::idByIndex(dp_int index) const

Returns:

Id at index offset into vector of ids.

Parameters:

  • dp_int index: [in] index into vector of ids.

Return type: dp_id

Function indexById

dp_index ansys::dpf::Scoping::indexById(dp_int id) const

Returns:

Index of id within vector of ids.

Returns:

-1 if id not found.

Parameters:

Return type: dp_index

Function at

dp_id ansys::dpf::Scoping::at(dp_int index) const

Returns:

Id at index offset into vector of ids.

Parameters:

Return type: dp_id

Function ids

const dp_id * ansys::dpf::Scoping::ids(dp_int &size) const

Returns:

Pointer to list of ids.

Parameters:

  • dp_int & size: [out] Length of list.

Return type: const dp_id *

Function ids

DpfVector< int > ansys::dpf::Scoping::ids() const

Returns:

DpfVector of ids array.

Return type: DpfVector< int >

Function getIds

void ansys::dpf::Scoping::getIds(std::vector< dp_id > &ids_to_fill) const

Update ids_to_fill with scoping ids.

Parameters:

  • std::vector< dp_id > & ids_to_fill: [out] vector of ids.

Return type: void

Function emplace

void ansys::dpf::Scoping::emplace(dp_index index, dp_id id)

Set offset index into scoping to new id.

Parameters:

Return type: void

Function hashIds

std::string ansys::dpf::Scoping::hashIds() const

Return type: std::string

Function reserve

void ansys::dpf::Scoping::reserve(dp_int size)

Reserve the container of ids.

Parameters:

Return type: void

Function resize

void ansys::dpf::Scoping::resize(dp_int size)

Resize the container of ids.

Parameters:

Return type: void

Function getHashableKey

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

Set and get an simpler hashable entity (here topology identifiers) instead of the full FE Scoping to save time

Return type: std::string

Function setHashableKey

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

Parameters:

  • const std::string & unique_identifier

Return type: void

Function getHash

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

Compute and get the hash of a scoping

Return type: size_t

Function deep_copy

Scoping ansys::dpf::Scoping::deep_copy(ansys::dpf::Client const *const client=nullptr, const bool b_copy_ids=true) const

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

Parameters:

  • ansys::dpf::Client const *const client = nullptr : [in] Client instance designating the IP, port and protocol to use.
  • const bool b_copy_ids = true : [in] Boolean that allows to decide if scoping ids are to be copied

Return type: Scoping

Public static functions

Function emptyScoping

static Scoping ansys::dpf::Scoping::emptyScoping()

Create an empty scoping. Returns:

Empty Scoping

Return type: Scoping

Connect with Ansys