Arcane  v4.1.3.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() = default;
48
49 private:
50
51 AMRPatchPositionSignature(const AMRPatchPosition& patch, ICartesianMesh* cmesh, Int32 nb_cut);
52
53 public:
54
61 void compress();
62
68 void fillSig();
69
73 bool isValid() const;
74
79 bool canBeCut() const;
80
85 void compute();
86
90 Real efficacity() const;
91
99 std::pair<AMRPatchPositionSignature, AMRPatchPositionSignature> cut(Integer dim, CartCoord cut_point) const;
100
105
110
115
119 AMRPatchPosition patch() const;
120
121 ICartesianMesh* mesh() const;
122
126 bool stopCut() const;
127
131 void setStopCut(bool stop_cut);
132
136 bool isComputed() const;
137
138 private:
139
140 bool m_is_null;
141 AMRPatchPosition m_patch;
142 ICartesianMesh* m_mesh;
143 Int32 m_nb_cut;
144 bool m_stop_cut;
145
147
148 bool m_have_cells;
149 bool m_is_computed;
150
154};
155
156/*---------------------------------------------------------------------------*/
157/*---------------------------------------------------------------------------*/
158
159} // End namespace Arcane
160
161/*---------------------------------------------------------------------------*/
162/*---------------------------------------------------------------------------*/
163
164#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.