getfem-users
[Top][All Lists]
Advanced

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

RE: [EXT] Re: compute node normal on exterior surface of mesh


From: Lesage,Anne Cecile J
Subject: RE: [EXT] Re: compute node normal on exterior surface of mesh
Date: Fri, 4 Feb 2022 20:46:23 +0000

Dear Konsta

 

Thank you

Indeed I will go with the faces solution

 

Just to clarify 0.9 is the minimum criterium on the scalar product of the norm with the direction in bracket

The think the outer faces minus that region aligned with positive x

I can use region_substract right?

Or  m.set_region(99,m.outer_faces_with_direction([-1,0],-0.7))?

 

Regards

AC

 

From: Konstantinos Poulios <logari81@googlemail.com>
Sent: Friday, February 4, 2022 2:37 AM
To: Lesage,Anne Cecile J <AJLesage@mdanderson.org>
Cc: getfem-users@nongnu.org
Subject: [EXT] Re: compute node normal on exterior surface of mesh

 

WARNING: This email originated from outside of MD Anderson. Please validate the sender's email address before clicking on links or attachments as they may not be safe.

 

Dear Anne-Cecile

 

It is easy to get averaged normals on a mesh_fem:

 

m=gf.Mesh("load", "ladder.mesh")
md=gf.Model("real")
m.set_region(99,m.outer_faces())
mf=gf.MeshFem(m,3)
mf.set_classical_fem(1)
U=md.interpolation("Normal",mf,99)
mf.export_to_vtu("normals.vtu", mf, U, "Normals")

 

image.png

 

you can then interpolate U on some given points with computer_interpolate_on.

 

However, I would rather recommend a solution with faces rather than points. Averaging unit vectors leads in general to non-unit vectors. Moreover, points in general do not make sense in a physical world. Surfaces and volumes do. I would recommend you to use the outer_faces_with_direction function. For example with

 

m.set_region(99,m.outer_faces_with_direction([0,1,0],0.9))

 

you can define a region with outer normals pointing approximately in the positive Y direction.

 

Best regards

Kostas

 

 

 

On Thu, Feb 3, 2022 at 12:22 AM Lesage,Anne Cecile J <AJLesage@mdanderson.org> wrote:

Dear all

 

I see in the python documentation that  the mesh class has a function normal_of_face

 

I would like to compute the mean normal at node points (mean of the faces normal to which this point belong) on the exterior surface of the mesh

I have the list of those points id

 

This is to do a direction test for setting boundary conditions

 

Thank you

Regards

Anne-Cecile

 

 

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

reply via email to

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