Skip to content
Snippets Groups Projects
Commit adb8b2b7 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Merge branch 'master' of git.imp.fu-berlin.de:agnumpde/dune-fufem

parents f967fbc9 e56d6833
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ class Assembler ...@@ -19,7 +19,7 @@ class Assembler
{} {}
template <class LocalAssemblerType, class GlobalMatrixType> template <class LocalAssemblerType, class GlobalMatrixType>
void assembleOperator(LocalAssemblerType& localAssembler, GlobalMatrixType& A, const bool lumping=false) const void assembleOperator(LocalAssemblerType&& localAssembler, GlobalMatrixType& A, const bool lumping=false) const
{ {
const OperatorAssembler<TrialBasis, AnsatzBasis> operatorAssembler(tBasis_, aBasis_); const OperatorAssembler<TrialBasis, AnsatzBasis> operatorAssembler(tBasis_, aBasis_);
operatorAssembler.assemble(localAssembler, A, lumping); operatorAssembler.assemble(localAssembler, A, lumping);
...@@ -47,5 +47,10 @@ class Assembler ...@@ -47,5 +47,10 @@ class Assembler
const AnsatzBasis& aBasis_; const AnsatzBasis& aBasis_;
}; };
template <class TrialBasis, class AnsatzBasis>
auto assembler(const TrialBasis& tBasis, const AnsatzBasis& aBasis) {
return Assembler<TrialBasis, AnsatzBasis>(tBasis, aBasis);
}
#endif #endif
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2: // vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_FUFEM_ASSEMBLERS_LOCALASSEMBLERS_SCALEDSUMOPERATORASSEMBLER_HH #ifndef DUNE_FUFEM_ASSEMBLERS_LOCALASSEMBLERS_SCALEDSUMOPERATORASSEMBLER_HH
#define DUNE_FUFEM_ASSEMBLERS_LOCALASSEMBLERS_SCALEDSUMOPERATORASSEMBLER_HH #define DUNE_FUFEM_ASSEMBLERS_LOCALASSEMBLERS_SCALEDSUMOPERATORASSEMBLER_HH
#include <dune/common/diagonalmatrix.hh> #include <dune/common/fmatrix.hh>
#include <dune/fufem/assemblers/localoperatorassembler.hh> #include <dune/fufem/assemblers/localoperatorassembler.hh>
/** \brief Local operator that is the sum of scaled local operator assemblers. /** \brief Local operator that is the sum of scaled local operator assemblers.
* All template parameters according to \class LocalOperatorAssembler * All template parameters according to \class LocalOperatorAssembler
*/ */
template <class Grid, class TrialLocalFE, class AnsatzLocalFE, typename T> template <class Grid, class TrialLocalFE, class AnsatzLocalFE,
typename T = Dune::FieldMatrix<double, 1, 1>>
class ScaledSumOperatorAssembler class ScaledSumOperatorAssembler
: public LocalOperatorAssembler<Grid, TrialLocalFE, AnsatzLocalFE, T> { : public LocalOperatorAssembler<Grid, TrialLocalFE, AnsatzLocalFE, T> {
public: public:
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <dune/fufem/assemblers/localfunctionalassembler.hh> #include <dune/fufem/assemblers/localfunctionalassembler.hh>
#include <dune/fufem/assemblers/localassemblers/l2functionalassembler.hh> #include <dune/fufem/assemblers/localassemblers/l2functionalassembler.hh>
#include <dune/grid/common/rangegenerators.hh>
/** \brief Local assembler for finite element L^2-functionals on the Subgrid, given by Hostgrid-functions /** \brief Local assembler for finite element L^2-functionals on the Subgrid, given by Hostgrid-functions
* *
* This is needed, e.g. when assembling the right hand side of the spatial problem of a time-discretized time dependent problem with spatial adaptivity. * This is needed, e.g. when assembling the right hand side of the spatial problem of a time-discretized time dependent problem with spatial adaptivity.
......
...@@ -30,6 +30,8 @@ class LocalOperatorAssembler ...@@ -30,6 +30,8 @@ class LocalOperatorAssembler
enum {ndofs = T::cols}; enum {ndofs = T::cols};
virtual ~LocalOperatorAssembler() {}
/** \brief After return BoolMatrix isNonZero contains the bit pattern of coupling basis functions /** \brief After return BoolMatrix isNonZero contains the bit pattern of coupling basis functions
* *
* \param element the grid element on which to operate * \param element the grid element on which to operate
......
...@@ -118,4 +118,9 @@ value (const Element& element, unsigned int codim, unsigned int subEntity) const ...@@ -118,4 +118,9 @@ value (const Element& element, unsigned int codim, unsigned int subEntity) const
return (indicatorEntry != indicators_[codim].end()) ? indicatorEntry->second : 0; return (indicatorEntry != indicators_[codim].end()) ? indicatorEntry->second : 0;
} }
template <class Grid>
auto makeRefinementIndicator(const Grid& grid) {
return RefinementIndicator<Grid>(grid);
}
#endif #endif
...@@ -705,7 +705,7 @@ std::unique_ptr<GridType> makeTorus( ...@@ -705,7 +705,7 @@ std::unique_ptr<GridType> makeTorus(
// if ring is closed last nodes are the first nodes // if ring is closed last nodes are the first nodes
std::vector<unsigned int> cornerIDs(4); std::vector<unsigned int> cornerIDs(4);
Dune::GeometryType gt;gt.makeTetrahedron(); auto gt = Dune::GeometryTypes::tetrahedron;
for (unsigned int i=0; i<nElementHorizontal-1; i++) { for (unsigned int i=0; i<nElementHorizontal-1; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment