...
 
Commits (2)
......@@ -30,7 +30,6 @@ class FunctionalAssembler
template <class LocalFunctionalAssemblerType, class GlobalVectorType>
void assemble(LocalFunctionalAssemblerType& localAssembler, GlobalVectorType& b, bool initializeVector=true) const
{
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename LocalFunctionalAssemblerType::LocalVector LocalVector;
typedef typename TrialBasis::LinearCombination LinearCombination;
......@@ -42,19 +41,17 @@ class FunctionalAssembler
b=0.0;
}
ElementIterator it = tBasis_.getGridView().template begin<0>();
ElementIterator end = tBasis_.getGridView().template end<0>();
for (; it != end; ++it)
for (const auto& element : elements(tBasis_.getGridView()))
{
// get shape functions
const typename TrialBasis::LocalFiniteElement& tFE = tBasis_.getLocalFiniteElement(*it);
const typename TrialBasis::LocalFiniteElement& tFE = tBasis_.getLocalFiniteElement(element);
LocalVector localB(tFE.localBasis().size());
localAssembler.assemble(*it, localB, tFE);
localAssembler.assemble(element, localB, tFE);
for (size_t i=0; i<tFE.localBasis().size(); ++i)
{
int idx = tBasis_.index(*it, i);
int idx = tBasis_.index(element, i);
const LinearCombination& constraints = tBasis_.constraints(idx);
bool isConstrained = tBasis_.isConstrained(idx);
if (isConstrained)
......