[dune-pdelab] Time-dependent right hand side
conf86 at web.de
conf86 at web.de
Wed Sep 2 20:20:32 CEST 2015
> If you simply compute your time-dependent term inside one one of the assmebly
> methods of the local operator, the default setTime() from
> InstationaryLocalOperatorDefaultMethods should be sufficient for you: it
> stores the set time internally, and if you derive your localoperator from
> InstationaryLocalOperatorDefaultMethods you can retrieve the set time using
> getTime() within alpha_volume() etc. I think this is what you tried
> initially, when you ran into the ambiguous overload problem. I assume that
> was caused by one local operator deriving from the other, and both local
> operator deriving directly from InstationaryLocalOperatorDefaultMethods. To
> avoid that, it is probably easiest to disregard example03 and avoid deriving
> one operator from the other. That way there should be only one instance of
> InstationaryLocalOperatorDefaultMethods in the ancestry of your local operator
> and no ambiguity should arise. Simply fold whatever you were doing in the
> derived local operator into to base local operator.
Thank you for your explanation!
Yes, I used the derived operator from the course example and I also now understand why it didn't work.
I now have reduced both (example02_operator.hh and example03_operator.hh) to one operator.
Within alpha_volume() in "loop over quadrature points", I simply put
RF t = getTime();
and it finally works.
Best regards
More information about the dune-pdelab
mailing list