Arcane  v4.1.4.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AMRPatchPositionSignature.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/* AMRPatchPositionSignature.h (C) 2000-2026 */
9/* */
10/* Calcul des signatures d'une position de patch. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_INTERNAL_AMRPATCHPOSITIONSIGNATURE_H
13#define ARCANE_CARTESIANMESH_INTERNAL_AMRPATCHPOSITIONSIGNATURE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
18
19#include "arcane/utils/UniqueArray.h"
20
21#include "arcane/cartesianmesh/AMRPatchPosition.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
41class AMRPatchPositionSignature
42{
43 public:
44
45 AMRPatchPositionSignature();
46 AMRPatchPositionSignature(const AMRPatchPosition& patch, ICartesianMesh* cmesh);
47 AMRPatchPositionSignature(const AMRPatchPositionSignature&) = default;
48 ~AMRPatchPositionSignature() = default;
49
50 private:
51
52 AMRPatchPositionSignature(const AMRPatchPosition& patch, ICartesianMesh* cmesh, Int32 nb_cut);
53
54public:
55
56 AMRPatchPositionSignature& operator=(const AMRPatchPositionSignature&) = default;
57
58 public:
59
66 void compress();
67
73 void fillSig();
74
78 bool isValid() const;
79
84 bool canBeCut() const;
85
90 void compute();
91
95 Real efficacity() const;
96
104 std::pair<AMRPatchPositionSignature, AMRPatchPositionSignature> cut(Integer dim, CartCoord cut_point) const;
105
110
115
120
124 AMRPatchPosition patch() const;
125
126 ICartesianMesh* mesh() const;
127
131 bool stopCut() const;
132
136 void setStopCut(bool stop_cut);
137
141 bool isComputed() const;
142
143 private:
144
145 bool m_is_null;
146 AMRPatchPosition m_patch;
147 ICartesianMesh* m_mesh;
148 Int32 m_nb_cut;
149 bool m_stop_cut;
150
152
153 bool m_have_cells;
154 bool m_is_computed;
155
159};
160
161/*---------------------------------------------------------------------------*/
162/*---------------------------------------------------------------------------*/
163
164} // End namespace Arcane
165
166/*---------------------------------------------------------------------------*/
167/*---------------------------------------------------------------------------*/
168
169#endif
ConstArrayView< CartCoord > sigX() const
Méthode permettant de récupérer la signature X.
bool stopCut() const
Méthode permettant de savoir si le patch peut encore être découpé.
bool isValid() const
Méthode permettant de savoir si les signatures sont valides.
ConstArrayView< CartCoord > sigZ() const
Méthode permettant de récupérer la signature Z.
void compress()
Méthode permettant de retirer les 0 au début et à la fin des signatures.
Real efficacity() const
Méthode permettant de connaitre l'efficacité du patch.
std::pair< AMRPatchPositionSignature, AMRPatchPositionSignature > cut(Integer dim, CartCoord cut_point) const
Méthode permettant de découper le patch. Le patch n'est pas modifié.
void setStopCut(bool stop_cut)
Méthode permettant de définir si le patch peut encore être découpé.
AMRPatchPosition patch() const
Méthode permettant de récupérer une copie du patch.
void compute()
Méthode permettant de calculer les signatures d'un patch. Cette méthode doit être appelée après const...
bool isComputed() const
Méthode permettant de savoir si la méthode compute() a déjà été appelée.
bool canBeCut() const
Méthode permettant de savoir si le patch peut être découpé en deux via la méthode cut().
void fillSig()
Méthode permettant de calculer les signatures.
ConstArrayView< CartCoord > sigY() const
Méthode permettant de récupérer la signature Y.
Classe permettant de définir la position d'un patch dans le maillage cartésien.
Vue constante d'un tableau de type T.
Interface de gestionnaire de numérotation pour maillage cartesian.
Interface d'un maillage cartésien.
Vecteur 1D de données avec sémantique par valeur (style STL).
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 CartCoord
Représente une coordonnée d'un élément dans la grille cartésienne (en X ou en Y ou en Z).
Int32 Integer
Type représentant un entier.
double Real
Type représentant un réel.
std::int32_t Int32
Type entier signé sur 32 bits.