[dune-functions] Access sub-preBasis of PowerBasis

Carsten Gräser graeser at mi.fu-berlin.de
Tue May 21 11:36:14 CEST 2019


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: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20190521/5c237d40/attachment.sig>


More information about the dune-functions mailing list