Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
CartesianMeshCoarsening2.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/* CartesianMeshCoarsening2.h (C) 2000-2024 */
9/* */
10/* Coarsening of a Cartesian mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_CARTESIANMESHCOARSENING2_H
13#define ARCANE_CARTESIANMESH_CARTESIANMESHCOARSENING2_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/Array2.h"
19
21#include "arcane/core/ICartesianMeshGenerationInfo.h"
22
23#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
76class ARCANE_CARTESIANMESH_EXPORT CartesianMeshCoarsening2
77: public TraceAccessor
78{
79 friend CartesianMeshImpl;
80
81 private:
82
83 explicit CartesianMeshCoarsening2(ICartesianMesh* m);
84
85 public:
86
92 void createCoarseCells();
93
94 void removeRefinedCells();
95
96 private:
97
98 ICartesianMesh* m_cartesian_mesh = nullptr;
99 Int32 m_verbosity_level = false;
102 bool m_is_create_coarse_called = false;
103 bool m_is_remove_refined_called = false;
104 Int64 m_first_own_cell_unique_id_offset = NULL_ITEM_UNIQUE_ID;
105
106 private:
107
108 Int64 _getMaxUniqueId(const ItemGroup& group);
110 void _writeMeshSVG(const String& name);
114};
115
116/*---------------------------------------------------------------------------*/
117/*---------------------------------------------------------------------------*/
118
119} // End namespace Arcane
120
121/*---------------------------------------------------------------------------*/
122/*---------------------------------------------------------------------------*/
123
124#endif
Declarations of types on entities.
void createCoarseCells()
Coarsens the initial mesh by 2.
void _doDoubleGhostLayers()
Doubles the ghost layer of the initial mesh.
Int64 _getMaxUniqueId(const ItemGroup &group)
Returns the max of uniqueId() of entities in a group.
void _recomputeMeshGenerationInfo()
Recalculates the information about the number of cells per direction.
UniqueArray< Int64 > m_coarse_cells_uid
uniqueId() of the coarse cells
Mesh entity group.
Definition ItemGroup.h:51
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
-- 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.