Skip to content
Snippets Groups Projects
Commit 3ff14fee authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Make SumEnergy inherit from LocalEnergy

As the name says, it is really only an energy, and nothing more.
parent 36ab43ee
No related branches found
No related tags found
No related merge requests found
......@@ -9,13 +9,13 @@
#include <dune/fufem/functions/virtualgridfunction.hh>
#include <dune/fufem/boundarypatch.hh>
#include <dune/elasticity/assemblers/localfestiffness.hh>
#include <dune/elasticity/assemblers/localenergy.hh>
namespace Dune {
template<class GridView, class LocalFiniteElement, class field_type=double>
class SumEnergy
: public LocalFEStiffness<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,GridView::dimension> > >
: public Elasticity::LocalEnergy<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,GridView::dimension> > >
{
// grid types
typedef typename GridView::ctype ctype;
......@@ -28,8 +28,8 @@ public:
/** \brief Constructor with a set of material parameters
* \param parameters The material parameters
*/
SumEnergy(std::shared_ptr<LocalFEStiffness<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,dim> > > > a,
std::shared_ptr<LocalFEStiffness<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,dim> > > > b)
SumEnergy(std::shared_ptr<Elasticity::LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > a,
std::shared_ptr<Elasticity::LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > b)
: a_(a),
b_(b)
{}
......@@ -45,9 +45,9 @@ public:
private:
std::shared_ptr<LocalFEStiffness<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,dim> > > > a_;
std::shared_ptr<Elasticity::LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > a_;
std::shared_ptr<LocalFEStiffness<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,dim> > > > b_;
std::shared_ptr<Elasticity::LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > b_;
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment