Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • extensions/dune-metagrid
  • tkoch/dune-metagrid
2 results
Show changes
Commits on Source (4)
Module: dune-metagrid
Version: 2.8-git
Version: 2.9-git
Maintainer: dune-devel@lists.dune-project.org
Depends: dune-grid (>= 2.8) dune-alugrid (>= 2.8)
Suggests: dune-spgrid (>= 2.8)
......@@ -116,6 +116,11 @@ namespace Dune
return hostEntity().type();
}
unsigned int subEntities( const unsigned int cd ) const
{
return hostEntity().subEntities( cd );
}
/** \brief obtain the level of this entity */
int level () const
{
......@@ -274,11 +279,6 @@ namespace Dune
/** \} */
unsigned int subEntities( const unsigned int codim ) const
{
return hostEntity().subEntities( codim );
}
template< int codim >
int count () const
{
......
......@@ -305,12 +305,19 @@ namespace Dune
leafIndexSet_( 0 ),
localIdSet_( hostGrid.localIdSet() ),
rankManager_( *this ),
geomTypes_(),
sizeCache_( *this ),
adaptMarkers_( hostGrid.leafIndexSet().size( 0 ), std::numeric_limits< int >::min() )
{
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 )
{
auto types = hostGrid.levelGridView( 0 ).indexSet().types( i );
geomTypes_.push_back( types );
}
sizeCache_.reset();
}
......@@ -330,12 +337,19 @@ namespace Dune
leafIndexSet_( 0 ),
localIdSet_( hostGrid->localIdSet() ),
rankManager_( *this ),
geomTypes_(),
sizeCache_( *this ),
adaptMarkers_( hostGrid->leafIndexSet().size( 0 ), std::numeric_limits< int >::min() )
{
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 )
{
auto types = hostGrid.levelGridView( 0 ).indexSet().types( i );
geomTypes_.push_back( types );
}
sizeCache_.reset();
}
......@@ -650,6 +664,12 @@ namespace Dune
return ghostSize( codim );
}
//! return geometry types for codim
const std::vector< GeometryType > &geomTypes ( const int codim ) const
{
return geomTypes_[ codim ];
}
/** \brief communicate information on a grid level
*
* \param datahandle communication data handle (user defined)
......@@ -900,6 +920,8 @@ namespace Dune
mutable LocalIdSet localIdSet_;
RankManager rankManager_ ;
std::vector< std::vector< GeometryType > > geomTypes_;
SizeCache sizeCache_;
std::vector< int > adaptMarkers_;
......
......@@ -99,7 +99,7 @@ namespace Dune
void ldbUpdateVertex ( const Element &element, DataBase &db )
{
typedef typename Element::Geometry::GlobalCoordinate GlobalCoordinate;
//typedef typename Element::Geometry::GlobalCoordinate GlobalCoordinate;
const int index = indexSet_.index( element );
const int wght = weight( element );
......
set(GRIDTYPE ALUGRID_CUBE)
#set(GRIDTYPE YASPGRID)
set(GRIDDIM 3)
set(GRIDDIM 2)
set(WORLDDIM ${GRIDDIM})
set(METAGRIDS idgrid)
# set(METAGRIDS idgrid,idgrid,idgrid)
# set(TESTS test-cacheitgrid test-cartesiangrid test-filteredgrid test-idgrid test-metagrids test-parallelgrid test-sfc test-prismgrid)
set(TESTS test-cartesiangrid test-idgrid )
set(TESTS test-cartesiangrid test-idgrid test-parallelgrid )
foreach(_executable ${TESTS})
dune_add_test(NAME ${_executable} SOURCES ${_executable}.cc)
......
......@@ -44,8 +44,8 @@ void checkCapabilities(const Grid& grid)
#else
false ;
#endif
static_assert( Dune::Capabilities::isParallel< Grid > :: v == reallyParallel,
"isParallel is not set correctly");
//static_assert( Dune::Capabilities::isParallel< Grid > :: v == reallyParallel,
// "isParallel is not set correctly");
static const bool reallyCanCommunicate =
#if ALU3DGRID_PARALLEL && ALU2DGRID_PARALLEL
......@@ -100,12 +100,6 @@ void writeFile( const GridView& gridView )
template <class GridType>
void checkSerial(GridType & grid, int mxl = 2, const bool display = false)
{
if( display )
{
GrapeGridDisplay< GridType > grape( grid );
grape.display();
}
// be careful, each global refine create 8 x maxlevel elements
std::cout << " CHECKING: Macro" << std::endl;
//gridcheck(grid);
......@@ -119,23 +113,11 @@ void checkSerial(GridType & grid, int mxl = 2, const bool display = false)
//gridcheck(grid);
std::cout << " CHECKING: intersections" << std::endl;
//checkIntersectionIterator(grid);
if( display )
{
GrapeGridDisplay< GridType > grape( grid );
grape.display();
}
}
// check also non-conform grids
//makeNonConfGrid(grid,0,1);
if( display )
{
GrapeGridDisplay< GridType > grape( grid );
grape.display();
}
//std::cout << " CHECKING: non-conform" << std::endl;
//gridcheck(grid);
......@@ -152,12 +134,6 @@ void checkSerial(GridType & grid, int mxl = 2, const bool display = false)
template <class GridType>
void checkParallel(GridType & grid, int gref, int mxl = 3, const bool display = false )
{
if( display )
{
GrapeGridDisplay< GridType > grape( grid );
grape.display();
}
std::cout << "P[ " << grid.comm().rank() << " ] = " << grid.size( 0 ) << std::endl;
#if HAVE_MPI
......