Skip to content
Snippets Groups Projects
Commit 3eda524d authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

enabled check for hybrid grids.

[[Imported from SVN: r3564]]
parent 03d2ad4a
Branches
Tags
No related merge requests found
......@@ -19,6 +19,25 @@
#include "gridcheck.cc"
template <class GridType >
void markOne ( GridType & grid , int num , int ref )
{
typedef typename GridType::template Codim<0>::LeafIterator LeafIterator;
int count = 0;
LeafIterator endit = grid.template leafend <0> ();
for(LeafIterator it = grid.template leafbegin<0> (); it != endit ; ++it )
{
if(num == count) grid.mark( ref, it );
count++;
}
grid.preAdapt();
grid.adapt();
grid.postAdapt();
}
int main () {
try {
......@@ -29,8 +48,16 @@ int main () {
Dune::UGGrid<2,2> grid;
Dune::AmiraMeshReader<Dune::UGGrid<2,2> >::read(grid, "ug-testgrid-2.am");
// check macro grid
gridcheck(grid);
// create hybrid grid
markOne(grid,0,1) ;
gridcheck(grid);
};
grid.globalRefine(1);
gridcheck(grid);
}
{
std::cout << std::endl << "UGGrid<3,3> with grid file: ug-testgrid-3.am"
......@@ -38,8 +65,16 @@ int main () {
Dune::UGGrid<3,3> grid;
Dune::AmiraMeshReader<Dune::UGGrid<3,3> >::read(grid, "ug-testgrid-3.am");
// check macro grid
gridcheck(grid);
// create hybrid grid
markOne(grid,0,1) ;
gridcheck(grid);
grid.globalRefine(1);
gridcheck(grid);
};
}
} catch (Dune::Exception &e) {
std::cerr << e << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment