Skip to content

Commit e1b4d23

Browse files
Merge pull request #1196 from arcaneframework/dev/gg-rename-componentiteminternallocalid
Rename class 'ComponentItemInternalLocalId' to 'ConstituentItemIndex'
2 parents 3d506f5 + 4ab5774 commit e1b4d23

19 files changed

+122
-119
lines changed

arcane/src/arcane/core/materials/ComponentItem.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void ComponentCell::
2929
_badConversion(ComponentItemInternal* item_internal, Int32 level,Int32 expected_level)
3030
{
3131
ARCANE_FATAL("bad level for internal component cell level={0} expected={1} cid={2} component_id={3}",
32-
level,expected_level,item_internal->_internalLocalId(),item_internal->componentId());
32+
level,expected_level, item_internal->constituentItemIndex(),item_internal->componentId());
3333
}
3434

3535
/*---------------------------------------------------------------------------*/

arcane/src/arcane/core/materials/ComponentItem.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ class ARCANE_CORE_EXPORT ComponentCell
144144
}
145145

146146
//! \internal
147-
ARCCORE_HOST_DEVICE ComponentItemInternalLocalId _internalLocalId() const
147+
ARCCORE_HOST_DEVICE ConstituentItemIndex _internalLocalId() const
148148
{
149-
return m_internal->_internalLocalId();
149+
return m_internal->constituentItemIndex();
150150
}
151151
};
152152

arcane/src/arcane/core/materials/ComponentItemInternal.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ComponentItemSharedInfo* ComponentItemSharedInfo::null_shared_info_pointer = &Co
3434
/*---------------------------------------------------------------------------*/
3535

