[dune-fem] LocalFunctionAdapter

Martin Nolte nolte at mathematik.uni-freiburg.de
Fri Jun 5 15:01:37 CEST 2015


Hi Macro, hi Tobi,

DiscreteFunctionAdapter is the old name of the GridFunctionAdapter.

Best,

Martin

On 06/05/2015 02:59 PM, Agnese, Marco wrote:
> Hi Tobias,
> in my function I have a coefficient which is multiplied for an indicator function which takes an entity and return 1 or 0.
> Therefore I need the information about the entity since the coordinate alone is not sufficient.
>
> Honestly I don't know what is  the DiscreteFunctionAdapter.
> The only ones I found are the GridFunctionAdapter and the LocalFunctionAdapter. For this reason I would like to add the AnalyticalFunctionAdapter to simplify the usage with a c++ function.
>
> Cheers,
> Marco.
> ________________________________________
> From: Tobias Malkmus [tomalk at mathematik.uni-freiburg.de]
> Sent: Friday, June 05, 2015 1:47 PM
> To: Agnese, Marco; dune-fem at dune-project.org
> Subject: Re: [dune-fem] LocalFunctionAdapter
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Marco
>
> One small question from my side. What is the usage of entity in your
> "do stuff" part?
>
> If you need it just to get the global coordinates, you should use the
> grid function adapter on top of a wrapper around your c++ function.
>
> IF you acctually need more informations from the entity, then you
> should use the DiscreteFunctionAdapter, which Andreas mentioned.
>
> By the way, where can i find this within fem ? The grep for
> DiscreteFuncitonAapter results in :
>
> ./dune/fem/function/common/localfunctionadapter.hh:14:    /**
> @addtogroup DiscreteFunctionAdapter
> ./dune/fem/function/common/localfunctionadapter.hh:16:        Similar
> to DiscreteFunctionAdapter but here we provide a LocalFunction
> ./dune/fem/function/common/localfunctionadapter.hh:35:    //! traits
> of DiscreteFunctionAdapter
>
> But there is no such class.
>
>
> Best Tobias
>
>
> On 06/05/2015 02:24 PM, Agnese, Marco wrote:
>> Hi Andreas, to recap the class LocalAnalyticalFunction which I
>> implemented simply store a reference to a C++ function
>>
>> RangeType f(const DomainType& x,const double& t,const EntityType&
>> entity) { //do stuff }
>>
>> and add all the necessary types/methods in such a way you can pass
>> it to the LocalFunctionAdpater to obtain a GridFunction.
>>
>> I would like to add a class AnalyticalFunctionAdapter do Dune-Fem
>> that takes a C++ function and return a GridFunction (using the
>> aforementioned LocalAnalyticalFunction and LocalFunctionAdapter).
>>
>> In this way would be very handy for everybody to transform the c++
>> fucntion f into a GridFunction.
>>
>> Cheers, Marco. _______________________________________________
>> dune-fem mailing list dune-fem at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-fem
>>
>>
>
>
> - --
> Tobias Malkmus                 <tomalk at mathematik.uni-freiburg.de>
>
> Mathematisches Institut               Tel: +49 761 203 5627
> Abt. für Angewandte Mathematik        Universität Freiburg
> Hermann-Herder-Str. 10
> 79104 Freiburg
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBAgAGBQJVcZpQAAoJEBMY7DHvcWNg37UH/jGHDT6e8VlfP/3VB+FVWLH7
> V2z80WtmOI0mQooBhX7ZqunfUwhmmf0MCN5IXcHBBKBTQG3+LrEJYlUbO8XTh0jE
> aeFMW1C4oUP6IShdmaplkaCsVr/KCqcTJ6e3YqchtJSmPKeIAOPntOiWYebEMSOC
> +cluitoXVBuyhnL9PvXlpRMH8oD6gVzmKxRDrslUS0AABxuIRYQtRHCfkFJWvVoP
> j9WolGnzojfRnSqT68mdeKR85+uFAHGG/P8Fo//fIwoH8FTBzEL0dndPnisp7QdJ
> MeY3Q99XyMNfDiG/YFrw8xFHBSDywbo+q+YFblXWWxDLqX42HeZDSDjm8AV7Sbk=
> =krj9
> -----END PGP SIGNATURE-----
> _______________________________________________
> dune-fem mailing list
> dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem
>

-- 
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the dune-fem mailing list