Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
CartesianMeshUniqueIdRenumbering.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/* CartesianMeshUniqueIdRenumbering.h (C) 2000-2023 */
9/* */
10/* Renumbering of uniqueId() for Cartesian meshes. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_INTERNAL_CARTESIANMESHUNIQUEIDRENUMBERING_H
13#define ARCANE_CARTESIANMESH_INTERNAL_CARTESIANMESHUNIQUEIDRENUMBERING_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
21
22#include "arcane/cartesianmesh/CartesianPatch.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
40class CartesianMeshUniqueIdRenumbering
41: public TraceAccessor
42{
43 class NewUniqueIdList;
44
45 public:
46
47 CartesianMeshUniqueIdRenumbering(ICartesianMesh* cmesh, ICartesianMeshGenerationInfo* gen_info,
48 CartesianPatch parent_patch, Int32 patch_method);
49 ~CartesianMeshUniqueIdRenumbering() = default;
50
51 public:
52
53 void renumber();
54
55 private:
56
57 ICartesianMesh* m_cartesian_mesh = nullptr;
58 ICartesianMeshGenerationInfo* m_generation_info = nullptr;
59 CartesianPatch m_parent_patch;
60 bool m_is_verbose = false;
61 Int32 m_patch_method = 1;
62
63 private:
64
65 void _applyChildrenCell2D(Cell cell, NewUniqueIdList& new_uids,
66 Int64 coord_i, Int64 coord_j,
67 Int64 nb_cell_x, Int64 nb_cell_y, Int32 level, Int64 base_adder);
68 void _applyChildrenCell3D(Cell cell, NewUniqueIdList& new_uids,
69 Int64 coord_i, Int64 coord_j, Int64 coord_k,
70 Int64 current_level_nb_cell_x, Int64 current_level_nb_cell_y, Int64 current_level_nb_cell_z,
71 Int32 current_level, Int64 cell_adder, Int64 node_adder, Int64 face_adder);
72 void _applyChildrenCell3DV2(Cell cell, NewUniqueIdList& new_uids,
73 Int64 coord_i, Int64 coord_j, Int64 coord_k,
74 Int64 current_level_nb_cell_x, Int64 current_level_nb_cell_y, Int64 current_level_nb_cell_z,
75 Int32 current_level, Int64 cell_adder, Int64 node_adder, Int64 face_adder);
76 void _applyFamilyRenumbering(IItemFamily* family, VariableItemInt64& items_new_uid);
77 void _markItemsToKeepCurrentNumbering(ICartesianMeshPatch* patch);
78};
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83} // End namespace Arcane
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88#endif
Declarations of types on entities.
AMR Patch of a Cartesian mesh.
Cell of a mesh.
Definition Item.h:1300
Brief: Cartesian mesh generation information.
Interface of an AMR patch of a Cartesian mesh.
Interface of an entity family.
Definition IItemFamily.h:83
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
ItemVariableScalarRefT< Int64 > VariableItemInt64
Quantity of 64-bit integer type.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.