[Dune] Question about dune-grid-howto/shapefunctions.hh
Christian Engwer
christi at uni-hd.de
Fri Apr 8 19:50:04 CEST 2011
Hi,
the file mentioned in the first post is part of the grid-howto. The
reason that it is a singleton is, that the shape function is always
the same, no matter which element you are working on. Thus there is no
need to recreate it. A singleton makes sure that there is only one
instance of certain object and avoids expensive recreation of that
object.
Ciao
Christian
On Fri, Apr 08, 2011 at 04:21:04PM +0200, Carsten Gräser wrote:
> Hello,
>
> Am 08.04.2011 15:33, schrieb Jayesh Badwaik:
> > Hi,
> >
> > I am using the shapefunctions.hh file as the shapefunctions for my fem
> > program and i was wondering
> > why is the class written as a singleton class?
> > Any specific reason?
> there's no such file in the core modules. As far as I remember there was one
> in the dune-disc module. This module is deprecated and no longer maintained
> for at least one year. There is a core module dune-localfunctions containing
> shape functions now.
>
> Best,
> Carsten
>
>
>
> >
> > Cheers and Regards,
> > Jayesh Vinay Badwaik
> > -----------------------------------------------------------------------------------------------------------
> >
> > We are servants rather than masters in mathematics --- Charles Hermite
> >
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
More information about the Dune
mailing list