Skip to content

Enable x-dependent coefficients for the SOOA

Gitlab Import requested to merge feature/heterogeneous-second-order into master

As a follow-up to a conversation with Carsten today about the design a SecondOrderOperatorAssembler with x-dependent coefficients could follow, I've now come up with a first sort-of-working version.

TL;DR: The code works. There's one place where I'm hardcoding the number of functions that I'm passing. And I had to disable the concept check.

One the one hand, this is the right place to discuss the design decisions again (for Carsten: something where I unintentionally diverged from the plan? for others: General input?)

On the other hand, this the place where I'm asking for help because I'm currently not quite sure how to solve a few issues. They are (marked by FIXME in the diff), in decreasing order of importance:

  • (line 231): I have the return values of the functions that I passed in a tuple and want to call the contraction on the expanded tuple. In other words, I need the code
Arithmetic::addProduct(localMatrix[i][j], z, contraction_(gradients_[i],
                                                          gradients_[j],
                                                          std::get<0>(ret),
                                                          std::get<1>(ret)));

to work for an arbitrary tuple length. -I tried to extend the concept check such that it takes the return types of the functions into account but failed. I've no idea what's wrong.

  • I don't know how, if I passed a GridViewFunction, I would get a localView to bind the element to. Rather than a global basis, I have a local Basis after all. What do I need to do here?
  • Finally, I'd like to understand why I cannot carry out the following replacement:
-auto const numFunctions = Dune::Functions::StaticSize<decltype(ret)>::value;
+auto const numFunctions = Dune::Functions::StaticSize<decltype(functions_)>::value;

To me, those are two instances of TupleVectors with different template parameters but the same length. Why does the former compile just fine but not the latter?

Merge request reports