[dune-pdelab] Time-dependent right hand side

Jö Fahlke jorrit at jorrit.de
Fri Aug 28 13:23:29 CEST 2015


Am Fri, 28. Aug 2015, 12:57:56 +0200 schrieb conf86 at web.de:
> Date: Fri, 28 Aug 2015 12:57:56 +0200
> From: conf86 at web.de
> To: conf86 at web.de, dune-pdelab at dune-project.org
> Subject: Re: [dune-pdelab] Time-dependent right hand side
> 
> 
> > 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?
> 
> Hi,
> 
> I hope I'm not getting annoying, but I cant't figure out how to implement this.
> Is there some obvious example where this is done which I missed or is it a difficult/unclear question?

The local operator is the right place for time-dependent source/sink terms and
Neumann boundary conditions.  Time-dependent Dirichlet boundary conditions
need to be interpolated in each time step, usually the bcextension is reused
for that.  See
https://cgit.dune-project.org/repositories/dune-pdelab-howto/tree/src/course-examples/example03_bcextension.hh
and
https://cgit.dune-project.org/repositories/dune-pdelab-howto/tree/src/course-examples/example03_Q2.hh#n80
line 80, observe how the BCExtension instance g is passed to osm.apply().

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

In the beginning the Universe was created.  This has made a lot of
people very angry and been widely regarded as a bad move.
-- Douglas Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20150828/9d731514/attachment.sig>


More information about the dune-pdelab mailing list