Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
CartesianMeshAMRPatchMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* CartesianMeshAMRPatchMng.h (C) 2000-2025 */
9/* */
10/* Cartesian Mesh AMR Patch Manager. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#ifndef ARCANE_CARTESIANMESH_INTERNAL_CARTESIANMESHAMRPATCHMNG_H
15#define ARCANE_CARTESIANMESH_INTERNAL_CARTESIANMESHAMRPATCHMNG_H
16
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
20#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
21
22#include "arcane/utils/TraceAccessor.h"
23
24#include "arcane/core/IMesh.h"
25
26#include "arcane/cartesianmesh/internal/ICartesianMeshAMRPatchMng.h"
27
28#include <unordered_map>
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Arcane
34{
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39class CartesianMeshAMRPatchMng
40: public TraceAccessor
42{
43 public:
44
45 explicit CartesianMeshAMRPatchMng(ICartesianMesh* cmesh, ICartesianMeshNumberingMngInternal* numbering_mng);
46
47 public:
48
49 void refine() override;
50 void createSubLevel() override;
51 void coarsen(bool update_parent_flag) override;
52
53 private:
54
55 void _shareInfosOfCellsAroundPatch(ConstArrayView<Cell> patch_cells, std::unordered_map<Int64, Integer>& around_cells_uid_to_owner, std::unordered_map<Int64, Int32>& around_cells_uid_to_flags, Int32 useful_flags) const;
56
57 private:
58
59 IMesh* m_mesh;
60 ICartesianMesh* m_cmesh;
62};
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67} // End namespace Arcane
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72#endif
void refine() override
Method allowing cell refinement using the "II_Refine" flag.
void createSubLevel() override
Method allowing coarsening of level 0 cells.
void coarsen(bool update_parent_flag) override
Method allowing removal of cells marked with the "II_Coarsen" flag.
void _shareInfosOfCellsAroundPatch(ConstArrayView< Cell > patch_cells, std::unordered_map< Int64, Integer > &around_cells_uid_to_owner, std::unordered_map< Int64, Int32 > &around_cells_uid_to_flags, Int32 useful_flags) const
Method allowing retrieval of owners and flags of cells around patch_cells.
Constant view of an array of type T.
Interface for Cartesian mesh numbering manager.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.