← Back to team overview

dolfin team mailing list archive

Form with a Real space

 

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?

Regards,

Johan



Follow ups