Arcane  v3.16.2.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MEDMeshReaderService.cc
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/* MEDMeshReaderService.cc (C) 2000-2025 */
9/* */
10/* Lecture d'un maillage au format MED. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ITraceMng.h"
15
16#include "arcane/IMeshReader.h"
17#include "arcane/BasicService.h"
18#include "arcane/ServiceFactory.h"
19#include "arcane/IPrimaryMesh.h"
20#include "arcane/ICaseMeshReader.h"
21#include "arcane/IMeshBuilder.h"
22#include "arcane/IParallelMng.h"
23#include "arcane/MeshPartInfo.h"
24
25#include <med.h>
26#define MESGERR 1
27#include <med_utils.h>
28#include <string.h>
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Arcane
34{
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
44class MEDMeshReader
45: public TraceAccessor
46{
47 public:
48
55 struct MEDToArcaneItemInfo
56 {
57 public:
58
59 MEDToArcaneItemInfo(int dimension, int nb_node, med_int med_type,
60 Integer arcane_type, const Int32* indirection)
61 : m_dimension(dimension)
62 , m_nb_node(nb_node)
63 , m_med_type(med_type)
64 , m_arcane_type(arcane_type)
65 , m_indirection(indirection)
66 {}
67
68 public:
69
70 int dimension() const { return m_dimension; }
71 int nbNode() const { return m_nb_node; }
72 med_int medType() const { return m_med_type; }
73 Integer arcaneType() const { return m_arcane_type; }
74 const Int32* indirection() const { return m_indirection; }
75
76 private:
77
78 int m_dimension;
79 int m_nb_node;
80 med_int m_med_type;
81 Integer m_arcane_type;
82 const Int32* m_indirection;
83 };
84
85 public:
86
87 explicit MEDMeshReader(ITraceMng* tm)
88 : TraceAccessor(tm)
89 {
90 _initMEDToArcaneTypes();
91 }
92
93 public:
94
95 [[nodiscard]] IMeshReader::eReturnType
96 readMesh(IPrimaryMesh* mesh, const String& file_name);
97
98 private:
99
100 IMeshReader::eReturnType _readMesh(IPrimaryMesh* mesh, const String& filename);
101
102 private:
103
104 // Structure pour fermer automatiquement les fichiers MED ouverts
105 struct AutoCloseMED
106 {
107 AutoCloseMED(med_idt id)
108 : fid(id)
109 {}
110 ~AutoCloseMED()
111 {
112 if (fid >= 0)
113 ::MEDfileClose(fid);
114 }
115
116 med_idt fid;
117 };
118 UniqueArray<MEDToArcaneItemInfo> m_med_to_arcane_types;
119
120 private:
121
122 Int32 _readItems(med_idt fid, const char* meshnane, const MEDToArcaneItemInfo& iinfo,
123 Array<med_int>& connectivity);
124 void _initMEDToArcaneTypes();
125 void _addTypeInfo(int dimension, int nb_node, med_int med_type, Integer arcane_type)
126 {
127 MEDToArcaneItemInfo t(dimension, nb_node, med_type, arcane_type, nullptr);
128 m_med_to_arcane_types.add(t);
129 }
130 void _addTypeInfo(int dimension, int nb_node, med_int med_type, Integer arcane_type,
131 const Int32* indirection)
132 {
133 MEDToArcaneItemInfo t(dimension, nb_node, med_type, arcane_type, indirection);
134 m_med_to_arcane_types.add(t);
135 }
136 void _readAndAllocateCells(IPrimaryMesh* mesh, Int32 mesh_dimension, med_idt fid, const char* meshname);
137
138 [[nodiscard]] IMeshReader::eReturnType
139 _readNodesCoordinates(IPrimaryMesh* mesh, Int64 nb_node, Int32 spacedim,
140 med_idt fid, const char* meshname);
141};
142
143/*---------------------------------------------------------------------------*/
144/*---------------------------------------------------------------------------*/
145
146namespace
147{
148 const Int32 Hexaedron8_indirection[] = { 1, 0, 3, 2, 5, 4, 7, 6 };
149 const Int32 Hexaedron20_indirection[] = { 1, 8, 10, 3, 9, 2, 0, 11, 5, 14, 18, 7, 6, 4, 16, 15, 13, 12, 17, 19 };
150 const Int32 Pyramid5_indirection[] = { 1, 0, 3, 2, 4 };
151 const Int32 Quad4_indirection[] = { 1, 0, 3, 2 };
152 const Int32 Triangle3_indirection[] = { 1, 0, 2 };
153 // PAS utilisé pour l'instant. A tester.
154 const Int32 Tetraedron4_indirection[] = { 1, 0, 2, 3 };
155} // namespace
156
157void MEDMeshReader::
158_initMEDToArcaneTypes()
159{
160 m_med_to_arcane_types.clear();
161
162 // TODO: regarder la correspondance de connectivité entre
163 // Arcane et MED pour les éléments quadratiques
164 // Types 1D
165 _addTypeInfo(1, 2, MED_SEG2, IT_Line2);
166 _addTypeInfo(1, 3, MED_SEG3, IT_Line3); // Non supporté
167 _addTypeInfo(1, 4, MED_SEG4, IT_NullType); // Non supporté
168
169 // Types 2D.
170 _addTypeInfo(2, 3, MED_TRIA3, IT_Triangle3, Triangle3_indirection);
171 _addTypeInfo(2, 4, MED_QUAD4, IT_Quad4, Quad4_indirection);
172 _addTypeInfo(2, 6, MED_TRIA6, IT_NullType); // Non supporté
173 _addTypeInfo(2, 7, MED_TRIA7, IT_NullType); // Non supporté
174 _addTypeInfo(2, 8, MED_QUAD8, IT_Quad8); // Non supporté
175 _addTypeInfo(2, 9, MED_QUAD9, IT_NullType); // Non supporté
176
177 // Types 3D
178 _addTypeInfo(3, 4, MED_TETRA4, IT_Tetraedron4);
179 _addTypeInfo(3, 5, MED_PYRA5, IT_Pyramid5, Pyramid5_indirection);
180 _addTypeInfo(3, 6, MED_PENTA6, IT_Pentaedron6);
181 _addTypeInfo(3, 8, MED_HEXA8, IT_Hexaedron8, Hexaedron8_indirection);
182 _addTypeInfo(3, 10, MED_TETRA10, IT_Tetraedron10);
183 _addTypeInfo(3, 12, MED_OCTA12, IT_Octaedron12);
184 _addTypeInfo(3, 13, MED_PYRA13, IT_NullType); // Non supporté
185 _addTypeInfo(3, 15, MED_PENTA15, IT_NullType); // Non supporté
186 _addTypeInfo(3, 18, MED_PENTA18, IT_NullType); // Non supporté
187 _addTypeInfo(3, 20, MED_HEXA20, IT_Hexaedron20, Hexaedron20_indirection);
188 _addTypeInfo(3, 27, MED_HEXA27, IT_NullType); // Non supporté
189
190 // Mailles dont la géométrie à une connectivité variable.
191 // Pour l'instant on ne supporte aucun de ces types dans Arcane.
192 // On traite quand même ces éléments pour afficher une erreur s'ils sont
193 // présents dans le maillage. En mettant la valeur (0) pour le nombre
194 // de noeuds on signale à _readItems() qu'on ne sait pas traiter ces éléments.
196 _addTypeInfo(2, 0, MED_POLYGON, IT_NullType);
197 _addTypeInfo(2, 0, MED_POLYGON2, IT_NullType);
198 _addTypeInfo(3, 0, MED_POLYHEDRON, IT_NullType);
199
200 // Mailles dont la géométrie est dynamique (découverte du modèle dans le fichier)
201 // TODO: regarder comment les traiter
202 //#define MED_STRUCT_GEO_INTERNAL 600
203 //#define MED_STRUCT_GEO_SUP_INTERNAL 700
204}
205
206/*---------------------------------------------------------------------------*/
207/*---------------------------------------------------------------------------*/
208
209IMeshReader::eReturnType MEDMeshReader::
210readMesh(IPrimaryMesh* mesh, const String& file_name)
211{
212 info() << "Trying to read MED File name=" << file_name;
213 return _readMesh(mesh, file_name);
214}
215
216/*---------------------------------------------------------------------------*/
217/*---------------------------------------------------------------------------*/
218
219IMeshReader::eReturnType MEDMeshReader::
220_readMesh(IPrimaryMesh* mesh, const String& filename)
221{
222 const med_idt fid = MEDfileOpen(filename.localstr(), MED_ACC_RDONLY);
223 if (fid < 0) {
224 MESSAGE("ERROR: can not open MED file ");
225 error() << "ERROR: can not open MED file '" << filename << "'";
227 }
228 // Pour garantir la fermeture du fichier.
229 AutoCloseMED auto_close_med(fid);
230
231 int nb_mesh = MEDnMesh(fid);
232 if (nb_mesh < 0) {
233 error() << "Error reading number of meshes";
235 }
236 info() << "MED: nb_mesh=" << nb_mesh;
237 if (nb_mesh == 0) {
238 error() << "No mesh is present";
240 }
241
242 // Le maillage qu'on lit est toujours le premier
243 int mesh_index = 1;
244
245 // Récupère la dimension d'espace. Cela est nécessaire pour dimensionner axisname eet unitname
246 int nb_axis = MEDmeshnAxis(fid, mesh_index);
247 if (nb_axis < 0) {
248 error() << "Can not read number of axis (MEDmeshnAxis)";
250 }
251 info() << "MED: nb_axis=" << nb_axis;
252
253 UniqueArray<char> axisname(MED_SNAME_SIZE * nb_axis + 1, '\0');
254 UniqueArray<char> unitname(MED_SNAME_SIZE * nb_axis + 1, '\0');
255
256 char meshname[MED_NAME_SIZE + 1];
257 meshname[0] = '\0';
258 char meshdescription[MED_COMMENT_SIZE + 1];
259 meshdescription[0] = '\0';
260 char dtunit[MED_SNAME_SIZE + 1];
261 dtunit[0] = '\0';
262 med_int spacedim = 0;
263 med_int meshdim = 0;
264 med_mesh_type meshtype = MED_UNDEF_MESH_TYPE;
265 med_sorting_type sortingtype = MED_SORT_UNDEF;
266 med_int nstep = 0;
267 med_axis_type axistype = MED_UNDEF_AXIS_TYPE;
268 int err = 0;
269 err = MEDmeshInfo(fid, mesh_index, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
270 dtunit, &sortingtype, &nstep, &axistype, axisname.data(), unitname.data());
271 if (err < 0) {
272 error() << "Can not read mesh info (MEDmeshInfo) r=" << err;
274 }
275 if (meshtype != MED_UNSTRUCTURED_MESH) {
276 error() << "Arcane handle only MED unstructured mesh (MED_UNSTRUCTURED_MESH) type=" << meshtype;
278 }
279 Integer mesh_dimension = meshdim;
280 if (mesh_dimension != 2 && mesh_dimension != 3)
281 ARCANE_FATAL("MED reader handles only 2D or 3D meshes");
282
283 info() << "MED: name=" << meshname;
284 info() << "MED: description=" << meshdescription;
285 info() << "MED: spacedim=" << spacedim;
286 info() << "MED: meshdim=" << meshdim;
287 info() << "MED: dtunit=" << dtunit;
288 info() << "MED: meshtype=" << meshtype;
289 info() << "MED: sortingtype=" << sortingtype;
290 info() << "MED: axistype=" << axistype;
291 info() << "MED: nstep=" << nstep;
292
293 Int64 nb_node = 0;
294 // Lecture du nombre de noeuds.
295 {
296 med_bool coordinatechangement;
297 med_bool geotransformation;
298 // TODO: traiter les informations telles que coordinatechangement
299 // et geotransformation si besoin
300 med_int med_nb_node = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_NODE, MED_NO_GEOTYPE,
301 MED_COORDINATE, MED_NO_CMODE, &coordinatechangement,
302 &geotransformation);
303 if (med_nb_node < 0) {
304 error() << "Can not read number of nodes (MEDmeshnEntity) err=" << med_nb_node;
306 }
307 nb_node = med_nb_node;
308 }
309 info() << "MED: nb_node=" << nb_node;
310
311 mesh->setDimension(mesh_dimension);
312
313 IParallelMng* pm = mesh->parallelMng();
314 bool is_parallel = pm->isParallel();
315 Int32 rank = mesh->meshPartInfo().partRank();
316 // En parallèle, seul le rang 0 lit le maillage
317 bool is_read_items = !(is_parallel && rank != 0);
318 if (is_read_items) {
319 _readAndAllocateCells(mesh, mesh_dimension, fid, meshname);
320 mesh->endAllocate();
321 return _readNodesCoordinates(mesh, nb_node, spacedim, fid, meshname);
322 }
323 // Appelle la méthode d'allocation avec zéro mailles.
324 // Cela est nécessaire car IPrimaryMesh::allocateCells() est collective.
325 mesh->allocateCells(0, {}, true);
326
327 return IMeshReader::RTOk;
328}
329
330/*---------------------------------------------------------------------------*/
331/*---------------------------------------------------------------------------*/
332
333void MEDMeshReader::
334_readAndAllocateCells(IPrimaryMesh* mesh, Int32 mesh_dimension, med_idt fid, const char* meshname)
335{
336 Int64 cell_unique_id = 0;
337 // Alloue les entités types par type.
338 for (const auto& iinfo : m_med_to_arcane_types) {
339 Integer item_dimension = iinfo.dimension();
340 // On ne traite que les entités de la dimension du maillage.
341 if (item_dimension != mesh_dimension)
342 continue;
343 UniqueArray<med_int> med_connectivity;
344 Int32 nb_item = _readItems(fid, meshname, iinfo, med_connectivity);
345 if (nb_item == 0)
346 continue;
347 Integer arcane_type = iinfo.arcaneType();
348 Integer nb_item_node = iinfo.nbNode();
349 if (arcane_type == IT_NullType) {
350 // Indique un type supporté par MED mais pas par Arcane
351 ARCANE_FATAL("MED type '{0}' is not supported by Arcane", iinfo.medType());
352 }
353 Int64 cells_infos_index = 0;
354 Int64 med_connectivity_index = 0;
355 UniqueArray<Int64> cells_infos((2 + nb_item_node) * nb_item);
356 info() << "CELL_INFOS size=" << cells_infos.size() << " nb_item=" << nb_item
357 << " type=" << arcane_type;
358 const Int32* indirection = iinfo.indirection();
359 for (Int32 i = 0; i < nb_item; ++i) {
360 cells_infos[cells_infos_index] = arcane_type;
361 ++cells_infos_index;
362 cells_infos[cells_infos_index] = cell_unique_id;
363 ++cells_infos_index;
364 ++cell_unique_id;
365 // La connectivité dans MED commence à 1 et Arcane à 0.
366 // Il faut donc retrancher 1 de la connectivité donnée par MED.
367 Span<Int64> cinfo_span(cells_infos.span().subspan(cells_infos_index, nb_item_node));
368 Span<med_int> med_cinfo_span(med_connectivity.span().subspan(med_connectivity_index, nb_item_node));
369 if (indirection) {
370 for (Integer k = 0; k < nb_item_node; ++k) {
371 cinfo_span[k] = med_cinfo_span[indirection[k]] - 1;
372 }
373 }
374 else {
375 for (Integer k = 0; k < nb_item_node; ++k)
376 cinfo_span[k] = med_cinfo_span[k] - 1;
377 }
378 med_connectivity_index += nb_item_node;
379 cells_infos_index += nb_item_node;
380
381 }
382 mesh->allocateCells(nb_item, cells_infos, false);
383 }
384}
385
386/*---------------------------------------------------------------------------*/
387/*---------------------------------------------------------------------------*/
388
389IMeshReader::eReturnType MEDMeshReader::
390_readNodesCoordinates(IPrimaryMesh* mesh, Int64 nb_node, Int32 spacedim,
391 med_idt fid, const char* meshname)
392{
393 const bool do_verbose = false;
394 // Lit les coordonnées des noeuds et positionne les coordonnées dans Arcane
395 UniqueArray<Real3> nodes_coordinates(nb_node);
396 {
397 UniqueArray<med_float> coordinates(nb_node * spacedim);
398 int err = MEDmeshNodeCoordinateRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE,
399 coordinates.data());
400 if (err < 0) {
401 error() << "Can not read nodes coordinates err=" << err;
403 }
404
405 if (spacedim == 3) {
406 for (Int64 i = 0; i < nb_node; ++i) {
407 Real3 xyz(coordinates[i * 3], coordinates[(i * 3) + 1], coordinates[(i * 3) + 2]);
408 if (do_verbose)
409 info() << "I=" << i << " XYZ=" << xyz;
410 nodes_coordinates[i] = xyz;
411 }
412 }
413 else if (spacedim == 2) {
414 for (Int64 i = 0; i < nb_node; ++i) {
415 Real3 xyz(coordinates[i * 2], coordinates[(i * 2) + 1], 0.0);
416 if (do_verbose)
417 info() << "I=" << i << " XYZ=" << xyz;
418 nodes_coordinates[i] = xyz;
419 }
420 }
421 else
422 ARCANE_THROW(NotImplementedException, "spacedim!=2 && spacedim!=3");
423 }
424
425 // Positionne les coordonnées
426 {
427 VariableNodeReal3& nodes_coord_var(mesh->nodesCoordinates());
428 ENUMERATE_NODE (inode, mesh->allNodes()) {
429 Node node = *inode;
430 nodes_coord_var[inode] = nodes_coordinates[node.uniqueId()];
431 }
432 }
433 return IMeshReader::RTOk;
434}
435
436/*---------------------------------------------------------------------------*/
437/*---------------------------------------------------------------------------*/
438
439Int32 MEDMeshReader::
440_readItems(med_idt fid, const char* meshname, const MEDToArcaneItemInfo& iinfo,
441 Array<med_int>& connectivity)
442{
443 int med_item_type = iinfo.medType();
444 med_bool coordinatechangement;
445 med_bool geotransformation;
446 med_int nb_med_item = ::MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_CELL, med_item_type,
447 MED_CONNECTIVITY, MED_NODAL, &coordinatechangement,
448 &geotransformation);
449 if (nb_med_item < 0) {
450 ARCANE_FATAL("Can not read MED med_item_type '{0}' error={1}", med_item_type, nb_med_item);
451 }
452 info() << "MED: type=" << med_item_type << " nb_item=" << nb_med_item;
453 if (nb_med_item == 0)
454 return 0;
455 Int64 nb_node = iinfo.nbNode();
456 if (nb_node == 0)
457 // Indique un élément qu'on ne sais pas traiter.
458 ARCANE_THROW(NotImplementedException, "Reading items with MED type '{0}'", med_item_type);
459
460 connectivity.resize(nb_node * nb_med_item);
461 int err = MEDmeshElementConnectivityRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_CELL,
462 med_item_type, MED_NODAL, MED_FULL_INTERLACE,
463 connectivity.data());
464 if (err < 0) {
465 ARCANE_FATAL("Can not read connectivity MED med_item_type '{0}' error={1}",
466 med_item_type, err);
467 }
468 info() << "CON: " << connectivity;
469 return nb_med_item;
470}
471
472/*---------------------------------------------------------------------------*/
473/*---------------------------------------------------------------------------*/
474
475class MEDMeshReaderService
476: public BasicService
477, public IMeshReader
478{
479 public:
480
481 explicit MEDMeshReaderService(const ServiceBuildInfo& sbi)
482 : BasicService(sbi)
483 {}
484
485 public:
486
487 void build() override {}
488 bool allowExtension(const String& str) override
489 {
490 return str == "med";
491 }
493 const XmlNode& mesh_element,
494 const String& file_name,
495 const String& dir_name,
496 bool use_internal_partition) override
497 {
498 ARCANE_UNUSED(mesh_element);
499 ARCANE_UNUSED(dir_name);
500 ARCANE_UNUSED(use_internal_partition);
501 MEDMeshReader reader(traceMng());
502 return reader.readMesh(mesh, file_name);
503 }
504};
505
506/*---------------------------------------------------------------------------*/
507/*---------------------------------------------------------------------------*/
508
509ARCANE_REGISTER_SERVICE(MEDMeshReaderService,
510 ServiceProperty("MEDMeshReader", ST_SubDomain),
511 ARCANE_SERVICE_INTERFACE(IMeshReader));
512
513/*---------------------------------------------------------------------------*/
514/*---------------------------------------------------------------------------*/
515
516class MEDCaseMeshReader
517: public AbstractService
518, public ICaseMeshReader
519{
520 public:
521
522 class Builder
523 : public IMeshBuilder
524 {
525 public:
526
527 explicit Builder(ITraceMng* tm, const CaseMeshReaderReadInfo& read_info)
528 : m_trace_mng(tm)
529 , m_read_info(read_info)
530 {}
531
532 public:
533
534 void fillMeshBuildInfo(MeshBuildInfo& build_info) override
535 {
536 ARCANE_UNUSED(build_info);
537 }
539 {
540 MEDMeshReader reader(m_trace_mng);
541 String fname = m_read_info.fileName();
542 m_trace_mng->info() << "MED Reader (ICaseMeshReader) file_name=" << fname;
543 IMeshReader::eReturnType ret = reader.readMesh(pm, fname);
544 if (ret != IMeshReader::RTOk)
545 ARCANE_FATAL("Can not read MED File");
546 }
547
548 private:
549
550 ITraceMng* m_trace_mng;
551 CaseMeshReaderReadInfo m_read_info;
552 };
553
554 public:
555
556 explicit MEDCaseMeshReader(const ServiceBuildInfo& sbi)
557 : AbstractService(sbi)
558 {}
559
560 public:
561
563 {
564 IMeshBuilder* builder = nullptr;
565 if (read_info.format() == "med")
566 builder = new Builder(traceMng(), read_info);
567 return makeRef(builder);
568 }
569};
570
571/*---------------------------------------------------------------------------*/
572/*---------------------------------------------------------------------------*/
573
574ARCANE_REGISTER_SERVICE(MEDCaseMeshReader,
575 ServiceProperty("MEDCaseMeshReader", ST_SubDomain),
576 ARCANE_SERVICE_INTERFACE(ICaseMeshReader));
577
578/*---------------------------------------------------------------------------*/
579/*---------------------------------------------------------------------------*/
580
581} // namespace Arcane
582
583/*---------------------------------------------------------------------------*/
584/*---------------------------------------------------------------------------*/
#define ARCANE_THROW(exception_class,...)
Macro pour envoyer une exception avec formattage.
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
#define ENUMERATE_NODE(name, group)
Enumérateur générique d'un groupe de noeuds.
#define ARCANE_SERVICE_INTERFACE(ainterface)
Macro pour déclarer une interface lors de l'enregistrement d'un service.
Classe de base d'un service.
AbstractService(const ServiceBuildInfo &)
Constructeur à partir d'un ServiceBuildInfo.
Tableau d'items de types quelconques.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Informations nécessaires pour la lecture d'un fichier de maillage.
Interface du service de lecture du maillage à partir du jeu de données.
Interface d'un service de création/lecture du maillage.
Interface du service gérant la lecture d'un maillage.
Definition IMeshReader.h:37
eReturnType
Types des codes de retour d'une lecture ou écriture.
Definition IMeshReader.h:42
@ RTError
Erreur lors de l'opération.
Definition IMeshReader.h:44
@ RTOk
Opération effectuée avec succès.
Definition IMeshReader.h:43
Interface du gestionnaire de traces.
void allocateMeshItems(IPrimaryMesh *pm) override
Alloue les entités du maillage géré par ce service.
void fillMeshBuildInfo(MeshBuildInfo &build_info) override
Remplit build_info avec les informations nécessaires pour créer le maillage.
Ref< IMeshBuilder > createBuilder(const CaseMeshReaderReadInfo &read_info) const override
Retourne un builder pour créer et lire le maillage dont les informations sont spécifiées dans read_in...
bool allowExtension(const String &str) override
Vérifie si le service supporte les fichiers avec l'extension str.
void build() override
Construction de niveau build du service.
eReturnType readMeshFromFile(IPrimaryMesh *mesh, const XmlNode &mesh_element, const String &file_name, const String &dir_name, bool use_internal_partition) override
Lit un maillage à partir d'un fichier.
Lecteur de maillages au format MED.
Paramètres nécessaires à la construction d'un maillage.
Référence à une instance.
Structure contenant les informations pour créer un service.
Chaîne de caractères unicode.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
TraceMessage info() const
Flot pour un message d'information.
TraceMessage error() const
Flot pour un message d'erreur.
ITraceMng * traceMng() const
Gestionnaire de trace.
Vecteur 1D de données avec sémantique par valeur (style STL).
Noeud d'un arbre DOM.
Definition XmlNode.h:51
#define ARCANE_REGISTER_SERVICE(aclass, a_service_property,...)
Macro pour enregistrer un service.
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Grandeur au noeud de type coordonnées.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
@ ST_SubDomain
Le service s'utilise au niveau du sous-domaine.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Créé une référence sur un pointeur.
std::int32_t Int32
Type entier signé sur 32 bits.
Informations pour passer des types MED aux types Arcane pour les entités.