Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ComponentItemListBuilder.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* ComponentItemListBuilder.cc (C) 2000-2024 */
9/* */
10/* Classe d'aide à la construction d'une liste de ComponentItem. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/materials/internal/ComponentItemListBuilder.h"
15#include "arcane/materials/internal/MeshMaterialVariableIndexer.h"
16
17#include "arcane/utils/MemoryUtils.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Materials
23{
24namespace
25{
26 MemoryAllocationOptions _allocInfo(const String& name)
27 {
28 MemoryAllocationOptions opts(MemoryUtils::getDefaultDataAllocator());
29 opts.setArrayName(name);
30 return opts;
31 }
32} // namespace
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36ComponentItemListBuilder::
37ComponentItemListBuilder()
38{
39}
40
41/*---------------------------------------------------------------------------*/
42/*---------------------------------------------------------------------------*/
43
44ComponentItemListBuilderOld::
45ComponentItemListBuilderOld(MeshMaterialVariableIndexer* var_indexer,
46 Integer begin_index_in_partial)
47: m_component_index(var_indexer->index() + 1)
48, m_index_in_partial(begin_index_in_partial)
49, m_pure_matvar_indexes(_allocInfo("PureMatVarIndexes"))
50, m_partial_matvar_indexes(_allocInfo("PartialMatVarIndexes"))
51, m_partial_local_ids(_allocInfo("PartialLocalIds"))
52, m_indexer(var_indexer)
53{
54 Integer reserve_size = 4000;
55 m_pure_matvar_indexes.reserve(reserve_size);
56 m_partial_matvar_indexes.reserve(reserve_size);
57 m_partial_local_ids.reserve(reserve_size);
58}
59
60/*---------------------------------------------------------------------------*/
61/*---------------------------------------------------------------------------*/
62
63} // End namespace Arcane::Materials
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
Active toujours les traces dans les parties Arcane concernant les matériaux.
Int32 Integer
Type représentant un entier.