Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
LegacyMeshBuilder.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/* LegacyMeshBuilder.h (C) 2000-2023 */
9/* */
10/* Mesh construction via the "historical" method. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_INTERNAL_LEGACYMESHBUILDER_H
13#define ARCANE_IMPL_INTERNAL_LEGACYMESHBUILDER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/Array.h"
19#include "arcane/utils/ScopedPtr.h"
20
21#include "arcane/core/XmlNode.h"
22#include "arcane/core/MeshHandle.h"
23#include "arcane/core/IInitialPartitioner.h"
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane
29{
30class IPrimaryMesh;
32class IMeshReader;
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
43class ARCANE_IMPL_EXPORT LegacyMeshBuilder
44: public TraceAccessor
45{
46 struct MeshBuildInfo
47 {
48 public:
49
50 MeshBuildInfo()
51 : m_dir_name(".")
52 , m_mesh(nullptr)
53 {}
54
55 public:
56
57 XmlNode m_xml_node;
58 String m_orig_file_name;
59 String m_file_name;
60 String m_dir_name;
61 MeshHandle m_mesh_handle;
62 IPrimaryMesh* m_mesh;
63 };
64
65 public:
66
67 LegacyMeshBuilder(ISubDomain* sd, MeshHandle default_mesh_handle);
68
69 public:
70
71 void readCaseMeshes();
72 void createDefaultMesh();
73 void readMeshes();
74 void allocateMeshes();
75 void initializeMeshVariablesFromCaseFile();
76
77 private:
78
79 ISubDomain* m_sub_domain;
80 MeshHandle m_default_mesh_handle;
81 //TODO make private
82 public:
83
86 String m_internal_partitioner_name;
89
90 private:
91
92 void _readMesh(ConstArrayView<Ref<IMeshReader>> mesh_readers, const MeshBuildInfo& mbi);
93 void _createMeshesHandle();
94};
95
96/*---------------------------------------------------------------------------*/
97/*---------------------------------------------------------------------------*/
98
99} // End namespace Arcane
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
103
104#endif
Constant view of an array of type T.
Interface of an initial partitioner.
Interface of the service managing the reading of a mesh.
Definition IMeshReader.h:33
Interface of the subdomain manager.
Definition ISubDomain.h:75
void _readMesh(ConstArrayView< Ref< IMeshReader > > mesh_readers, const MeshBuildInfo &mbi)
ScopedPtrT< IInitialPartitioner > m_initial_partitioner
Initial partitioner.
bool m_use_partitioner_tester
basic partitioner for metis
UniqueArray< MeshBuildInfo > m_meshes_build_info
Info to build a mesh.
bool m_use_internal_mesh_partitioner
true if it partitions the mesh internally
Handle on a mesh.
Definition MeshHandle.h:48
Reference to an instance.
Encapsulation of an automatically destructing pointer.
Definition ScopedPtr.h:44
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
Node of a DOM tree.
Definition XmlNode.h:51
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --