Arcane  v4.1.2.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AMRZonePosition.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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-2025 */
9/* */
10/* Definition d'une zone 2D ou 3D d'un maillage. */
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
33class ARCANE_CARTESIANMESH_EXPORT AMRZonePosition
34{
35 public:
36
43 : m_position(position)
44 , m_length(length)
45 , m_is_3d(true)
46 {}
47
54 : m_position(position)
55 , m_length(length)
56 , m_is_3d(false)
57 {}
58
59 public:
60
66 {
67 return m_position;
68 }
69
74 Real3 length() const
75 {
76 return m_length;
77 }
78
83 bool is3d() const
84 {
85 return m_is_3d;
86 }
87
94 void cellsInPatch(IMesh* mesh, UniqueArray<Int32>& cells_local_id) const;
95
104 void cellsInPatch(ICartesianMesh* mesh, UniqueArray<Int32>& cells_local_id, AMRPatchPosition& position) const;
105
113 AMRPatchPosition toAMRPatchPosition(ICartesianMesh* mesh) const;
114
115 private:
116
117 Real3 m_position;
118 Real3 m_length;
119 bool m_is_3d;
120};
121
122/*---------------------------------------------------------------------------*/
123/*---------------------------------------------------------------------------*/
124
125} // End namespace Arcane
126
127/*---------------------------------------------------------------------------*/
128/*---------------------------------------------------------------------------*/
129
130#endif
Classe permettant de définir la position d'un patch dans le maillage cartésien.
Real3 length() const
Méthode permettant de retrouver la taille de la zone.
bool is3d() const
Méthode permettant de savoir si c'est une zone 2D ou 3D.
AMRZonePosition(const Real3 &position, const Real3 &length)
Constructeur de zone 3D.
Real3 position() const
Méthode permettant de retrouver la position de la zone.
AMRZonePosition(const Real2 &position, const Real2 &length)
Constructeur de zone 2D.
Interface d'un maillage cartésien.
Classe gérant un vecteur de réel de dimension 2.
Definition Real2.h:121
Classe gérant un vecteur de réel de dimension 3.
Definition Real3.h:132
Vecteur 1D de données avec sémantique par valeur (style STL).
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-