3636
std::ostream&
37-
operator<<(std::ostream& o,const ComponentItemInternalLocalId& id)
37+
operator<<(std::ostream& o,const ConstituentItemIndex& id)
3838
{
3939
o << id.localId();
4040
return o;

arcane/src/arcane/core/materials/ComponentItemInternal.h

+79-76
Large diffs are not rendered by default.

arcane/src/arcane/core/materials/ComponentItemVector.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ ComponentItemVector(ComponentItemVectorView rhs)
103103
/*---------------------------------------------------------------------------*/
104104

105105
void ComponentItemVector::
106-
_setItems(ConstArrayView<ComponentItemInternalLocalId> globals,
107-
ConstArrayView<ComponentItemInternalLocalId> multiples)
106+
_setItems(ConstArrayView<ConstituentItemIndex> globals,
107+
ConstArrayView<ConstituentItemIndex> multiples)
108108
{
109109
m_p->m_constituent_list->copyPureAndPartial(globals, multiples);
110110
}

arcane/src/arcane/core/materials/ComponentItemVector.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ class ARCANE_CORE_EXPORT ComponentItemVector
133133

134134
protected:
135135

136-
void _setItems(ConstArrayView<ComponentItemInternalLocalId> globals,
137-
ConstArrayView<ComponentItemInternalLocalId> multiples);
136+
void _setItems(ConstArrayView<ConstituentItemIndex> globals,
137+
ConstArrayView<ConstituentItemIndex> multiples);
138138

139139
void _setMatVarIndexes(ConstArrayView<MatVarIndex> globals,
140140
ConstArrayView<MatVarIndex> multiples);

arcane/src/arcane/core/materials/EnvItemVector.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ EnvCellVector(CellVectorView view,IMeshEnvironment* environment)
5353
void EnvCellVector::
5454
_build(CellVectorView view)
5555
{
56-
FixedArray<UniqueArray<ComponentItemInternalLocalId>,2> internals;
56+
FixedArray<UniqueArray<ConstituentItemIndex>,2> internals;
5757
FixedArray<UniqueArray<MatVarIndex>,2> matvar_indexes;
5858
FixedArray<UniqueArray<Int32>,2> local_ids;
5959
IMeshComponent* my_component = _component();

arcane/src/arcane/core/materials/MatItemVector.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ MatCellVector(CellVectorView view,IMeshMaterial* material)
5050
void MatCellVector::
5151
_build(CellVectorView view)
5252
{
53-
FixedArray<UniqueArray<ComponentItemInternalLocalId>,2> internals;
53+
FixedArray<UniqueArray<ConstituentItemIndex>,2> internals;
5454
FixedArray<UniqueArray<MatVarIndex>,2> matvar_indexes;
5555
FixedArray<UniqueArray<Int32>,2> local_ids;
5656
IMeshComponent* my_component = _component();

arcane/src/arcane/core/materials/internal/ConstituentItemLocalIdList.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ class ARCANE_CORE_EXPORT ConstituentItemLocalIdList
4444

4545
public:
4646

47-
void setConstituentItem(Int32 index, ComponentItemInternalLocalId id)
47+
void setConstituentItem(Int32 index, ConstituentItemIndex id)
4848
{
4949
m_item_internal_local_id_list[index] = id;
5050
m_items_internal[index] = m_shared_info->_itemInternal(id);
5151
}
5252

53-
void copy(ConstArrayView<ComponentItemInternalLocalId> ids)
53+
void copy(ConstArrayView<ConstituentItemIndex> ids)
5454
{
5555
const Int32 size = ids.size();
5656
resize(size);
@@ -70,8 +70,8 @@ class ARCANE_CORE_EXPORT ConstituentItemLocalIdList
7070
/*!
7171
* \brief Copie les constituents partitionnés en partie pure et partielle.
7272
*/
73-
void copyPureAndPartial(ConstArrayView<ComponentItemInternalLocalId> pure_ids,
74-
ConstArrayView<ComponentItemInternalLocalId> partial_ids)
73+
void copyPureAndPartial(ConstArrayView<ConstituentItemIndex> pure_ids,
74+
ConstArrayView<ConstituentItemIndex> partial_ids)
7575
{
7676
Int32 nb_pure = pure_ids.size();
7777
Int32 nb_partial = partial_ids.size();
@@ -83,15 +83,15 @@ class ARCANE_CORE_EXPORT ConstituentItemLocalIdList
8383
setConstituentItem(nb_pure + i, partial_ids[i]);
8484
}
8585

86-
ConstArrayView<ComponentItemInternalLocalId> localIds() const
86+
ConstArrayView<ConstituentItemIndex> localIds() const
8787
{
8888
return m_item_internal_local_id_list;
8989
}
9090
matimpl::ConstituentItemBase itemBase(Int32 index) const
9191
{
9292
return m_shared_info->_item(localId(index));
9393
}
94-
ComponentItemInternalLocalId localId(Int32 index) const
94+
ConstituentItemIndex localId(Int32 index) const
9595
{
9696
return m_item_internal_local_id_list[index];
9797
}
@@ -111,8 +111,8 @@ class ARCANE_CORE_EXPORT ConstituentItemLocalIdList
111111
//! Liste des ComponentItemInternal* pour ce constituant.
112112
UniqueArray<ComponentItemInternal*> m_items_internal;
113113

114-
//! Liste des ComponentItemInternalLocalId pour ce constituant.
115-
UniqueArray<ComponentItemInternalLocalId> m_item_internal_local_id_list;
114+
//! Liste des ConstituentItemIndex pour ce constituant.
115+
UniqueArray<ConstituentItemIndex> m_item_internal_local_id_list;
116116

117117
ComponentItemSharedInfo* m_shared_info = nullptr;
118118

arcane/src/arcane/materials/AllEnvData.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ _computeInfosForEnvCells()
262262
++current_pos[lid];
263263
Int16 nb_mat = m_component_connectivity_list->cellNbMaterial(CellLocalId(lid), env_id);
264264
matimpl::ConstituentItemBase ref_ii = m_item_internal_data.envItemBase(pos);
265-
ComponentItemInternalLocalId cii_lid = all_env_items_internal_range[lid];
265+
ConstituentItemIndex cii_lid = all_env_items_internal_range[lid];
266266
env->setConstituentItem(z, ref_ii._internalLocalId());
267267
ref_ii._setSuperAndGlobalItem(cii_lid, ItemLocalId(lid));
268268
ref_ii._setNbSubItem(nb_mat);

arcane/src/arcane/materials/ComponentItemInternalData.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,22 @@ endCreate()
122122
void ComponentItemInternalData::
123123
_resetItemsInternal()
124124
{
125-
ComponentItemInternalLocalId internal_local_id;
125+
ConstituentItemIndex internal_local_id;
126126
ArrayView<ComponentItemInternal> all_env_storage = m_all_env_item_internal_storage;
127127
ArrayView<ComponentItemInternal> env_storage = m_env_item_internal_storage;
128128
ArrayView<ComponentItemInternal> mat_storage = m_mat_item_internal_storage;
129129

130130
ComponentItemSharedInfo* all_env_shared_info = allEnvSharedInfo();
131-
for (ComponentItemInternalLocalId id : m_all_env_items_internal_range)
131+
for (ConstituentItemIndex id : m_all_env_items_internal_range)
132132
all_env_storage[id.localId()]._reset(id, all_env_shared_info);
133133

134134
ComponentItemSharedInfo* env_shared_info = envSharedInfo();
135-
for (ComponentItemInternalLocalId id : m_env_items_internal_range)
135+
for (ConstituentItemIndex id : m_env_items_internal_range)
136136
env_storage[id.localId()]._reset(id, env_shared_info);
137137

138138
ComponentItemSharedInfo* mat_shared_info = matSharedInfo();
139139
for (ComponentItemInternalRange mat_range : m_mat_items_internal_range) {
140-
for (ComponentItemInternalLocalId id : mat_range)
140+
for (ConstituentItemIndex id : mat_range)
141141
mat_storage[id.localId()]._reset(id, mat_shared_info);
142142
}
143143
}

arcane/src/arcane/materials/MeshComponentData.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ _changeLocalIdsForInternalList(Int32ConstArrayView old_to_new_ids)
126126
{
127127
// TODO: regarder s'il est possible de supprimer le tableau temporaire
128128
// new_internals (c'est à peu près sur que c'est possible).
129-
ConstArrayView<ComponentItemInternalLocalId> current_internals(m_constituent_local_id_list.localIds());
130-
UniqueArray<ComponentItemInternalLocalId> new_internals;
129+
ConstArrayView<ConstituentItemIndex> current_internals(m_constituent_local_id_list.localIds());
130+
UniqueArray<ConstituentItemIndex> new_internals;
131131

132132
Int32ConstArrayView local_ids = variableIndexer()->localIds();
133133

arcane/src/arcane/materials/MeshEnvironment.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ computeMaterialIndexes(ComponentItemInternalData* item_internal_data)
209209
Int32UniqueArray cells_pos(max_local_id);
210210
//TODO: regarder comment supprimer ce tableau cells_env qui n'est normalement pas utile
211211
// car on doit pouvoir directement utiliser les m_items_internal
212-
UniqueArray<ComponentItemInternalLocalId> cells_env(max_local_id);
212+
UniqueArray<ConstituentItemIndex> cells_env(max_local_id);
213213

214214
{
215215
Integer cell_index = 0;

arcane/src/arcane/materials/internal/ComponentItemInternalData.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ComponentItemInternalRange
5353

5454
public:
5555

56-
ComponentItemInternalLocalId operator*() const { return ComponentItemInternalLocalId(m_current_value); }
56+
ConstituentItemIndex operator*() const { return ConstituentItemIndex(m_current_value); }
5757
void operator++() { ++m_current_value; }
5858
bool operator==(const Sentinel&) const
5959
{
@@ -72,10 +72,10 @@ class ComponentItemInternalRange
7272

7373
public:
7474

75-
ComponentItemInternalLocalId operator[](Int32 index) const
75+
ConstituentItemIndex operator[](Int32 index) const
7676
{
7777
ARCANE_CHECK_AT(index, m_nb_value);
78-
return ComponentItemInternalLocalId(m_first_index + index);
78+
return ConstituentItemIndex(m_first_index + index);
7979
}
8080

8181
public:
@@ -94,7 +94,7 @@ class ComponentItemInternalRange
9494
return {};
9595
}
9696
Int32 size() const { return m_nb_value; }
97-
ComponentItemInternalLocalId firstValue() const { return ComponentItemInternalLocalId(m_first_index); }
97+
ConstituentItemIndex firstValue() const { return ConstituentItemIndex(m_first_index); }
9898

9999
private:
100100

@@ -127,8 +127,8 @@ class ComponentItemInternalData
127127

128128
private:
129129

130-
UniqueArray<ComponentItemInternalLocalId> m_first_sub_constituent_item_id_list;
131-
UniqueArray<ComponentItemInternalLocalId> m_super_component_item_local_id_list;
130+
UniqueArray<ConstituentItemIndex> m_first_sub_constituent_item_id_list;
131+
UniqueArray<ConstituentItemIndex> m_super_component_item_local_id_list;
132132
UniqueArray<Int16> m_component_id_list;
133133
UniqueArray<Int16> m_nb_sub_constituent_item_list;
134134
UniqueArray<Int32> m_global_item_local_id_list;

arcane/src/arcane/materials/internal/MeshComponentData.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class MeshComponentData
8383
return m_constituent_local_id_list.itemBase(index);
8484
}
8585

86-
void _setConstituentItem(Int32 index, ComponentItemInternalLocalId id)
86+
void _setConstituentItem(Int32 index, ConstituentItemIndex id)
8787
{
8888
return m_constituent_local_id_list.setConstituentItem(index, id);
8989
}
@@ -135,7 +135,7 @@ class MeshComponentData
135135
//! Infos pour l'indexation des variables partielles.
136136
MeshMaterialVariableIndexer* m_variable_indexer = nullptr;
137137

138-
//! Liste des ComponentItemInternalLocalId pour ce constituant.
138+
//! Liste des ConstituentItemIndex pour ce constituant.
139139
ConstituentItemLocalIdList m_constituent_local_id_list;
140140

141141
MeshComponentPartData* m_part_data = nullptr;

arcane/src/arcane/materials/internal/MeshEnvironment.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class MeshEnvironment
135135

136136
public:
137137

138-
void setConstituentItem(Int32 index, ComponentItemInternalLocalId id)
138+
void setConstituentItem(Int32 index, ConstituentItemIndex id)
139139
{
140140
m_data._setConstituentItem(index,id);
141141
}

arcane/src/arcane/materials/internal/MeshMaterial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class MeshMaterial
128128

129129
public:
130130

131-
void setConstituentItem(Int32 index, ComponentItemInternalLocalId id)
131+
void setConstituentItem(Int32 index, ConstituentItemIndex id)
132132
{
133133
m_data._setConstituentItem(index,id);
134134
}

arcane/tools/wrapper/materials/csharp/ComponentItem.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public ComponentItemInternal* Internal
2222
set { m_internal = value; }
2323
}
2424

25-
public Cell GlobalCell { get { return m_internal->m_shared_info->GlobalCell(m_internal->m_component_item_internal_local_id); } }
26-
public MatVarIndex MatVarIndex { get { return m_internal->m_shared_info->VarIndex(m_internal->m_component_item_internal_local_id); } }
25+
public Cell GlobalCell { get { return m_internal->m_shared_info->GlobalCell(m_internal->m_component_item_index); } }
26+
public MatVarIndex MatVarIndex { get { return m_internal->m_shared_info->VarIndex(m_internal->m_component_item_index); } }
2727
internal int _matvarArrayIndex { get { return MatVarIndex.ArrayIndex; } }
2828
internal int _matvarValueIndex { get { return MatVarIndex.ValueIndex; } }
2929

@@ -45,8 +45,8 @@ public ComponentItemInternal* Internal
4545
get { return m_internal; }
4646
set { m_internal = value; }
4747
}
48-
public Cell GlobalCell { get { return m_internal->m_shared_info->GlobalCell(m_internal->m_component_item_internal_local_id); } }
49-
public MatVarIndex MatVarIndex { get { return m_internal->m_shared_info->VarIndex(m_internal->m_component_item_internal_local_id); } }
48+
public Cell GlobalCell { get { return m_internal->m_shared_info->GlobalCell(m_internal->m_component_item_index); } }
49+
public MatVarIndex MatVarIndex { get { return m_internal->m_shared_info->VarIndex(m_internal->m_component_item_index); } }
5050
internal int _matvarArrayIndex { get { return MatVarIndex.ArrayIndex; } }
5151
internal int _matvarValueIndex { get { return MatVarIndex.ValueIndex; } }
5252
[Obsolete("This method is internal to Arcane")]
@@ -66,8 +66,8 @@ public ComponentItemInternal* Internal
6666
set { m_internal = value; }
6767
}
6868

69-
public Cell GlobalCell { get { return m_internal->m_shared_info->GlobalCell(m_internal->m_component_item_internal_local_id); } }
70-
public MatVarIndex MatVarIndex { get { return m_internal->m_shared_info->VarIndex(m_internal->m_component_item_internal_local_id); } }
69+
public Cell GlobalCell { get { return m_internal->m_shared_info->GlobalCell(m_internal->m_component_item_index); } }
70+
public MatVarIndex MatVarIndex { get { return m_internal->m_shared_info->VarIndex(m_internal->m_component_item_index); } }
7171
internal int _matvarArrayIndex { get { return MatVarIndex.ArrayIndex; } }
7272
internal int _matvarValueIndex { get { return MatVarIndex.ValueIndex; } }
7373

arcane/tools/wrapper/materials/csharp/ComponentItemInternal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ internal MatVarIndex VarIndex(Int32 constituent_local_id)
3737
[StructLayout(LayoutKind.Sequential)]
3838
public unsafe struct ComponentItemInternal
3939
{
40-
internal Int32 m_component_item_internal_local_id;
40+
internal Int32 m_component_item_index;
4141
internal ComponentItemSharedInfo* m_shared_info;
4242
}
4343

0 commit comments

Comments
 (0)