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

LagrangeFastBaseFunctionSet adapted to changes in fastbase.hh

[[Imported from SVN: r3328]]
parent 8ac1a2a2
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ namespace Dune {
>
{
public:
//! my Grid's type
//! my Grid's type
typedef typename GridPartImp::GridType GridType;
/** \todo Please doc me! */
......@@ -181,17 +181,6 @@ namespace Dune {
template <class EntityType>
int mapToGlobal ( EntityType &en, int localNum ) const;
/*
//! sign in to dofmanager, return is the memory
template <class DiscFuncType>
typename DiscFuncType :: MemObjectType &
signIn (DiscFuncType & df) const;
//! sign out to dofmanager, dofmanager frees the memory
template <class DiscFuncType>
bool signOut ( DiscFuncType & df) const;
*/
//! Return the dof mapper of the space
const MapperType& mapper() const;
......@@ -213,9 +202,6 @@ namespace Dune {
//! length is different element types
std::vector < BaseFunctionSetType * > baseFuncSet_;
//! DofManager manages the memory
//mutable DofManagerType & dm_;
//! the index set, used by the mapper for mapping between grid and space
GridPartType& grid_;
private:
......
......@@ -30,12 +30,12 @@ namespace Dune {
typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
public:
LagrangeBaseFunction (int baseNum)
: BaseFunctionInterface<FunctionSpaceType> (),
baseNum_ ( baseNum )
LagrangeBaseFunction (int baseNum) :
BaseFunctionInterface<FunctionSpaceType> (),
baseNum_ ( baseNum )
{
assert((baseNum_ >= 0) || (baseNum_ < DimRange));
};
}
virtual void evaluate ( const FieldVector<deriType, 0> &diffVariable,
const DomainType & x, RangeType & phi) const
......@@ -762,9 +762,8 @@ namespace Dune {
//! Constructor, calls Constructor of FastBaseFunctionSet, which is the
//! InterfaceImplementation
LagrangeFastBaseFunctionSet( FunctionSpaceType &fuSpace )
: FastBaseFunctionSet<FunctionSpaceType >
( fuSpace, numOfBaseFct ) , baseFuncList_(numOfBaseFct,0)
LagrangeFastBaseFunctionSet( FunctionSpaceType &fuSpace ) :
FastBaseFunctionSet<FunctionSpaceType >( fuSpace, numOfBaseFct )
{
int numOfDifferentFuncs = (int) numOfBaseFct / dimrange;
for(int i=0; i<numOfDifferentFuncs; i++)
......@@ -773,19 +772,14 @@ namespace Dune {
{
//baseFuncList_[ i*dimrange + k ] = new LagrangeBaseFunctionType ( i ) ;
size_t idx = i*dimrange + k;
baseFuncList_[ idx ] = new LagrangeBaseFunctionType ( i ) ;
this->setBaseFunctionPointer ( idx , baseFuncList_[ idx ] );
this->setBaseFunctionPointer ( idx, new LagrangeBaseFunctionType(i) );
}
}
this->setNumOfDiffFct ( numOfDifferentFuncs );
};
//! Destructor deleting the base functions
~LagrangeFastBaseFunctionSet( )
{
for(int i=0; i<numOfBaseFct; i++)
if( baseFuncList_[i] ) delete baseFuncList_[i];
};
~LagrangeFastBaseFunctionSet( ) {}
//! return number of base function for this base function set
int getNumberOfBaseFunctions() const { return numOfBaseFct; };
......@@ -796,9 +790,7 @@ namespace Dune {
{
return (int) (numOfBaseFct / dimrange);
}
private:
//! Vector with all base functions corresponding to the base function set
std::vector < LagrangeBaseFunctionType* > baseFuncList_;
};
} // end namespace Dune
......
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