Hello Chritophe, thanks for your kind response:
On Wed, 2015-01-28 at 20:17 +0100, Christophe Geuzaine wrote:
> This is nice, but it does not solve the issue of getting the outward normal
> in the sense needed to set neumann or robin boundary conditions.
In what sense? All the data you need is there...
In the sense that I will try to explain in the attached geometry. Gmsh reports
that the square at the bottom has normals that are not outward. It gets even
worse if line 16 is replaced by
Plane Surface(6) = {-5};
I woukd like a mechanism for obtaining the normal pointing away from the bulk
domain, not just following the face orientation.
Moreover, the attached geometry files is composed of two blocks which
correspond to different physical groups (say they are made of different
materials). In the case that the boundary condition involves a bulk property
(say the thermal conductivity in a neumann-type bondary condition for the heat
conduction equation) there is no way to directly link the surface elements in
physical entities 101 and to the the corresponding attached volume element,
which is the one that belongs to either physical entity 204 or 205 that refers
to the actual material.
Not only a mechanism for writing directly the list of first-neighbors for each
element may solve the link between surface and volume elements for setting BCs,
but also would ease the implementation of solvers based on finite-volumes
spatial discretizations.
BTW, for 2D problems (say a square confined to the x-y plane) Gmsh does not
compute (or at least does not show) the normals of the line elements where
boundary conditions are to be applied, so this computation has to be done from
the solver side.
> BTW, I think that there is some valuable information about the meshed
> geometry that should be optionally included in the resulting mesh file. For
> example, I do not see the point of having to compute the outward normals (or
> the face areas or the element's neighbors) from the solver side. Moreover,
> with the information Gmsh has in its administrative structures it should be
> far more efficient to compute the geometric properties at the time of the
> mesh generation, let alone if the same mesh has to be used several times in
> different runs.
The best is probably for you to design a file format that contains all the info
you need. Have a look at all the Geo/GModelIO_*.cpp routines to get some
examples.
What about adding optional sections like $Normals$/$EndNormals$,
$Neighbors$/$EndNeighbors$?
> I tried to follow step-by-step the mesh() method but I am not so fond to C++
> so I could not completely understand what is going on behind, but maybe
> someone here may be able to tell.
You can also use the Python bindings if you're more familiar with that language.
Neither, but I can get along with it.
Can you point out where in the source tree where the normals are computed?
What about face areas and element neighbors? Is the ANN library only used for
the nearest-neighbor plugin or Gmsh uses it when computing the mesh?
Thanks again!
--
Germán Theler :: CTO Eng & IT
CITES – Centro de Innovación Tecnológica Empresarial y Social S.A.
Dirección General Sancor Seguros
Grupo Sancor Seguros
tel +54 3493 –428 500 – Int.: 3374
[email protected]<mailto:[email protected]>
www.cites-gss.com<http://www.cites-gss.com> -
www.gruposancorseguros.com<http://www.gruposancorseguros.com>
________________________________
Imprima este mensaje sólo si es absolutamente necesario.
Para imprimir, en lo posible utilice el papel de ambos lados.
El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.
************AVISO DE CONFIDENCIALIDAD************
El Grupo Sancor Seguros comunica que:
Este mensaje y todos los archivos adjuntos a el son para uso exclusivo del
destinatario y pueden contener información confidencial o propietaria, cuya
divulgación es sancionada por ley. Si usted recibió este mensaje erróneamente,
por favor notifíquenos respondiendo al remitente, borre el mensaje original y
destruya las copias (impresas o grabadas en cualquier medio magnético) que
pueda haber realizado del mismo. Todas las opiniones contenidas en este mail
son propias del autor del mensaje. La publicación, uso, copia o impresión total
o parcial de este mensaje o documentos adjuntos queda prohibida.
Disposición DNDP 10-2008. El titular de los datos personales tiene la facultad
de ejercer el derecho de acceso a los mismos en forma gratuita a intervalos no
inferiores a seis meses, salvo que acredite un interés legítimo al efecto
conforme lo establecido en el artículo 14, inciso 3 de la Ley 25.326. La
DIRECCIÓN NACIONAL DE PROTECCIÓN DE DATOS PERSONALES, Organo de Control de la
Ley 25.326, tiene la atribución de atender las denuncias y reclamos que se
interpongan con relación al incumplimiento de las normas sobre la protección de
datos personales.
cl1 = 35;
lx = 100;
ly = 100;
Point(1) = {0, 0, 0, cl1};
Point(2) = {lx, 0, 0, cl1};
Point(3) = {lx, ly, 0, cl1};
Point(4) = {0, ly, 0, cl1};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(5) = {1, 2, 3, 4};
Plane Surface(6) = {5};
Extrude {0, 0, 0.5*lx} {
Surface{6};
}
Extrude {0, 0, 0.25*lx} {
Surface{28};
}
Physical Surface(101) = {50, 6};
Physical Surface(102) = {19, 15, 27, 23, 49, 45, 41, 15, 37};
Physical Volume(204) = {1};
Physical Volume(205) = {2};
Mesh 3;
General.Trackball=1;
General.TrackballQuaternion0 = -0.5552173440099455;
General.TrackballQuaternion1 = -0.149247833784577;
General.TrackballQuaternion2 = -0.1664473918304832;
General.TrackballQuaternion3 = -0.7998462669625873;
Mesh.Normals = 40;
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh