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

FastBaseFunctionSet is now responsible for deleting BaseFunction pointers

[[Imported from SVN: r3327]]
parent 8be7ae5c
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,9 @@ namespace Dune {
enum { DimDomain = DiscreteFunctionSpaceType::DimDomain };
enum { DimRange = DiscreteFunctionSpaceType::DimRange };
BaseFunctionInterface () {} ;
BaseFunctionInterface () {}
virtual ~BaseFunctionInterface() {}
//! evaluate the function at Domain x, and store the value in Range Phi
//! diffVariable stores information about which gradient is to be
......@@ -73,8 +75,6 @@ namespace Dune {
virtual void evaluate ( const FieldVector<deriType, 2> &diffVariable,
const DomainType & , RangeType &) const = 0;
private:
};
/** @} end documentation group */
......@@ -128,12 +128,16 @@ namespace Dune {
public:
//! \todo Please doc me!
BaseFunctionSetInterface () {};
BaseFunctionSetInterface () {}
//! \todo Please doc me!
int getNumberOfBaseFunctions () const DUNE_DEPRECATED {
return asImp().getNumberOfBaseFunctions();
};
virtual ~BaseFunctionSetInterface() {}
/*
//! \todo Please doc me!
int getNumberOfBaseFunctions () const DUNE_DEPRECATED {
return asImp().getNumberOfBaseFunctions();
};
*/
//! Number of base functions
int numBaseFunctions() const {
......@@ -210,6 +214,8 @@ namespace Dune {
jacobianDiffVar_[i] = i;
};
virtual ~BaseFunctionSetDefault() {}
//! default evaluate using the evaluate interface
void eval( int baseFunct, const DomainType & x, RangeType & phi ) const
{
......
......@@ -66,17 +66,27 @@ namespace Dune {
//! Constructor
FastBaseFunctionSet (FunctionSpaceType & fuspace , int numOfBaseFct);
//! return the number of base fucntions for this BaseFunctionSet
int getNumberOfBaseFunctions () const DUNE_DEPRECATED
{
return baseFunctionList_.size();
};
//! return the number of base fucntions for this BaseFunctionSet
int getNumberOfDiffBaseFuncs () const DUNE_DEPRECATED
{
return numOfDiffFct_;
};
//! Destructor
virtual ~FastBaseFunctionSet() {
for (unsigned int i = 0; i < baseFunctionList_.size(); ++i) {
delete baseFunctionList_[i];
baseFunctionList_[i] = 0;
}
baseFunctionList_.resize(0);
}
/*
//! return the number of base fucntions for this BaseFunctionSet
int getNumberOfBaseFunctions () const DUNE_DEPRECATED
{
return baseFunctionList_.size();
};
//! return the number of base fucntions for this BaseFunctionSet
int getNumberOfDiffBaseFuncs () const DUNE_DEPRECATED
{
return numOfDiffFct_;
};
*/
//! return the number of base fucntions for this BaseFunctionSet
int numBaseFunctions () const
......
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