ansys::dpf::MeshesContainer Class Reference
Last update: 10.07.2023
ansys::dpf::MeshesContainer Class Reference
#include <dpf_api.h>
Public Member Functions | |
MeshesContainer (MeshesContainer const &) | |
MeshesContainer (MeshesContainer &&) | |
MeshesContainer (Client const *const client) | |
MeshesContainer (Client const *const client, std::vector< std::string > const &labels) | |
MeshesContainer (int id, Client const *const client) | |
MeshesContainer (std::vector< std::string > const &labels) | |
MeshesContainer & | operator= (MeshesContainer const &) |
MeshesContainer & | operator= (MeshesContainer &&) |
MeshedRegion | operator[] (dp_int index) |
dp_int | size () const |
MeshedRegion | at (dp_index index) |
const MeshedRegion | at (dp_index index) const |
void | update (MeshedRegion &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, MeshedRegion const &f) |
dp_int | getSizeFor (LabelSpace const &label_space) const |
std::vector< MeshedRegion > | getMeshes (LabelSpace const &label_space) const |
MeshedRegion | getMesh (LabelSpace const &label_space) const |
std::vector< std::string > | labels () const |
LabelSpace | getLabelSpace (dp_index index) const |
bool | hasLabel (std::string const &label) const |
@ return Indication that given label exists within mesh container. More... | |
Scoping | labelScoping (std::string const &label) const |
MeshesContainer | createSubMeshesContainer (LabelSpace const &lab_space) const |
create a MeshesContainer with all the meshes corresponding to the label space in input | |
std::string | name () const |
void | setName (std::string name) |
dp_id | id () const |
@ return Id of mesh container. | |
void | setId (dp_id id) |
MeshesContainer | 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 MeshesContainer | emptyMeshesContainer () |
Detailed Description
Contains a group of meshes.
The meshes container is designed as a set of meshes ordered through labels and ids. Labels identify how the fields are filtered. The most common meshes container have the label "body" with ids corresponding to each body entity.
- Examples
- DataExport.cpp.
Constructor & Destructor Documentation
◆ MeshesContainer() [1/4]
ansys::dpf::MeshesContainer::MeshesContainer | ( | Client const *const | client | ) |
Create a new meshes container on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ MeshesContainer() [2/4]
ansys::dpf::MeshesContainer::MeshesContainer | ( | Client const *const | client, |
std::vector< std::string > const & | labels | ||
) |
Create a collection of meshes with the given labels on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use. [in] labels Labels for meshes.
◆ MeshesContainer() [3/4]
ansys::dpf::MeshesContainer::MeshesContainer | ( | int | id, |
Client const *const | client | ||
) |
Retrieve an existing instance of MeshesContainer on a server.
- Parameters
-
[in] id Id of the MeshesContainer object on the server's database. [in] client Client instance designating the IP, port and protocol to use.
◆ MeshesContainer() [4/4]
ansys::dpf::MeshesContainer::MeshesContainer | ( | std::vector< std::string > const & | labels | ) |
Create mesh container for a group of meshed regions with the given labels.
- Parameters
-
[in] labels Labels for group of meshed regions.
Member Function Documentation
◆ add()
void ansys::dpf::MeshesContainer::add | ( | LabelSpace const & | labels, |
MeshedRegion const & | f | ||
) |
Add meshed region with given label space.
- Parameters
-
[in] labels Label space for meshed region. [in] f Meshed region to add.
- Examples
- DataExport.cpp.
◆ addLabel() [1/2]
void ansys::dpf::MeshesContainer::addLabel | ( | std::string const & | label | ) |
Add label for new mesh group in mesh container.
- Parameters
-
[in] label New group label.
- Examples
- DataExport.cpp.
◆ addLabel() [2/2]
void ansys::dpf::MeshesContainer::addLabel | ( | std::string const & | label, |
dp_id | default_value | ||
) |
Add label with value for new mesh group in mesh container.
- Parameters
-
[in] label New group label. [in] default_value Value for label.
◆ addLabels()
void ansys::dpf::MeshesContainer::addLabels | ( | std::vector< std::string > const & | labels | ) |
Add list of labels for new mesh groups in mesh container.
- Parameters
-
[in] labels New groups labels.
◆ at() [1/2]
MeshedRegion ansys::dpf::MeshesContainer::at | ( | dp_index | index | ) |
- Returns
- Meshed region for given index.
- Parameters
-
[in] index Index of meshed region to get.
◆ at() [2/2]
const MeshedRegion ansys::dpf::MeshesContainer::at | ( | dp_index | index | ) | const |
- Returns
- Meshed region for given index.
- Parameters
-
[in] index Index of meshed region to get.
◆ deep_copy()
MeshesContainer ansys::dpf::MeshesContainer::deep_copy | ( | ansys::dpf::Client const *const | client = nullptr | ) | const |
Create a new MeshesContainer on a server by copying all the data of this MeshesContainer.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ emptyMeshesContainer()
|
static |
Create an empty mesh container.
- Returns
- Empty mesh container.
◆ getLabelSpace()
LabelSpace ansys::dpf::MeshesContainer::getLabelSpace | ( | dp_index | index | ) | const |
- Returns
- LabelSpace for given index in mesh container.
- Parameters
-
[in] index Index of meshes container for which to get label space.
◆ getMesh()
MeshedRegion ansys::dpf::MeshesContainer::getMesh | ( | LabelSpace const & | label_space | ) | const |
- Returns
- First meshed region for given label space.
- Parameters
-
[in] label_space Label space for which to get meshed region.
◆ getMeshes()
std::vector< MeshedRegion > ansys::dpf::MeshesContainer::getMeshes | ( | LabelSpace const & | label_space | ) | const |
- Returns
- Vector of meshed regions for given label space.
- Parameters
-
[in] label_space Label space for which to get meshed regions.
◆ getSizeFor()
dp_int ansys::dpf::MeshesContainer::getSizeFor | ( | LabelSpace const & | label_space | ) | const |
- Returns
- Number of meshed regions for given label space.
- Parameters
-
[in] label_space Label space for which to get number of meshed regions.
◆ hasLabel()
bool ansys::dpf::MeshesContainer::hasLabel | ( | std::string const & | label | ) | const |
@ return Indication that given label exists within mesh container.
- Parameters
-
[in] label Label for which to check existence.
◆ labels()
std::vector< std::string > ansys::dpf::MeshesContainer::labels | ( | ) | const |
- Returns
- Vector of labels for mesh container.
◆ labelScoping()
Scoping ansys::dpf::MeshesContainer::labelScoping | ( | std::string const & | label | ) | const |
- Returns
- a scoping of the available ids in the meshes container for a given label
- Parameters
-
[in] label Name of label.
◆ name()
std::string ansys::dpf::MeshesContainer::name | ( | ) | const |
- Returns
- Name of mesh container.
◆ operator[]()
MeshedRegion ansys::dpf::MeshesContainer::operator[] | ( | dp_int | index | ) |
- Returns
- Meshed region for given index.
- Parameters
-
[in] index Index of mesh within container.
◆ reserve()
void ansys::dpf::MeshesContainer::reserve | ( | dp_int | size | ) |
Reserve space for given number of meshed regions.
- Parameters
-
[in] size Expected number of meshed regions.
◆ resize()
void ansys::dpf::MeshesContainer::resize | ( | dp_int | size | ) |
Resize meshes container to given number of meshed regions.
- Parameters
-
[in] size Number of meshed regions in container.
◆ setId()
void ansys::dpf::MeshesContainer::setId | ( | dp_id | id | ) |
Set Id of mesh container.
- Parameters
-
[in] id Id for mesh container.
◆ setName()
void ansys::dpf::MeshesContainer::setName | ( | std::string | name | ) |
Set name of mesh container.
- Parameters
-
[in] name Name of mesh container.
◆ size()
dp_int ansys::dpf::MeshesContainer::size | ( | ) | const |
- Returns
- Number of meshed regions in container.
◆ update()
void ansys::dpf::MeshesContainer::update | ( | MeshedRegion & | f, |
dp_index | index | ||
) |
Update a meshed region at index.
- Parameters
-
[in] f New meshed region. [in] index Index of meshed region to update.