Skip to main content

DPF Cpp Client Library 2026 R1

Class ansys::dpf::MeshesContainer

Last update: 25.03.2026

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.

See also: MeshedRegion

Inherits from:

  • ansys::dpf::CollectionBase

Members

Friends

Public functions

Function MeshesContainer

ansys::dpf::MeshesContainer::MeshesContainer()

Return type:

Function ~MeshesContainer

virtual ansys::dpf::MeshesContainer::~MeshesContainer()

Return type:

Function MeshesContainer

ansys::dpf::MeshesContainer::MeshesContainer(MeshesContainer const &)

Parameters:

  • MeshesContainer const &

Return type:

Function MeshesContainer

ansys::dpf::MeshesContainer::MeshesContainer(MeshesContainer &&) noexcept

Parameters:

  • MeshesContainer &&

Return type:

Function MeshesContainer

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

Create a new meshes container on a server.

Parameters:

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

Return type:

Function MeshesContainer

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:

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

Return type:

Function MeshesContainer

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

Retrieve an existing instance of MeshesContainer on a server.

Parameters:

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

Return type:

Function MeshesContainer

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

Create mesh container for a group of meshed regions with the given labels.

Parameters:

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

Return type:

Function operator=

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

Parameters:

  • MeshesContainer const &

Return type: MeshesContainer &

Function operator=

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

Parameters:

  • MeshesContainer &&

Return type: MeshesContainer &

Function operator[]

MeshedRegion ansys::dpf::MeshesContainer::operator[](dp_int index)

Returns:

Meshed region for given index.

Parameters:

  • dp_int index: [in] Index of mesh within container.

Return type: MeshedRegion

Function at

MeshedRegion ansys::dpf::MeshesContainer::at(dp_index index)

Returns:

Meshed region for given index.

Parameters:

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

Return type: MeshedRegion

Function at

const MeshedRegion ansys::dpf::MeshesContainer::at(dp_index index) const

Returns:

Meshed region for given index.

Parameters:

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

Return type: const MeshedRegion

Function update

void ansys::dpf::MeshesContainer::update(MeshedRegion &f, dp_index index)

Update a meshed region at index.

Parameters:

Return type: void

Function add

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

Add meshed region with given label space.

Parameters:

  • LabelSpace const & labels: [in] Label space for meshed region.
  • MeshedRegion const & f: [in] Meshed region to add.
  • 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 getMeshes

std::vector< MeshedRegion > ansys::dpf::MeshesContainer::getMeshes(LabelSpace const &label_space) const

Returns:

Vector of meshed regions for given label space.

Parameters:

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

Return type: std::vector< MeshedRegion >

Function getMesh

MeshedRegion ansys::dpf::MeshesContainer::getMesh(LabelSpace const &label_space) const

Returns:

First meshed region for given label space.

Parameters:

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

Return type: MeshedRegion

Function getMeshesIndices

std::vector< int > ansys::dpf::MeshesContainer::getMeshesIndices(LabelSpace const &lab_space) const

Parameters:

Return type: std::vector< int >

Function getMatchingMesh

MeshedRegion ansys::dpf::MeshesContainer::getMatchingMesh(LabelSpace const &label_space) const

Returns:

First matching Mesh for given label space.

Parameters:

Return type: MeshedRegion

Function getMatchingMeshIndices

DpfVector< dp_index > ansys::dpf::MeshesContainer::getMatchingMeshIndices(LabelSpace const &label_space) const

Returns:

Vector of matching Mesh to the given label space.

Parameters:

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

Return type: DpfVector< dp_index >

Function createSubMeshesContainer

MeshesContainer ansys::dpf::MeshesContainer::createSubMeshesContainer(LabelSpace const &lab_space) const

create a MeshesContainer with all the meshes corresponding to the label space in input

Parameters:

Return type: MeshesContainer

Function 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:

Return type: MeshesContainer

Public static functions

Function emptyMeshesContainer

static MeshesContainer ansys::dpf::MeshesContainer::emptyMeshesContainer()

Create an empty mesh container. Returns:

Empty mesh container.

Return type: MeshesContainer

Connect with Ansys