Any version of dune-functions is supposed to be compatible with the corresponding version of the Dune core modules.
- Added a constructor for
LocalViewWrapper
from aLocalView
object and added accessor to base class for python bindings. - The headers
common/callable.hh
andcommon/functionfromcallable.hh
providing adaptors the the removedVirtualFunction
interface from dune-common have been removed. - The class
HierarchicalVectorWrapper
and the corresponding headerfunctionspacebases/hierarchicvectorwrapper.hh
have been deprecated. UseistlVectorBackend()
frombackends/istlvectorbackend.hh
instead. - The class
SizeInfo
and the corresponding headerfunctionspacebases/sizeinfo.hh
have been deprecated. One now can directly usevectorBackend.resize(globalBasis)
instead ofvectorBackend.resize(sizeInfo(globalBasis))
. - The deprecated header
common/treedata.hh
was removed. - The deprecated header
common/referencehelper.hh
was removed. Use the corresponding header from dune-common instead. - Make
AnalyticGridViewFunction
copyable - The method
operator()
of the classDiscreteGlobalBasisFunction
has been implemented. It evaluates a piecewise function on a grid at a point given in global coordinates. As this evaluation requires finding the element that the evaluation point is in, it can be very slow. - Reimplement
HasStaticSize
in terms by checkingHybrid::size()
- Add utility
StaticSizeOrZero
that defaults to theintegral_constant<size_t,0>
in case the container does only have dynamic size. - Add global coordinate evaluation for
CompositeGridFunction
- The
MultiIndex
used byDefaultGlobalBasis
is now aStaticMultiIndex
if it's size is known at compile time. Otherwise its aReservedVector
. - The template class
StaticMultiIndex
for a statically sized multiindex was added. This essentially addsoperator<<
tostd::array
for writing to a stream and a cast to the first entry forsize()==0
.FlatMultiIndex<T>
is now an alias forStaticMultiIndex<T,1>
. - The template class
OverflowArray
was added. It mostly behaves likeDune::ReservedVector
but derives from a statically sized array base class. This allows to have temporary dynamic size but cast to the result to the statically sized base class. - The new
FaceNormalGridFunction
implements the unit outer normal of the closest face within an element as a grid function. - SubspaceBases will no longer be nested. Instead,
SubspaceBasis(SubspaceBases(rootBasis,innerTP),outerTP)
is resolved to aSubspaceBases(rootBasis, tp)
where the tree pathtp
is obainted by joininginnerTP
andouterTP
. This is implemented for the helper functionsubspaceBasis()
and the newly added class template argument deduction guides. - The way multi index types are generated for global bases has been refactored.
This changes nothing for the user but gives more freedom in the construction
of global bases.
But it is a breaking change for the
PreBasis
andPreBasisFactory
interface. If you maintain your own prebasis implementions, they have to be adapted. The necessary modifications are documented in detail here: https://gitlab.dune-project.org/staging/dune-functions/-/merge_requests/326. - Support for
PreBasis
implementations not providingPreBasis::indices()
has been removed. - The added
ComposedGridFunction
implements the composition of a lambda function with one or several grid functions while itself providing the grid function interface. - The new utility
resolveRef(t)
allows to seamlessly work withstd::reference_wrapper
by returning eithert.get()
ort
depending on whethert
is astd::reference_wrapper
or not. - The header treedata.hh and the class
TreeData
are deprecated. Please useTreeContainer
from dune-typetree instead. - Function
derivative()
ofLocalAnalyticGridFunction
returns a bound local-function if the underlying value-local-function was bound before, i.e., the bound-to element and geometry are passed to the derivative local-function. - The concepts for
LocalFunction
andLocalView
were extended with abound()
member function. It tells whether the object was already bound with a call to thebind()
method or not. Implementations of the two concepts outside dune-functions will have to implement this additional method. - The derivative of a
DiscreteGlobalBasisFunction
is now implemented.
-
PreBasis
implementations are now required to provide a methodPreBasis::indices(node,iterator)
that replaces binding aNodeIndexSet
tonode
and then callingNodeIndexSet::indices(iterator)
. As a consequencePreBasis::IndexSet
andPreBasis::makeIndexSet
are no longer needed. -
The
RaviartThomasBasis
andBrezziDouglasMariniBasis
now return Piola-transformed shape functions. This is implemented by changing the return value oftree().finiteElement()
: It is not an object of typeRaviartThomasLocalFiniteElement
orBrezziDouglasMariniLocalFiniteElement
anymore. Rather, it is an object of a new typeGlobalValuedLocalFiniteElement
, which wraps otherLocalFiniteElement
implementations and applies a range-space transformation. Domain-space transformations still have to be done by the calling code. TheGlobalValuedLocalFiniteElement
still implements theLocalFiniteElement
interface ofdune-localfunctions
. -
The
RaviartThomasBasis
class now supports tetrahedral grids fororder=0
, quadrilateral grids fororder=2
, and hexahedral grids fororder=1
. -
The
RannacherTurekBasis
class now supports Crouzeix-Raviart elements. Grids containing simplices, cubes or both in 2d and 3d are supported now. -
The
dune-functions
module now contains an implementation of a Nedelec basis (for problems posed in H(curl)). While the interface caters to different basis orders, grid dimensions and element types, only the first-order basis called "of the first kind" is implemented, and only for grids containing simplices, cubes or both in 2d and 3d. -
The
dune-functions
module now contains an implementation of a Hierarchical Lagrange basis for second order on simplex grids -
There is now an experimental implementation of a periodic basis in form of a class
PeriodicBasis
. It is a meta basis, i.e., a basis that is parametrized with another basis (the host basis). In aPeriodicBasis
, global degrees of freedom of the host basis can be grouped into equivalence classes, which are then treated as single global degrees of freedom. This allows, in particular, to implement periodic boundary conditions for discretizations without intersection integrals.The
PeriodicBasis
class can only be constructed by using theperiodic
method from the namespaceDune::Functions::BasisFactory::Experimental
. It can change at any moment without much advance notice. Use it at your own risk, and give us feedback! -
Imported the Python bindings from the 2.7 branch of dune-python and fixed remaining issues. Added a CI test that builds various global bases in 2d and 3d and verifies the correct number of dofs.
-
interpolate
is now capable of interpolating vector-valued finite element functions correctly. The method of using scalar basis functions combined with vector-valued coefficients to mock a power basis is still supported.
- The
LagrangeBasis
is extended by a template parameter to set the range type of the underlying LocalBasis. This parameter is also added to the basis factory. One can writelagrange<k, float>()
to create a lagrange basis with compile-time orderk
and range typefloat
. The range type defaults todouble
if nothing is given. The run-time order lagrange functions can be created bylagrange<float>(k)
, correspondingly. - The
LagrangeBasis
class can now be used with a run-time polynomial order. For this, the template parameter setting the order now has a default value of -1. If this default value is used, the class accepts an integer constructor argument with a run-time order. As the decision whether to use a compile-time or run-time order is taken at compile-time there should be no efficiency decrease for the compile-time-order case. (Note: The implementation currently uses theLagrangeFiniteElement
implementation ofdune-localfunctions
, which violates strict-aliasing rules. This may lead to surprising crashes and miscalculations when compiling with optimization.)
- The functionality provided by
LocalIndexSet
, namely theindices
method and theMultiIndex
typedef, have been merged intoLocalView
. The global multi-indices are now precomputed and cached when binding theLocalView
.LocalIndexSet
as well as thelocalIndexSet()
method of global bases have been deprecated. - When using
DiscreteGlobalBasisFunction
andinterpolate
the function range is accessed hierarchically. I.e. a leaf node with tree path i0,...,in is mapped to the range entryr[i0]...[in]
. - If the vector passed to
DiscreteGlobalBasisFunction
orinterpolate()
does not provide theVectorBackend
interface, it is automatically wrapped usingistlVectorBackend(vector)
. - The new method
istlVectorBackend(vector)
creates aVectorBackend
suitable for being used as coefficient vector forinterpolate()
andDiscreteGlobalBasisFunction
. The underlyingvector
can be a nested vector composed by stl and dune random access containers. Notice that the only scalar coefficients per basis function are supported. - The algorithm
forEachBoundaryDOF()
was added in a new headerboundarydofs.hh
. It allows to iterate over all DOFs of a given global basis associated to sub-entities located at the boundary of the domain. - The class
SubEntityDOFs<GridView>
was added along with somesubEnitityDOFs
helper functions for creation in the new headersubentitydofs.hh
. After binding an object of this class to a local view and a sub-entity it can be used a range of local indices of DOFs associated to sub-sub-entities of this sub-entity. FlatVectorBackend
is now officially an implementation detail and thus moved to the namespaceImpl::
. The headerflatvectorbackend.hh
was removed. As a replacement the new free functionflatVectorView(c)
create a view object providingoperator[]
andsize()
methods for flat-vector-like access to the underlying containerc
.- The
BasisBuilder
namespace has been renamed toBasisFactory
. The old name still exists and should work as before, but its use is discouraged. - Added an implementation of a Rannacher-Turek basis
- Add a set of unit tests for bases
- Extend the documentation of these bases
- Remove
DiscreteScalarGlobalBasisFunction
. This was replaced byDiscreteGlobalBasisFunction
. - Introduce interface method
NodeIndexSet::indices(it)
that must write all global indices for the bound tree into the container pointed to by the iteratorit
- Remove
NodeIndexSet::index(i)
for computation of individual global indices. DefaultLocalIndexSet::bind(...)
now computes and caches all global indices whileDefaultLocalIndexSet::index(...)
is just a cheap lookup in the cache.Dune::Functions::Optional
was removed. Please useDune::Std::optional
instead.- Dune-functions now requires at least GCC 5 and uses C++14. As a consequence Debian 8 is no longer supported and tested.
- An implementation of a global Raviart-Thomas basis provided by Jakub Both was merged. This is still incomplete and considered experimental.
- An implementation of a global Brezzi-Douglas-Marini-Basis was added. Thanks to Jakub Both for the code.
Dune::Functions::TupleVector
was deprecated. UseDune::TupleVector
from dune-common instead.
TODO...