Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ConstituentItemVectorBuildInfo.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/* ConstituentItemVectorBuildInfo.h (C) 2000-2025 */
9/* */
10/* Construction options for 'ComponentItemVector'. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MATERIALS_CONSTITUENTITEMVECTORBUILDINFO_H
13#define ARCANE_CORE_MATERIALS_CONSTITUENTITEMVECTORBUILDINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/ItemGroup.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Materials
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Construction options for 'ComponentItemVector' and
30 *
31 * This class allows specifying the arguments to construct
32 * instances of ComponentItemVector, MatCellVector or EnvCellVector.
33 *
34 * It is possible to construct it from a CellGroup, a CellVectorView
35 * or a list of localIds().
36 */
37class ARCANE_CORE_EXPORT ConstituentItemVectorBuildInfo
38{
39 friend class MatCellVector;
40 friend class EnvCellVector;
41
42 private:
43
44 //! Type used to construct the instance.
45 enum class eBuildListType
46 {
47 Group,
48 VectorView,
49 LocalIds
50 };
51
52 public:
53
54 //! Construction from entities of the group \a group
55 explicit ConstituentItemVectorBuildInfo(const CellGroup& group);
56 //! Construction from entities of the view \a view
58 //! Construction from entities having local numbers \a local_ids
60
61 private:
62
63 SmallSpan<const Int32> _localIds() const;
64
65 private:
66
67 CellGroup m_group;
68 CellVectorView m_view;
69 SmallSpan<const Int32> m_local_ids;
70 eBuildListType m_build_list_type;
71};
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76} // namespace Arcane::Materials
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81#endif
ConstituentItemVectorBuildInfo(const CellGroup &group)
Construction from entities of the group group.
View of an array of elements of type T.
Definition Span.h:805
ItemGroupT< Cell > CellGroup
Group of cells.
Definition ItemTypes.h:184
ItemVectorViewT< Cell > CellVectorView
View over a vector of cells.
Definition ItemTypes.h:305
Always enables tracing in Arcane parts concerning materials.