-
Carsten Gräser authored
This now supports multicomponent functions in different flavors * nontrivial subtrees representing e.g. vector fields * implicit product spaces induced by vector-valued coefficients * vector-valued ansatz functions Of course combinations of those are also possible, as long as this can be mapped to the vector backend. Due to this flexibility the range type has to be specified explicitly because there is no longer a 'natural' one. This class requires that the vector type accepts multi-indices. For simple bases using FlatMultiIndex a simple BlockVector already does this. For more complicated cases with nested indices you may have to use a HierarchicVectorWrapper. To simplify creation of such functions there is a free function to be used like this auto f = makeDiscreteGlobalBasisFunction<Range>(basis, treePath, vector); Notice that it will capture r-value references for vector such that you can use auto f = makeDiscreteGlobalBasisFunction<Range>(basis, treePath, hierarchicVector(vector)); if you need a HierarchicVectorWrapper due to nested indices. The only difference to DiscreteScalarGlobalBasisFunction is that you must specify the range type manually. However, in simple cases (scalar function) this is as easy as adding <double> to the factory function call. Things to be done: * Swap the order of treePath and vector argument and provide an empty treePath as default. * Optimize implementation * Don't allocate result vectors for localBasis::evaluate on each evaluation, but store preallocated ones per node. * Don't collect coefficients on each evaluation but copy them once on bind and cache them. * Drop DiscreteScalarGlobalBasisFunction
6130018e