Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
SubDomainBuildInfo.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/* SubDomainBuildInfo.h (C) 2000-2025 */
9/* */
10/* Information for building a subdomain. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_SUBDOMAINBUILDINFO_H
13#define ARCANE_CORE_SUBDOMAINBUILDINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18#include "arcane/utils/Array.h"
19#include "arcane/utils/Ref.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31class IParallelMng;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36/*!
37 * \brief Parameters necessary for building a subdomain.
38
39 Info to create a subdomain associated with the parallelism manager
40 \a parallelMng(), using the data set name \a caseFileName()
41 and content \a caseBytes. \a index() is the index in
42 the list of subdomains for this subdomain's session.
43
44 The file name is purely informative, and only the content \a caseBytes()
45 is used. If \a caseBytes() is not empty, it must contain a
46 valid XML document.
47
48 In domain replication, the instance must be constructed by specifying
49 the IParallelMng corresponding to the set of subdomains and replicas,
50 which is allReplicaParallelMng(). Without replication, this corresponds to the standard
51 parallel manager.
52*/
53class ARCANE_CORE_EXPORT SubDomainBuildInfo
54{
55 public:
56
57 SubDomainBuildInfo(Ref<IParallelMng> pm, Int32 index);
58 SubDomainBuildInfo(Ref<IParallelMng> pm, Int32 index, Ref<IParallelMng> all_replica_pm);
59
60 public:
61
62 Ref<IParallelMng> parallelMng() const
63 {
64 return m_parallel_mng;
65 }
66
67 String caseFileName() const { return m_case_file_name; }
68
69 void setCaseFileName(const String& filename)
70 {
71 m_case_file_name = filename;
72 }
73
74 ByteConstArrayView caseBytes() const;
75 ByteConstSpan caseContent() const;
76
77 void setCaseBytes(ByteConstArrayView bytes);
78 void setCaseContent(ByteConstSpan content);
79
80 Integer index() const { return m_index; }
81
82 Ref<IParallelMng> allReplicaParallelMng() const
83 {
84 return m_all_replica_parallel_mng;
85 }
86
87 private:
88
89 Ref<IParallelMng> m_parallel_mng;
90 String m_case_file_name; //!< Name of the file containing the data set.
91 UniqueArray<std::byte> m_case_content; //!< Data set content
92 Int32 m_index; //!< Subdomain number in the session
93 //! Parallelism manager containing all replicas of m_parallel_mng
94 Ref<IParallelMng> m_all_replica_parallel_mng;
95};
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
100} // End namespace Arcane
101
102/*---------------------------------------------------------------------------*/
103/*---------------------------------------------------------------------------*/
104
105#endif
File containing declarations concerning the message passing model.
Interface of the parallelism manager for a subdomain.
Reference to an instance.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
Span< const std::byte > ByteConstSpan
Read-only view of a 1D array of characters.
Definition UtilsTypes.h:548
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
Definition UtilsTypes.h:476
std::int32_t Int32
Signed integer type of 32 bits.