how define independent function space in fenics?

Asked by Rana Zakerzadeh on 2013-03-21

Hi,

I want to solve a problem that on that I have 2 domain with an interface that makes then separate. I want to use one mesh in whole domain ( because I think if I define 2 mesh, I can not define interface), but I need to have 2 FunctionSpace "V" , since I want to use jump function on interface and I don't want it to be continuous on interface.

is there any way that I can solve this problem? any comment?
Thanks,
Rana

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Johan Hake
Solved:
2013-03-26
Last query:
2013-03-26
Last reply:
2013-03-22
Best Johan Hake (johan-hake) said : #1

What you want is CG 1 on the interior and DG 1 on the interface, right?
That is not possible at the moment.

Johan

On 03/21/2013 09:35 PM, Rana Zakerzadeh wrote:
> New question #224858 on FEniCS Project:
> https://answers.launchpad.net/fenics/+question/224858
>
> Hi,
>
> I want to solve a problem that on that I have 2 domain with an interface that makes then separate. I want to use one mesh in whole domain ( because I think if I define 2 mesh, I can not define interface), but I need to have 2 FunctionSpace "V" , since I want to use jump function on interface and I don't want it to be continuous on interface.
>
> is there any way that I can solve this problem? any comment?
> Thanks,
> Rana
>

Some time ago, I faced a similar problem. You can find my solution (C++, works with dolfin.1.0.1) at

http://tu-chemnitz.de/~gerw/IdentifyDoFs.tar.gz

It consists of a stationary heat equation on two domains, coupled by some heat exchange in between. Therefore, I glued two CG1 function spaces on the common interface (hence, the global function space is discontinuous at this interface). However, you need that the two local function spaces have the same DoF-coordinates on their intersection.

Thanks Gerd, I see in your solution you used this command for having 2 function space:
Timer t3("Create FunctionSpaces");
 Poisson::FunctionSpace V1(mesh1);
 Poisson::FunctionSpace V2(mesh2);
 t3.stop();

But how did you glue them together?

Thanks Johan Hake, that solved my question.

Jan Blechta (blechta) said : #5

> Some time ago, I faced a similar problem. You can find my solution
> (C++, works with dolfin.1.0.1) at
>
> http://tu-chemnitz.de/~gerw/IdentifyDoFs.tar.gz
>
> It consists of a stationary heat equation on two domains, coupled by
> some heat exchange in between. Therefore, I glued two CG1 function
> spaces on the common interface (hence, the global function space is
> discontinuous at this interface). However, you need that the two
> local function spaces have the same DoF-coordinates on their
> intersection.

Hello Gerd,
quite clever solution. Does it work in parallel?

Jan

@Rana Zakerzadeh:
The gluing is done in the assembly, in particular the off-diagonal blocks (Coupling::BilinearForm c).

@Jan Blechta:
No. We used it for some small, academic examples.