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

Added new functions for restiction and prolongation and dof compress

process.

[[Imported from SVN: r1697]]
parent a01c98a7
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,18 @@ namespace Dune {
//! return max number of local dofs per entity
virtual int numberOfDofs () const =0;
//! returns true if index is new ( for dof compress )
virtual bool indexNew (int num) const = 0;
//! return old index in dof array of given index ( for dof compress )
virtual int oldIndex (int num) const = 0;
//! return new index in dof array
virtual int newIndex (int num) const = 0;
/*! return estimate for size that is addtional needed
for restriction of data */
virtual int additionalSizeEstimate() const = 0;
};
//***********************************************************************
......@@ -62,9 +74,7 @@ namespace Dune {
//! default implementation if not overlaoded
virtual int newSize() const
{
// overload this method in derived class
assert(false);
return -1;
return asImp().size();
}
//! default implementation if not overlaoded
......@@ -82,6 +92,34 @@ namespace Dune {
return -1;
}
//! returns true if index is new ( for dof compress )
virtual bool indexNew (int num) const
{
assert(false);
return false;
}
//! return old index in dof array of given index ( for dof compress )
virtual int oldIndex (int num) const
{
assert(false);
return -1;
}
// return new index in dof array
virtual int newIndex (int num) const
{
assert(false);
return -1;
}
// return estimate for size additional need for restriction of data
virtual int additionalSizeEstimate() const
{
assert(false);
return -1;
}
private:
//! Barton-Nackman trick
DofMapperImp &asImp() { return static_cast<DofMapperImp &>(*this); };
......
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