Skip to content
Snippets Groups Projects

HostGrid can provide geomTypes in container not std::vector

Merged Simon Praetorius requested to merge issue/grid-geomtypes into master
1 file
+ 8
5
Compare changes
  • Side-by-side
  • Inline
@@ -315,9 +315,10 @@ namespace Dune
if( hostGrid.comm().size() > 1 )
DUNE_THROW( InvalidStateException, "ParallelGrid can only be used with serial host grids." );
for( int i = 0; i <= HostGrid::dimension; ++i )
geomTypes_.push_back( hostGrid.levelGridView( 0 ).indexSet().types( i ) );
for( int i = 0; i <= HostGrid::dimension; ++i ) {
auto types = hostGrid.levelGridView( 0 ).indexSet().types( i );
geomTypes_.emplace_back(std::begin(types), std::end(types));
}
sizeCache_.reset();
for (std::size_t i = 0; i < hostGrid.numBoundarySegments(); ++i)
@@ -347,8 +348,10 @@ namespace Dune
if( hostGrid->comm().size() > 1 )
DUNE_THROW( InvalidStateException, "ParallelGrid can only be used with serial host grids." );
for( int i = 0; i <= HostGrid::dimension; ++i )
geomTypes_.push_back( hostGrid->levelGridView( 0 ).indexSet().types( i ) );
for( int i = 0; i <= HostGrid::dimension; ++i ) {
auto types = hostGrid->levelGridView( 0 ).indexSet().types( i );
geomTypes_.emplace_back(std::begin(types), std::end(types));
}
sizeCache_.reset();
Loading