14#include "arcane/mesh/ItemConnectivity.h"
15#include "arcane/mesh/ExtraGhostItemsManager.h"
27void ItemConnectivity::
30 ItemVectorView from_items = _sourceFamily()->allItems().own().view();
31 ItemVectorView to_items = _targetFamily()->allItems().own().view();
32 ARCANE_ASSERT((from_items.size() == to_items.size()),
33 (
"Connected families must have the same number of items "))
34 m_item_property.resize(_sourceFamily(),NULL_ITEM_LOCAL_ID);
38 m_item_property[iitem] = to_items[i++].localId();
45void ItemArrayConnectivity::
48 ItemVectorView from_items = _sourceFamily()->allItems().own().view();
49 ItemVectorView to_items = _targetFamily()->allItems().own().view();
50 ARCANE_ASSERT((from_items.size()*m_nb_dof_per_item == to_items.size()),
51 (
"Incorrect connected family size. Should be FromFamily.own.size * nb_element_per_item"))
52 m_item_property.resize(_sourceFamily(),m_nb_dof_per_item,NULL_ITEM_LOCAL_ID);
55 for (Integer j = 0; j < m_nb_dof_per_item ; ++j)
56 m_item_property[iitem][j] = to_items[i++].localId();
63void ItemMultiArrayConnectivity::
64compute(IntegerConstArrayView nb_dof_per_item)
66 ItemVectorView from_items = _sourceFamily()->allItems().own().view();
67 DoFVectorView to_items = _targetFamily()->allItems().own().view();
68 Integer total_nb_dof_per_item = 0;
69 for (Integer i = 0; i < nb_dof_per_item.size(); ++i)
70 total_nb_dof_per_item += nb_dof_per_item[i];
72 ARCANE_ASSERT((total_nb_dof_per_item == to_items.size()),
73 (
"Incorrect connected family size. Should be equal to the sum of array nb_element_per_item elements"))
75 m_item_property.resize(_sourceFamily(),nb_dof_per_item,NULL_ITEM_LOCAL_ID);
79 for (Integer j = 0; j < nb_dof_per_item[iitem->localId()]; ++j)
80 m_item_property[iitem][j] = to_items[i++].localId();
87void ItemConnectivity::
90 ARCANE_ASSERT((
from_items.size() ==
to_items.size()),(
"from_items and to_items arrays must have the same size to update connectivity"))
92 m_item_property.resize(_sourceFamily(),NULL_ITEM_LOCAL_ID);
101void ItemArrayConnectivity::
104 ARCANE_ASSERT((
from_items.size() ==
to_items.size()),(
"from_items and to_items arrays must have the same size to update connectivity"))
106 m_item_property.resize(_sourceFamily(),m_nb_dof_per_item, NULL_ITEM_LOCAL_ID);
110 for (Integer i = 0; i <
from_items.size(); ++i){
120void ItemMultiArrayConnectivity::
124 (
"from_items and to_items arrays must have the same size to update connectivity"))
132 for (Integer i = 0; i <
from_items.size(); ++i)
134 for (Integer i = 0; i <
from_items.size(); ++i)
142 for (Integer i = 0; i <
from_items.size(); ++i){
152void ItemConnectivity::
155 m_item_property.resize(_sourceFamily(), NULL_ITEM_LOCAL_ID);
158 if (m_item_property[item] != NULL_ITEM_LOCAL_ID)
166void ItemArrayConnectivity::
171 for (Integer i = 0; i < m_nb_dof_per_item; ++i)
173 if (m_item_property[item][i] != NULL_ITEM_LOCAL_ID)
174 m_item_property[item][i] =
old_to_new_ids[m_item_property[item][i]];
182void ItemMultiArrayConnectivity::
187 for (Integer i = 0; i < m_item_property.dim2Sizes()[item.localId()]; ++i)
189 if (m_item_property[item][i] != NULL_ITEM_LOCAL_ID)
190 m_item_property[item][i] =
old_to_new_ids[m_item_property[item][i]];
Vue sur un vecteur d'entités.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Vue constante d'un tableau de type T.
Vecteur 1D de données avec sémantique par référence.
ItemVectorViewT< DoF > DoFVectorView
Vue sur un vecteur de degre de liberte.
Int32 Integer
Type représentant un entier.