1 file + 84 − 40 Side-by-side Compare changes Side-by-side Inline Show whitespace changes Files 1 src/mesh/GmshReader.cpp +84 −40 Original line number Original line Diff line number Diff line Loading @@ -39,7 +39,8 @@ GmshConnectivityBuilder<1>::GmshConnectivityBuilder(const GmshReader::GmshData& Array<int> cell_number_vector(nb_cells); Array<int> cell_number_vector(nb_cells); Array<unsigned int> cell_to_node_row(nb_cells + 1); Array<unsigned int> cell_to_node_row(nb_cells + 1); parallel_for(cell_to_node_row.size(), PUGS_LAMBDA(const CellId cell_id) { cell_to_node_row[cell_id] = 2 * cell_id; }); parallel_for( cell_to_node_row.size(), PUGS_LAMBDA(const CellId cell_id) { cell_to_node_row[cell_id] = 2 * cell_id; }); Array<unsigned int> cell_to_node_list(cell_to_node_row[cell_to_node_row.size() - 1]); Array<unsigned int> cell_to_node_list(cell_to_node_row[cell_to_node_row.size() - 1]); for (CellId cell_id = 0; cell_id < nb_cells; ++cell_id) { for (CellId cell_id = 0; cell_id < nb_cells; ++cell_id) { Loading @@ -62,7 +63,10 @@ GmshConnectivityBuilder<1>::GmshConnectivityBuilder(const GmshReader::GmshData& for (unsigned int r = 0; r < gmsh_data.point_entity.size(); ++r) { for (unsigned int r = 0; r < gmsh_data.point_entity.size(); ++r) { const unsigned int point_number = gmsh_data.point_entity[r]; const unsigned int point_number = gmsh_data.point_entity[r]; ref_points_map[gmsh_data.point_entity_ref[r]].push_back(point_number); auto ref_range = point_to_physical_tag.equal_range(gmsh_data.point_entity_ref[r]); for (auto i_ref = ref_range.first; i_ref != ref_range.second; ++i_ref) { ref_points_map[i_ref->second].push_back(point_number); } } } Array<size_t> node_nb_cell(descriptor.nodeNumberVector().size()); Array<size_t> node_nb_cell(descriptor.nodeNumberVector().size()); Loading Loading @@ -125,7 +129,10 @@ GmshConnectivityBuilder<1>::GmshConnectivityBuilder(const GmshReader::GmshData& for (unsigned int j = 0; j < gmsh_data.edge_entity_ref.size(); ++j) { for (unsigned int j = 0; j < gmsh_data.edge_entity_ref.size(); ++j) { const unsigned int elem_number = j; const unsigned int elem_number = j; ref_cells_map[gmsh_data.edge_entity_ref[j]].push_back(elem_number); auto ref_range = cell_to_physical_tag.equal_range(gmsh_data.edge_entity_ref[j]); for (auto i_ref = ref_range.first; i_ref != ref_range.second; ++i_ref) { ref_cells_map[i_ref->second].push_back(elem_number);
src/mesh/GmshReader.cpp +84 −40 Original line number Original line Diff line number Diff line Loading @@ -39,7 +39,8 @@ GmshConnectivityBuilder<1>::GmshConnectivityBuilder(const GmshReader::GmshData& Array<int> cell_number_vector(nb_cells); Array<int> cell_number_vector(nb_cells); Array<unsigned int> cell_to_node_row(nb_cells + 1); Array<unsigned int> cell_to_node_row(nb_cells + 1); parallel_for(cell_to_node_row.size(), PUGS_LAMBDA(const CellId cell_id) { cell_to_node_row[cell_id] = 2 * cell_id; }); parallel_for( cell_to_node_row.size(), PUGS_LAMBDA(const CellId cell_id) { cell_to_node_row[cell_id] = 2 * cell_id; }); Array<unsigned int> cell_to_node_list(cell_to_node_row[cell_to_node_row.size() - 1]); Array<unsigned int> cell_to_node_list(cell_to_node_row[cell_to_node_row.size() - 1]); for (CellId cell_id = 0; cell_id < nb_cells; ++cell_id) { for (CellId cell_id = 0; cell_id < nb_cells; ++cell_id) { Loading @@ -62,7 +63,10 @@ GmshConnectivityBuilder<1>::GmshConnectivityBuilder(const GmshReader::GmshData& for (unsigned int r = 0; r < gmsh_data.point_entity.size(); ++r) { for (unsigned int r = 0; r < gmsh_data.point_entity.size(); ++r) { const unsigned int point_number = gmsh_data.point_entity[r]; const unsigned int point_number = gmsh_data.point_entity[r]; ref_points_map[gmsh_data.point_entity_ref[r]].push_back(point_number); auto ref_range = point_to_physical_tag.equal_range(gmsh_data.point_entity_ref[r]); for (auto i_ref = ref_range.first; i_ref != ref_range.second; ++i_ref) { ref_points_map[i_ref->second].push_back(point_number); } } } Array<size_t> node_nb_cell(descriptor.nodeNumberVector().size()); Array<size_t> node_nb_cell(descriptor.nodeNumberVector().size()); Loading Loading @@ -125,7 +129,10 @@ GmshConnectivityBuilder<1>::GmshConnectivityBuilder(const GmshReader::GmshData& for (unsigned int j = 0; j < gmsh_data.edge_entity_ref.size(); ++j) { for (unsigned int j = 0; j < gmsh_data.edge_entity_ref.size(); ++j) { const unsigned int elem_number = j; const unsigned int elem_number = j; ref_cells_map[gmsh_data.edge_entity_ref[j]].push_back(elem_number); auto ref_range = cell_to_physical_tag.equal_range(gmsh_data.edge_entity_ref[j]); for (auto i_ref = ref_range.first; i_ref != ref_range.second; ++i_ref) { ref_cells_map[i_ref->second].push_back(elem_number);