50 ISubDomain* subDomain()
const {
return m_sub_domain; }
55 Real maximumComputationTime()
const override {
return m_maximum_computation_time; }
58 Real
imbalance()
const override {
return m_imbalance; }
66 void setCellsWeight(ArrayView<float> weights,Integer nb_weight)
override;
67 ArrayView<float> cellsWeight()
const override;
70 Integer nbCellWeight()
const;
88 virtual void changeOwnersFromCells();
90 enum eMarkCellWithConstraint {eCellClassical, eCellReference, eCellGrouped, eCellGhost, eCellInAConstraint};
93 virtual void initConstraints(
bool uidref=
true);
96 virtual void freeConstraints();
99 virtual Int32 nbOwnCellsWithConstraints()
const;
102 virtual Real getNeighbourCellsUidWithConstraints(Cell cell, Int64Array& neighbourcells, Array<float> *commWeights = NULL,
103 bool noCellContrib =
false);
105 virtual Integer nbNeighbourCellsWithConstraints(Cell cell);
108 virtual void getNeighbourNodesUidWithConstraints(Cell cell, Int64UniqueArray neighbournodes);
112 virtual Int32 localIdWithConstraints(Cell cell);
113 virtual Int32 localIdWithConstraints(
Int32 cell_lid);
116 virtual void invertArrayLid2LidCompacted();
121 virtual SharedArray<float> cellsWeightsWithConstraints(
Int32 max_nb_weight=0,
bool ask_lb_cells=
false);
123 virtual SharedArray<float> cellsSizeWithConstraints();
128 virtual bool cellUsedWithConstraints(Cell cell);
130 virtual bool cellUsedWithWeakConstraints(std::pair<Int64,Int64>& paired_item);
133 virtual void changeCellOwner(Item cell, VariableItemInt32& cells_new_owner,
Int32 new_owner);
138 virtual bool haveConstraints() {
return m_cells_with_constraints.size() > 0;}
140 virtual bool haveWeakConstraints() {
return m_cells_with_weak_constraints.size() > 0;}
145 virtual void dumpObject(String filename=
"toto");
147 virtual void* getCommunicator()
const;
148 virtual Parallel::Communicator communicator()
const;
149 virtual bool cellComm() {
return true; }
153 virtual void _initArrayCellsWithConstraints();
154 virtual void _initFilterLidCells();
155 virtual void _initUidRef();
156 virtual void _initUidRef(VariableCellInteger& cell_renum_uid);
157 virtual void _initLid2LidCompacted();
158 virtual void _initNbCellsWithConstraints();
159 virtual void _clearCellWgt();
163 Real _addNgb(
const Cell& cell,
const Face& face, Int64Array& neighbourcells, Array<bool>& contrib,
164 HashTableMapT<Int64,Int32>& map, Array<float> *ptrcommWeights,
Int32 offset,
165 HashTableMapT<Int32,Int32>& lids,
bool special=
false);
166 bool _createConstraintsLists(Int64MultiArray2& tied_uid);
168 SharedArray<float> _cellsProjectWeights(VariableCellArrayReal& cellWgtIn,
Int32 nbWgt)
const;
169 SharedArray<float> _cellsProjectWeights(VariableCellReal& cellWgtIn)
const;
173 ISubDomain* m_sub_domain =
nullptr;
174 IMesh* m_mesh =
nullptr;
175 IParallelMng* m_pm_sub =
nullptr;
179 IItemFamily* m_cell_family =
nullptr;
183 ILoadBalanceMng* m_lbMng =
nullptr;
184 ILoadBalanceMngInternal* m_lb_mng_internal =
nullptr;
186 Real m_maximum_computation_time = 0.0;
187 Real m_imbalance = 0.0;
188 Real m_max_imbalance = 0.0;
192 UniqueArray<SharedArray<Cell> > m_cells_with_constraints;
193 std::set<std::pair<Int64, Int64> > m_cells_with_weak_constraints;
194 Integer m_nb_cells_with_constraints = 0;
195 UniqueArray<eMarkCellWithConstraint> m_filter_lid_cells;
199 void _checkCreateVar();
Interface du gestionnaire d'un sous-domaine.