[dune-pdelab] Instationary heat equation

Jö Fahlke jorrit at jorrit.de
Sat Jul 11 23:11:53 CEST 2015


Am Sat, 11. Jul 2015, 21:36:00 +0200 schrieb conf86 at web.de:
> Date: Sat, 11 Jul 2015 21:36:00 +0200
> From: conf86 at web.de
> To: dune-pdelab at dune-project.org
> Subject: [dune-pdelab] Instationary heat equation
> 
> Hello,
> 
> I want to solve the instationary equation
> \partial_t u + a * \laplace u = f
> 
> Where and how can I define this factor a? 
> 
> When I try this in operator.hh:
> 
>  RF a = 1.0;
> 
>  RF factor = it->weight()*eg.geometry().integrationElement(it->position());
>  for (size_type i=0; i<lfsu.size(); ++i)
> 	  r.accumulate(lfsu, i, (a * gradu*gradphi[i] - f * phi[i]) * factor);
> 
> it doesn't work (sorry, I'm currently not at my office, so I don't remember the exact error message).

Try putting gradu*gradphi[i] in parenthesis, like so

| 	  r.accumulate(lfsu, i, (a * (gradu*gradphi[i]) - f * phi[i]) * factor);

Otherwise you'd need the operation "scalar * vector", which historically has
been missing for efficiency reasons.

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

Kiss a non-smoker; taste the difference.
-- fortune
-------------- 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/20150711/21efc955/attachment.sig>


More information about the dune-pdelab mailing list