Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
MeshReaderMng.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/* MeshReaderMng.h (C) 2000-2025 */
9/* */
10/* Mesh reader manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MESHREADERMNG_H
13#define ARCANE_CORE_MESHREADERMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*!
31 * \brief Mesh reader manager.
32 */
33class ARCANE_CORE_EXPORT MeshReaderMng
34{
35 class Impl;
36
37 public:
38
39 MeshReaderMng(ISubDomain* sd);
40 MeshReaderMng(const MeshReaderMng&) = delete;
41 ~MeshReaderMng();
42 const MeshReaderMng& operator=(const MeshReaderMng&) = delete;
43
44 public:
45
46 /*!
47 * \brief Reads the mesh whose file name is \a file_name.
48 *
49 * \a file_name must have an extension and the reader used is based
50 * on this extension.
51 * The created mesh is associated with a sequential \a IParallelMng
52 * and will be named \a mesh_name.
53 *
54 * This method throws an exception if the mesh cannot be read.
55 */
56 IMesh* readMesh(const String& mesh_name, const String& file_name);
57
58 /*!
59 * \brief Reads the mesh whose file name is \a file_name.
60 *
61 * \a file_name must have an extension and the reader used is based
62 * on this extension.
63 * The created mesh is associated with the parallelism manager
64 * \a parallel_mng and will be named \a mesh_name.
65 *
66 * This method throws an exception if the mesh cannot be read.
67 */
68 IMesh* readMesh(const String& mesh_name, const String& file_name,
69 IParallelMng* parallel_mng);
70
71 /*!
72 * \brief If true, indicates that the unit system possibly present
73 * in the file format is used (\a true by default).
74 *
75 * This method must be called before calling readMesh() for it to
76 * be taken into account.
77 */
78 void setUseMeshUnit(bool v);
79 //! Indicates whether the unit system present in the file is used
80 bool isUseMeshUnit() const;
81
82 private:
83
84 Impl* m_p;
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90} // End namespace Arcane
91
92/*---------------------------------------------------------------------------*/
93/*---------------------------------------------------------------------------*/
94
95#endif
Declarations of Arcane's general types.
File containing declarations concerning the message passing model.
Interface of the parallelism manager for a subdomain.
Interface of the subdomain manager.
Definition ISubDomain.h:75
IMesh * readMesh(const String &mesh_name, const String &file_name)
Reads the mesh whose file name is file_name.
void setUseMeshUnit(bool v)
If true, indicates that the unit system possibly present in the file format is used (true by default)...
bool isUseMeshUnit() const
Indicates whether the unit system present in the file is used.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --