[dune-functions] Access sub-preBasis of PowerBasis

Lasse Hinrichsen l.hinrichsen at fu-berlin.de
Tue May 21 11:48:51 CEST 2019


Hello Carsten,

your proposal would indeed satisfy my requirements.

However, for the PowerPreBasis I think you can not ask for individual
pre-bases as it only stores a single PreBasis that is used to generate
all child nodes.
Therefore `subPreBasis()` without any argument should be enough.

Lasse

On 5/21/19 11:36 AM, Carsten Gräser wrote:
> Dear Lasse,
> 
> Am 21.05.19 um 11:02 schrieb Lasse Hinrichsen:
>> Dear dune-functions experts,
>>
>> I was wondering how to access the underlying PreBasis of a power basis
>> (similarly, for a composite).
> [...]> and `my_fancy_prebasis` contains something I still need at runtime (say,
>> the order of ansatz functions which I may want to change during runtime).
>>
>> Is there a way to access this (sub-)PreBasis? Clearly, the PowerPreBasis
>> holds it as a member, but it does not provide access to it. Of course,
>> one could easily provide access there, but I wonder, if
> [...]
> Yes this is missing currently. To my impression whoever
> wrote the PowerPreBasis simply forgot to add this and
> I don't see any problem in changing this.
> 
> I would propose to add
> 
>   auto& subPreBasis(std::size_t index)
>   const auto& subPreBasis(std::size_t index) const
> 
> to PowerPreBasis and
> 
>   template<std::size_t index> auto& subPreBasis()
>   template<std::size_t index> auto& subPreBasis(Dune::index_constant<index>)
>   template<std::size_t index> const auto& subPreBasis() const
>   template<std::size_t index> const auto& subPreBasis(Dune::index_constant<index>) const
> 
> to CompositePreBasis. Would this satisfy your requirements?
> 
> Best
> Carsten
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20190521/bc0f1d2c/attachment.sig>


More information about the dune-functions mailing list