Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
CellMerger.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/* CellMerger.h (C) 2000-2023 */
9/* */
10/* Merges two cells. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_CELLMERGER_H
13#define ARCANE_MESH_CELLMERGER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/mesh/MeshGlobal.h"
18
19#include "arcane/utils/String.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::mesh
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
34class ARCANE_MESH_EXPORT CellMerger
35{
36 public:
37
40
42 ~CellMerger() = default;
43
44 public:
45
55 void merge(Cell i_cell_1, Cell i_cell_2);
56
68 ARCANE_DEPRECATED_REASON("Y2022: Use getCell() instead")
70
82 Cell getCell(Cell i_cell_1, Cell i_cell_2);
83
84 private:
85
90 enum _Type
91 {
92 NotMergeable = 0,
93 Hexahedron = 1,
94 Pyramid = 2,
95 Pentahedron = 3,
96 Quadrilateral = 10,
97 Triangle = 11
98 };
99
107 String _typeName(const _Type& t) const;
108
116 _Type _getCellType(const Integer& internal_cell_type) const;
117
127 _Type _promoteType(const _Type& t1, const _Type& t2) const;
128};
129
130/*---------------------------------------------------------------------------*/
131/*---------------------------------------------------------------------------*/
132
133} // End namespace Arcane::mesh
134
135/*---------------------------------------------------------------------------*/
136/*---------------------------------------------------------------------------*/
137
138#endif
Declarations of types on entities.
Cell of a mesh.
Definition Item.h:1300
Internal structure of a mesh entity.
~CellMerger()=default
Destructor.
void merge(Cell i_cell_1, Cell i_cell_2)
Merges the two cells i_cell_1 and i_cell_2.
ItemInternal * getItemInternal(ItemInternal *i_cell_1, ItemInternal *i_cell_2)
Returns the ItemInternal used by the cell after merging.
CellMerger(ITraceMng *)
Constructor.
Definition CellMerger.h:39
Cell getCell(Cell i_cell_1, Cell i_cell_2)
Returns the cell used by the cell after merging.
Int32 Integer
Type representing an integer.