From 7f2daf142bd6b843a630e8121c9788669fd8e859 Mon Sep 17 00:00:00 2001
From: Adrian Burri <burriad@dune-project.org>
Date: Fri, 28 Oct 2005 09:48:24 +0000
Subject: [PATCH] LagrangeFastBaseFunctionSet adapted to changes in fastbase.hh

[[Imported from SVN: r3328]]
---
 fem/lagrangebase.hh                       | 16 +-------------
 fem/lagrangebase/lagrangebasefunctions.hh | 26 ++++++++---------------
 2 files changed, 10 insertions(+), 32 deletions(-)

diff --git a/fem/lagrangebase.hh b/fem/lagrangebase.hh
index a132d631a..bc31ef846 100644
--- a/fem/lagrangebase.hh
+++ b/fem/lagrangebase.hh
@@ -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:
diff --git a/fem/lagrangebase/lagrangebasefunctions.hh b/fem/lagrangebase/lagrangebasefunctions.hh
index 422f2fdc9..8b73f1271 100644
--- a/fem/lagrangebase/lagrangebasefunctions.hh
+++ b/fem/lagrangebase/lagrangebasefunctions.hh
@@ -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
-- 
GitLab