[dune-pdelab] Time-dependent right hand side

conf86 at web.de conf86 at web.de
Tue Aug 25 16:20:28 CEST 2015


Thank you for your answer!

I'm sorry, after some more investigations it seems I messed up my code. I actually put setTime in *LocalOperator and it was already put in *TimeLocalOperator which possibly lead to this error.
I better try to fomulate my question again, because the code was wrong anyway.

I have the heat equation: 
\partial_t u - \Delta u = f(t) = (e.g.) t

So the Integral in *LocalOperator is (example02_operator.hh):

        RF factor = it->weight()*eg.geometry().integrationElement(it->position());
        for (size_type i=0; i<lfsu.size(); ++i)
	  r.accumulate(lfsu, i, (gradu*gradphi[i] - f*phi[i]) * factor);

My questions are: Is *LocalOperator actually the right place to define the time-dependent f? (If not, where does it go?)
And how can I get the time variable for RF f = time?




More information about the dune-pdelab mailing list