Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ICaseMeshReader.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/* ICaseMeshReader.h (C) 2000-2025 */
9/* */
10/* Interface for the mesh reading service from the dataset. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ICASEMESHREADER_H
13#define ARCANE_CORE_ICASEMESHREADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Necessary information for reading a mesh file.
30 *
31 * \a isParallelRead() indicates whether it is true that all ranks on which the mesh
32 * is defined will read the file and therefore must distribute it if possible.
33 * in a balanced manner across all ranks.
34 *
35 * \a format() indicates the file format. By default, it is the file extension.
36 * For example, if the file is 'toto.vtk', then the format
37 * will be 'vtk'.
38 */
40{
41 public:
42
43 const String& fileName() const { return m_file_name; }
44 const String& directoryName() const { return m_directory_name; }
45 bool isParallelRead() const { return m_is_parallel_read; }
46 const String& format() const { return m_format; }
47 void setFileName(const String& v) { m_file_name = v; }
48 void setDirectoryName(const String& v) { m_directory_name = v; }
49 void setParallelRead(bool v) { m_is_parallel_read = v; }
50 void setFormat(const String& v) { m_format = v; }
51
52 private:
53
54 String m_file_name;
55 String m_directory_name;
56 String m_format;
57 bool m_is_parallel_read = true;
58};
59
60/*---------------------------------------------------------------------------*/
61/*---------------------------------------------------------------------------*/
62
63/*!
64 * \ingroup StandardService
65 * \brief Interface for the mesh reading service from the dataset.
66 *
67 * This interface is intended to replace IMeshReader
68 */
69class ARCANE_CORE_EXPORT ICaseMeshReader
70{
71 public:
72
73 //! Deallocates resources
74 virtual ~ICaseMeshReader() = default;
75
76 public:
77
78 /*!
79 * \brief Returns a builder to create and read the mesh whose
80 * information is specified in \a read_info.
81 *
82 * If this reader does not support the format specified in \a read_info,
83 * it returns null.
84 */
85 virtual Ref<IMeshBuilder> createBuilder(const CaseMeshReaderReadInfo& read_info) const = 0;
86};
87
88/*---------------------------------------------------------------------------*/
89/*---------------------------------------------------------------------------*/
90
91} // End namespace Arcane
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96#endif
Declarations of Arcane's general types.
Necessary information for reading a mesh file.
Interface for the mesh reading service from the dataset.
virtual Ref< IMeshBuilder > createBuilder(const CaseMeshReaderReadInfo &read_info) const =0
Returns a builder to create and read the mesh whose information is specified in read_info.
virtual ~ICaseMeshReader()=default
Deallocates resources.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --