56 ISubDomain* subDomain()
const {
return m_sub_domain; }
61 virtual Real maximumComputationTime()
const {
return m_maximum_computation_time; }
64 virtual Real
imbalance()
const {
return m_imbalance; }
72 virtual void setCellsWeight(ArrayView<float> weights,Integer nb_weight);
73 virtual ArrayView<float> cellsWeight()
const;
76 virtual Integer nbCellWeight()
const;
94 virtual void changeOwnersFromCells();
96 enum eMarkCellWithConstraint {eCellClassical, eCellReference, eCellGrouped, eCellGhost, eCellInAConstraint};
99 virtual void initConstraints(
bool uidref=
true);
102 virtual void freeConstraints();
105 virtual Int32 nbOwnCellsWithConstraints()
const;
108 virtual Real getNeighbourCellsUidWithConstraints(Cell cell, Int64Array& neighbourcells, Array<float> *commWeights = NULL,
109 bool noCellContrib =
false);
111 virtual Integer nbNeighbourCellsWithConstraints(Cell cell);
114 virtual void getNeighbourNodesUidWithConstraints(Cell cell, Int64UniqueArray neighbournodes);
118 virtual Int32 localIdWithConstraints(Cell cell);
119 virtual Int32 localIdWithConstraints(
Int32 cell_lid);
122 virtual void invertArrayLid2LidCompacted();
127 virtual SharedArray<float> cellsWeightsWithConstraints(
Int32 max_nb_weight=0,
bool ask_lb_cells=
false);
129 virtual SharedArray<float> cellsSizeWithConstraints();
134 virtual bool cellUsedWithConstraints(Cell cell);
136 virtual bool cellUsedWithWeakConstraints(std::pair<Int64,Int64>& paired_item);
139 virtual void changeCellOwner(Item cell, VariableItemInt32& cells_new_owner,
Int32 new_owner);
144 virtual bool haveConstraints() {
return m_cells_with_constraints.size() > 0;}
146 virtual bool haveWeakConstraints() {
return m_cells_with_weak_constraints.size() > 0;}
151 virtual void dumpObject(String filename=
"toto");
153 virtual void* getCommunicator()
const;
154 virtual Parallel::Communicator communicator()
const;
157 virtual bool cellComm() {
return true; }
160 virtual void _initArrayCellsWithConstraints();
161 virtual void _initFilterLidCells();
162 virtual void _initUidRef();
163 virtual void _initUidRef(VariableCellInteger& cell_renum_uid);
164 virtual void _initLid2LidCompacted();
165 virtual void _initNbCellsWithConstraints();
166 virtual void _clearCellWgt();
169 Real _addNgb(
const Cell& cell,
const Face& face, Int64Array& neighbourcells, Array<bool>& contrib,
170 HashTableMapT<Int64,Int32>& map, Array<float> *ptrcommWeights,
Int32 offset,
171 HashTableMapT<Int32,Int32>& lids,
bool special=
false);
172 bool _createConstraintsLists(Int64MultiArray2& tied_uid);
174 SharedArray<float> _cellsProjectWeights(VariableCellArrayReal& cellWgtIn,
Int32 nbWgt)
const;
175 SharedArray<float> _cellsProjectWeights(VariableCellReal& cellWgtIn)
const;
179 ISubDomain* m_sub_domain =
nullptr;
180 IMesh* m_mesh =
nullptr;
181 IParallelMng* m_pm_sub =
nullptr;
185 IItemFamily* m_cell_family =
nullptr;
189 ILoadBalanceMng* m_lbMng =
nullptr;
190 ILoadBalanceMngInternal* m_lb_mng_internal =
nullptr;
192 Real m_maximum_computation_time = 0.0;
193 Real m_imbalance = 0.0;
194 Real m_max_imbalance = 0.0;
198 UniqueArray<SharedArray<Cell> > m_cells_with_constraints;
199 std::set<std::pair<Int64, Int64> > m_cells_with_weak_constraints;
200 Integer m_nb_cells_with_constraints = 0;
201 UniqueArray<eMarkCellWithConstraint> m_filter_lid_cells;
205 void _checkCreateVar();
Interface du gestionnaire d'un sous-domaine.