getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] interface condition question


From: Renard Yves
Subject: Re: [Getfem-users] interface condition question
Date: Wed, 15 Jul 2009 21:32:18 +0200
User-agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1)


Jehanzeb Hameed <address@hidden> a écrit :

Hello,

I am trying to use the approach in inter_element.cc . I have a
triangle mesh of a circle. The interface between the domains is also a
circle.

In the function, compute_on_gauss_point, I need to access to normals,
as I want to calculate the jump in the normal direction for a vector
variable. However, it seems something is amiss in calculation of
normals. E.g. the code

        cout << "convex = " << cv1 << " face = " << f1<< " normal = "<<
pgt1->normals()[f1] << " points = ";
        for (bgeot::size_type pt = 0;pt <  3; ++pt) {
                cout <<  mf.linked_mesh().points_of_convex(cv1)[pt];
        }


pgt1->normals()[f1]
gives the normal of the reference element (pgt is the geometric transformation. If you want the normal of the real element you should multiply this normal by ctx.B() to the left.


gives output,

convex = 0    face = 1       normal = [-1, 0]         points = [-0.5,
0.866025][-0.288353, 0.385477][1.77042e-12, 1]

As can be seen, the normal is calculated incorrectly. Can someone
please tell me what's amiss?

I also wanted to discuss my approach to the problem, and was wondering
if its the best one. I have a system with a vector and a scalar
variable. I could see two ways to go about it in getfem.

1) Use bricks

2) Form my own system, with a fem having 3 (2 for vector, 1 for
scalar) degree of freedom's per vertex. This requires using
generic_assembly.

3) Use 2 fems, one for vector, one for scalar, form 4 matrices using
generic_assembly, then add these into one big matrix.

The three approaches are convenient, yes. If you use bricks, you will have anyway to define a brick for the coupling. So 1) and 3) are not so different (just, the use of bricks allows to go quickly not redefining how to prescribe the Dirichlet condition for instance).


I followed approach 2. I wanted to impose dirichlet conditions
strongly (i.e. use "getfem::assembling_Dirichlet_condition"), and I
couldnt see how I could do this with approach 1 and 3 above. It seems
I have to use a dirichlet condition brick, which uses lagrange
multipliers to enforce dirichlet conditions. Am I right, i.e. if I
want to use strong dirichlet conditions, then using approch 2 is the
way to go ?

It depends. If you want to prescribe an homogeneous (i.e. zero) Dirichlet condition, you can also use a partial_mesh_fem to eleminate the corresponding degrees of freedom. But may be the approach 2 is the simplest.


Yves.



So far, I have been able to get my approach working without the jump
condition. Now I want to incorporate the jump condition, but  thats
presenting some issues. Will it be possible for someone (e.g Yves or
Ronan or anyone else) to look into my code  if I am still unable to
get this to work?

Thanks,
-Jehanzeb


On Sun, Jul 12, 2009 at 6:20 AM, Renard Yves<address@hidden> wrote:

Jehanzeb Hameed <address@hidden> a écrit :

Hello,

I am now comfortable enough with getfem to start attacking the
interface problem, thanks to help from this list. In the code for
getfem++/contrib/inter_element_test, there is piece of code which I
cant fully understand, and I havent been able to figure it from the
documentation. The relevant lines of code are:

   const base_matrix& B = ctx1.B();
   gmm::mult(B, pgt1->normals()[f1], up);
   scalar_type norm = gmm::vect_norm2(up);
   scalar_type J = ctx1.J() * norm;

What is the matrix B? Also, does J give the determinant of Jacobian
transformation for the face (if so, why)?

B is the transpose of the inverse of the gradient of the geometric
transformation (pseudo-inverse if the element have a lower dimension than
the mesh) see the documentation pages

http://download.gna.org/getfem/doc/getfem_project/getfem_project_4.html#id5

http://download.gna.org/getfem/doc/getfem_project/getfem_project_7.html

ctx1.J() is the jacobian of the transformation of the whole element.
Multiplied by the norm of the normal to the face, it gives the jacobian of
the transformation of the face, yes.


Also, on a related note, I am planning to use the technique in this
file to implement the jump integral. Yves mentioned the method in
crack.cc, which uses mortars and some sort of constraints matrix,
which I havent looked into yet. Is there a reason to prefer one of the
two approaches?

It depends of what you need to do. If you have a single mesh with to regions
and a discontinuity between the two regions, the faster is probably the
method used in crack.cc.


Regards,

Yves.




Thanks,
-Jehanzeb


2009/7/1 Ronan Perrussel <address@hidden>:

Hello,

it was not fully straightforward but you can find an example in:
getfem++/contrib/inter_element_test,
if you have matching meshes on the interface. If not it is certainly
possible but I am not the expert to explain how to do.

I hope it helps,
Best regards,
Ronan

Jehanzeb Hameed a écrit :

Hello,

I am investigating the possibility of using getfem for implementing a
2 domain problem, with an interface between the domains. I want to use
continuous lagrange elements on each domain, and a jump condition at
the interface. The jump condition will take the form (u_1 - u_2, v_1 -
v_2), where u_1 and v_1 and test and trial functions for domain 1, and
u_2 and v_2 are test and trial functions for domain 2.  The integral
(u_1 - u_2, v_1 - v_2) is only over the interface between the domains.

Can this be done relatively easily in getfem?

Thanks,
-Jehanzeb

_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users




_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users












reply via email to

[Prev in Thread] Current Thread [Next in Thread]