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

Fixed a bunch of warnings

parent 282b3a71
No related branches found
No related tags found
No related merge requests found
......@@ -188,7 +188,7 @@ int main(int argc, char *argv[])
}
std::ofstream gnuplot("sol.gnu");
for (int j=0; j<mesh.numberOfCells(); ++j) {
for (size_t j=0; j<mesh.numberOfCells(); ++j) {
for (int r=0; r<3; ++r) {
const Rd& x = mesh.xr()[mesh.connectivity().cellNodes()(j,r)];
gnuplot << x[0] << ' ' << x[1] << '\n';
......
......@@ -156,7 +156,7 @@ public:
std::cout << "node_ids.size()=" << node_ids.size() << '\n';
if ((node_ids[0] != 0) or (node_ids[node_ids.size()-1] != node_ids.size()-1)) {
std::cerr << "sparse node numerotation NIY\n";
for (int i=0; i<node_ids.size(); ++i) {
for (size_t i=0; i<node_ids.size(); ++i) {
std::cout << "node_ids[" << i << "] = " << node_ids[i] << '\n';
}
std::exit(0);
......@@ -169,8 +169,8 @@ public:
Kokkos::View<unsigned short*> node_nb_cells("node_nb_cells", node_ids.size());
int max_node_cells = 0;
for (int i=0; i<node_cells_vector.size(); ++i) {
size_t max_node_cells = 0;
for (size_t i=0; i<node_cells_vector.size(); ++i) {
const auto& cells_vector = node_cells_vector[i];
const size_t nb_cells = cells_vector.size();
node_nb_cells[i] = nb_cells;
......@@ -190,10 +190,10 @@ public:
Kokkos::View<unsigned short**> node_cell_local_node("node_cell_local_node",
node_ids.size(), max_node_cells);
Kokkos::parallel_for(m_number_of_nodes, KOKKOS_LAMBDA(const int& r){
for (int J=0; J<node_nb_cells[r]; ++J) {
const int j = node_cells(r,J);
for (int R=0; R<cell_nb_nodes[j]; ++R) {
Kokkos::parallel_for(m_number_of_nodes, KOKKOS_LAMBDA(const unsigned int& r){
for (unsigned short J=0; J<node_nb_cells[r]; ++J) {
const unsigned int j = node_cells(r,J);
for (unsigned int R=0; R<cell_nb_nodes[j]; ++R) {
if (cell_nodes(j,R) == r) {
node_cell_local_node(r,J)=R;
break;
......
......@@ -783,10 +783,10 @@ GmshReader::__proceedData()
cell_nodes(jq,3) = __quadrangles[j][3];
}
const Kokkos::View<unsigned short*> cell_nb_nodes("cell_nb_nodes", nb_cells);
for (int j=0; j<nb_triangles; ++j) {
for (size_t j=0; j<nb_triangles; ++j) {
cell_nb_nodes[j] = 3;
}
for (int j=nb_triangles; j<nb_triangles+nb_quadrangles; ++j) {
for (size_t j=nb_triangles; j<nb_triangles+nb_quadrangles; ++j) {
cell_nb_nodes[j] = 4;
}
m_connectivity = new Connectivity2D(cell_nb_nodes, cell_nodes);
......@@ -803,7 +803,7 @@ GmshReader::__proceedData()
MeshType& mesh = *m_mesh;
std::ofstream gnuplot("mesh.gnu");
for (int j=0; j<mesh.numberOfCells(); ++j) {
for (size_t j=0; j<mesh.numberOfCells(); ++j) {
for (int r=0; r<3; ++r) {
const Rd& x = mesh.xr()[mesh.connectivity().cellNodes()(j,r)];
gnuplot << x[0] << ' ' << x[1] << '\n';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment