[dune-pdelab] Inquiry

Jö Fahlke jorrit at jorrit.de
Sun Sep 25 11:27:08 CEST 2011


Am Fri, 23. Sep 2011, 17:02:06 +0200 schrieb Jared Okiro:
> I am requesting for clarification on the example code in the directory
> dune-pdelab-howto/src/convection-diffusion/dgdiffusion.cc.
> In the section for calculating the L2 error(commented), there is a line like
> this:
> 
> *typedef DifferenceSquaredAdapter<G,UDGF> DifferenceSquared;*

Well, DifferenceSquaredAdapter is defined on line 85 in the same file.  It
says there:

| /*! \brief Adapter returning ||f1(x)-f2(x)||^2 for two given grid functions
|
|   \tparam T1  a grid function type
|   \tparam T2  a grid function type
| */
| template<typename T1, typename T2>
| class DifferenceSquaredAdapter 

So both template parameters must be Grid functions, one will usually be your
computed solution, the other one a reference solution (for instance an
analytic solution or a solution computed on a finer mesh).  "G" in the comment
appears to be a misnomer, probably due to bitrot.

Bye,
Jö.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

Der Horizont vieler Menschen ist ein Kreis mit Radius Null - und das
nennen sie ihren Standpunkt.
-- A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20110925/27b78226/attachment.sig>


More information about the dune-pdelab mailing list