Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
AMRZonePosition.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/* AMRZonePosition.h (C) 2000-2026 */
9/* */
10/* Definition of a 2D or 3D zone of a mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_AMRBOXPOSITION_H
13#define ARCANE_CARTESIANMESH_AMRBOXPOSITION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
18#include "arcane/utils/Real3.h"
19#include "arcane/core/VariableTypes.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
34class ARCANE_CARTESIANMESH_EXPORT AMRZonePosition
35{
36 public:
37
44 : m_position(position)
45 , m_length(length)
46 , m_is_3d(true)
47 {}
48
55 : m_position(position)
56 , m_length(length)
57 , m_is_3d(false)
58 {}
59
60 public:
61
67 {
68 return m_position;
69 }
70
75 Real3 length() const
76 {
77 return m_length;
78 }
79
84 bool is3d() const
85 {
86 return m_is_3d;
87 }
88
95 void cellsInPatch(IMesh* mesh, UniqueArray<Int32>& cells_local_id) const;
96
105 void cellsInPatch(ICartesianMesh* mesh, UniqueArray<Int32>& cells_local_id, AMRPatchPosition& position) const;
106
117 AMRPatchPosition toAMRPatchPosition(ICartesianMesh* mesh) const;
118
119 private:
120
121 Real3 m_position;
122 Real3 m_length;
123 bool m_is_3d;
124};
125
126/*---------------------------------------------------------------------------*/
127/*---------------------------------------------------------------------------*/
128
129} // End namespace Arcane
130
131/*---------------------------------------------------------------------------*/
132/*---------------------------------------------------------------------------*/
133
134#endif
Class allowing the definition of a patch position in the Cartesian mesh.
Real3 length() const
Method allowing retrieval of the zone's size.
bool is3d() const
Method allowing determination if it is a 2D or 3D zone.
AMRZonePosition(const Real3 &position, const Real3 &length)
3D zone constructor.
Real3 position() const
Method allowing retrieval of the zone's position.
AMRZonePosition(const Real2 &position, const Real2 &length)
2D zone constructor.
Class managing a 2-dimensional real vector.
Definition Real2.h:122
Class managing a 3-dimensional real vector.
Definition Real3.h:132
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --