ansys::dpf::Scoping Class Reference
Last update: 10.07.2023
ansys::dpf::Scoping Class Reference
Define a set of entities by ids. More...
#include <dpf_api.h>
Inheritance diagram for ansys::dpf::Scoping:
Public Member Functions | |
Scoping () | |
Scoping (std::vector< dp_id > const &ids, ansys::dpf::Location location) | |
Scoping (std::vector< dp_id > const &ids, ansys::dpf::Location location, Client const *const client) | |
Scoping (Client const *const client) | |
Scoping (int id, Client const *const client) | |
Scoping (Scoping const &) | |
Scoping (Scoping &&) | |
Scoping & | operator= (Scoping const &) |
Scoping & | operator= (Scoping &&) |
ansys::dpf::Location | location () const |
void | setLocation (ansys::dpf::Location location) |
void | setIds (std::vector< dp_id > const &ids) |
void | setIds (dp_id *ids, dp_int size) |
bool | identicalPointers (Scoping const &f) const |
dp_int | size () const |
dp_id | idByIndex (dp_int index) const |
dp_index | indexById (dp_int id) const |
dp_id | at (dp_int index) const |
const dp_id * | ids (dp_int &size) const |
DpfVector< int > | ids () const |
void | getIds (std::vector< dp_id > &ids_to_fill) const |
void | emplace (dp_index index, dp_id id) |
std::string | hashIds () const |
void | reserve (dp_int size) |
void | resize (dp_int size) |
Scoping | deep_copy (ansys::dpf::Client const *const client=nullptr) const |
Public Member Functions inherited from ansys::dpf::DpfTypes | |
virtual bool | empty () const |
virtual std::string | describe () const |
so::API const * | callAPI () const |
bool | isOnCommonAPI () const |
bool | getClient (Client &client) const |
bool | hasBeenMovedLocally () const |
bool | isSameObject (DpfTypes const &rhs) const |
Static Public Member Functions | |
static Scoping | emptyScoping () |
Detailed Description
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.
- Examples
- CompleteRST.cpp, DataApis.cpp, ModelTest.cpp, and OperatorsApis.cpp.
Constructor & Destructor Documentation
◆ Scoping() [1/5]
ansys::dpf::Scoping::Scoping | ( | ) |
Create a new scoping.
◆ Scoping() [2/5]
ansys::dpf::Scoping::Scoping | ( | std::vector< dp_id > const & | ids, |
ansys::dpf::Location | location | ||
) |
◆ Scoping() [3/5]
ansys::dpf::Scoping::Scoping | ( | std::vector< dp_id > const & | ids, |
ansys::dpf::Location | location, | ||
Client const *const | client | ||
) |
◆ Scoping() [4/5]
ansys::dpf::Scoping::Scoping | ( | Client const *const | client | ) |
Create a new scoping on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ Scoping() [5/5]
ansys::dpf::Scoping::Scoping | ( | int | id, |
Client const *const | client | ||
) |
Member Function Documentation
◆ at()
◆ deep_copy()
Scoping ansys::dpf::Scoping::deep_copy | ( | ansys::dpf::Client const *const | client = nullptr | ) | const |
◆ emplace()
Set offset index into scoping to new id.
- Parameters
-
[in] index Location for new id. [in] id New id.
- Examples
- DataApis.cpp.
◆ emptyScoping()
|
static |
Create an empty scoping.
- Returns
- Empty Scoping
◆ getIds()
void ansys::dpf::Scoping::getIds | ( | std::vector< dp_id > & | ids_to_fill | ) | const |
Update ids_to_fill with scoping ids.
- Parameters
-
[out] ids_to_fill vector of ids.
- Examples
- DataApis.cpp.
◆ idByIndex()
- Returns
- Id at index offset into vector of ids.
- Parameters
-
[in] index index into vector of ids.
- Examples
- DataApis.cpp.
◆ identicalPointers()
bool ansys::dpf::Scoping::identicalPointers | ( | Scoping const & | f | ) | const |
Compare scoping with input scoping f.
- Parameters
-
[in] f Scoping with which to compare.
◆ ids() [1/2]
◆ ids() [2/2]
◆ indexById()
- Returns
- Index of id within vector of ids.
- -1 if id not found.
- Parameters
-
[in] id id.
- Examples
- DataApis.cpp.
◆ location()
ansys::dpf::Location ansys::dpf::Scoping::location | ( | ) | const |
- Examples
- DataApis.cpp, and ModelTest.cpp.
◆ reserve()
void ansys::dpf::Scoping::reserve | ( | dp_int | size | ) |
Reserve the container of ids.
◆ resize()
void ansys::dpf::Scoping::resize | ( | dp_int | size | ) |
Resize the container of ids.
◆ setIds() [1/2]
◆ setIds() [2/2]
void ansys::dpf::Scoping::setIds | ( | std::vector< dp_id > const & | ids | ) |
◆ setLocation()
void ansys::dpf::Scoping::setLocation | ( | ansys::dpf::Location | location | ) |
◆ size()
dp_int ansys::dpf::Scoping::size | ( | ) | const |
- Returns
- Number of entries in scoping.
- Examples
- DataApis.cpp, DataExport.cpp, and ModelTest.cpp.