Dear Eleonora,

If you just want to print the coordinate of the Gauss point inside de generic 
assembly you can just add a
Print(X) inside your assembly string.
If you do not want to change the result of your computation your can insert it 
inside an instuction having no effect such as

  ... *(1+Norm(Print(X)-X))

or something similar.

Yves.


----- Original Message -----
From: "Eleonora Piersanti" <[email protected]>
To: "Yves Renard" <[email protected]>
Cc: [email protected]
Sent: Wednesday, February 11, 2015 11:49:18 AM
Subject: Re: [Getfem-users] Coordinates of gauss points

Thank you for the answer. 

Since I need to assamble a complicate term I am using the high level generic 
assembly. For debugging purpose, I am using the Print command, as suggested in 
the guide, that print on screen the value of a quantity in each Gauss Point. I 
would recover the coordinates of those points so that I can understand if what 
I am doing is correct. 

I tried with fem_interpolation_context but I have problems to understand how to 
call the constructor properly. Is there a way to save X variable in a vector 
with high level features? 

Sorry, maybe the question is trivial.
Kind regards,
Eleonora  
  

     Il Mercoledì 11 Febbraio 2015 8:16, Yves Renard <[email protected]> 
ha scritto:
   

 Dear Eleonora,

It is of course possible. It depends in which context you need them.

In the high level generic assembly, the current position (i.e. the coordinates 
of the current Gauss point) is simply denoted by X.

In te internal of getfem, when elementary computations occurs, there is a 
special object named "fem_interpolation_context"
. If ctx is such an object, ctx.xref() is the coordinate of the Gauss point on 
the reference element and ctx.xreal() on the real one.

If you need the Gauss points on each element, you can loop over the elements 
and the Gauss points inside an element and using a fem_interpolation_context 
object have the coordinate of each Gauss point on the real element.

Don't forget also that there is a specific structure named "im_data" which is 
specially dedicated to store some data on each Gauss points and which can be 
used in generic assembly.

Yves.



----- Original Message -----
From: "Eleonora Piersanti" <[email protected]>
To: [email protected]
Sent: Tuesday, February 10, 2015 7:49:00 PM
Subject: [Getfem-users] Coordinates of gauss points

Hi to everyone, 
is it possible to obtain the coordinates of the Gauss points? 
Thanks, 
Eleonora 

_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users



_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to