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

indexNew --> indexIsNew to prevent collision with newIndex.

[[Imported from SVN: r4198]]
parent ce530163
No related branches found
No related tags found
No related merge requests found
......@@ -89,13 +89,16 @@ namespace Dune {
//! and no compress of date has to be done
bool compress () { return false; }
//! returns true if index set gernally needs compress after adaptation
bool needsCompress () const { return false; }
//! do nothing here, because fathers index should already exist
template <class EntityType>
void insertNewIndex(const EntityType & en ) {}
void insertNewIndex( const EntityType & en ) {}
//! do nothing here, because fathers index should already exist
template <class EntityType>
void removeOldIndex(const EntityType & en ) {}
void removeOldIndex( const EntityType & en ) {}
//! nothing to do here
void resize () {}
......@@ -103,8 +106,11 @@ namespace Dune {
//! no extra memory for restriction is needed
int additionalSizeEstimate () const { return 0; }
//! all indices are old
bool indexNew(int num, int codim ) const { return false; }
//! returns true if index idx of codim cd is new, here all indices are old
bool indexIsNew( int idx, int cd ) const { return false; }
//! returns true if index idx is new, here all indices are old
bool indexIsNew( int idx ) const { return false; }
//! we have no old size
int oldSize ( int codim ) const { return 0; }
......
......@@ -159,7 +159,7 @@ namespace Dune {
}
//! for dof manager, to check whether it has to copy dof or not
bool indexNew (int num) const
bool indexIsNew (int num) const
{
assert((num >= 0) && (num < state_.size()));
return state_[num] == NEW;
......@@ -746,8 +746,8 @@ namespace Dune {
}
//! insert new index to set
void insertNewIndex (const typename GridType::template Codim<0>::Entity & en ) {
void insertNewIndex (const typename GridType::template Codim<0>::Entity & en )
{
// here we have to add the support of higher codims
resizeVectors();
......@@ -788,18 +788,17 @@ namespace Dune {
// give all entities that lie below the old entities new numbers
markAllBelowOld ();
//markAllUsed ();
}
//! for dof manager, to check whether it has to copy dof or not
bool indexNew (int num, int codim) const
bool indexIsNew (int num, int codim) const
{
assert( codimUsed_[codim] );
return codimLeafSet_[codim].indexNew(num);
return codimLeafSet_[codim].indexIsNew(num);
}
//! make to index numbers consecutive
//! return true, if at least one hole was closed
//! return true, if at least one hole existed
bool compress ()
{
// if not marked, mark which indices are still used
......@@ -820,6 +819,9 @@ namespace Dune {
return haveToCopy;
}
//! this index set needs compress after adaptation, here true is returned
bool needsCompress () const { return true; }
//! memorise index
// --insert
void insert (const EntityCodim0Type & en)
......@@ -840,8 +842,6 @@ namespace Dune {
void remove (const EntityCodim0Type & en)
{
// if state is NEW or USED the index of all entities is removed
//std::cout << codimLeafSet_[0].state( hIndexSet_.index(en) ) << " state for en = " << hIndexSet_.index(en) << "\n";
//std::cout << codimLeafSet_[0].index( hIndexSet_.index(en) ) << " leaf index \n";
if( codimLeafSet_[0].exsits( hIndexSet_.index(en) ) )
{
codimLeafSet_[0].remove ( hIndexSet_.index(en) );
......@@ -1154,9 +1154,9 @@ namespace Dune {
}
//! for dof manager, to check whether it has to copy dof or not
bool indexNew (int num, int codim)
bool indexIsNew (int num, int codim)
{
return leafIndexSet_.indexNew(num,codim);
return leafIndexSet_.indexIsNew(num,codim);
}
//! make to index numbers consecutive
......
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