Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MeshMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* MeshMng.h (C) 2000-2022 */
9/* */
10/* Classe gérant la liste des maillages. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_INTERNAL_MESHMNG_H
13#define ARCANE_IMPL_INTERNAL_MESHMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Array.h"
18#include "arcane/utils/TraceAccessor.h"
19
20#include "arcane/IMeshMng.h"
21#include "arcane/MeshHandle.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28class ISubDomain;
29class IVariableMng;
30class IPrimaryMesh;
31class MeshFactoryMng;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36class ARCANE_IMPL_EXPORT MeshMng
37: public TraceAccessor
38, public IMeshMng
39{
40 public:
41
43 ~MeshMng();
44
45 public:
46
47 MeshMng(const MeshMng& rhs) = delete;
48 MeshMng& operator=(const MeshMng& rhs) = delete;
49
50 public:
51
52 ITraceMng* traceMng() const override { return TraceAccessor::traceMng(); }
53 IMeshFactoryMng* meshFactoryMng() const override;
54 IVariableMng* variableMng() const override { return m_variable_mng; }
55
56 MeshHandle* findMeshHandle(const String& name, bool throw_exception) override;
57 MeshHandle findMeshHandle(const String& name) override;
58 MeshHandle createMeshHandle(const String& name) override;
59 void destroyMesh(MeshHandle handle) override;
60 MeshHandle defaultMeshHandle() const override { return m_default_mesh_handle; }
61
62 public:
63
64 void addMesh(IMesh* mesh);
65 void destroyMeshes();
66 ConstArrayView<IMesh*> meshes() const;
67 MeshHandle createDefaultMeshHandle(const String& name);
68
69 public:
70
71 //TODO: a supprimer
72 IMesh* findMesh(const String& name, bool throw_exception);
73 //TODO: a supprimer
74 IMesh* getMesh(Integer index) const;
75 //TODO: a supprimer
76 IPrimaryMesh* getPrimaryMesh(Integer index) const;
77
78 protected:
79
80 MeshHandle _addMeshHandle(const String& name);
81 void _destroyMesh(IPrimaryMesh* primary_mesh);
82 void _rebuildMeshList();
83
84 private:
85
86 UniqueArray<IMesh*> m_meshes;
87 UniqueArray<MeshHandle> m_meshes_handle;
88 IVariableMng* m_variable_mng;
89 MeshFactoryMng* m_mesh_factory_mng;
90 MeshHandle m_default_mesh_handle;
91};
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96} // End namespace Arcane
97
98/*---------------------------------------------------------------------------*/
99/*---------------------------------------------------------------------------*/
100
101#endif
Interface de l'application.
Interface du gestionnaire de fabriques de maillages.
Interface du gestionnaire des maillages.
Definition IMeshMng.h:40
Interface du gestionnaire de variables.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Handle sur un maillage.
Definition MeshHandle.h:47
IVariableMng * variableMng() const override
Gestionnaire de variables associé à ce gestionnaire.
Definition MeshMng.h:54
MeshHandle defaultMeshHandle() const override
Handle pour le maillage par défaut.
Definition MeshMng.h:60
ITraceMng * traceMng() const override
Gestionnaire de trace associé à ce gestionnaire.
Definition MeshMng.h:52
Interface du gestionnaire de traces.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-