[Gmsh] freefem
Geordie McBain
gdmcbain at freeshell.org
Fri Jun 18 01:52:53 CEST 2010
2010/6/18 Luis Casillas <casillasluis at lanl.gov>:
> Hi,
> I continue with the attempt to export a mesh to freefempp,
> the strange thing is that I have had success in a few cases,
> but in most of them I get errors, I'm attaching a pair of meshes that
> don't work,
> thanks
Hello. There's a little error in domain1.geo that makes the mesh produced with
$ gmsh -2 -format mesh -string 'Mesh.SaveElementTagType=2;' -o
domain1.3.mesh domain1.geo
$ gawk -f 3to2.awk domain1.3.mesh > domain1.mesh
wrong: the top-right subdomain has the wrong orientation, clockwise
rather than anticlockwise. Change the line in domain1.geo defining
its boundary as follows:
$ diff domain1{,a}.geo
52c52
< Line Loop(21) = {18,19,20,10,14};
---
> Line Loop(21) = {-18,-19,-20,-10,-14};
Then it works fine; e.g. the FreeFem++ file
mesh Th = readmesh ("domain1a.mesh");
cout << "area: " << int2d (Th) (1.0) << "." << endl;
happily and correctly computes the area as 100.
I didn't look at the other two meshes.