[dune-pdelab] Initial conditions for instationary problems

Jö Fahlke jorrit at jorrit.de
Wed Jun 3 19:27:37 CEST 2015


Am Wed,  3. Jun 2015, 13:36:42 +0200 schrieb conf86 at web.de:
> Date: Wed, 3 Jun 2015 13:36:42 +0200
> From: conf86 at web.de
> To: dune-pdelab at dune-project.org
> Subject: [dune-pdelab] Initial conditions for instationary problems
> 
> Hi,
> 
> I have another question regarding the dune-course examples.
> I'm trying to figure out where exactly the initial conditions for t=t_0 are set in example03. I see that in example03_Q1.hh there is a function calling the initial condition, but I don't really see the source.
> Or is it not set at all and 0 by default for this example? If so, is there an example-code how to set it?

I only have example03_Q2.hh or example02_Q1.hh available (because I'm still in
the train), but I guess the answer is as follows:

The dirichlet boundary conditions actually have to be consistent with the
initial conditions at t=0.  So in the examples we usually use the same
function for both: the stuff on *_bcextension.hh.  (BCExtension here means
"the function describing the boundary condition, extended to the interior of
the domain".)

The vector ok unknowns is then usually set to values interpolated from the
initial conditions by code like this:

  typedef BCExtension<GV,Real> G;                               // boundary value + extension
  G g(gv);
  Dune::PDELab::interpolate(g,gfs,u);                           // interpolate coefficient vector

The second line instantiates a BCExtension object "g", which in the third line
is interpoluted into the vector of unknowns "u", using the (grid) function
space "gfs".

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

This is the first age that's paid much attention to the future, which
is a little ironic since we may not have one.
-- Arthur C Clarke
-------------- 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/20150603/9da73b3c/attachment.sig>


More information about the dune-pdelab mailing list