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