Arcane  4.2.1.0
User documentation
Loading...
Searching...
No Matches
CartesianMeshAllocateBuildInfo.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/* CartesianMeshAllocateBuildInfo.h (C) 2000-2026 */
9/* */
10/* Information for allocating entities of a Cartesian mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_CARTESIANMESHALLOCATEBUILDINFO_H
13#define ARCANE_CORE_CARTESIANMESHALLOCATEBUILDINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19#include <array>
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26class CartesianMeshAllocateBuildInfoInternal;
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31/*!
32 * \brief Information for allocating entities of an unstructured mesh.
33 *
34 * This class allows specifying the cells that will be added during
35 * the initial mesh allocation.
36 * You must call setMeshDimension() to specify the mesh dimension
37 * then call addCell() for each cell you wish to add. Once
38 * all cells have been added, you must call allocateMesh().
39 */
40class ARCANE_CORE_EXPORT CartesianMeshAllocateBuildInfo
41{
42 public:
43
44 class Impl;
45 class Intenrnal;
46
47 public:
48
49 explicit CartesianMeshAllocateBuildInfo(IPrimaryMesh* mesh);
50 ~CartesianMeshAllocateBuildInfo();
51
52 public:
53
54 CartesianMeshAllocateBuildInfo(CartesianMeshAllocateBuildInfo&& from) = delete;
55 CartesianMeshAllocateBuildInfo(const CartesianMeshAllocateBuildInfo& from) = delete;
56 CartesianMeshAllocateBuildInfo& operator=(CartesianMeshAllocateBuildInfo&& from) = delete;
57 CartesianMeshAllocateBuildInfo& operator=(const CartesianMeshAllocateBuildInfo& from) = delete;
58
59 public:
60
61 //! Sets the information for a 3D mesh.
62 ARCANE_DEPRECATED_REASON("Y2023: Use overload with first_own_cell_offset instead")
63 void setInfos3D(std::array<Int64, 3> global_nb_cells,
64 std::array<Int32, 3> own_nb_cells,
65 Int64 cell_unique_id_offset,
66 Int64 node_unique_id_offset);
67
68 //! Sets the information for a 3D mesh.
69 void setInfos3D(const Int64x3& global_nb_cells,
70 const Int32x3& own_nb_cells,
71 const Int64x3& first_own_cell_offset,
72 Int64 cell_unique_id_offset);
73
74 //! Sets the information for a 2D mesh.
75 ARCANE_DEPRECATED_REASON("Y2023: Use overload with first_own_cell_offset instead")
76 void setInfos2D(std::array<Int64, 2> global_nb_cells,
77 std::array<Int32, 2> own_nb_cells,
78 Int64 cell_unique_id_offset,
79 Int64 node_unique_id_offset);
80
81 //! Sets the information for a 2D mesh.
82 void setInfos2D(const Int64x2& global_nb_cells,
83 const Int32x2& own_nb_cells,
84 const Int64x2& first_own_cell_offset,
85 Int64 cell_unique_id_offset);
86
87 /*!
88 * \brief Allocates the mesh.
89 *
90 * It is necessary to have called setInfos() beforehand.
91 *
92 * This method is collective.
93 */
94 void allocateMesh();
95
96 public:
97
98 //! Internal part reserved for Arcane
99 CartesianMeshAllocateBuildInfoInternal* _internal();
100
101 private:
102
103 Impl* m_p = nullptr;
104};
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109} // End namespace Arcane
110
111/*---------------------------------------------------------------------------*/
112/*---------------------------------------------------------------------------*/
113
114#endif
Declarations of types on entities.
void setInfos3D(std::array< Int64, 3 > global_nb_cells, std::array< Int32, 3 > own_nb_cells, Int64 cell_unique_id_offset, Int64 node_unique_id_offset)
Sets the information for a 3D mesh.
CartesianMeshAllocateBuildInfoInternal * _internal()
Internal part reserved for Arcane.
void setInfos2D(std::array< Int64, 2 > global_nb_cells, std::array< Int32, 2 > own_nb_cells, Int64 cell_unique_id_offset, Int64 node_unique_id_offset)
Sets the information for a 2D mesh.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.