Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::mesh::ExternalPartitionConstraint Class Reference
Inheritance diagram for Arcane::mesh::ExternalPartitionConstraint:
Collaboration diagram for Arcane::mesh::ExternalPartitionConstraint:

Public Member Functions

 ExternalPartitionConstraint (IMesh *mesh, ArrayView< ItemGroup > constraints)
virtual void addLinkedCells (Int64Array &linked_cells, Int32Array &linked_owners)
 Adds a set of constraints on the cells.
Public Member Functions inherited from Arcane::IMeshPartitionConstraint
virtual ~IMeshPartitionConstraint ()=default
 Releases resources.

Private Attributes

IMeshm_mesh = nullptr
UniqueArray< ItemGroupm_constraints

Detailed Description

Definition at line 30 of file core/ExternalPartitionConstraint.h.

Constructor & Destructor Documentation

◆ ExternalPartitionConstraint()

Arcane::ExternalPartitionConstraint::ExternalPartitionConstraint ( IMesh * mesh,
ArrayView< ItemGroup > constraints )
inline

Definition at line 35 of file core/ExternalPartitionConstraint.h.

Member Function Documentation

◆ addLinkedCells()

void Arcane::ExternalPartitionConstraint::addLinkedCells ( Int64Array & linked_cells,
Int32Array & linked_owners )
virtual

Adds a set of constraints on the cells.

Adds to the linked_cells array a set of pairs of uniqueId() of cells that must remain in the same partition. For example, if cells 25 and 23 must remain connected, it is enough to call:

linked_cells.add(23);
linked_cells.add(25);

You must always add pairs of uniqueId(), potentially repeating the cells. For example, if one wishes that cells 35, 37, and 39, one must do as follows:

linked_cells.add(35);
linked_cells.add(37);
linked_cells.add(35);
linked_cells.add(39);

The linked_cells array must have a size that is a multiple of 2. The linked owners array indicates for each pair which subdomain it must belong to.

TODO: Remove linked_owners

Warning
: each pair must start with the cell having the smallest uid. The "owner" indicates for every couple that corresponds to the first cell.

Implements Arcane::IMeshPartitionConstraint.

Definition at line 31 of file ExternalPartitionConstraint.cc.

Member Data Documentation

◆ m_constraints

UniqueArray<ItemGroup> Arcane::ExternalPartitionConstraint::m_constraints
private

Definition at line 46 of file core/ExternalPartitionConstraint.h.

◆ m_mesh

IMesh* Arcane::ExternalPartitionConstraint::m_mesh = nullptr
private

Definition at line 45 of file core/ExternalPartitionConstraint.h.


The documentation for this class was generated from the following files: