[dune-fem] Direct sum of spaces

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Jun 23 15:38:22 CEST 2015


Hi Marco,

maybe I am slow today, but I do not get your point. So you have two (say scalar) 
space P0 and P1. In this case, do you want the new space to model scalar 
functions that are the sum of a P0 and a P1 function? This would not be handled 
by the TupleDiscreteFunctionSpace. In the following, I will briefly sketch how 
you could come by such a space.

But given the tools in the tuple space you can easily write such a space. The 
only difference between the tuple space and your desired space is the 
basisfunctionset. You simply want it to sum the basis functions instead of 
multiplying them by e_i (where i is the position in the tuple) This can easily 
be adapted (in a copy, of course). Unfortunately, I cannot space you to write a 
big lot of boiler-plate code. Maybe others would also be interested in such a space.

There is, of course, the possibility write the entire space yourself. Given the 
P0 and P1 basis (or shape) function sets (which exist), you could write a new 
space behaving the way you want it. But that might be even more work. In either 
case, you have to write the "summing" basis (or shape) function set.

Best,

Martin

On 06/23/2015 02:51 PM, Agnese, Marco wrote:
> Hi Martin,
> the tuple space is a sort of solution but it is not what I would like. Indeed with the tuple space you have "independent" spaces.
> I use them for example to solve a stokes problem where one space represent the velocity and the other represent the pressure.
>
> The problem for the direct sum is the following.
> Suppose that you have all your code working with a space P0 therefore you have all your assemble routines, interpolations, errors estimation, dumping and so on. Than you can change the space to another with a simple typedef, so for example you can solve everything for P1.
> Now if you want to use a direct sum of the 2 spaces (P1+P0) you cannot simple define a tuple space of the two spaces P1 and P0 and solve everything over this space. Indeed you have to write a proper assemble routine to handle the tuple space, you have to interpolate the functions in a different way and so on. In other word you have to rewrite big portion of the code breaking the possibility to switch between spaces easily.
>
> Therefore the tuple space is a wrapper to encapsulate spaces into one in order to pass everything to a solver, but each space will have its own independence. What I would like, instead, is a simple way to sum the spaces and use this new space as an ordinary space.
>
> That is my understanding, but if I am wrong, please correct me.
>
> Cheers,
> Marco.
> _______________________________________________
> 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