|
34 | 34 | #include "arcane/core/ItemRefinementPattern.h"
|
35 | 35 | #include "arcane/core/Properties.h"
|
36 | 36 | #include "arcane/core/IGhostLayerMng.h"
|
| 37 | +#include "arcane/core/ItemVector.h" |
37 | 38 |
|
38 | 39 | #include "arcane/mesh/DynamicMesh.h"
|
39 | 40 | #include "arcane/mesh/ItemRefinement.h"
|
40 | 41 | #include "arcane/mesh/MeshRefinement.h"
|
41 |
| - |
42 | 42 | #include "arcane/mesh/ParallelAMRConsistency.h"
|
43 | 43 | #include "arcane/mesh/FaceReorienter.h"
|
44 |
| - |
45 | 44 | #include "arcane/mesh/NodeFamily.h"
|
46 | 45 | #include "arcane/mesh/EdgeFamily.h"
|
47 |
| -#include "arcane/core/ItemVector.h" |
| 46 | + |
| 47 | +#include "arcane/core/materials/IMeshMaterialMng.h" |
48 | 48 |
|
49 | 49 | #include <vector>
|
50 | 50 |
|
@@ -739,6 +739,14 @@ coarsenItemsV2(bool update_parent_flag)
|
739 | 739 | UniqueArray<Int64> ghost_cell_to_refine;
|
740 | 740 | UniqueArray<Int64> ghost_cell_to_coarsen;
|
741 | 741 |
|
| 742 | + if (!update_parent_flag) { |
| 743 | + // Si les matériaux sont actifs, il faut forcer un recalcul des matériaux car les groupes |
| 744 | + // de mailles ont été modifiés et donc la liste des constituants aussi |
| 745 | + Materials::IMeshMaterialMng* mm = Materials::IMeshMaterialMng::getReference(m_mesh, false); |
| 746 | + if (mm) |
| 747 | + mm->forceRecompute(); |
| 748 | + } |
| 749 | + |
742 | 750 | m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine, ghost_cell_to_coarsen, true);
|
743 | 751 |
|
744 | 752 | return m_mesh->parallelMng()->reduce(Parallel::ReduceMax, (!to_coarse.empty()));
|
|
0 commit comments