ansys::dpf::ScopingsContainer Class Reference
Last update: 10.07.2023
ansys::dpf::ScopingsContainer Class Reference
#include <dpf_api.h>
Public Member Functions | |
ScopingsContainer (ScopingsContainer const &) | |
ScopingsContainer (ScopingsContainer &&) | |
ScopingsContainer (Client const *const client) | |
ScopingsContainer (Client const *const client, std::vector< std::string > const &labels) | |
ScopingsContainer (int id, Client const *const client) | |
ScopingsContainer (std::vector< std::string > const &labels) | |
ScopingsContainer & | operator= (ScopingsContainer const &) |
ScopingsContainer & | operator= (ScopingsContainer &&) |
Scoping | operator[] (dp_int index) |
dp_int | size () const |
Scoping | at (dp_index index) |
const Scoping | at (dp_index index) const |
void | update (Scoping &f, dp_index index) |
void | reserve (dp_int size) |
void | resize (dp_int size) |
void | addLabel (std::string const &label) |
void | addLabel (std::string const &label, dp_id default_value) |
void | addLabels (std::vector< std::string > const &labels) |
void | add (LabelSpace const &labels, Scoping const &f) |
dp_int | getSizeFor (LabelSpace const &labels) const |
std::vector< Scoping > | getScopings (LabelSpace const &labels) const |
std::vector< dp_index > | getScopingsIndices (LabelSpace const &lab_space) const |
Scoping | getScoping (LabelSpace const &labels) const |
std::vector< std::string > | labels () const |
LabelSpace | getLabelSpace (dp_index index) const |
bool | hasLabel (std::string const &label) const |
Scoping | labelScoping (std::string const &label) const |
@ return Scoping for given label. More... | |
ScopingsContainer | createSubScopingsContainer (LabelSpace const &lab_space) const |
std::string | name () const |
void | setName (std::string name) |
dp_id | id () const |
void | setId (dp_id id) |
ScopingsContainer | 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 ScopingsContainer | emptyScopingsContainer () |
Detailed Description
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
- Using collections and labels
- Examples
- AveragingTest.cpp, and WorkflowExamples.cpp.
Constructor & Destructor Documentation
◆ ScopingsContainer() [1/4]
ansys::dpf::ScopingsContainer::ScopingsContainer | ( | Client const *const | client | ) |
Create a new scopings container on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ ScopingsContainer() [2/4]
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
-
[in] client Client instance designating the IP, port and protocol to use. [in] labels Labels for group of scopings.
◆ ScopingsContainer() [3/4]
ansys::dpf::ScopingsContainer::ScopingsContainer | ( | int | id, |
Client const *const | client | ||
) |
Retrieve an existing instance of ScopingsContainer on a server.
- Parameters
-
[in] id Id of the ScopingsContainer object on the server's database. [in] client Client instance designating the IP, port and protocol to use.
◆ ScopingsContainer() [4/4]
ansys::dpf::ScopingsContainer::ScopingsContainer | ( | std::vector< std::string > const & | labels | ) |
Create a group of scopings with the given labels.
- Parameters
-
[in] labels Labels for group of scopings.
Member Function Documentation
◆ add()
void ansys::dpf::ScopingsContainer::add | ( | LabelSpace const & | labels, |
Scoping const & | f | ||
) |
◆ addLabel() [1/2]
void ansys::dpf::ScopingsContainer::addLabel | ( | std::string const & | label | ) |
Add new scoping with given label to group of scopings.
- Parameters
-
[in] label Label for new scoping.
◆ addLabel() [2/2]
void ansys::dpf::ScopingsContainer::addLabel | ( | std::string const & | label, |
dp_id | default_value | ||
) |
Add label with value for new scoping in group of scopings.
- Parameters
-
[in] label Label for new scoping. [in] default_value Value for label.
◆ addLabels()
void ansys::dpf::ScopingsContainer::addLabels | ( | std::vector< std::string > const & | labels | ) |
Add list of labels for new scopings in group.
- Parameters
-
[in] labels Labels for new scopings.
◆ at() [1/2]
- Returns
- Scoping at given index.
- Parameters
-
[in] index Index of scoping to get.
◆ at() [2/2]
- Returns
- Scoping at given index.
- Parameters
-
[in] index Index of scoping to get.
◆ 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
-
[in] lab_space Label space for which to create new scopings container.
◆ 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
-
[in] client Client instance designating the IP, port and protocol to use.
◆ emptyScopingsContainer()
|
static |
Create an empty scopings container.
- Returns
- Empty ScopingsContainer.
◆ getLabelSpace()
LabelSpace ansys::dpf::ScopingsContainer::getLabelSpace | ( | dp_index | index | ) | const |
- Returns
- Label space for given index into scoping container.
- Parameters
-
[in] index Index for which to get label space.
◆ getScoping()
Scoping ansys::dpf::ScopingsContainer::getScoping | ( | LabelSpace const & | labels | ) | const |
- Returns
- First scoping for given label space.
- Parameters
-
[in] labels Label space for which to get first scoping.
◆ getScopings()
std::vector< Scoping > ansys::dpf::ScopingsContainer::getScopings | ( | LabelSpace const & | labels | ) | const |
- Returns
- Vector of scopings for given label space.
- Parameters
-
[in] labels Label space for whict to get scopings.
◆ getScopingsIndices()
std::vector< dp_index > ansys::dpf::ScopingsContainer::getScopingsIndices | ( | LabelSpace const & | lab_space | ) | const |
- Returns
- Scoping indices for scopings given by LabelSpace
- Parameters
-
[in] lab_space LabelSpace defining scopings for which to get indices.
◆ getSizeFor()
dp_int ansys::dpf::ScopingsContainer::getSizeFor | ( | LabelSpace const & | labels | ) | const |
- Returns
- Number of scopings for given label space.
- Parameters
-
[in] labels Label space for which to get number of scopings.
◆ hasLabel()
bool ansys::dpf::ScopingsContainer::hasLabel | ( | std::string const & | label | ) | const |
- Returns
- Indication if given label exists withing scoping container.
- Parameters
-
[in] label Label for which to check existence.
◆ id()
dp_id ansys::dpf::ScopingsContainer::id | ( | ) | const |
- Returns
- Id of scopings container.
◆ labels()
std::vector< std::string > ansys::dpf::ScopingsContainer::labels | ( | ) | const |
- Returns
- Vector of labels for scoping container.
◆ labelScoping()
Scoping ansys::dpf::ScopingsContainer::labelScoping | ( | std::string const & | label | ) | const |
◆ name()
std::string ansys::dpf::ScopingsContainer::name | ( | ) | const |
- Returns
- Name of scopings container.
◆ operator[]()
- Returns
- Scoping at given index.
- Parameters
-
[in] index Index of scoping.
◆ reserve()
void ansys::dpf::ScopingsContainer::reserve | ( | dp_int | size | ) |
Reserve space for given number of scopings.
- Parameters
-
[in] size Number of scopings.
◆ resize()
void ansys::dpf::ScopingsContainer::resize | ( | dp_int | size | ) |
Resize container to given number of scopings.
- Parameters
-
[in] size Number of scopings.
◆ setId()
void ansys::dpf::ScopingsContainer::setId | ( | dp_id | id | ) |
Set Id of scopings container.
- Parameters
-
[in] id Ids for scopings container.
◆ setName()
void ansys::dpf::ScopingsContainer::setName | ( | std::string | name | ) |
Set name of scopings container.
- Parameters
-
[in] name Name for scopings container.
◆ size()
dp_int ansys::dpf::ScopingsContainer::size | ( | ) | const |
- Returns
- Number of scopings.
- Examples
- AveragingTest.cpp.