← Back to team overview

dolfin team mailing list archive

Re: Form with a Real space

 


On 25. sep. 2010, at 02:37, Johan Hake <johan.hake@xxxxxxxxx> wrote:

> Hello!
> 
> I have been experimenting with forms including spaces of Real. I am using the 
> Real space to calculate average values of other species across the boundaries. 
> These values are then used to cacluate derived values such as fluxes across a 
> boundary. In this way I manage to connect two sepatated meshes (stored in the 
> same mesh) via the calculated flux. As everything is contained in one form I 
> can linearize it an use it in a Newton solver, which converges nicely.
> 
> In this procedure I have used unknowns of Reals to caluclate other Reals. This 
> is somewhat combersome when I have to express this using an integral. 
> 
> Consider:
> 
>  V = MixedFunctionSpace([FunctionSpace(mesh, "CG", 1)]+
>                         [FunctionSpace(mesh, "R", 0)]*3)
> 
>  u, r0, r1, r2 = split(Function(V))
>  v, v0, v1, v2 = TestFunctions(V)
>  ...
>  L0 = (r0-(r2-r1))*v0*ds(1)
> 
> Here I express r0 in terms of r1 and r2. However in the form I need to 
> integrate the expression over an arbitrary domain in the mesh. I am not 
> interested in this, as the value is not spatialy varying. Do you have any 
> suggestions of how to avoid this or to do it in some other manner?
> 

It is not entirely clear to me which values that are unknown above, but if everything is known or you are just operating on real numbers, I imagine that extracting the value of the Function using values() could be simpler? 

--
Marie


> Regards,
> 
> Johan
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References