Skip to content
Snippets Groups Projects
Commit 87fb228d authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Rename few variables and Connectivity members

parent 6a7a39e6
Branches
Tags
1 merge request!6Feature/crs
......@@ -109,17 +109,17 @@ void Connectivity<3>::_computeFaceCellConnectivities()
m_cell_to_face_matrix = cell_to_face_vector;
}
FaceValuePerCell<bool> cell_to_face_is_reversed(*this);
FaceValuePerCell<bool> cell_face_is_reversed(*this);
{
for (const auto& face_cells_vector : face_cells_map) {
const auto& cells_vector = face_cells_vector.second;
for (unsigned short lj=0; lj<cells_vector.size(); ++lj) {
const auto& [cell_number, cell_local_face, reversed] = cells_vector[lj];
cell_to_face_is_reversed(cell_number, cell_local_face) = reversed;
cell_face_is_reversed(cell_number, cell_local_face) = reversed;
}
}
m_cell_to_face_is_reversed_matrix = cell_to_face_is_reversed;
m_cell_face_is_reversed = cell_face_is_reversed;
}
{
......@@ -145,11 +145,11 @@ void Connectivity<3>::_computeFaceCellConnectivities()
m_connectivity_computer.computeInverseConnectivityMatrix(m_cell_to_face_matrix,
m_face_to_cell_matrix);
m_face_to_cell_local_face_matrix = CellValuePerFace<unsigned short>(*this);
m_face_to_cell_local_face = CellValuePerFace<unsigned short>(*this);
m_connectivity_computer.computeLocalChildItemNumberInItem(m_cell_to_face_matrix,
m_face_to_cell_matrix,
m_face_to_cell_local_face_matrix);
m_face_to_cell_local_face);
#warning check that the number of cell per faces is <=2
std::unordered_map<unsigned int, std::vector<unsigned int>> node_faces_map;
......
......@@ -232,14 +232,14 @@ public:
ConnectivityMatrix m_cell_to_node_matrix;
ConnectivityMatrix m_cell_to_face_matrix;
FaceValuePerCell<bool> m_cell_to_face_is_reversed_matrix;
FaceValuePerCell<bool> m_cell_face_is_reversed;
ConnectivityMatrix m_face_to_cell_matrix;
CellValuePerFace<unsigned short> m_face_to_cell_local_face_matrix;
CellValuePerFace<unsigned short> m_face_to_cell_local_face;
ConnectivityMatrix m_face_to_node_matrix;
ConnectivityMatrix m_node_to_cell_matrix;
CellValuePerNode<unsigned short> m_node_to_cell_local_node_matrix;
CellValuePerNode<unsigned short> m_node_to_cell_local_node;
template <TypeOfItem SubItemType,
TypeOfItem ItemType>
......@@ -351,11 +351,11 @@ private:
m_connectivity_computer.computeInverseConnectivityMatrix(m_cell_to_node_matrix,
m_node_to_cell_matrix);
m_node_to_cell_local_node_matrix = CellValuePerNode<unsigned short>(*this);
m_node_to_cell_local_node = CellValuePerNode<unsigned short>(*this);
m_connectivity_computer.computeLocalChildItemNumberInItem(m_cell_to_node_matrix,
m_node_to_cell_matrix,
m_node_to_cell_local_node_matrix);
m_node_to_cell_local_node);
if constexpr (Dimension>1) {
this->_computeFaceCellConnectivities();
}
......
......@@ -134,11 +134,11 @@ class MeshData
node_id_to_local[cell_nodes(R)] = R;
}
const auto& cell_faces = m_mesh.connectivity().m_cell_to_face_matrix.rowConst(j);
const auto& cell_faces_is_reversed = m_mesh.connectivity().m_cell_to_face_is_reversed_matrix.itemValues(j);
const auto& cell_face_is_reversed = m_mesh.connectivity().m_cell_face_is_reversed.itemValues(j);
for (size_t L=0; L<cell_faces.length; ++L) {
const size_t l = cell_faces(L);
const auto& face_nodes = m_mesh.connectivity().m_face_to_node_matrix.rowConst(l);
if (cell_faces_is_reversed[L]) {
if (cell_face_is_reversed[L]) {
for (size_t rl = 0; rl<face_nodes.length; ++rl) {
m_Cjr(j, node_id_to_local[face_nodes(rl)]) -= Nlr(l,rl);
}
......
......@@ -101,7 +101,7 @@ class AcousticSolver
Kokkos::parallel_for(m_mesh.numberOfNodes(), KOKKOS_LAMBDA(const int& r) {
Rdd sum = zero;
const auto& node_to_cell = m_connectivity.m_node_to_cell_matrix.rowConst(r);
const auto& node_to_cell_local_node = m_connectivity.m_node_to_cell_local_node_matrix.itemValues(r);
const auto& node_to_cell_local_node = m_connectivity.m_node_to_cell_local_node.itemValues(r);
for (size_t j=0; j<node_to_cell.length; ++j) {
const unsigned int J = node_to_cell(j);
const unsigned int R = node_to_cell_local_node[j];
......@@ -123,7 +123,7 @@ class AcousticSolver
Rd& br = m_br(r);
br = zero;
const auto& node_to_cell = m_connectivity.m_node_to_cell_matrix.rowConst(r);
const auto& node_to_cell_local_node = m_connectivity.m_node_to_cell_local_node_matrix.itemValues(r);
const auto& node_to_cell_local_node = m_connectivity.m_node_to_cell_local_node.itemValues(r);
for (size_t j=0; j<node_to_cell.length; ++j) {
const unsigned int J = node_to_cell(j);
const unsigned int R = node_to_cell_local_node[j];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment