Arcane  v4.1.1.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-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/* AMRPatchPositionSignature.h (C) 2000-2025 */
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
32class AMRPatchPositionSignature
33{
34 public:
35
36 AMRPatchPositionSignature();
37 AMRPatchPositionSignature(AMRPatchPosition patch, ICartesianMesh* cmesh, AMRPatchPositionLevelGroup* all_patches);
38 AMRPatchPositionSignature(AMRPatchPosition patch, ICartesianMesh* cmesh, AMRPatchPositionLevelGroup* all_patches, Integer nb_cut);
39 ~AMRPatchPositionSignature();
40
41 public:
42
43 void compress();
44 void fillSig();
45 bool isValid() const;
46 bool canBeCut() const;
47 void compute();
48 Real efficacity() const;
49 std::pair<AMRPatchPositionSignature, AMRPatchPositionSignature> cut(Integer dim, Integer cut_point) const;
50 bool isIn(Integer x, Integer y, Integer z) const;
51
52 ConstArrayView<Integer> sigX() const;
53 ConstArrayView<Integer> sigY() const;
54 ConstArrayView<Integer> sigZ() const;
55 AMRPatchPosition patch() const;
56 ICartesianMesh* mesh() const;
57 bool stopCut() const;
58 void setStopCut(bool stop_cut);
59 bool isComputed() const;
60
61 private:
62
63 bool m_is_null;
64 AMRPatchPosition m_patch;
65 ICartesianMesh* m_mesh;
66 Integer m_nb_cut;
67 bool m_stop_cut;
68
70
71 bool m_have_cells;
72 bool m_is_computed;
73
77
78 AMRPatchPositionLevelGroup* m_all_patches;
79};
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84} // End namespace Arcane
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89#endif
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 Integer
Type représentant un entier.
double Real
Type représentant un réel.