Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::mesh::MeshPartitionConstraintMng Class Reference

Mesh partitioning constraint manager. More...

#include <arcane/mesh/MeshPartitionConstraintMng.h>

Inheritance diagram for Arcane::mesh::MeshPartitionConstraintMng:
Collaboration diagram for Arcane::mesh::MeshPartitionConstraintMng:

Classes

class  Helper
 Helper for constraint management. More...

Public Member Functions

 MeshPartitionConstraintMng (IMesh *mesh)
virtual void addConstraint (IMeshPartitionConstraint *constraint)
 Adds a constraint.
virtual void removeConstraint (IMeshPartitionConstraint *constraint)
 Removes a constraint.
virtual void computeAndApplyConstraints ()
 Computes and applies constraints.
virtual void computeConstraintList (Int64MultiArray2 &tied_uids)
 Computes constraints and returns a list of linked entities.
virtual void addWeakConstraint (IMeshPartitionConstraint *constraint)
 Adds a weak constraint.
virtual void removeWeakConstraint (IMeshPartitionConstraint *constraint)
 Removes a constraint.
virtual void computeAndApplyWeakConstraints ()
 Computes and applies constraints.
virtual void computeWeakConstraintList (Int64MultiArray2 &tied_uids)
 Computes constraints and returns a list of linked entities.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::IMeshPartitionConstraintMng
virtual ~IMeshPartitionConstraintMng ()=default
 Releases resources.

Private Member Functions

void _computeAndApplyConstraints (Helper &h)
void _computeAndApplyWeakConstraints (Helper &h)

Private Attributes

IMeshm_mesh
bool m_is_debug
List< IMeshPartitionConstraint * > m_constraints
List< IMeshPartitionConstraint * > m_weak_constraints

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Mesh partitioning constraint manager.

Definition at line 36 of file MeshPartitionConstraintMng.h.

Constructor & Destructor Documentation

◆ MeshPartitionConstraintMng()

Arcane::mesh::MeshPartitionConstraintMng::MeshPartitionConstraintMng ( IMesh * mesh)

Definition at line 82 of file MeshPartitionConstraintMng.cc.

◆ ~MeshPartitionConstraintMng()

Arcane::mesh::MeshPartitionConstraintMng::~MeshPartitionConstraintMng ( )
virtual

Definition at line 93 of file MeshPartitionConstraintMng.cc.

Member Function Documentation

◆ _computeAndApplyConstraints()

void Arcane::mesh::MeshPartitionConstraintMng::_computeAndApplyConstraints ( Helper & h)
private

Definition at line 146 of file MeshPartitionConstraintMng.cc.

◆ _computeAndApplyWeakConstraints()

void Arcane::mesh::MeshPartitionConstraintMng::_computeAndApplyWeakConstraints ( Helper & h)
private

Definition at line 158 of file MeshPartitionConstraintMng.cc.

◆ addConstraint()

void Arcane::mesh::MeshPartitionConstraintMng::addConstraint ( IMeshPartitionConstraint * constraint)
virtual

Adds a constraint.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 106 of file MeshPartitionConstraintMng.cc.

◆ addWeakConstraint()

void Arcane::mesh::MeshPartitionConstraintMng::addWeakConstraint ( IMeshPartitionConstraint * constraint)
virtual

Adds a weak constraint.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 173 of file MeshPartitionConstraintMng.cc.

References Arcane::Array< T >::add().

Here is the call graph for this function:

◆ computeAndApplyConstraints()

void Arcane::mesh::MeshPartitionConstraintMng::computeAndApplyConstraints ( )
virtual

Computes and applies constraints.

It computes constraints on the mesh by applying the IMeshPartitionConstraint::addLinkedCell() method for each constraint and applies them by modifying the IItemFamily::itemsNewOwner() variable of the cells. All cells that must be linked in it are then placed in the same partition.

This operation does not guarantee that the resulting partitions are balanced in terms of load. For this, a re-partitioning service (IMeshPartitioner) must be used that takes these constraints into account.

This operation is collective.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 124 of file MeshPartitionConstraintMng.cc.

◆ computeAndApplyWeakConstraints()

void Arcane::mesh::MeshPartitionConstraintMng::computeAndApplyWeakConstraints ( )
virtual

Computes and applies constraints.

It computes constraints on the mesh by applying the IMeshPartitionConstraint::addLinkedCell() method for each constraint and applies them by modifying the IItemFamily::itemsNewOwner() variable of the cells. All cells that must be linked in it are then placed in the same partition.

This operation does not guarantee that the resulting partitions are balanced in terms of load. For this, a re-partitioning service (IMeshPartitioner) must be used that takes these constraints into account.

This operation is collective.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 185 of file MeshPartitionConstraintMng.cc.

◆ computeConstraintList()

void Arcane::mesh::MeshPartitionConstraintMng::computeConstraintList ( Int64MultiArray2 & tied_uids)
virtual

Computes constraints and returns a list of linked entities.

It computes constraints like computeAndApplyConstraints() but does not modify the owner. Instead, it returns a list containing lists of the uniqueId() of the entities that must be linked.

This operation is collective.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 135 of file MeshPartitionConstraintMng.cc.

◆ computeWeakConstraintList()

void Arcane::mesh::MeshPartitionConstraintMng::computeWeakConstraintList ( Int64MultiArray2 & tied_uids)
virtual

Computes constraints and returns a list of linked entities.

It computes constraints like computeAndApplyConstraints() but does not modify the owner. Instead, it returns a list containing lists of the uniqueId() of the entities that must be linked.

This operation is collective.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 193 of file MeshPartitionConstraintMng.cc.

◆ removeConstraint()

void Arcane::mesh::MeshPartitionConstraintMng::removeConstraint ( IMeshPartitionConstraint * constraint)
virtual

Removes a constraint.

The caller becomes the owner of constraint and must manage its destruction.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 115 of file MeshPartitionConstraintMng.cc.

◆ removeWeakConstraint()

void Arcane::mesh::MeshPartitionConstraintMng::removeWeakConstraint ( IMeshPartitionConstraint * constraint)
virtual

Removes a constraint.

The caller becomes the owner of constraint and must manage its destruction.

Implements Arcane::IMeshPartitionConstraintMng.

Definition at line 179 of file MeshPartitionConstraintMng.cc.

Member Data Documentation

◆ m_constraints

List<IMeshPartitionConstraint*> Arcane::mesh::MeshPartitionConstraintMng::m_constraints
private

Definition at line 65 of file MeshPartitionConstraintMng.h.

◆ m_is_debug

bool Arcane::mesh::MeshPartitionConstraintMng::m_is_debug
private

Definition at line 64 of file MeshPartitionConstraintMng.h.

◆ m_mesh

IMesh* Arcane::mesh::MeshPartitionConstraintMng::m_mesh
private

Definition at line 63 of file MeshPartitionConstraintMng.h.

◆ m_weak_constraints

List<IMeshPartitionConstraint*> Arcane::mesh::MeshPartitionConstraintMng::m_weak_constraints
private

Definition at line 66 of file MeshPartitionConstraintMng.h.


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