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

Begin use of Partitioner

parent ac58a1af
No related branches found
No related tags found
1 merge request!11Feature/mpi
......@@ -309,10 +309,37 @@ GmshReader::GmshReader(const std::string& filename)
CSRGraph mesh_graph;
if (commRank() == 0) {
mesh_graph = m_mesh->cellToCellGraph();
}
CellValue<int> cell_parts;
switch(m_mesh->meshDimension())
{
case 1: {
Mesh<Connectivity1D>& mesh = dynamic_cast<Mesh<Connectivity1D>&>(*m_mesh);
CellValue<int> mesh_cell_parts(mesh.connectivity());
cell_parts = mesh_cell_parts;
break;
}
case 2: {
Mesh<Connectivity2D>& mesh = dynamic_cast<Mesh<Connectivity2D>&>(*m_mesh);
CellValue<int> mesh_cell_parts(mesh.connectivity());
cell_parts = mesh_cell_parts;
break;
}
case 3: {
Mesh<Connectivity3D>& mesh = dynamic_cast<Mesh<Connectivity3D>&>(*m_mesh);
CellValue<int> mesh_cell_parts(mesh.connectivity());
cell_parts = mesh_cell_parts;
break;
}
default:{
perr() << "unexpected mesh dimension\n";
Messenger::destroy();
std::exit(1);
}
}
Partitioner P;
Array<int> new_cell_owner = P.partition(mesh_graph);
cell_parts = P.partition(mesh_graph);
}
Messenger::destroy();
std::exit(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment