Skip to content

Commit

Permalink
Merge pull request #790 from michal-toth/feature/graph-of-grid-second…
Browse files Browse the repository at this point in the history
…-try

Add functions that process output from Zoltan
  • Loading branch information
blattms authored Nov 28, 2024
2 parents ec75718 + 8e60e33 commit 31946cc
Show file tree
Hide file tree
Showing 11 changed files with 1,096 additions and 241 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ if(MPI_FOUND)
if(NOT MPIEXEC_EXECUTABLE)
set(MPIEXEC_EXECUTABLE ${MPIEXEC})
endif()
add_test(addLgrsOnDistributedGrid_test_parallel ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 4 bin/addLgrsOnDistributedGrid_test)
add_test(addLgrsOnDistributedGrid_test_parallel ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 4 bin/addLgrsOnDistributedGrid_test)
add_test(distribution_test_parallel ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 4 bin/distribution_test)
if(Boost_VERSION_STRING VERSION_GREATER 1.53)
add_test(inactiveCell_lgr_test_parallel ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 4 bin/inactiveCell_lgr_test)
add_test(test_graphofgrid_parallel3 ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 3 bin/test_graphofgrid_parallel)
add_test(test_graphofgrid_parallel ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 4 bin/test_graphofgrid_parallel)
endif()
add_test(test_communication_utils_parallel ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 4 bin/test_communication_utils)
endif()
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ list (APPEND MAIN_SOURCE_FILES
opm/grid/ColumnExtract.cpp
opm/grid/FaceQuadrature.cpp
opm/grid/GraphOfGrid.cpp
opm/grid/GraphOfGridWrappers.cpp
opm/grid/GridHelpers.cpp
opm/grid/GridManager.cpp
opm/grid/GridUtilities.cpp
Expand Down Expand Up @@ -128,6 +129,7 @@ if(Boost_VERSION_STRING VERSION_GREATER 1.53)
tests/cpgrid/lookupdataCpGrid_test.cpp
tests/cpgrid/shifted_cart_test.cpp
tests/test_graphofgrid.cpp
tests/test_graphofgrid_parallel.cpp
)
endif()

Expand Down
4 changes: 3 additions & 1 deletion opm/grid/GraphOfGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
Expand All @@ -31,10 +31,12 @@ namespace Opm{
template<typename Grid>
void GraphOfGrid<Grid>::createGraph ()
{
const auto& rank = grid.comm().rank();
// load vertices (grid cells) into graph
for (auto it=grid.template leafbegin<0>(); it!=grid.template leafend<0>(); ++it)
{
VertexProperties vertex;
vertex.nproc = rank;
// get vertex's global ID
int gID = grid.globalIdSet().id(*it);

Expand Down
2 changes: 1 addition & 1 deletion opm/grid/GraphOfGrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
Expand Down
Loading

0 comments on commit 31946cc

Please sign in to comment.