Arcane  v3.16.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
XmfMeshWriter.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/* XmfMeshWriter.cc (C) 2000-2025 */
9/* */
10/* Ecriture d'un fichier au format Xmf. */
11/*****************************************************************************
12/* TODO: - Work on Precision (="4"), which could be adjusted.
13 - Test for new output file
14*/
15/*****************************************************************************
16 * [Topology]
17 *****************************************************************************
18 XML Element : Topology
19 XML Attribute : Name = Any String
20 XML Attribute : TopologyType = Polyvertex | Polyline | Polygon |
21 Triangle | Quadrilateral | Tetrahedron | Pyramid| Wedge | Hexahedron |
22 Edge_3 | Triagle_6 | Quadrilateral_8 | Tetrahedron_10 | Pyramid_13 |
23 Wedge_15 | Hexahedron_20 |
24 Mixed |
25 2DSMesh | 2DRectMesh | 2DCoRectMesh |
26 3DSMesh | 3DRectMesh | 3DCoRectMesh
27 XML Attribute : NumberOfElements = Number of Cells
28 XML Attribute : NodesPerElement = # (Only Important for Polyvertex, Polygon and Polyline)
29 XML Attribute : Order = Order of Nodes if not Default
30 XML BaseOffset: Offset if not 0
31******************************************************************************
32XdmfTopology has the general class (XDMF_STRUCTURED | XDMF_UNSTRUCTURED)
33and the specific BASE type (TETRAHEDRON | 3DSMESH etc.).
34******************************************************************************
35For unstructured meshes, XdmfTopology also contains the connectivity array.
36For structured meshes, connectivity is implicit (i.e. X[i] is connected to X[i+1])
37*****************************************************************************/
38
39/*****************************************************************************
40 * [Geometry]
41 *****************************************************************************
42 XdmfGeometry is a required part of an XdmfGrid. Geometry can be specified in several different ways :
43
44 XDMF_GEOMETRY_XYZ : X0,Y0,Z0,X1,Y1,Z1 ..... XN,YN,ZN for every point
45 XDMF_GEOMETRY_X_Y_Z : X0,X1 ... XN,Y0,Y1 ... YN,Z0,Z1 ... ZN for every point
46 XDMF_GEOMETRY_VXVYVZ : X0,X1 ... XN,Y0,Y1 ... YN,Z0,Z1 ... ZN for XAxis, YAxis, ZAxis
47 XDMF_GEOMETRY_ORIGIN_DXDYDZ : Xorigin, Yorigin, Zorigin, Dx, Dy, Dz
48 ******************************************************************************
49 XML Element : Grid
50 XML Attribute : Name = Any String
51 XML Attribute : GeometryType = XYZ* | XY | X_Y_Z | X_Y | VXVYVZ | ORIGIN_DXDYDZ
52 ******************************************************************************
53 Example :
54 <Grid Name="Mesh" GridType="Uniform">
55 <Topology ...
56 <Geometry ...
57 <Attribute ...
58 </Grid>
59*****************************************************************************/
60
61/***************************************************************************** \
62* [DataItem] *
63******************************************************************************
64An XdmfDataItem is a container for data. It is of one of these types :
65
66 Uniform ...... A single DataStructure
67 HyperSlab .... A DataTransform that Subsamples some DataStructure
68 Coordinates .. A DataTransform that Subsamples via Parametric Coordinates
69 Function ..... A DataTransform described by some function
70 Collection ... Contains an Array of 1 or more DataStructures or DataTransforms
71 Tree ......... A Hierarchical group of other DataItems
72
73If not specified in the "ItemType" a Uniform item is assumed.
74A Uniform DataItem is a XdmfDataStructure or an XdmfDataTransform.
75Both XdmfDataStructure and XdmfDataTransform are maintined for backwards compatibility.
76******************************************************************************
77 XML Attribute : Name = Any String, DataItems have an optional name.
78 XML Attribute : ItemType = Uniform* | Collection | Tree | HyperSlab | Coordinates | Function
79 XML Attribute : Dimensions = K J I
80 Dimensions are listed with the slowest varying dimension first.
81 (i.e. KDim JDim IDim).
82 XML Attribute : NumberType = Float* | Int | UInt | Char | UChar
83 Type is "Char | Float | Int | Compound" with the default being Float.
84 XML Attribute : Precision = 1 | 4 | 8
85 Precision is BytesPerElement and defaults to 4 for Ints and Floats.
86 XML Attribute : Format = XML* | HDF
87 Format is any supported XDMF format but usually XML | HDF.
88\*****************************************************************************/
89
90/*---------------------------------------------------------------------------*/
91/*---------------------------------------------------------------------------*/
92
93#include "arcane/utils/Iostream.h"
94#include "arcane/utils/StdHeader.h"
95#include "arcane/utils/HashTableMap.h"
96#include "arcane/utils/ValueConvert.h"
97#include "arcane/utils/ScopedPtr.h"
98#include "arcane/utils/ITraceMng.h"
99#include "arcane/utils/String.h"
100#include "arcane/utils/IOException.h"
101#include "arcane/utils/PlatformUtils.h"
102#include "arcane/utils/Collection.h"
103#include "arcane/utils/Enumerator.h"
104#include "arcane/utils/NotImplementedException.h"
105#include "arcane/utils/Real3.h"
106
107#include "arcane/core/FactoryService.h"
108#include "arcane/core/IMainFactory.h"
109#include "arcane/core/IMeshReader.h"
110#include "arcane/core/ISubDomain.h"
111#include "arcane/core/IMesh.h"
112#include "arcane/core/IItemFamily.h"
113#include "arcane/core/Item.h"
115#include "arcane/core/VariableTypes.h"
116#include "arcane/core/IVariableAccessor.h"
117#include "arcane/core/IParallelMng.h"
118#include "arcane/core/IIOMng.h"
119#include "arcane/core/IXmlDocumentHolder.h"
120#include "arcane/core/XmlNodeList.h"
121#include "arcane/core/XmlNode.h"
122#include "arcane/core/IMeshUtilities.h"
123#include "arcane/core/IMeshWriter.h"
124#include "arcane/core/BasicService.h"
125
126#define XDMF_USE_ANSI_STDLIB
127#include <vtkxdmf2/Xdmf.h>
128
129
130/*---------------------------------------------------------------------------*/
131/*---------------------------------------------------------------------------*/
132namespace Arcane
133{
134
135using namespace xdmf2;
136
137/*---------------------------------------------------------------------------*/
138/*---------------------------------------------------------------------------*/
139
143class XmfMeshWriter
144: public AbstractService
145, public IMeshWriter
146{
147 public:
148 explicit XmfMeshWriter(const ServiceBuildInfo& sbi)
149 : AbstractService(sbi)
150 {
151 this->CurrIndent=0;
152 }
153
154 virtual void build(void) {}
155 virtual bool writeMeshToFile(IMesh* mesh,const String& file_name);
156
157 bool xmfWriteHead(void);
158 bool xmfWriteTail(void);
159
160 bool xmfWriteDomainHeader(void);
161 bool xmfWriteDomainFooter(void);
162
163 bool xmfWriteGridHeader(char*, char*);
164 bool xmfWriteGridFooter(void);
165
166 bool xmfWriteTopologyHeader(char*, XdmfInt32);
167 bool xmfWriteTopologyFooter(void);
168
169 bool xmfWriteGeometryHeader(char *Name, XdmfInt32 GeometryType);
170 bool xmfWriteGeometryFooter(void);
171
172 bool xmfWriteDataItemHeader(XdmfInt32[3], XdmfInt32, XdmfInt32);
173 bool xmfWriteDataItemFooter(void);
174
175 void Indent(void);
176 void IncrementIndent() { this->CurrIndent ++; }
177 void DecrementIndent() { if (this->CurrIndent >= 0) this->CurrIndent--; }
178
179private:
180 ofstream ost;
181 void _switchXmfType(Integer, Array<Integer>&);
182 int CurrIndent;
183 char *HeavyDataSetNameString;
184};
185
186
187/*---------------------------------------------------------------------------*/
188/*---------------------------------------------------------------------------*/
190/*---------------------------------------------------------------------------*/
191/*---------------------------------------------------------------------------*/
192
193/*****************************************************************************\
194* [_switchXmfType] *
195\*****************************************************************************/
196void XmfMeshWriter::
197_switchXmfType(Integer arc_type, Array<Integer>& arcConnectivityArray)
198{
199 if (arc_type > ItemTypeMng::nbBasicItemType()){
200 arcConnectivityArray.add(XDMF_NOTOPOLOGY);
201 return;
202 }
203
204 switch(arc_type){
205 case (IT_NullType): arcConnectivityArray.add(XDMF_NOTOPOLOGY);return;
206
207 case (IT_Vertex):
208 arcConnectivityArray.add(XDMF_POLYVERTEX);
209 arcConnectivityArray.add(1ul); return;
210
211 case (IT_Line2):
212 arcConnectivityArray.add(XDMF_POLYLINE);
213 arcConnectivityArray.add(2ul); return;
214
215 case (IT_Triangle3): arcConnectivityArray.add(XDMF_TRI); return;
216 case (IT_Quad4): arcConnectivityArray.add(XDMF_QUAD); return;
217 case (IT_Pentagon5): arcConnectivityArray.add(XDMF_POLYGON); return;
218 case (IT_Hexagon6): arcConnectivityArray.add(XDMF_POLYGON); return;
219 case (IT_Heptagon7): arcConnectivityArray.add(XDMF_POLYGON); return;
220 case (IT_Octogon8): arcConnectivityArray.add(XDMF_POLYGON); return;
221 case (IT_Tetraedron4): arcConnectivityArray.add(XDMF_TET); return;
222 case (IT_Pyramid5): arcConnectivityArray.add(XDMF_PYRAMID); return;
223 case (IT_Pentaedron6): arcConnectivityArray.add(XDMF_WEDGE); return;
224 case (IT_Hexaedron8): arcConnectivityArray.add(XDMF_HEX); return;
225 case (IT_Heptaedron10): arcConnectivityArray.add(XDMF_TET_10); return;
226
227 case (IT_Octaedron12):
228 arcConnectivityArray.add(XDMF_POLYVERTEX);
229 arcConnectivityArray.add(12ul); return;
230case (IT_Enneedron14):
231 arcConnectivityArray.add(XDMF_POLYVERTEX);
232 arcConnectivityArray.add(14ul); return;
233 case (IT_Decaedron16):
234 arcConnectivityArray.add(XDMF_POLYVERTEX);
235 arcConnectivityArray.add(16ul); return;
236 case (IT_HemiHexa7):
237 arcConnectivityArray.add(XDMF_POLYVERTEX);
238 arcConnectivityArray.add(7ul); return;
239
240 //warning IT_AntiWedgeLeft6 IT_AntiWedgeRight6 and IT_HemiHexa6 are merged
241 case (IT_HemiHexa6):
242 case (IT_AntiWedgeLeft6):
243 case (IT_AntiWedgeRight6):
244 arcConnectivityArray.add(XDMF_POLYVERTEX);
245 arcConnectivityArray.add(6ul); return;
246
247 //warning IT_HemiHexa5 and IT_DiTetra5 are merged
248 case (IT_HemiHexa5):
249 case (IT_DiTetra5):
250 arcConnectivityArray.add(XDMF_POLYVERTEX);
251 arcConnectivityArray.add(5ul); return;
252
253 case (IT_DualNode):
254 case (IT_DualEdge):
255 case (IT_DualFace):
256 case (IT_DualCell): arcConnectivityArray.add(XDMF_NOTOPOLOGY); return;
257
258 default: arcConnectivityArray.add(XDMF_NOTOPOLOGY);return;
259 }
260 arcConnectivityArray.add(XDMF_NOTOPOLOGY);
261}
262
263
264
265
266/**********************************************************************
267 * [writeMeshToFile]
268 **********************************************************************/
270writeMeshToFile(IMesh* mesh,const String& file_name)
271{
272 info() << "[XmfMeshWriter::writeMeshToFile] nNodes=" <<mesh->nbNode() << " nCells="<< mesh->nbCell()
273 << " all=" << mesh->allNodes().size() << ", own=" << mesh->ownNodes().size();
274
275 /****************************
276 * XDMF-side initialisation *
277 ****************************/
278 XdmfRoot* xmfRoot=new XdmfRoot(); // represents the Root Element in Xdmf
279 XdmfDOM* xmfDom= new XdmfDOM();
280 String h5_file_name = file_name + ".h5";
281 if (platform::isFileReadable(h5_file_name))
282 if (platform::removeFile(h5_file_name))
283 ARCANE_FATAL("Could not remove .h5 file '{0}'",h5_file_name);
284 String xmfDomFileName(file_name);
285 // Add extension '.xmf' if needed.
286 if (!xmfDomFileName.endsWith(".xmf"))
287 xmfDomFileName = file_name + ".xmf";
288 if (xmfDom->SetWorkingDirectory(".")!= XDMF_SUCCESS)
289 throw IOException("writeMeshToFile", "SetOutputFileName");
290 if (xmfDom->SetOutputFileName(xmfDomFileName.localstr())!= XDMF_SUCCESS)
291 throw IOException("writeMeshToFile", "SetOutputFileName");
292 xmfRoot->SetDOM(xmfDom);
293 xmfRoot->Build();
294 info() << "XDMF-side initialisation done filename='" << xmfDomFileName << "'";
295
296 // Domain initialisation
297 XdmfDomain *xmfDomain = new XdmfDomain();
298 xmfDomain->SetName(file_name.localstr());
299 xmfRoot->Insert(xmfDomain);
300 info() << "[XmfMeshWriter] Domain initialisation done";
301
302 // Grid initialisation
303 XdmfGrid *xmfGrid = new XdmfGrid();
304 xmfGrid->SetGridType(XDMF_GRID_UNIFORM);
305 info() << "[XmfMeshWriter] Grid initialisation done";
306
307 /****************************************
308 * XdmfAttribute to save Cells Unique IDs
309 ****************************************/
310 XdmfAttribute *xmfCellAttribute=new XdmfAttribute();
311 xmfCellAttribute->SetName("CellsUniqueIDs");
312 xmfCellAttribute->SetAttributeCenter(XDMF_ATTRIBUTE_CENTER_CELL);
313 xmfCellAttribute->SetAttributeType(XDMF_ATTRIBUTE_TYPE_SCALAR);
314 XdmfArray *xmfCellsUniqueIDs = xmfCellAttribute->GetValues();
315 String heavyDataForCellsUniqueIDs(h5_file_name+":/CellsUniqueIDs");
316 xmfCellsUniqueIDs->SetHeavyDataSetName(heavyDataForCellsUniqueIDs.localstr());
317 xmfCellsUniqueIDs->SetNumberType(XDMF_INT32_TYPE);
318 xmfCellsUniqueIDs->SetNumberOfElements(mesh->nbCell());
319 XdmfInt64 cellIndex=0;
320
321 /****************************************
322 * XdmfAttribute to save Nodes Unique IDs
323 ****************************************/
324 XdmfAttribute *xmfNodeAttribute=new XdmfAttribute();
325 xmfNodeAttribute->SetName("NodesUniqueIDs");
326 xmfNodeAttribute->SetAttributeCenter(XDMF_ATTRIBUTE_CENTER_NODE);
327 xmfNodeAttribute->SetAttributeType(XDMF_ATTRIBUTE_TYPE_SCALAR);
328 XdmfArray *xmfNodesUniqueIDs = xmfNodeAttribute->GetValues();
329 String heavyDataForNodesUniqueIDs(h5_file_name+":/NodesUniqueIDs");
330 xmfNodesUniqueIDs->SetHeavyDataSetName(heavyDataForNodesUniqueIDs.localstr());
331 xmfNodesUniqueIDs->SetNumberType(XDMF_INT32_TYPE);
332 xmfNodesUniqueIDs->SetNumberOfElements(mesh->nbNode());
333 IntegerUniqueArray nodesUniqueIDs; // Unique nodes-IDs array
334
335 /***********************************
336 * XdmfAttribute to save Nodes Owners
337 \***********************************/
338 XdmfAttribute *xmfOwnerAttribute=new XdmfAttribute();
339 xmfOwnerAttribute->SetName("NodesOwner");
340 xmfOwnerAttribute->SetAttributeCenter(XDMF_ATTRIBUTE_CENTER_NODE);
341 xmfOwnerAttribute->SetAttributeType(XDMF_ATTRIBUTE_TYPE_SCALAR);
342 XdmfArray *xmfNodesOwners = xmfOwnerAttribute->GetValues();
343 String heavyDataForOwners(h5_file_name+":/NodesOwners");
344 xmfNodesOwners->SetHeavyDataSetName(heavyDataForOwners.localstr());
345 xmfNodesOwners->SetNumberType(XDMF_INT32_TYPE);
346 xmfNodesOwners->SetNumberOfElements(mesh->nbNode());
347 XdmfInt64 nodeIndex=0;
348 ENUMERATE_NODE(iNode,mesh->allNodes()){
349 nodesUniqueIDs.add(iNode->uniqueId().asInteger());
350 xmfNodesUniqueIDs->SetValue(nodeIndex, iNode->uniqueId().asInteger());
351 xmfNodesOwners->SetValue(nodeIndex++, iNode->owner());
352 }
353
354 // Each Grid contains a Topology,
355 info() << "[XmfMeshWriter] Focussing on the topology";
356 XdmfTopology *xmfTopology = xmfGrid->GetTopology();
357 xmfTopology->SetTopologyType(XDMF_MIXED);
358 xmfTopology->SetNumberOfElements(mesh->nbCell());
359 XdmfArray *xmfConnectivityArray= xmfTopology->GetConnectivity();
360 String heavyDataForConnections(h5_file_name+":/Connections");
361 xmfConnectivityArray->SetHeavyDataSetName(heavyDataForConnections.localstr());
362 xmfConnectivityArray->SetNumberType(XDMF_INT32_TYPE);
363 UniqueArray<XdmfInt32> arcCellConnectivityArray;
364 ENUMERATE_CELL(iCell,mesh->allCells()){// Scanning the cells' nodes to get type and connectivity
365 Cell cell = *iCell;
366 Integer nbNodes = cell.nbNode();
367 xmfCellsUniqueIDs->SetValue(cellIndex++, iCell->uniqueId().asInteger());
368 _switchXmfType(cell.type(), arcCellConnectivityArray);
369 Integer meshNbNodes=mesh->nbNode();
370 for( Integer j=0; j<nbNodes;++j){
371 Integer uid=cell.node(j).uniqueId();
372 for( Integer i=0; i<meshNbNodes; ++i){
373 // This is used for external viewers to be able to read our output
374 if (nodesUniqueIDs[i] != uid)
375 continue; // xmfNodesUniqueIDs->GetValueAsInt32(i) is just TOO painful to work with!
376 arcCellConnectivityArray.add(i);
377 break;
378 }
379 }
380 }
381 xmfConnectivityArray->SetNumberOfElements(arcCellConnectivityArray.size());
382 info() << "[XmfMeshWriter] arcCellConnectivityArray.size()=" << arcCellConnectivityArray.size();
383 for(XdmfInt32 idx=0; idx<arcCellConnectivityArray.size();++idx)
384 xmfConnectivityArray->SetValue(idx,arcCellConnectivityArray[idx]);
385 info() << "[XmfMeshWriter] Work on grid->topology done";
386
387 // a Geometry,
388 XdmfGeometry *xmfGeometry = xmfGrid->GetGeometry();
389 xmfGeometry->SetGeometryType(XDMF_GEOMETRY_XYZ);
390 //xmfGeometry->SetNumberOfPoints(mesh->nbNode());
391 XdmfArray *xmfNodeGeometryArray= xmfGeometry->GetPoints();
392 String heavyDataForGeometry(h5_file_name+":/XYZ");
393 xmfNodeGeometryArray->SetHeavyDataSetName(heavyDataForGeometry.localstr());
394 xmfNodeGeometryArray->SetNumberType(XDMF_FLOAT32_TYPE);
395 xmfNodeGeometryArray->SetNumberOfElements(3*mesh->nbNode());// Number of points in this geometry
396 VariableItemReal3& nodes_coords = mesh->nodesCoordinates();
397 XdmfInt64 Index=0;
398 ENUMERATE_NODE(iNode,mesh->allNodes()){
399 const Node& node = *iNode;
400 xmfNodeGeometryArray->SetValue(Index++,Convert::toDouble(nodes_coords[iNode].x));
401 xmfNodeGeometryArray->SetValue(Index++,Convert::toDouble(nodes_coords[iNode].y));
402 xmfNodeGeometryArray->SetValue(Index++,Convert::toDouble(nodes_coords[iNode].z));
403 //info() << "[writeMeshToFile] Adding node[" << iNode->uniqueId() << "]";
404 }
405 info() << "[XmfMeshWriter] Work on Geometry done";
406 xmfDomain->Insert(xmfGrid);
407
408
409 /*************************
410 * Fetching Other Groups
411 * XML Attribute : Name
412 * XML Attribute : AttributeType = Scalar* | Vector | Tensor | Tensor6 | Matrix
413 * XML Attribute : Center = Node* | Cell | Grid | Face | Edge
414 ************************/
415 info() << "[XmfMeshWriter] Working on Groups";
416 for(ItemGroupCollection::Enumerator arcGroup(mesh->groups()); ++arcGroup;){
417 if ( (*arcGroup == mesh->cellFamily()->allItems())||(*arcGroup == mesh->nodeFamily()->allItems())||\
418 (*arcGroup == mesh->edgeFamily()->allItems())||(*arcGroup == mesh->faceFamily()->allItems())) continue;
419 info() << "[writeMeshToFile] Found a " << arcGroup->itemKind() << "-group " << arcGroup->name();
420 XdmfAttribute *xmfAttribute=new XdmfAttribute();
421 xmfAttribute->SetName(arcGroup->name().localstr());
422 xmfAttribute->SetAttributeCenter(XDMF_ATTRIBUTE_CENTER_NODE);
423 xmfAttribute->SetAttributeType(XDMF_ATTRIBUTE_TYPE_SCALAR);
424 XdmfArray *xmfGroup = xmfAttribute->GetValues();
425 String heavyDataForGroup(h5_file_name+":/" + arcGroup->name());
426 xmfGroup->SetHeavyDataSetName(heavyDataForGroup.localstr());
427 xmfGroup->SetNumberType(XDMF_INT32_TYPE);
428 xmfGroup->SetNumberOfElements(1+arcGroup->size());
429 XdmfInt64 Index=0;
430 xmfGroup->SetValue(Index++, arcGroup->itemKind());
431 ENUMERATE_ITEM(iItem, *arcGroup){
432 xmfGroup->SetValue(Index++, iItem->uniqueId().asInteger());
433 }
434 xmfGrid->Insert(xmfAttribute);
435 }
436 xmfGrid->Insert(xmfCellAttribute);
437 xmfGrid->Insert(xmfNodeAttribute);
438 xmfGrid->Insert(xmfOwnerAttribute);
439 xmfGrid->Build();
440
441
442 /********************
443 * Output & cleanup *
444 ********************/
445 xmfDom->Write();
446
447 delete xmfCellAttribute;
448 delete xmfNodeAttribute;
449 delete xmfOwnerAttribute;
450 delete xmfGrid;
451 delete xmfDomain;
452 delete xmfRoot;
453 delete xmfDom;
454
455 info() << "[XmfMeshWriter] Done";
456 return false;
457}
458
459/*---------------------------------------------------------------------------*/
460/*---------------------------------------------------------------------------*/
461
462}
463
464/*---------------------------------------------------------------------------*/
465/*---------------------------------------------------------------------------*/
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Types et macros pour itérer sur les entités du maillage.
#define ENUMERATE_CELL(name, group)
Enumérateur générique d'un groupe de mailles.
#define ENUMERATE_ITEM(name, group)
Enumérateur générique d'un groupe de noeuds.
#define ENUMERATE_NODE(name, group)
Enumérateur générique d'un groupe de noeuds.
#define ARCANE_REGISTER_SUB_DOMAIN_FACTORY(aclass, ainterface, aname)
Enregistre un service de fabrique pour la classe aclass.
Integer size() const
Nombre d'éléments du vecteur.
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.
Maille d'un maillage.
Definition Item.h:1205
EnumeratorT< ItemGroup > Enumerator
Definition Collection.h:129
Interface d'un service d'écriture d'un maillage.
Definition IMeshWriter.h:37
Exception lorsqu'une erreur d'entrée/sortie est détectée.
Definition IOException.h:32
static Integer nbBasicItemType()
nombre de types disponibles
Node node(Int32 i) const
i-ème noeud de l'entité
Definition Item.h:788
Int32 nbNode() const
Nombre de noeuds de l'entité
Definition Item.h:785
ItemUniqueId uniqueId() const
Identifiant unique sur tous les domaines.
Definition Item.h:225
Int16 type() const
Type de l'entité
Definition Item.h:241
Noeud d'un maillage.
Definition Item.h:582
Structure contenant les informations pour créer un service.
Chaîne de caractères unicode.
const char * localstr() const
Retourne la conversion de l'instance dans l'encodage UTF-8.
Definition String.cc:228
bool endsWith(const String &s) const
Indique si la chaîne se termine par les caractères de s.
Definition String.cc:1084
TraceMessage info() const
Flot pour un message d'information.
Vecteur 1D de données avec sémantique par valeur (style STL).
Ecriture des fichiers de maillage aux format xmf.
virtual bool writeMeshToFile(IMesh *mesh, const String &file_name)
Ecrit un maillage sur un fichier.
virtual void build(void)
Construction de niveau build du service.
ItemVariableScalarRefT< Real3 > VariableItemReal3
Grandeur de type coordonn?es 3D.
double toDouble(Real r)
Converti un Real en double.
Definition Convert.h:32
ARCCORE_BASE_EXPORT bool isFileReadable(const String &file_name)
Vérifie que le fichier file_name est accessible et lisible.
ARCCORE_BASE_EXPORT bool removeFile(const String &file_name)
Supprime le fichier file_name.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.
UniqueArray< Integer > IntegerUniqueArray
Tableau dynamique à une dimension d'entiers.
Definition UtilsTypes.h:434