Skip to content
Snippets Groups Projects
Commit 599859c1 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Adapt to recent changes in dune-functions and the gfe assembler infrastructure

parent 50ac61a9
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ assembleGradient(const std::vector<RigidBodyMotion<double,3> >& sol,
grad = 0;
// A view on the FE basis on a single element
typename Basis::LocalView localView(&this->basis_);
auto localView = this->basis_.localView();
auto localIndexSet = this->basis_.indexSet().localIndexSet();
ElementIterator it = this->basis_.gridView().template begin<0>();
......@@ -49,8 +49,7 @@ assembleGradient(const std::vector<RigidBodyMotion<double,3> >& sol,
// Assemble local gradient
std::vector<FieldVector<double,blocksize> > localGradient(nDofs);
this->localStiffness_->assembleGradient(*it,
localView.tree().finiteElement(),
this->localStiffness_->assembleGradient(localView,
localSolution,
localGradient);
......
......@@ -15,6 +15,7 @@ class RodLocalStiffness
: public LocalGeodesicFEStiffness<Dune::Functions::PQkNodalBasis<GridView,1>, RigidBodyMotion<RT,3> >
{
typedef RigidBodyMotion<RT,3> TargetSpace;
typedef Dune::Functions::PQkNodalBasis<GridView,1> Basis;
// grid types
typedef typename GridView::Grid::ctype DT;
......@@ -100,13 +101,12 @@ public:
virtual RT energy (const Entity& e,
const std::array<RigidBodyMotion<RT,3>, dim+1>& localSolution) const;
virtual RT energy (const Entity& e,
const typename Dune::Functions::PQkNodalBasis<GridView,1>::LocalView::Tree::FiniteElement& localFiniteElement,
virtual RT energy (const typename Basis::LocalView& localView,
const std::vector<RigidBodyMotion<RT,3> >& localSolution) const
{
assert(localSolution.size()==2);
std::array<RigidBodyMotion<RT,3>, 2> localSolutionArray = {localSolution[0], localSolution[1]};
return energy(e,localSolutionArray);
return energy(localView.element(),localSolutionArray);
}
/** \brief Assemble the element gradient of the energy functional */
......
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