Skip to content
Snippets Groups Projects
Commit 962105b5 authored by Adrian Burri's avatar Adrian Burri
Browse files

Only constant index sets used now

[[Imported from SVN: r2678]]
parent b05c1ff8
No related branches found
No related tags found
No related merge requests found
......@@ -1428,6 +1428,12 @@ namespace Dune
//! clean up some markers
bool postAdapt();
template <class DofManagerType>
bool loadBalance (DofManagerType & dm) { return false; }
template <class DofManagerType>
bool communicate (DofManagerType & dm) { return false; }
/** \brief return type of grid, here AlbertaGrid_Id. */
GridIdentifier type () const { return AlbertaGrid_Id; };
......@@ -1467,11 +1473,6 @@ namespace Dune
return *leafIndexSet_;
}
LeafIndexSet & leafIndexSet () {
if(!leafIndexSet_) leafIndexSet_ = new LeafIndexSet (*this);
return *leafIndexSet_;
}
const GlobalIdSet & globalIdSet () const {
return globalIdSet_;
}
......
......@@ -260,15 +260,9 @@ namespace Dune {
//! get leaf index set of the grid
const LeafIndexSet & leafIndexSet () const;
//! get leaf index set of the grid
LeafIndexSet & leafIndexSet ();
//! get level index set of the grid
const LevelIndexSet & levelIndexSet (int level) const;
//! get level index set of the grid
LevelIndexSet & levelIndexSet (int level);
//! calculate load of each proc and repartition if neccessary
bool loadBalance ();
......
......@@ -186,15 +186,6 @@ namespace Dune {
return *leafIndexSet_;
}
template <int dim, int dimworld, ALU3dGridElementType elType>
inline typename ALU3dGrid<dim, dimworld, elType>::LeafIndexSet &
ALU3dGrid<dim, dimworld, elType>::leafIndexSet()
{
if(!leafIndexSet_) leafIndexSet_ = new LeafIndexSet ( *this );
return *leafIndexSet_;
}
template <int dim, int dimworld, ALU3dGridElementType elType>
inline const typename ALU3dGrid<dim, dimworld, elType>::LevelIndexSet &
ALU3dGrid<dim, dimworld, elType>::levelIndexSet( int level ) const
......@@ -207,18 +198,6 @@ namespace Dune {
return *(levelIndexVec_[level]);
}
template <int dim, int dimworld, ALU3dGridElementType elType>
inline typename ALU3dGrid<dim, dimworld, elType>::LevelIndexSet &
ALU3dGrid<dim, dimworld, elType>::levelIndexSet( int level )
{
if( (level < 0) && (level >= MAXL) )
DUNE_THROW(GridError,"Only " << MAXL << "levels allowed for this grid!\n");
if( levelIndexVec_[level] == 0 )
levelIndexVec_[level] = new LevelIndexSet ( *this , level );
return *(levelIndexVec_[level]);
}
template <int dim, int dimworld, ALU3dGridElementType elType>
inline int ALU3dGrid<dim, dimworld, elType>::maxlevel() const
{
......
......@@ -63,7 +63,7 @@ namespace Dune {
public:
//! Constructor
GridPartDefault(GridType& grid, IndexSetType& iset) :
GridPartDefault(GridType& grid, const IndexSetType& iset) :
GridPartInterface<GridPartTraits>(),
grid_(grid),
iset_(iset) {}
......@@ -74,12 +74,11 @@ namespace Dune {
const GridType& grid() const { return grid_; }
//! Returns reference to index set of the underlying grid
IndexSetType& indexSet() { return iset_; }
const IndexSetType& indexSet() const { return iset_; }
private:
GridType& grid_; // needs to modifyable, so that one can mark
IndexSetType& iset_;
const IndexSetType& iset_;
};
//! \brief Selects a specific level of a grid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment