Re: [Gmsh] Problem with gmsh mesh in freefem++

2020-12-20 Thread Max Orok
Hi Sadia,

Can you try adding the line
Mesh.MshFileVersion = 2.2;
to your geo script? It's possible freefem is expecting a msh 2.2 file
instead of the new default version 4.1

Sincerely,
Max

On Sun, Dec 20, 2020 at 1:52 AM Sadia Siddiqa 
wrote:

> Hi,
>
> I am Sadia. I am facing the problem with gmsh mesh used in freefem++. Its
> a simple geometry. If you can help me that would be great. I have attached
> my .geo file with this email. When I import it in freefem it does not
> generate mesh.
>
> Kindly help.
> Sadia
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] SolidWorks tagging elementary entities

2020-10-27 Thread Max Orok
Hi Charles,

There's support for reading STEP label and colour information, which you
could map to Gmsh physical groups.
Here is an example of using labels as physical groups:
https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/demos/api/step_assembly.py
https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/demos/api/as1-tu-203.stp

It is still a little bit tricky, here are some related issues that might be
helpful:
https://gitlab.onelab.info/gmsh/gmsh/-/issues/559
https://gitlab.onelab.info/gmsh/gmsh/-/issues/693

Sincerely,
Max

On Tue, Oct 27, 2020 at 1:46 AM CHARLES WRIGHT <
101091...@student.swin.edu.au> wrote:

> Good Afternoon,
>
> I am currently working on a few 3D models using SOLIDWORKS for input into
> esys-escript with gmsh as the meshing software.
>
> we’ve successfully created the files and ported as STEP files into gmsh,
> the meshing has worked great. The only problem is tagging the physical
> groups for manipulation in esys.-escript.
>
>
>
> We could go through each file and tag them manually in gmsh, but I thought
> there had to be an easier way that I’m missing in SOLIDWORKS or an
> intermediate step.
>
> Any advice is appreciated.
>
>
> Charles
>
> Swinburne University of Technology
>
>
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
> _______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Transfinite 3D meshing

2020-10-06 Thread Max Orok
Hi Bruno,

At a quick glance, it's possible you require some more synchronize calls
between the different API calls.
It's good practice to call synchronize when you move from one part of the
API to another (e.g. from gmsh.model.geo to gmsh.model.geo.mesh).
This is a somewhat common issue (see e.g.
https://gitlab.onelab.info/gmsh/gmsh/-/issues/987,
https://gitlab.onelab.info/gmsh/gmsh/-/issues/986).

I see you have a single sync call at the end but it possibly comes too late
to register the transfinite settings.
I would suggest trying to minimize your script further (maybe a single
geometry and a single transfinite call) to dig in further.

Sincerely,
Max

On Tue, Oct 6, 2020 at 10:43 AM Bruno  wrote:

> Dear Gmsh community,
>
> I have a 3 dimensional square duct here attached that I wish to mesh
> using the transfinite option in Gmsh, which seems very powerful.
>
> I wish to have on each side of the inlet and outlet square of the duct
> 20 meshing points
>
> To this end I wrote the script below, but it does the meshing without
> taking into account the transfinite points.
>
> Any clue what I am doing wrong here? I could not find the answer in the
> mail archive.
>
> Python script:
>
> import gmsh
>
> dcell = Wd = Hd = 2.8
> tol = dcell / 100
> Ld = 18.46
>
> gmsh.initialize()
> gmsh.option.setNumber("General.Terminal", 1)
> gmsh.option.setNumber("Mesh.MshFileVersion", 4.1)
> gmsh.option.setString("Geometry.OCCTargetUnit", "MM")
> gmsh.option.setNumber("Mesh.Optimize",1)
> #gmsh.option.setNumber("Mesh.Optimize",1)
>
> gmsh.merge("SquareDuct.brep")
> model = gmsh.model
> model.mesh.removeDuplicateNodes()
>
>
> # CREATE PHYSICAL GROUPS
>
> # WALLS
> s = []
> s_bot = model.getEntitiesInBoundingBox(-Hd/2-tol, -Wd/2-tol, -Ld/2-tol,
> -Hd/2+tol, Wd/2+tol, Ld/2+tol, dim = 2)
> s_top = model.getEntitiesInBoundingBox(Hd/2-tol, -Wd/2-tol, -Ld/2-tol,
> Hd/2+tol, Wd/2+tol, Ld/2+tol, dim = 2)
> s_left = model.getEntitiesInBoundingBox(-Hd/2-tol, -Wd/2-tol, -Ld/2-tol,
> Hd/2+tol, -Wd/2+tol, Ld/2+tol, dim = 2)
> s_right = model.getEntitiesInBoundingBox(-Hd/2-tol, Wd/2-tol, -Ld/2-tol,
> Hd/2+tol, Wd/2+tol, Ld/2+tol, dim = 2)
> s = s + s_bot + s_left + s_top + s_right
> s_no_slip = [s[i][1] for i in range(len(s))]
> p = model.addPhysicalGroup(2, s_no_slip)
> model.setPhysicalName(2, p, "noslip")
> print("noslip = ", len(s))
>
> # FLUID INLET CURVE
> c_in = model.getEntitiesInBoundingBox(-Hd/2-tol, -Wd/2-tol, -Ld/2-tol,
> Hd/2+tol, Wd/2+tol, -Ld/2+tol, dim = 1)
> # FLUID INLET
> s = model.getEntitiesInBoundingBox(-Hd/2-tol, -Wd/2-tol, -Ld/2-tol,
> Hd/2+tol, Wd/2+tol, -Ld/2+tol, dim = 2)
> p = model.addPhysicalGroup(2, [s[i][1] for i in range(len(s))])
> model.setPhysicalName(2, p, "inlet")
> print("inlet = ", len(s))
> for ci in c_in:
>  gmsh.model.geo.mesh.setTransfiniteCurve(ci[1], 20)
> p = model.addPhysicalGroup(1, [c_in[i][1] for i in range(len(c_in))])
> model.setPhysicalName(1, p, "inlet_curve")
>
> # FLUID OUTLET CURVE
> c_out = model.getEntitiesInBoundingBox(-Hd/2-tol, -Wd/2-tol, Ld/2-tol,
> Hd/2+tol, Wd/2+tol, Ld/2+tol, dim = 1)
> # FLUID OUTLET
> s = model.getEntitiesInBoundingBox(-Hd/2-tol, -Wd/2-tol, Ld/2-tol,
> Hd/2+tol, Wd/2+tol, Ld/2+tol, dim = 2)
> p = model.addPhysicalGroup(2, [s[i][1] for i in range(len(s))])
> model.setPhysicalName(2, p, "outlet")
> print("outlet = ", len(s))
> for co in c_out:
>  gmsh.model.geo.mesh.setTransfiniteCurve(co[1], 20)
> p = model.addPhysicalGroup(1, [c_out[i][1] for i in range(len(c_out))])
> model.setPhysicalName(1, p, "outlet_curve")
>
> for si in s_no_slip:
>  gmsh.model.geo.mesh.setTransfiniteSurface(si)
>
> # VOLUME
> s = model.getEntities(3)
> p = model.addPhysicalGroup(3, [s[i][1] for i in range(len(s))])
> model.setPhysicalName(3, p, "air")
>
> for vi in [s[i][1] for i in range(len(s))]:
>  gmsh.model.geo.mesh.setTransfiniteVolume(vi)
>
> gmsh.model.geo.synchronize()
>
> # MESH 3D
> model.mesh.generate(3)
> #model.mesh.recombine()
>
> gmsh.write("SquareDuct.msh")
> gmsh.finalize()
>
>
> Best regards
>
> Bruno Agostini
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] GMSH units

2020-09-24 Thread Max Orok
Hi Zuheyr,

You can use the option Geometry.OCCInputScaling:

Geometry.OCCScaling

Scale STEP, IGES and BRep models by the given factor when importing them
with the OpenCASCADE kernel
Default value: 1
Saved in: General.OptionsFileName
Given in the geometry options list:
http://gmsh.info/dev/doc/texinfo/gmsh.html#Geometry-options-list

Sincerely,
Max

On Thu, Sep 24, 2020 at 6:31 AM Zuheyr Alsalihi  wrote:

> Dear Prof. Geuzaine and gmsh experts,
>
> I am using gmsh-4.5.6-Linux64. If I read a CAD step file in mm, and if I
> want to make a mesh in meters,
> what should I do? Thank you so much for reading.
>
> Best, Zuheyr ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Scripting multiple views in one picture

2020-08-27 Thread Max Orok
Hi Zuheyr,

I assume you're talking about the Window->Split Horizontally command in the
GUI?
I took a quick look, it's possible this command is either undocumented or
not exposed (yet) through the scripting interface.
As a workaround, you could perhaps create view snapshots one at a time and
paste them together with some image processing tool.

Tutorial 8 (also available in C++ and Python) shows how to rotate the
camera in a view.
http://gmsh.info/doc/texinfo/gmsh.html#t8

Sincerely,
Max

On Thu, Aug 27, 2020 at 1:54 PM Zuheyr Alsalihi  wrote:

> Dear Gmsh creators, experts,
>
> How can I script to split the view in 2 like a technical drawing, view
> from right on the left side, view from left on the right side, in a split
> view? Or can I embed a previous view to a small frame somewhere in the main
> view?
> Many thanks for reading!
>
> Best wishes. ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-08-25 Thread Max Orok
It's in the options list, to get to the list:
Open Gmsh -> Help -> Current Options and Workspace
Edit the value

[image: image.png]

To save for next time:
Tools->Options->Save options on exit

[image: image.png]

Sincerely,
Max


On Tue, Aug 25, 2020 at 12:35 AM cean wang  wrote:

> Where is the "Solver.AutoMesh = 0" option?
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Comparison of different meshes

2020-08-14 Thread Max Orok
Hi Maurice,

The hexahedral mesh (and also the tetrahedral mesh) seems quite coarse.
Could you refine the mesh and see if the result smoothes out?

Sincerely,
Max

On Fri, Aug 14, 2020 at 10:25 AM Rohracker, Maurice 
wrote:

> Dear GMSH user and developer,
>
> I created two meshes for a box with a spherical inclusion around the
> origin, one with tetrahedra and one with hexahedra. For both, I created
> a simple load case in Abaqus and compared both results in a short report
> (see attached). In the report, a more detail explanation of the load
> case is given as well.
>
> Do you have any idea, why in the hexahedral case, the stress results are
> not that smooth like in the tetrahedral case? Could it be that I missed
> some option while creating the hexahedral mesh? Are there any options
> which could improve the mesh and such also the results? Or are these
> things related to the simulation I am doing?
>
> Do you have any similar experience with such behaviour?
>
> We are using GMSH 4.4.1.
>
> If you need more information, please let me know.
>
> Thank you very much in advance.
>
> Best regards,
> Maurice Rohracker
> Master Computational Engineering
> FAU Erlangen-Nürnberg___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Does OCC fillet splines?

2020-07-30 Thread Max Orok
Hi Karim,

If possible, you should submit the geo script of your Gmsh session. It will
help to see what you've tried already.

Max

On Wed, Jul 29, 2020 at 1:26 PM Kadry Abdelmeguid Karim Hesham Ahmed <
karim.kadryabdelmeg...@epfl.ch> wrote:

> Hello Gmsh community,
>
> I am learning how to fillet a volume and I'm running into problems when I
> use closed splines as faces
>
>
> I draw a simple closed spline, define a plane surface, extrude it a small
> distance. I then try to fillet the face curve belonging to the extruded
> volume and an error appears which says "could not compute fillet".
>
>
> I also tried various radii to check but it did not work either!
>
> Is the kernel able to fillet spline based edges? I am able to fillet the
> same extruded volume but with circles just fine. Tutorial 19 only deals
> with circles as the face being extruded and not splines (only as
> guidewires) so that's not much help.
>
>
> I attached  .brep of the volume that I'm having trouble with.
>
> Thanks!
>
> Karim
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Error codes.

2020-07-03 Thread Max Orok
I tried to make a rough taxonomy a while back.
The same error code might mean something different depending on the
function
(function returning 1 in gmsh::option namespace means something different
than for gmsh::model namespace)


*Gmsh error codes: *
*Error code -1 (everywhere):*
The Gmsh context wasn't properly initialized, or a required library
component is missing.
For example, calling any `fltk` functions without a linked FLTK library.

*gmsh*/

*Error code 1*
One of Gmsh's "shell" methods couldn't run successfully.
For example, a bad file path was given to the `open` function.


*gmsh/model, gmsh/view, etc. *
*Error code 1*
A function that mutates the model couldn't complete successfully.
For example, addPoint couldn't succeed because of a tag collision.

*Error code 2*
A model lookup function failed.
For example, tried to call a function on a view that doesn't exist.


*Error code 3 (rare) *
The function couldn't successfully use a required input parameter.
For example,  a user-specified quadrature scheme couldn't be applied to the
data.

*Error code 4 (rare)*
A parallelizable mesh query function failed

*gmsh/option*
*Error code 1*
The given option doesn't exist in Gmsh.

There's some functions that don't fit. I think error code 2 in particular
is a bit of a catch-all.

On Fri, Jul 3, 2020 at 10:04 AM Christophe Geuzaine 
wrote:

>
> Hi Keith,
>
> Currently they are generic (this will be improved in the future). Set the
> "General.Terminal" option to 1 to see the error message on the terminal, or
> use the "logger" api to record the messages.
>
> Christophe
>
> > On 3 Jul 2020, at 15:51, Keith Sloan  wrote:
> >
> > Where can I find the documentation for error codes
> >
> > Like where can I find out what error code 2 means?
> >
> > ('gmshModelMeshAddElementsByType returned non-zero error code: ', 2)
> >
> >
> >
> >
> >
> > ___
> > gmsh mailing list
> > gmsh@onelab.info
> > http://onelab.info/mailman/listinfo/gmsh
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] asking for help

2020-05-11 Thread Max Orok
Hi Jose,

It would help if you could provide the problematic file.
You could also try using a more recent version of Gmsh:
http://gmsh.info/#Download

Sincerely,
Max

On Mon, May 11, 2020 at 11:01 AM Jose Juan Alonso del Rosario <
josejuan.alo...@gm.uca.es> wrote:

> Dear colleages,
>
> I am meshing a simple volumen consisting in a sheet of certain thickness.
> I have forced built-in option to avoid the problem with opencascade and the
> message of volumen consists of no elements happens whatever I do. The
> version is 3.0.6 on linux.
>
> Does anyone have any suggestion please?
>
> Thanks in advance
>
> Jose
>
>
> --
> Prof. Dr. Jose Juan Alonso del Rosario
> Applied Physics Dept.,
> Naval and Oceanic Engineering.
> University of Cadiz.
> Avda Rep Saharaui s/n. Puerto Real, 11510, Cadiz, Spain
> Tlf: +34 956 016054
> Fax: +34 956016079
> Secretary: +34 956016078
>
> "All I wanna say is that they don't really care about us", Michael Jackson
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Questions on 4.1 format

2020-03-30 Thread Max Orok
Hi Paul,

There's a discussion on the new format here that might be helpful:
https://gitlab.onelab.info/gmsh/gmsh/-/issues/444


On Mon, Mar 30, 2020 at 11:02 AM paul francedixhuit 
wrote:

> Hi All
> I'm currently having a look to the new 4.1 gmsh format.
>
> Compared to the previous 2.2 legacy one:
>
>- I guess *$Nodes* and *$Elements* for example use now blocs (or it
>has been splitted in blocs) in order to take advantages of parallelization,
>hasn't it?
>- *$Entities* and *$PhysicalNames* are used to define specific groups
>of elements to apply on specific features (typically sub-parts)
>
> Nonetheless concerning *$NodeData* (and *$ElementNodeData*), I've not
> tested it so far but I feel the structure remains identical to the 2.2 one:
> am I right? if so I can imagine improvements will be provided in a next
> future, won't be?
>
> The next steps will be to use it through the Python API 
>
> Bye
>
> Paul
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Adding second-order nodes to tet4

2020-03-19 Thread Max Orok
Hi Jeremy,

Going through the API shouldn't be too bad..

   - going over the triangle elements
   - find midpoint nodes
   - either use addElements or find the element format and make them on the
   fly

Could you maybe send a small piece of the mesh file to try out?

Max

On Thu, Mar 19, 2020 at 7:10 AM Jeremy Theler  wrote:

> Hi All
>
> Say I have a .msh file with first-order tetrahedra and triangles. How
> can I ask Gmsh to convert these tet4 and tria3 to tet10 and tria6 by
> adding mid-edge nodes? Something like "refine by splitting" but for p
> instead for h.
>
> I only have the .msh file, not the original geometry.
>
> Any ideas?
>
> Regards
> --
> jeremy theler
> www.seamplex.com
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] GmshToFoam Error

2020-02-13 Thread Max Orok
Hi Nick,

gmshToFoam is an OpenFOAM community tool and not supported by the Gmsh
team.
That said, have you tried setting Mesh.MshFileVersion=2.2 in your geo file?

There was a somewhat recent mesh major version change from 2 to 4, perhaps
your mesh is version 4?
There are some old issues that might be helpful:

https://gitlab.onelab.info/gmsh/gmsh/issues/687
https://gitlab.onelab.info/gmsh/gmsh/issues/672

Sincerely,
Max

On Thu, Feb 13, 2020 at 10:48 AM Nick Barra  wrote:

> Hi,
>
>
>
> I am trying to model an aerofoil by creating a hybrid mesh in Gmsh and
> solving it in OpenFoam. When I try to run the ‘gmshToFoam’ converter I get
> warnings which are then presented as errors when using checkMesh. I have
> copied the first few error lines below:
>
>
>
> FOAM Warning
> :
>
>
> From function Foam::polyMesh::polyMesh(const Foam::IOobject&,
> Foam::pointField&&, const cellShapeList&, const faceListList&, const
> wordList&, const wordList&, const Foam::word&, const Foam::word&, const
> wordList&,
> bool)
>   
>in
> file meshes/polyMesh/polyMeshFromShapeMesh.C at line
> 592
> 
> Found
> 3653 undefined faces in mesh; adding to default
> patch.
>Finding faces of patch
> 0
>
>
> Finding faces of patch
> 1
>
>
> --> FOAM Warning : Not using gmsh face 4(4 414 446 16) since zero vertex
> is not on boundary of
> polyMesh
> --> FOAM Warning
> :
>
>
> From function int main(int,
> char**)
>
>
> in file gmshToFoam.C at line
> 1549
>  Could not match gmsh face 4(4 414 446 16) to any of the
> interior or exterior faces that share the same 0th
> point
> --> FOAM Warning : Not using gmsh face 4(414 415 447 446) since zero vertex
> is not on boundary of
> polyMesh
> --> FOAM Warning
> :
>
>
> From function int main(int,
> char**)
>
>
> in file gmshToFoam.C at line
> 1549
> Could not match gmsh face
> 4(414 415 447 446) to any of the interior or exterior faces that share the
> same 0th point
>
>
>
>
>
> This error then repeats several times, and then it seems to successfully
> find faces for the rest of the patches.
>
> The checkMesh error is ‘Unused points found in the mesh, number unused
> faces:...’
>
>
>
> My geometry file is attached to this email.
>
>
>
> Kind Regards,
>
> Nick
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Create mesh for 1D geometry

2020-02-07 Thread Max Orok
I'm not sure dwg or dwf is supported, but I know you can import STEP, IGES
or BREP.

If it's just the one geometry I think you could manually specify it like we
did for a single line, but make sure that
the lines are connected at those points.


On Fri, Feb 7, 2020 at 8:04 AM Deepa  wrote:

> Hi Max,
>
> Thanks a lot. It works like a charm!
>
> I'd like to know if it is possible to create NASTRAN bulk data file for
> geometries like the following
>
> [image: Untitled.png]
>
> I have the geometry in  dwg and dxf file format created from AutoCAD.
> Basically, I have specified coordinate positions to create points at every
> delx= say,0.5 in CAD.
>
> Many thanks,
> Deepa
>
> On Fri, Feb 7, 2020 at 1:52 AM Max Orok  wrote:
>
>> Using the python api, building on Jeremy's nice example, but omitting
>> physical groups:
>>
>> -
>> import gmsh
>>
>> delx = 0.5
>> xend = 20
>>
>> gmsh.initialize()
>>
>> point_a = gmsh.model.geo.addPoint(0.0, 0.0, 0.0, meshSize=delx)
>> point_b = gmsh.model.geo.addPoint(20.0, 0.0, 0.0, meshSize=delx)
>>
>> line = gmsh.model.geo.addLine(point_a, point_b)
>>
>> gmsh.model.geo.synchronize()
>>
>> # make a 1d mesh
>> gmsh.model.mesh.generate(1)
>>
>> # save the mesh as a NASTRAN bulk data file
>> gmsh.write("line.bdf")
>>
>> gmsh.finalize()
>> -
>>
>> Sincerely,
>> Max
>>
>> On Thu, Feb 6, 2020 at 1:25 PM Jeremy Theler  wrote:
>>
>>> delx = 0.5;
>>> xend = 20;
>>> Point(1) = {0, 0, 0, delx};
>>> Point(2) = {xend, 0, 0, delx};
>>>
>>> Line(1) = {1, 2};
>>>
>>> Physical Point("left") = {1};
>>> Physical Point("right") = {2};
>>> Physical Line("bulk") = {1};
>>>
>>> On Thu, 2020-02-06 at 23:11 +0530, Deepa wrote:
>>> > >
>>> > > I am a beginner here.
>>> > >
>>> > > I'm looking for ways of creating a mesh for a 2D geometry. It's a
>>> > > straight line, the nodes have to be positioned along the x
>>> > > directions and all y-coordinates have to be zero.
>>> > >
>>> > > Example: 0 : delx : xend, where delx =0.5, xend = 20.
>>> > >
>>> > > I have to create the input file in a format that will be compatible
>>> > > for importing in COMSOL.
>>> > >
>>> > > Any suggestions on how to proceed will be really helpful
>>> > >
>>> > > Thanks,
>>> > > Deepa
>>> > >
>>> > >
>>> >
>>> > ___
>>> > gmsh mailing list
>>> > gmsh@onelab.info
>>> >
>>> > http://onelab.info/mailman/listinfo/gmsh
>>> >
>>> >
>>>
>>>
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info
>>> http://onelab.info/mailman/listinfo/gmsh
>>>
>>
>>
>> --
>> Max Orok
>> Contractor
>> www.mevex.com
>>
>>
>>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Create mesh for 1D geometry

2020-02-06 Thread Max Orok
Using the python api, building on Jeremy's nice example, but omitting
physical groups:

-
import gmsh

delx = 0.5
xend = 20

gmsh.initialize()

point_a = gmsh.model.geo.addPoint(0.0, 0.0, 0.0, meshSize=delx)
point_b = gmsh.model.geo.addPoint(20.0, 0.0, 0.0, meshSize=delx)

line = gmsh.model.geo.addLine(point_a, point_b)

gmsh.model.geo.synchronize()

# make a 1d mesh
gmsh.model.mesh.generate(1)

# save the mesh as a NASTRAN bulk data file
gmsh.write("line.bdf")

gmsh.finalize()
-

Sincerely,
Max

On Thu, Feb 6, 2020 at 1:25 PM Jeremy Theler  wrote:

> delx = 0.5;
> xend = 20;
> Point(1) = {0, 0, 0, delx};
> Point(2) = {xend, 0, 0, delx};
>
> Line(1) = {1, 2};
>
> Physical Point("left") = {1};
> Physical Point("right") = {2};
> Physical Line("bulk") = {1};
>
> On Thu, 2020-02-06 at 23:11 +0530, Deepa wrote:
> > >
> > > I am a beginner here.
> > >
> > > I'm looking for ways of creating a mesh for a 2D geometry. It's a
> > > straight line, the nodes have to be positioned along the x
> > > directions and all y-coordinates have to be zero.
> > >
> > > Example: 0 : delx : xend, where delx =0.5, xend = 20.
> > >
> > > I have to create the input file in a format that will be compatible
> > > for importing in COMSOL.
> > >
> > > Any suggestions on how to proceed will be really helpful
> > >
> > > Thanks,
> > > Deepa
> > >
> > >
> >
> > _______
> > gmsh mailing list
> > gmsh@onelab.info
> >
> > http://onelab.info/mailman/listinfo/gmsh
> >
> >
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
import gmsh 

delx = 0.5
xend = 20

gmsh.initialize()

point_a = gmsh.model.geo.addPoint(0.0, 0.0, 0.0, meshSize=delx)
point_b = gmsh.model.geo.addPoint(20.0, 0.0, 0.0, meshSize=delx)

line = gmsh.model.geo.addLine(point_a, point_b)

gmsh.model.geo.synchronize()

# make a 1d mesh 
gmsh.model.mesh.generate(1)

# save the mesh as a NASTRAN bulk data file
gmsh.write("line.bdf")

gmsh.finalize()

line.bdf
Description: Binary data
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Transforming mesh

2020-01-16 Thread Max Orok
I got a rough gui version working with scaling and translation.
It takes a copy of the input "Mesh file", transforms it and saves it as
"transformed.msh".

It works nicely if you merge the "base" mesh file first and then start
playing around with the transformed version.
Here is a copy if anyone would like to try it:

[image: image.png]


On Tue, Jan 14, 2020 at 1:53 AM Christophe Geuzaine 
wrote:

>
>
> > On 13 Jan 2020, at 23:23, Max Orok  wrote:
> >
> > Thank you Christophe, I was scared off a bit from setNodes by the doc
> >
> > 
> >
> > and went looking for some sort of "block assign" for large meshes and
> skipped the step where I tried using setNodes directly.
> >
>
> Indeed I was maybe a bit extreme in the warning :-) I'll change this.
>
> > Thanks guys,
> > Max
> >
> > On Mon, Jan 13, 2020 at 1:44 PM Christophe Geuzaine 
> wrote:
> >
> >
> > > On 13 Jan 2020, at 19:15, Max Orok  wrote:
> > >
> > > Hi Jeremy, thanks for your response.
> > > This is kind of what I've got going right now with the attached
> scripts:
> > >
> > > I'd like to be able to do this in the GUI, just because the adjustment
> is a little touchy.
> > > Maybe an extension could be to combine these into a ONELAB client and
> try it that way.
> > > I also considered adding a plugin but perhaps the ONELAB route is
> fastest.
> > >
> >
> > You can directly change the mesh and run the GUI in the script:
> >
> >
> >
> > Christophe
> >
> > > Max
> > > _______
> > > gmsh mailing list
> > > gmsh@onelab.info
> > > http://onelab.info/mailman/listinfo/gmsh
> >
> > —
> > Prof. Christophe Geuzaine
> > University of Liege, Electrical Engineering and Computer Science
> > http://www.montefiore.ulg.ac.be/~geuzaine
> >
> >
> >
> >
> >
> > --
> > Max Orok
> > Contractor
> > www.mevex.com
> >
> >
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>

-- 
Max Orok
Contractor
www.mevex.com
# transform a mesh interactively
# -- requires Gmsh 4.5 for setNode function
# -- Max Orok, January 2020

import onelab
import gmsh

c = onelab.client(__file__)

x_shift = c.defineNumber('Shift/x', value=0.0)
y_shift = c.defineNumber('Shift/y', value=0.0)
z_shift = c.defineNumber('Shift/z', value=0.0)

x_scale = c.defineNumber('Scale/x', value=1.0)
y_scale = c.defineNumber('Scale/y', value=1.0)
z_scale = c.defineNumber('Scale/z', value=1.0)

fname = c.defineString('Mesh file', kind='file')

gmsh.initialize()
gmsh.open(fname)

# # find bounding box of whole model
# (xmin, ymin, zmin, xmax, ymax, zmax) = gmsh.model.getBoundingBox(-1, -1)
#
# xc = (xmax + xmin) / 2
# yc = (ymax + ymin) / 2
# zc = (zmax + zmin) / 2

(nodes, coords, _) = gmsh.model.mesh.getNodes()

# scale doesn't really work nicely unless the model's centered
for i, tag in enumerate(nodes):
gmsh.model.mesh.setNode(tag, [x_scale * coords[3*i] + x_shift, y_scale 
* coords[3*i+1] + y_shift, z_scale * coords[3*i+2] + z_shift], [])

gmsh.write("transformed.msh")
gmsh.finalize()

c.mergeFile(c.checkPath("transformed.msh"))
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Transforming mesh

2020-01-13 Thread Max Orok
Thank you Christophe, I was scared off a bit from setNodes by the doc

[image: image.png]

and went looking for some sort of "block assign" for large meshes and
skipped the step where I tried using setNodes directly.

Thanks guys,
Max

On Mon, Jan 13, 2020 at 1:44 PM Christophe Geuzaine 
wrote:

>
>
> > On 13 Jan 2020, at 19:15, Max Orok  wrote:
> >
> > Hi Jeremy, thanks for your response.
> > This is kind of what I've got going right now with the attached scripts:
> >
> > I'd like to be able to do this in the GUI, just because the adjustment
> is a little touchy.
> > Maybe an extension could be to combine these into a ONELAB client and
> try it that way.
> > I also considered adding a plugin but perhaps the ONELAB route is
> fastest.
> >
>
> You can directly change the mesh and run the GUI in the script:
>
>
>
> Christophe
>
> > Max
> > ___
> > gmsh mailing list
> > gmsh@onelab.info
> > http://onelab.info/mailman/listinfo/gmsh
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Transforming mesh

2020-01-13 Thread Max Orok
Hi Jeremy, thanks for your response.
This is kind of what I've got going right now with the attached scripts:

I'd like to be able to do this in the GUI, just because the adjustment is a
little touchy.
Maybe an extension could be to combine these into a ONELAB client and try
it that way.
I also considered adding a plugin but perhaps the ONELAB route is fastest.

Max
import sys
import gmsh

if len(sys.argv) != 5 and len(sys.argv) != 3:
print("usage: shift.py  x-scale y-scale z-scale > out-nodes")
print("or")
print("\t shift.py  global-scale > out-nodes")
exit(1)

fname = sys.argv[1]

gmsh.initialize()
gmsh.open(fname)
(nodes, coords, _) = gmsh.model.mesh.getNodes()

if len(sys.argv) == 5:
x_scale = float(sys.argv[2])
y_scale = float(sys.argv[3])
z_scale = float(sys.argv[4])

for i, tag in enumerate(nodes):
print(str(i+1), coords[3*i] * x_scale, coords[3*i+1] * y_scale, coords[3*i+2] * z_scale)

else:
glob_scale = float(sys.argv[2])
for i, tag in enumerate(nodes):
print(str(i+1), coords[3*i] * glob_scale, coords[3*i+1] * glob_scale, coords[3*i+2] * glob_scale)

gmsh.finalize()
import sys
import gmsh

if len(sys.argv) != 5:
print("usage: shift.py  x-shift y-shift z-shift > out-nodes")
exit(1)

fname = sys.argv[1]
x_shift = float(sys.argv[2])
y_shift = float(sys.argv[3])
z_shift = float(sys.argv[4])

gmsh.initialize()
gmsh.open(fname)

(nodes, coords, _) = gmsh.model.mesh.getNodes()

for i, tag in enumerate(nodes):
print(str(i+1), coords[3*i] + x_shift, coords[3*i+1] + y_shift, coords[3*i+2] + z_shift)

gmsh.finalize()
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Transforming mesh

2020-01-11 Thread Max Orok
Hi everyone,

Is there a way to transform a mesh and obtain another mesh file based on
that transformation?

The Manipulation window is perfect, but I'd like to be able to save the
transformed mesh.

Thank you,
Max
-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Creating 3D geometry

2020-01-07 Thread Max Orok
Hi Deepa,

This is sort of a half-baked idea, but if you could get the positions of a
bunch of center points,
maybe you could add lines between them and use that as a sort of extrude
profile for whatever shape you want to use.

You can base a mesh off of a picture's colour, so maybe that's a good way
to get some centerline points.
There is a picture example here that might be helpful
http://geuz.org/photos/cg/cg.geo

Sincerely,
Max

On Mon, Jan 6, 2020 at 1:06 AM Deepa  wrote:

> Hi Max,
> Thanks a lot for the response. I'd like to create tubes. However, I am not
> sure how this can be done.
>
> Deepa
>
> On Sun, Jan 5, 2020 at 12:03 AM Max Orok  wrote:
>
>> Hi Deepa,
>>
>> What sort of 3D geometry are you trying to get? Are those tubes or some
>> sort of tunnel cutout of a solid?
>> This looks pretty cool :)
>>
>> Max
>>
>>
>> On Sat, Jan 4, 2020 at 10:47 AM Deepa  wrote:
>>
>>> Hello Everyone,
>>>
>>> I want to generate a 3D geometry of the below image.
>>>
>>> [image: ske1.png]
>>>
>>> I could generate a centerline image using image processing tools in
>>> Mathematica.
>>> [image: centerline1.png]
>>>
>>> However, I'm not sure how to make use of this centerline image to create
>>> a 3D geometry.
>>> Any suggestions on how to create the 3D geometry from the above images
>>> in gmsh will be really helpful.
>>>
>>> Thanks a lot,
>>> Deepa
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info
>>> http://onelab.info/mailman/listinfo/gmsh
>>>
>>
>>
>> --
>> Max Orok
>> Contractor
>> www.mevex.com
>>
>>
>>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Creating 3D geometry

2020-01-04 Thread Max Orok
Hi Deepa,

What sort of 3D geometry are you trying to get? Are those tubes or some
sort of tunnel cutout of a solid?
This looks pretty cool :)

Max


On Sat, Jan 4, 2020 at 10:47 AM Deepa  wrote:

> Hello Everyone,
>
> I want to generate a 3D geometry of the below image.
>
> [image: ske1.png]
>
> I could generate a centerline image using image processing tools in
> Mathematica.
> [image: centerline1.png]
>
> However, I'm not sure how to make use of this centerline image to create a
> 3D geometry.
> Any suggestions on how to create the 3D geometry from the above images in
> gmsh will be really helpful.
>
> Thanks a lot,
> Deepa
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Python scripts as onelab solvers

2019-12-06 Thread Max Orok
Thank you, that's very helpful.
I was trying to add Gmsh API python scripts through the Add Solver ->
Choose exe path
and think it was failing because the lack of proper onelab.py setup.



On Fri, Dec 6, 2019 at 4:18 AM Christophe Geuzaine 
wrote:

>
>
> > On 5 Dec 2019, at 23:29, Max Orok  wrote:
> >
> > Hello all,
> >
> > I believe you can only use executable files as Gmsh solvers.
> > Would there be any interest in using Python scripts as solvers directly?
> > Perhaps there's a clever workaround used right now.
> >
> > From the GUI, I'd like to be able to:
> >   • add a python solver to the solver list
> >   • have that solver modify the gui window with onelab parameters,
> like exec solvers do currently
>
> Sure : see for example
> https://gitlab.onelab.info/doc/tutorials/wikis/Double-pendulum-model-in-Python
>
>
> > I know about the custom_gui.py demo, but believe it requires users to
> start it from the command line.
> >
>
> No, you can also run it like any other python script.
>
> The two approaches are complementary :
>
> - with the first you can use the binary Gmsh app ; all communications are
> done through a socket, so you can have a proprietary (python) solver if you
> wish
>
> - with the second you interact with the Gmsh lib directly in the same
> memory space: it's more powerful but in effect you create a "new" Gmsh app,
> bound by the GPL license.
>
> Christophe
>
>
> > Maybe this could be a more portable option for distributing solvers or
> reduce the barrier to writing one?
> >
> > Thank you,
> > Max
> >
> > --
> > Max Orok
> > Contractor
> > www.mevex.com
> >
> >
> > ___
> > gmsh mailing list
> > gmsh@onelab.info
> > http://onelab.info/mailman/listinfo/gmsh
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Python scripts as onelab solvers

2019-12-05 Thread Max Orok
Hello all,

I believe you can only use executable files as Gmsh solvers.
Would there be any interest in using Python scripts as solvers directly?
Perhaps there's a clever workaround used right now.

>From the GUI, I'd like to be able to:

   - add a python solver to the solver list
   - have that solver modify the gui window with onelab parameters, like
   exec solvers do currently

I know about the custom_gui.py demo, but believe it requires users to start
it from the command line.

Maybe this could be a more portable option for distributing solvers or
reduce the barrier to writing one?

Thank you,
Max

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Change position of value scale

2019-12-04 Thread Max Orok
Maybe try setting PostProcessing.HorizontalScales = 0; ?

[image: image.png]

http://gmsh.info/doc/texinfo/gmsh.html#Post_002dprocessing-options-list

Sincerely,
Max

On Wed, Dec 4, 2019 at 1:52 PM Marco Tiberga  wrote:

> Dear Gmsh community,
>
>
>
> Is there a way to change the position of the value scale in any kind of
> View?
>
> I tried with the most recent Gmsh snapshot, but if I go to “View options”
> -> “Axes” -> “2D axes/value scale position” only the option “manual” seems
> to actually be able to change the position. I am using the GUI, FYI.
>
>
>
> However, I cannot obtain what I want.
>
> The “Automatic” position is at the bottom-center of the screen and the
> scale is horizontal. If possible, I would like to have a vertical scale, to
> the left or right of the view.
>
>
>
> Thanks a lot for your help, in advance.
>
>
>
> Best regards,
>
> Marco Tiberga
>
> PhD candidate
>
> Delft University of Technology
>
> Faculty of Applied Sciences
>
> Radiation Science & Technology Department
>
> Mekelweg 15, 2629 JB Delft, The Netherlands
>
> E-Mail: *m.tibe...@tudelft.nl *
>
> Website: http://www.nera.rst.tudelft.nl/
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Gmsh crashes exporting vec fields in .pvtu format

2019-11-22 Thread Max Orok
Thank you Marco, cc'ing the wider Gmsh community with these examples in
case they can help.


On Thu, Nov 21, 2019 at 4:05 AM Marco Tiberga  wrote:

> Dear Max,
>
>
>
> Please find attached two .pos files of a scalar and a vector quantity I
> wanted to export in pvtu format.
>
> It is a velocity field, and the vector field was built through the
> Scal2Vec plugin from the components.
>
>
>
> On top of this, I have discovered that also the export of the .pos scalar
> view does not work.
>
> What I usually do is to open the mesh (.msh file), merge a .msh file with
> the scalar field and then export the view in pvtu format: this works.
>
> Instead, if I open the mesh, merge the .msh file with the scalar field,
> export the view into .pos format (the attached u_scal is an example), then
> open the new .pos file directly and finally try to export it in pvtu, Gmsh
> crashes.
>
> So, I suspect the problem is in the export of .pos view to pvtu format.
>
>
>
> Hope these are useful examples.
>
>
>
> Best regards,
>
> Marco
>
>
>
> *From:* Max Orok [mailto:mo...@mevex.com]
> *Sent:* woensdag 20 november 2019 22:48
> *To:* Marco Tiberga
> *Subject:* Re: [Gmsh] Gmsh crashes exporting vec fields in .pvtu format
>
>
>
> Hi Marco,
>
>
>
> Would it be possible to get an example file that shows this behaviour?
>
>
>
> Sincerely,
>
> Max
>
>
>
> On Wed, Nov 20, 2019 at 4:46 PM Marco Tiberga 
> wrote:
>
> Good evening,
>
>
>
> I would like to report a bug I found.
>
>
>
> I needed to export a vector field in pvtu format (via File -> Export).
> However, Gmsh crashes as soon as it starts the export process. This does
> not happen when I export scalar fields.
>
> However, I knew I was once able to do it. So, I went back with the
> versions, and I found out that the first buggy version is 2.14.1 (at that
> time, the export was done via File -> Save As).
>
>
>
> I understand this is a minor bug (and the fix is not even urgent as far as
> I am concerned, as I was able to export my field using Gmsh 2.14.0), but it
> is useful to report it anyway.
>
>
>
>
>
> Best regards,
>
> Marco Tiberga
>
> PhD candidate
>
> Delft University of Technology
>
> Faculty of Applied Sciences
>
> Radiation Science & Technology Department
>
> Mekelweg 15, 2629 JB Delft, The Netherlands
>
> E-Mail: *m.tibe...@tudelft.nl *
>
> Website: http://www.nera.rst.tudelft.nl/
>
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>
>
> --
>
> Max Orok
>
> Contractor
>
> www.mevex.com
>
> [image: Image removed by sender.]
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] adaptive meshing: using PView

2019-11-18 Thread Max Orok
I'm glad you found a solution!
Thank you for sharing how you solved it, that will be helpful for many,
many other people.
I've also had some trouble with matching the right number of data points
with the given plot type (e.g. vectors of 9 coords for tensor data etc)

On Mon, Nov 18, 2019 at 1:07 PM walter steffe 
wrote:

>
> I have found the problem with the PView, it was my fault.
>
> The function getKeysValues(sf_ele, keys, values) I had used is that one
> defined in gmsh-4.4.1-source/demos/api/adapt_mesh.cpp:
> void getKeysValues(const std::map ,
>std::vector ,
>std::vector > )
> {
>   keys.clear();
>   values.clear();
>   for(std::map::const_iterator it = f.begin();
>   it != f.end(); it++){
> keys.push_back(it->first);
> values.push_back(std::vector(1, it->second));
>   }
> }
>
> The vector associated with a tag (which in my case corresponds with a
> tetreahedron) has length 1 because the scalar field is constant over the
> element.
> But in my code
> "listdata.insert(listdata.end(),values[i].begin(),values[i].end())", I was
> supposing that values[i] contains 4 numbers (the values associated
> with the 4 tetrahedron vertices). And my assumption was wrong.
>
> Anyway now I have switched back to the field based on the PViewDataGModel
> (as done in gmsh-4.4.1-source/demos/api/adapt_mesh.cpp:).
> This solution is more efficient (less memory usage) and finally it works
> well after having set the current model.
>
>
> Walter
>
>
>
> On Mon, 2019-11-18 at 07:13 +0100, walter steffe wrote:
> > Hello Max, thanks for your replay.
> >
> >   The mesh field settings follws the example given in
> gmsh-4.4.1-source/demos/api/viewlist.cpp. The only differencex being that I
> have used
> > scalar tetrahedrons (SS) instead of scalar treiangles (ST).
> > From that example I have understood that the format of data vector has
> to be:
> >
> > tet1_V1x, tet1_V2x, tet1_V3x, tet1_V3x, tet1_V4x, tet1_V1y, tet1_V2y,
> ... tet1_V4z, tet1_val1, tet1_val2, tet1_val3, tet1_val4,
> > tet2_V1x, 
> >
> > Regarding the sharing of my code (which is called EmCAD) it is possible
> but it would require some work that I was planning to do in the next future.
> > A few years ago I published an old version of EmCAD (see
> https://github.com/wsteffe/EmCAD) but after that I made a lot of changes
> and I should update it to
> > the
> > most recent stable version.
> >
> > The generated pos file is quite big (about 10 MB) but the first two
> lines are the following:
> >
> > View "mesh size" {
> >
> SS(46.83944890393698,-37.88756912800455,27.48312772362366,47.34769558079194,-37.83372365566942,27.69034188350719,46.76329291980484,-
> >
> 37.58650617307168,27.60072813488528,46.97847752964434,-37.72705133636931,27.85320246718948){0.6408381837974682};
> >
> SS(45.9160848845363,-38.60456203454583,31.84977417926594,46.83102692685463,-38.97962021517143,31.85091832450902,46.00960755639631,-
> >
> 39.51314340935686,31.79892854402282,46.27960884215373,-38.86612166745061,30.90869736302538){1.042203762895043};
> >
> >
> > Previously I have tried using a PViewDataGModel based field.
> > The printed pos file was the same but the computation of mesh size still
> wrong.
> > In that case it failed inside the function PView *getView() const. This
> function exited after entering inside of the following lines:
> >   if(v->getData()->hasModel(GModel::current())) {
> >   Msg::Error(
> > "Cannot use view based on current mesh for background mesh: you
> might"
> > " want to use a list-based view (.pos file) instead");
> >   return 0;
> >   }
> >
> > But now I am thinking that probably this was because the current model
> was not switched to the new one (using gmsh::model::setCurrent())
> > and was still pointing to the model used for the setting of the
> PViewDataGModel.
> >
> > Anyway it is strange that the computation of a field based on the
> PViewDataList gives wrong results.
> >
> >
> > Walter
> >
> >
> >
> > On Sun, 2019-11-17 at 13:06 -0500, Max Orok wrote:
> > > Hi Walter,
> > >
> > > My first impression is that it looks like you might indeed be setting
> the mesh field value using the mesh coordinates.
> > >
> > > It's a little difficult to debug without an actual runnable program or
> the pos file that shows everything is OK.
> > > Would you mind sharing your program and pos file?
> > >
> > > Sincerely,
> > > Max
> &

Re: [Gmsh] adaptive meshing: using PView

2019-11-17 Thread Max Orok
Hi Walter,

My first impression is that it looks like you might indeed be setting the
mesh field value using the mesh coordinates.

It's a little difficult to debug without an actual runnable program or the
pos file that shows everything is OK.
Would you mind sharing your program and pos file?

Sincerely,
Max

On Sun, Nov 17, 2019 at 4:49 AM walter steffe 
wrote:

>
> Hello everyone, I am still experimenting with adaptive meshing and I
> wanted to set a background field based on a PView.
> I have build the view and related background field with the following code:
>
>
>  //sf_ele, and getKeysValues are the same as in
> gmsh-4.4.1-source/demos/api/adapt_mesh.cpp
>   getKeysValues(sf_ele, keys, values);
>
>
>   int viewTag = gmsh::view::add("mesh size");
>
>   const std::vector listdata;
>   int nelem=keys.size();
>   for(int i=0; i int etag=keys[i];
> for(int j=0; jnodesNum(); j++)
> listdata.push_back(mesh.elements()[etag]->nodes()[j]->x());
> for(int j=0; jnodesNum(); j++)
> listdata.push_back(mesh.elements()[etag]->nodes()[j]->y());
> for(int j=0; jnodesNum(); j++)
> listdata.push_back(mesh.elements()[etag]->nodes()[j]->z());
> listdata.insert(listdata.end(),values[i].begin(),values[i].end());
>   }
>   gmsh::view::addListData(viewTag, "SS", nelem, listdata);
>
>
>   // just to check the data:
>   gmsh::view::write(viewTag, "data.pos");
>   // It seems OK
>
>   ...
>
>   GModel *gm0=new GModel();
>   #importing of OCC geometry ...
>
>   ...
>
>
>   FieldManager *fields = gm->getFields();
>   int fieldTag=1;
>   Field *size_f=fields->newField(fieldTag, "PostView");
>   size_f->options["ViewTag"]->numericalValue(viewTag);
>   fields->setBackgroundFieldId(fieldTag);
>
>
>   gm->mesh(1);
>   gm->mesh(2);
>   gm->mesh(3);
>
>
>   The problem is that the field computed in BGM_MeshSize is WRONG.
>
>   Following lines are taken from BackgroundMeshTools.cpp:
>
>   double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y,
> double Z)
> {
>   
>   // lc from fields
>   double l4 = MAX_LC;
>   if(ge){
> FieldManager *fields = ge->model()->getFields();
> if(fields->getBackgroundField() > 0) {
>   Field *f = fields->get(fields->getBackgroundField());
>   if(f) l4 = (*f)(X, Y, Z, ge);
> }
>   }
>
>   ..
> }
>
>
>   I have debugged the code going inside of that computation and I have
> found that, quite often, it happens that
>   the value returned by (*f)(X, Y, Z, ge) coincides with the coordinate
> (x,y,or z) of a vertex used in the view data.
>
>   This could be produced by a wrong ordering of data passed to
> gmsh::view::addListData.
>   But the data file printed by gmsh::view::write(viewTag, "data.pos")
> seems good and the values are not exchanged with
>   the coordinates.
>
>   So I do not understand where is the problem. May you please give me a
> hint ?
>
>
>   Thanks in advance,
>   Walter Steffè
>
>
>
>
>
>
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Finding coordinates of transformed point in python api

2019-09-30 Thread Max Orok
Hi Peter,

I think you can use the getValue function for this.
Here's a short example that looks up the coordinates of a translated point:

import gmsh

gmsh.initialize()

p1 = gmsh.model.occ.addPoint(0, 0, 0)
gmsh.model.occ.translate([(0, p1)], 1.0, 1.0, 1.0)

# need to synchronize before looking up the point
gmsh.model.occ.synchronize()

no_parametrization = []
[x, y, z] = gmsh.model.getValue(0, p1, no_parametrization)

# will print 1.0, 1.0, 1.0
print("x: {}, y: {}, z: {}".format(x, y, z))

gmsh.finalize()

I hope this helps!
Max

On Mon, Sep 30, 2019 at 2:27 AM Peter Johnston 
wrote:

> Hello,
>
> My apologies if this is a dumb question, but I am having difficulty
> working out how to find the coordinates of a transformed point in the
> python api.
>
> I have created a point with:
>
> apex_pt = gmsh.model.occ.addPoint(a_epi,0.0,0.0,0,-1)
>
> and transform it (translate and rotate) with a routine that I wrote:
>
> transform([0,apex_pt])
>
> Having inspected the geometry and mesh, I know that the transformation
> puts the point in the correct position. However, I cannot work out how to
> find the coordinates of the new point. I have tried using getEntities (for
> dimension 0 entities) and getNodes for each entity returned, but this does
> not work for the one particular entity which is my apex_pt.
>
> Any help would be much appreciated.
>
> Thanks,
>
> Peter.
>
> -
>
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> _______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
import gmsh

gmsh.initialize()

p1 = gmsh.model.occ.addPoint(0, 0, 0)
gmsh.model.occ.translate([(0, p1)], 1.0, 1.0, 1.0)

# need to synchronize before looking up the point
gmsh.model.occ.synchronize()

no_parametrization = []
[x, y, z] = gmsh.model.getValue(0, p1, no_parametrization)

print("x: {}, y: {}, z: {}".format(x, y, z))

gmsh.finalize()
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] python API save geo file

2019-09-28 Thread Max Orok
Hi Miro, sorry about giving you the wrong info.
I’ve still got a lot to learn about Gmsh.

Thanks,
Max

On Friday, September 27, 2019, Miroslav Kuchta 
wrote:

> Perfect, thank you.
>
> Miro
>
> On Fri, Sep 27, 2019 at 8:48 AM Christophe Geuzaine 
> wrote:
>
>>
>>
>> > On 26 Sep 2019, at 17:21, Miroslav Kuchta 
>> wrote:
>> >
>> > Hi Max,
>> >
>> > what I am trying to accomplish is the ability to call something like
>> `model.save('foo.geo')`
>>
>> Use gmsh.write("foo.geo_unrolled")
>>
>> Christophe
>>
>>
>>
>> > in the attached script. I am only beginning to explore the API and this
>> would allow me to
>> > create part of the model in python, save it and optionally continue in
>> gmsh language. I guess
>> > this would be useful if not all of the API is exposed.
>> >
>> > Thanks, Miro
>> >
>> > On Thu, Sep 26, 2019 at 4:23 PM Max Orok  wrote:
>> > Hi Miro,
>> >
>> > I don't think so. Can you tell us more about what you are trying to
>> accomplish?
>> > The tutorials have many examples of equivalent functionality between
>> geo and python (c++, julia, etc.)
>> >
>> > Geo examples: https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial
>> > Equivalent API examples: https://gitlab.onelab.info/
>> gmsh/gmsh/tree/master/demos/api
>> >
>> > Sincerely,
>> > Max
>> >
>> > On Wed, Sep 25, 2019 at 4:20 PM Miroslav Kuchta <
>> miroslav.kuc...@gmail.com> wrote:
>> > Hi,
>> >
>> > is there a way to write as geo file the model constructed using python
>> API?
>> >
>> > Thanks, Miro
>> > ___
>> > gmsh mailing list
>> > gmsh@onelab.info
>> > http://onelab.info/mailman/listinfo/gmsh
>> >
>> >
>> > --
>> > Max Orok
>> > Contractor
>> > www.mevex.com
>> >
>> >
>> > ___
>> > gmsh mailing list
>> > gmsh@onelab.info
>> > http://onelab.info/mailman/listinfo/gmsh
>>
>> —
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science
>> http://www.montefiore.ulg.ac.be/~geuzaine
>>
>>
>>
>>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] python API save geo file

2019-09-26 Thread Max Orok
Hi Miro,

I don't think so. Can you tell us more about what you are trying to
accomplish?
The tutorials have many examples of equivalent functionality between geo
and python (c++, julia, etc.)

Geo examples: https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial
Equivalent API examples:
https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api

Sincerely,
Max

On Wed, Sep 25, 2019 at 4:20 PM Miroslav Kuchta 
wrote:

> Hi,
>
> is there a way to write as geo file the model constructed using python API?
>
> Thanks, Miro
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] hyperbolic-tangent function in a for loop

2019-09-26 Thread Max Orok
Hi Sebastian,

You're looking for another way to achieve the same result, right?
Can you tell about what you've tried already?

Any OpenFOAM issues are sort of out of scope for Gmsh but knowing what
error messages you're getting, etc. would be very helpful.

Sincerely,
Max

On Wed, Sep 25, 2019 at 12:31 PM Sebastian Tietjen 
wrote:

> Dear all,
>
> I try to create a mesh based on a hyperbolic-tangent function. This .geo
> file works perfectly in gmsh, however, implementing this in OpenFoam causes
> problems. My guess is that OpenFoam does not like how the layer command is
> used. I try already couple of stuff to fix it, but it is somehow not
> possible.
>
> I would be pleasd about any problem to fix my problem.
>
> Regards
>
> Sebastian Tietjen
>
>
>
> SetFactory("OpenCASCADE");
> //+
> Mesh.RecombineAll=1;
> g2=1.5;
> g3=1.5;
> A3=4;
> A1=2;
> L2=1/A3;
> L3=A3*L2;
> L1=A1*L2;
> N1=10;//128;
> N2=16;//156;
> N3=20;//312
>
> //vertical direction - x3 (y)
> one[0] = 1;
> layer[0] = 0;
> For i In {2:N3+1}
> one[i] = 1;
> X3=g3*(2*(i-1)/N3-1);
> layer[i]=(L3/2)*(1+Tanh (X3)/Tanh (g3));
> EndFor
> //Extrusion part in vertical direction
> Point(1) = {0, 0, 0, 1.0};
> Extrude {0,L3,0} {
> Point{1};
> Layers{one[], layer[]}; }
> //horizontal direction - x2 (x)
> oneX[0] = 1;
> layerX[0] = 0;
> For j In {2:N2+1}
> oneX[j] = 1;
> X2=g2*(2*(j-1)/N2-1);
> layerX[j]=(L2*4/2)*(1+Tanh (X2)/Tanh (g2));
> EndFor
> //Extrusion part in 1. vertical direction
> Extrude {L2,0,0} {
> Line{1};
> Layers{oneX[], layerX[]}; }
> //+
>
> //+Extrude surface
> Extrude {0, 0, L1} {
>   Surface{1}; Layers{N1}; Recombine;
> }
> //+
> Transfinite Surface {1};
> //+
> Physical Surface("Back") = {7};
> //+
> Physical Surface("Front") = {1};
> //+
> Physical Surface("HotWall") = {5};
> //+
> Physical Surface("ColdWall") = {3};
> //+
> Physical Surface("Top") = {4};
> //+
> Physical Surface("Bottom") = {6};
> //+
> Physical Volume("Fluid") = {1};
> //+
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Changing Post processing "Aspect" options on the API

2019-09-25 Thread Max Orok
Hi Tomas,

I think nearly every option can be controlled through the API.
The trick is finding the right name for them.

View [0] will have options like View[0].Option1, etc.

For specific options, one way to find them is changing them in the GUI and
checking which option name got modified.
You can do that by going to the Current Options window (Help -> Current
Options...)

For example, here's the Point Size option,

[image: image.png]

In Python, you could set this using

gmsh.option.setNumber("View[0].PointSize", 2.0)

Hope this helps!
Max


On Wed, Sep 25, 2019 at 9:25 AM SilveiraPO . 
wrote:

> Dear professor,
>
> Is it possible to change the settings in the "Aspect" menu from the
> post-processor through the API (in python)?
> For example, changing the options (in red), in the following picture
> [image: 1.PNG]
>
> Thanks in advance once again,
> Tomas
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] How to add a Point to a Surface with the gmsh Python API?

2019-08-20 Thread Max Orok
Hi Lepy,

I think the embed function is what you're looking for:
https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmsh.py#L2319

It's more general than "Point in Surface", because it can do Curves in
Surfaces, etc.
Make sure to call synchronize before trying to embed points.

The modified script is:

import gmsh

gmsh.initialize()

gmsh.option.setNumber("General.Terminal", 1)
gmsh.option.setNumber("Mesh.Algorithm", 6)
gmsh.option.setNumber("Mesh.RecombineAll", 1)

gmsh.model.add("square")
gmsh.model.geo.addPoint(0, 0, 0, 0.6, 1)
gmsh.model.geo.addPoint(1, 0, 0, 0.6, 2)
gmsh.model.geo.addPoint(1, 1, 0, 0.5, 3)
gmsh.model.geo.addPoint(0, 1, 0, 0.4, 4)
gmsh.model.geo.addLine(1, 2, 1)
gmsh.model.geo.addLine(2, 3, 2)
gmsh.model.geo.addLine(3, 4, 3)
line4 = gmsh.model.geo.addLine(4, 1)

gmsh.model.geo.addCurveLoop([1, 2, 3, line4], 1)
gmsh.model.geo.addPlaneSurface([1], 6)

gmsh.model.geo.addPoint(.5, .5, 0, 0.1, 5)

# make sure synchronize before adding point!
gmsh.model.geo.synchronize()

# embed point 5 (dim 0) in surface 6 (dim 2)
gmsh.model.mesh.embed(0, [5], 2, 6)
gmsh.model.mesh.generate(2)

gmsh.write("embedded.msh")

Without embedded point:
[image: image.png]

With embedded point:
[image: image.png]

Sincerely,
Max





On Tue, Aug 20, 2019 at 11:01 AM  wrote:

> Hi,
>
> I want to use the Python API from gmsh to mesh a 2D surface with a local
> mesh refinement.
>
> How can I add a point to a surface to get a finer mesh around some inner
> points?
>
> It should be the Python version of
>
> Point{5} In Surface{6};
>
> Thanks
>
> Lepy
>
> gmsh.initialize()
>
> gmsh.option.setNumber("General.Terminal", 1)
> gmsh.option.setNumber("Mesh.Algorithm", 6)
> gmsh.option.setNumber("Mesh.RecombineAll", 1)
>
> gmsh.model.add("square")
> gmsh.model.geo.addPoint(0, 0, 0, 0.6, 1)
> gmsh.model.geo.addPoint(1, 0, 0, 0.6, 2)
> gmsh.model.geo.addPoint(1, 1, 0, 0.5, 3)
> gmsh.model.geo.addPoint(0, 1, 0, 0.4, 4)
> gmsh.model.geo.addLine(1, 2, 1)
> gmsh.model.geo.addLine(2, 3, 2)
> gmsh.model.geo.addLine(3, 4, 3)
> line4 = gmsh.model.geo.addLine(4, 1)
>
> gmsh.model.geo.addCurveLoop([1, 2, 3, line4], 1)
> gmsh.model.geo.addPlaneSurface([1], 6)
>
> gmsh.model.geo.addPoint(.5, .5, 0, 0.1, 5)
>
> ??? gmsh.model.geo.addPoint2Surface(???)
>
> gmsh.model.geo.synchronize()
> gmsh.model.mesh.generate(2)
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] info

2019-08-18 Thread Max Orok
Hi Mauro,

The setMeshSize function takes a list of dimension, tag pairs aka dimtags.

Since it only handles points (dimension 0), I believe a list like
[(0, 1), (0, 2)]
is fine, but a list like
[(1, 1), (0, 2)]
wouldn't be handled properly.

All the entity types are:
0 = points
1 = lines
2 = 2d surfaces
3 = volumes

There is another option called CharacteristicLengthMax that globally sets
the maximum mesh element size.
I'm not sure whether this gives the same results as calling setMeshSize on
every point.
You can set it using the C++ function gmsh::option::setNumber.

Here is more info from the docs:
http://gmsh.info/doc/texinfo/gmsh.html#Mesh-options-list

Mesh.CharacteristicLengthMax

Maximum mesh element size
Default value: 1e+22
Saved in: General.OptionsFileName

Sincerely,
Max

On Sat, Aug 17, 2019 at 2:12 PM Mauro Corbo 
wrote:

> I am plyling around Gmsh developer version with vc++ 2017 Comunity Ed.
> I would import a Step/Iges  file with the function :
> " GMSH_API void importShapes(const std::string & fileName,"), and
> I would remesh with different mesh size, to get a more uniform mesh.
>
> I checked for "setMeshSize ..." function
> But I don't understand this : " Currently only  entities of dimension 0
> (points) are handled."
>   What does it mean only points are handled?
> Is it possible have different mesh sizes,plying on "size" parameters ,like
> in attached dPDF?
> Thanks in advance
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] gmsh compile

2019-08-14 Thread Max Orok
Hi Mauro,

Don't give up on the SDK! I think this may be a problem with the linker
being unable to find the library.
It would help if you post your exact error messages.

Here is an older post related to VS issues that might help you out:
https://gitlab.onelab.info/gmsh/gmsh/issues/551

*From that post: *
*-*

Compiling and running a C++ example with Visual Studio 2017 is as simple as
running this in the Visual Studio shell:

C:\gmsh-git-Windows64-sdk> ren include\gmsh.h_cwrap
gmsh.hC:\gmsh-git-Windows64-sdk> cl /Iinclude
share\doc\gmsh\demos\api\simple.cpp
lib\gmsh.libC:\gmsh-git-Windows64-sdk> cd
libC:\gmsh-git-Windows64-sdk\lib> ..\simple.exe

*-*

For your use case, I think the SDK is the right way to go.
I'm not sure about a Topo_DS shape directly, but Gmsh certainly allows you
to import a STP model and then mesh it with different settings.

Sincerely,
Max

On Wed, Aug 14, 2019 at 11:30 AM Mauro Corbo 
wrote:

> Dear Max,thanks for your reply.
> I have just tried with prebuilt sdk, but errors occurred for gmsh library
> functions call.(unresolved extrnals, the gmsh exists, but errors)
> I am using VS2012
> This is why , I would compile by source.
> byway,I work with OpenCascade from many years and I need a roboust
> platform to mesh surfaces and /or solids
> I am new in Gmsh.
> My questions is :
> Suppose I successfully compile with prebuilt Gmsh Sdk, Will I able to
> import a TopoDS_Shape (I know  there is a function for this) Or
> alternativley , import a STP/IGES object and mesh it playing via C++ code
> with mesh size ( see attached PDF) ?
> Does Sdk let this?
> Pls let me know
> Mauro
>
>
> Il giorno mer 14 ago 2019 alle ore 06:27 Max Orok  ha
> scritto:
>
>> If you really need to compile Gmsh from source, this readme file is a
>> good place to start:
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/README.txt
>>
>> However, if you only want to use the Gmsh API, you could take a look at:
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/api/README.txt
>>
>> Instead of having to compile Gmsh yourself, you can download a prebuilt
>> binary SDK library for Windows here <http://gmsh.info/bin/Windows/> and
>> link your programs against it.
>>
>> Sincerely,
>> Max
>>
>>
>> On Tue, Aug 13, 2019 at 4:18 PM Mauro Corbo 
>> wrote:
>>
>>> hello,could I get a detailed description how compile gmsh under Vs2012
>>> or later.
>>> I tried load CMAKE, but missing libraries error occur.
>>> Moreover,Could i know where find alla madatory libraries?
>>> Regards
>>> Mauro
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info
>>> http://onelab.info/mailman/listinfo/gmsh
>>>
>>
>>
>> --
>> Max Orok
>> Contractor
>> www.mevex.com
>>
>>
>>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] gmsh compile

2019-08-13 Thread Max Orok
If you really need to compile Gmsh from source, this readme file is a good
place to start:
https://gitlab.onelab.info/gmsh/gmsh/blob/master/README.txt

However, if you only want to use the Gmsh API, you could take a look at:
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/api/README.txt

Instead of having to compile Gmsh yourself, you can download a prebuilt
binary SDK library for Windows here <http://gmsh.info/bin/Windows/> and
link your programs against it.

Sincerely,
Max


On Tue, Aug 13, 2019 at 4:18 PM Mauro Corbo 
wrote:

> hello,could I get a detailed description how compile gmsh under Vs2012 or
> later.
> I tried load CMAKE, but missing libraries error occur.
> Moreover,Could i know where find alla madatory libraries?
> Regards
> Mauro
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Rust bindings experiment

2019-07-26 Thread Max Orok
Hello everyone,

I was thinking about a set of Rust bindings for the Gmsh C API (v4.4) and
made a very raw set using the bindgen tool:
https://github.com/mxxo/gmsh-sys

For a more idiomatic Rust API, I'll be following the re-implementation of
the C++ API in C (gmsh.h_cwrap) as a guide.

The naming for Rust's package manager is first come first serve (and
undeleteable), so I thought I'd see if there were any objections to
registering a "gmsh-sys" low-level C binding crate and a "gmsh" idiomatic
Rust API crate.

On the one hand, bindgen automatically generated Rust wrappers for Gmsh's C
header, so it could theoretically be part of the build pipeline and
included in the main repo. On the other hand, there may not be a huge
appetite for Rust support among Gmsh's users, especially compared to C++
and Python. My impression is using Rust for scientific codes is a bit of an
ongoing experiment.

On the maintenance side, packaging up an unofficial library crate for
distribution might be an interesting possibility without Gmsh having to
explicitly support yet another language API using the generator, especially
with the semantic differences for things like error handling.

Please let me know if you have any comments or suggestions.

Have a nice weekend!

Max
-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Different behaviour in Win or Linux

2019-07-22 Thread Max Orok
Hi Alessandro,

I don't think you could ever guarantee identical behaviour between
different OS's (because of differences in underlying numerical libraries
etc.)
On a case-by-case basis though I think it's possible!

Are there specific features in your geo file that you think cause issues
and might be candidates for replacement by other Gmsh features?
Maybe a series of boolean operations could be replaced by a STEP file
import and surface numbering etc.

If identical behaviour is absolutely necessary, another option is using the
Gmsh API (Python, C++, etc.)
You'd get better control over your data and have a full programming
language to use instead of only what the geo file understands.

Sincerely,
Max



On Mon, Jul 22, 2019 at 8:46 AM Alessandro Vicini <
alessandro.vic...@sitael.com> wrote:

>
> A geo file which works under windows has problems when read under Linux64
> (same code version, 4.4). I guess this is because of a different numbering
> of geometrical entities derived from transformations or boolean operations.
> Should I expect this? Is there a way to ensure "compatibility" of geo files
> under different OS? Thank you.
>
> Alessandro
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] [gmsh] "silly" question

2019-05-29 Thread Max Orok
Hi Alessandro,

The most straightforward way I can think of would be to use a CAD program
to make the 3D letters, export the model as STEP and then mesh that.
Tinkercad is one free option (I think you need to make an account).

There is an interesting script on Prof. Geuzaine's site (upper left corner)
for meshing a picture:
http://www.montefiore.ulg.ac.be/~geuzaine/

When I tried to use this script with a picture of text:
[image: image.png]

the result was extremely dense (the mesh lines are so dense they look solid
yellow), so it's not as easy as swapping out the picture, some further
tweaks are required to the background mesh scaling values probably.

[image: image.png]


Sincerely,
Max



On Wed, May 29, 2019 at 4:17 AM Alessandro Vicini <
alessandro.vic...@sitael.com> wrote:

>
>
> I would like to generate a 3d mesh for the volume obtained by extrusion of
> a text. So what I need to do is to import the text (as an image?) in gmsh,
> convert it somehow in a 2d geometry and then extrude it…
>
> Is this possible? Thank you.
>
>
>
> Alessandro
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] creating patch on sphere

2019-04-28 Thread Max Orok
Hello Peter,

I took a bit of a different approach and hopefully it is similar to what
you'd like to do.
This short script makes a "sphere patch" by subtracting one sphere from
another.

SetFactory("OpenCASCADE");

// arbitrary angle selections here
Sphere(1) = {0, 0, 0, 0.5, -Pi/9, Pi/9, Pi/4};
Sphere(2) = {-.25, 0, 0, 0.5, -Pi/9, Pi/9, Pi/4}; // shift sphere 2

// use sphere 2 to cut sphere 1
BooleanDifference{ Volume{1}; Delete; }{ Volume{2}; Delete; }

[image: image.png]
[image: image.png]

I hope this is helpful! If I missed the point please let me know.

Sincerely,
Max

On Wed, Apr 24, 2019 at 7:22 PM Peter Johnston 
wrote:

> Thanks Max and Christophe,
>
> I have attached a simple sample .geo file. For some reason it creates even
> more volumes than the more complicated script I was working on. However, it
> still displays similar problems.
>
> If you have any further questions, please let me know.
>
> Thanks again,
>
> Peter.
>
> -
>
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> On 25 Apr 2019, 1:36 AM +1000, Max Orok , wrote:
>
> Hi Peter,
>
> Scripts are always helpful! It is nice to be able to see the steps as you
> go along.
>
> Max
>
> On Wed, Apr 24, 2019 at 8:36 AM Peter Johnston 
> wrote:
>
>> Hello,
>>
>> I appear to have a problem for which I cannot figure out a solution.
>>
>> I have an annular hemispherical volume created between to hemispheres
>> centred on the origin. I would like to divide the volume into two parts in
>> a special way using Boolean operations. To define a sub-volume of the
>> initial volume by defining four points on the surface of the inner sphere,
>> create a “quadrilateral” on the inner surface by joining the four points in
>> order using circles through the origin. (I think that these should be parts
>> of great circles on the inner surface?). Then I create a line loop and a
>> surface, and finally extrude the surface away from the origin to create a
>> volume. Perhaps a .geo script would help here?
>>
>> When I perform BooleanDifferences and BooleanIntersections I end up with
>> three volumes instead of two. The reason I get the third volume is that the
>> surface patch that I create does not fit exactly onto the original
>> spherical surface. Is there any way that I can force the patch to be part
>> of the spherical surface?
>>
>> A consequence of the extra volume is that I cannot create a sensible mesh.
>>
>> Any ideas would be greatly appreciated.
>>
>> Thanks very much,
>>
>> Peter.
>>
>> PS, I could send a simple script file if that would help.
>>
>> -
>>
>> Associate Professor Peter Johnston (FAustMS, FIMA)
>> School of Environment and Science
>> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
>> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
>>
>
>
> --
> Max Orok
> Contractor
> www.mevex.com
>
>
>

-- 
Max Orok
Contractor
www.mevex.com


sphere-patch.geo
Description: Binary data
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Labeling the physical entities and extracting nodes on the surface of one physical entity

2019-04-28 Thread Max Orok
Hello Adil,

As far as I can see, your labels are correct!

Here is a picture of the labels after using Tools -> Options -> Geometry
[left sidebar] -> Volume labels [checkbox]. Yellow is a little hard to see
but they all look OK. You can also see the Physical Surface by clicking the
Surface checkbox in the same menu, although it is hard to distinguish from
all the other surfaces.

You can also use the visibility settings to check this (Tools -> Visibility
-> Physical groups [dropdown menu at the bottom]. The four physical groups
will then be shown as in the picture.

As far as volume boundaries go, you could use the Boundary function in a
geo file like so:

// example usage taken from t14.geo

bnd[] = Boundary{ Volume{1}; };
Physical Surface(80) = bnd[];

http://gmsh.info/doc/texinfo/gmsh.html#t14_002egeo is the link to the full
script

or try looking at the getBoundary function in the API.

[image: image.png]

Sincerely,
Max


On Sun, Apr 28, 2019 at 1:24 AM Abiti Adili  wrote:

> Hello,
>
> I am a  new learner of Gmsh. I have  the above attached geometry.geo and
> omnibus.geo files that  are supposed to create a box mesh with two balls
> inside. A  cross section of  the box and the labels of the regions is
> attached above in pdf file.
>
> I am trying to  have 4 different  physical entities which are
>
> 1. The first  ball denoted by R.
> 2. The second ball denoted by P.
> 3. The complement of  union(R,P) in the box which is  denoted by H.
> 4. The physical surface which is the boundary of  R.
>
> Upon checking the coordinates of nodes supposedly on the boundary of R, I
> found that a lot of them are  outside the ball R.
>
> I was wondering if  anyone could help me take a look at the geometry.geo
> and omnibus.geo and tell me if I have  labelled them correctly so that they
> correspond to the above 4 entities that I want to have.
>
> Also, how can I extract the indices of nodes on the boundary of R once I
> have  their coordinates?
>
> Thank you very much.
>
> Adil_______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] creating patch on sphere

2019-04-24 Thread Max Orok
Hi Peter,

Scripts are always helpful! It is nice to be able to see the steps as you
go along.

Max

On Wed, Apr 24, 2019 at 8:36 AM Peter Johnston 
wrote:

> Hello,
>
> I appear to have a problem for which I cannot figure out a solution.
>
> I have an annular hemispherical volume created between to hemispheres
> centred on the origin. I would like to divide the volume into two parts in
> a special way using Boolean operations. To define a sub-volume of the
> initial volume by defining four points on the surface of the inner sphere,
> create a “quadrilateral” on the inner surface by joining the four points in
> order using circles through the origin. (I think that these should be parts
> of great circles on the inner surface?). Then I create a line loop and a
> surface, and finally extrude the surface away from the origin to create a
> volume. Perhaps a .geo script would help here?
>
> When I perform BooleanDifferences and BooleanIntersections I end up with
> three volumes instead of two. The reason I get the third volume is that the
> surface patch that I create does not fit exactly onto the original
> spherical surface. Is there any way that I can force the patch to be part
> of the spherical surface?
>
> A consequence of the extra volume is that I cannot create a sensible mesh.
>
> Any ideas would be greatly appreciated.
>
> Thanks very much,
>
> Peter.
>
> PS, I could send a simple script file if that would help.
>
> -
>
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> _______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] mesh from STEP file: correct units

2019-04-23 Thread Max Orok
Hi Marco,

Here is the option you're looking for:
http://gmsh.info/doc/texinfo/gmsh.html#index-Geometry_002eOCCTargetUnit

It looks like it was only introduced in Gmsh 4 and higher, hopefully that
isn't an issue (h/t Prof Geuzaine and Jeremy Theler).

Here is an earlier thread about the same issue if you need more info:
http://onelab.info/pipermail/gmsh/2019/012965.html

Max

On Tue, Apr 23, 2019 at 5:24 PM Marco Tiberga  wrote:

> Dear Gmsh developers,
>
>
>
> I want to create a mesh from a STEP file, loading it from a geo file.
>
> The mesh should be in m (as you can see from the step file, line 2916) ,
> but from the numbers I visualize in gmsh, I deduce the lengths are still
> expressed in mm (the entire domain should be around 2.5m high, but I see
> 2500).
>
>
>
> How can I perform the units conversion? I tried with
>
> *factor = 1.e-3;*
>
> *allpoints[] = Point "*";*
>
> *Dilate{{0,0,0},{factor,factor,factor}}{Point{allpoints[]};}*
>
> but it does not seem to work.
>
>
>
> I attached the .geo and the .stp files I am using. I use Gmsh 3.0.6.
>
>
>
> Thanks a lot for your help and sorry if the question is stupid, but I have
> little experience in using gmsh with step files.
>
>
>
> Best regards,
>
> Marco Tiberga
>
> PhD candidate
>
> Delft University of Technology
>
> Faculty of Applied Sciences
>
> Radiation Science & Technology Department
>
> Mekelweg 15, 2629 JB Delft, The Netherlands
>
> E-Mail: m.tibe...@tudelft.nl
>
> Website: http://www.nera.rst.tudelft.nl/
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] merge several partial meshes to a complete mesh

2019-03-27 Thread Max Orok
Hello Johannes,

Yes, these are two separate operations. You can merge files using the
-merge option on the command line (see picture of some gmsh --help output).

[image: image.png]

I think the default behaviour of just opening the separate files given no
flags is sensible, as you may only want to compare two different simulation
results or different geometries.

Sincerely,
Max

On Wed, Mar 27, 2019 at 8:11 AM Johannes_ACKVA 
wrote:

> hello
>
> (1)
>
> I have several partial meshes in med-format. Is there a way with GMSH to
> assemble them to the complete mesh (similar to CODE_ASTER's command
> ASSE_MAILLAGE)??
>
> I tried:
>
> gmsh part1.med part2.med part3.med
>
> which seems me the same as doing
>
> gmsh
>
> and then:  Menu - File - Merge..  or:  Menu - File - Open..
>
> The effect is that I have several models in gmsh which I can switch
> between using the button at the very bottom left. But they are not
> really merged, I need to export  ONE  .med-file containing the union of
> all parts
>
> (2)
>
> what is the difference between
>
> Menu - File - Merge..
>
> and
>
> Menu - File - Open..
>
> many thanks for your help,
>
> Regards
> Johannes_ACKVA
>
> _
> CODE-ASTER-courses at Ingenieurbüro für Mechanik, Germany
>
> *** CODE-ASTER  INTRODUCTION
>  14 - 18 Oct 2019
>
> *** CODE-ASTER  DYNAMIC ANALYSIS
>  21 - 22 Nov 2019
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] terrain meshing with an sth file

2019-03-19 Thread Max Orok
Hi Laurent,

Does this thread touch on your issue at all?
https://www.mail-archive.com/gmsh@onelab.info/msg01982.html

Sincerely,
Max

On Tue, Mar 19, 2019 at 5:25 PM Laurent BRICTEUX <
laurent.brict...@umons.ac.be> wrote:

> Dear all,
>
> Is it possible to obtain a volume mesh starting from an stl terrain
> surface (see attachment)?
> I would like to make a CFD mesh consisting in a volume box for which the
> bottom surface is a prescribed terrain.
> The elements should be tets only.
> Is there any example geo file that could help to solve my problem ?
>
> Thank you for your help and the nice piece of soft.
>
> Laurent
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Another STL question

2019-03-19 Thread Max Orok
Yes, sorry Peter, perhaps there are some differences I'm not aware of.
I mistook STL for STEP in your first email and STEP is the one I'm more
familiar with, having successfully used Boolean operations on.

Sincerely,
Max

On Tue, Mar 19, 2019 at 7:13 PM Peter Johnston 
wrote:

> Dear Max,
>
> Thanks for your reply and suggestion. Your approach was the first thing I
> tried, but it did not appear to work when the surfaces and volumes were
> created from imported STL files.
>
> Perhaps there is difference between your approach and my original approach?
>
> Thanks again,
>
> Peter.
>
>
> -
>
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> On 20 Mar 2019, 1:51 AM +1000, Max Orok , wrote:
>
> Hi Peter,
>
> For two volumes (including STL imports), you can find the volume between
> them using the `BooleanDifference` command.
>
> Here is a small example:
>
> SetFactory("OpenCASCADE");
>
> Box(1) = {-10, -10, -10, 20, 20, 20};
>
> Sphere(2) = {0, 0, 0, 10};
>
> BooleanDifference{ Volume{1}; Delete; }{ Volume{2}; Delete; }
>
> Also, depending on the number of shapes you're importing, the `Coherence`
> command might also help if you find that volumes don't end up sharing mesh
> faces.
>
> Picture after using a clipping plane:
>
> 
>
> On Tue, Mar 19, 2019 at 2:41 AM Peter Johnston 
> wrote:
>
>> Hello again,
>>
>> I’m sorry to keep asking questions about STL files, but there is
>> something else that has arisen.
>>
>> I import two surfaces, one inside the other as follows:
>>
>> Merge "inner_shape.stl";
>>
>> Mesh.Smoothing=100;
>>
>> //+
>>
>> Surface Loop(1) = {1};
>>
>> //+
>>
>> Volume(1) = {1};
>>
>> //+
>>
>> Merge "outer_shape.stl";
>>
>> //+
>>
>> Surface Loop(2) = {2};
>>
>> //+
>>
>> Volume(2) = {2};
>>
>> Can I mesh the space in between the two shapes?
>>
>> Thanks,
>>
>> Peter.
>>
>> -----
>>
>> Associate Professor Peter Johnston (FAustMS, FIMA)
>> School of Environment and Science
>> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
>> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
>>
>
>
> --
> Max Orok
> Contractor
> www.mevex.com
>
>
>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Another STL question

2019-03-19 Thread Max Orok
Hi Peter,

For two volumes (including STL imports), you can find the volume between
them using the `BooleanDifference` command.

Here is a small example:

SetFactory("OpenCASCADE");

Box(1) = {-10, -10, -10, 20, 20, 20};

Sphere(2) = {0, 0, 0, 10};

BooleanDifference{ Volume{1}; Delete; }{ Volume{2}; Delete; }

Also, depending on the number of shapes you're importing, the `Coherence`
command might also help if you find that volumes don't end up sharing mesh
faces.

Picture after using a clipping plane:

[image: image.png]

On Tue, Mar 19, 2019 at 2:41 AM Peter Johnston 
wrote:

> Hello again,
>
> I’m sorry to keep asking questions about STL files, but there is something
> else that has arisen.
>
> I import two surfaces, one inside the other as follows:
>
> Merge "inner_shape.stl";
>
> Mesh.Smoothing=100;
>
> //+
>
> Surface Loop(1) = {1};
>
> //+
>
> Volume(1) = {1};
>
> //+
>
> Merge "outer_shape.stl";
>
> //+
>
> Surface Loop(2) = {2};
>
> //+
>
> Volume(2) = {2};
>
> Can I mesh the space in between the two shapes?
>
> Thanks,
>
> Peter.
>
> -
>
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Surfaces not lining up - new user

2019-03-14 Thread Max Orok
Hello Tony,

This looks like a case for the Coherence operation (only available using
OpenCascade)
After adding that line to your script, the model shares faces across the
different cylinders.

---

SetFactory("OpenCASCADE");

Cylinder(1) = {-50, -7.5, 0, 100, 0, 0, 7.5, 2*Pi};

Cylinder(2) = {-51, -7.5, 0, 1, 0, 0, 0.25, 2*Pi};

Cylinder(3) = {50, -7.5, 0, 1, 0, 0, 0.25, 2*Pi};

lcar1 = .1;
lcar2 = 1.0;


Characteristic Length{ PointsOf{ Volume{2:3}; } } = lcar1;
Characteristic Length{ PointsOf{ Volume{1}; } } = lcar2;

Show "*";

//+

*Coherence;*
---

[image: image.png]

Sincerely,
Max

On Thu, Mar 14, 2019 at 12:40 PM Anthony Ozzello <
anthony.ozze...@entegris.com> wrote:

> Hi everyone,
>
>
>
> I’m a new user, trying to set up a simple problem to start working with
> gmsh feeding into ElmerFEM.
>
> All I want to do is generate three cylinders that touch each other and the
> apply  positive voltage to
>
> one face at one end and negative voltage at the opposite face on the other
> end to show that I can
>
> build something simple and see that the potential in a stat current model
> is working. The problem
>
> is that, for some reason, the three cylinders do not seem to be connecting
> to each other. When I
>
> run the model, each of the three cylinders keeps its own potential there
> is no gradient in potential
>
> across the cylinders when I adjust the conductivity to low values. It
> seems the surfaces of the three
>
> cylinders do not connect electrically. I’ve turned on the ‘sew faces’
> option, but still no luck.
>
> Can anyone give me any ideas?
>
>
>
> Thanks,
>
>
>
> Tony
>
>
>
>
>
> //+
>
> SetFactory("OpenCASCADE");
>
> Cylinder(1) = {-50, -7.5, 0, 100, 0, 0, 7.5, 2*Pi};
>
> Cylinder(2) = {-51, -7.5, 0, 1, 0, 0, 0.25, 2*Pi};
>
> Cylinder(3) = {50, -7.5, 0, 1, 0, 0, 0.25, 2*Pi};
>
> lcar1 = .1;
>
> lcar2 = 1.0;
>
>
>
> Characteristic Length{ PointsOf{ Volume{2:3}; } } = lcar1;
>
> Characteristic Length{ PointsOf{ Volume{1}; } } = lcar2;
>
> //+
>
> Show "*";
>
>
>
> Tony Ozzello
>
> Technologist
> Liquid Filtration Division
>
> *T *+1 512 244 5205*M *+1 518 944 3519
> --
>
> [image: Entegris | 50 years of pure advantage] <http://www.entegris.com/>
>
> 700 Jeffrey Way, Suite 400
> Round Rock, Texas 78665 USA
>
>
>
> [image: PACE | A values-driven culture]
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] segfaults on linux but not windows with SDK

2019-03-14 Thread Max Orok
Hello Julien,

I'm sorry but I don't think we were able to get the c_wrap header to work.
I think we just plowed ahead with g++5 and the c++ header as-is and were
able to run our programs OK.

Sorry I can't be more help.
Max

On Thu, Mar 14, 2019 at 12:49 PM Julien Hess 
wrote:

> Hello Max and Christophe,
>
> I just encountered the same problem with the latest version 4.2.2 of the
> SDK. The regular header works just fine on Ubuntu with GCC 4, but the
> approach with the cwrap and gmshc.h to make it work with GCC 5 still causes
> a segfault when calling gmsh::initialize(). Do you remember what the issue
> with the cwrap header was? Is there a way to fix or bypass that issue?
>
> Thanks for any help!
>
> Julien
>
> *On 27 Jul 2018, at 15:02, Max Orok  <http://onelab.info/mailman/listinfo/gmsh>> wrote:
>
> *Yes, there was an issue with the cwrap header but the regular header was
> fine after all.
> Sorry for the trouble!
>
> Max Orok
>
> On Fri, Jul 27, 2018 at 1:58 AM, Christophe Geuzaine  <http://onelab.info/mailman/listinfo/gmsh>>
> wrote:
>
> >>>* On 10 Jul 2018, at 17:32, Max Orok  >>><http://onelab.info/mailman/listinfo/gmsh>> wrote:
> *>>* Hello all,
> *>>* Sorry for the newbie question. I have some C++ code that has successfully
> *>* built and ran using the windows gmsh SDK but which causes a segfault on
> *>* ubuntu when trying to call gmsh::initialize(). I have tried the basic gmsh
> *>* C++ header and .so files, using the cwrap and gmshc.h version of the gmsh
> *>* header file, defining the ABI number for g++ as 0, (and 1 just for kicks),
> *>* and finally recompiling the .so from source with the same compiler as the
> *>* other code, all to no avail. Is there anything further I can try apart 
> from
> *>* wrestling with gdb?
> *>>>* Did you fix the issue ?
> *>>* CG
> *>>>* Thanks for your time,
> *>* Max Orok
> *>* ___
> *>* gmsh mailing list
> *>* gmsh at onelab.info <http://onelab.info/mailman/listinfo/gmsh>
> *>* http://onelab.info/mailman/listinfo/gmsh 
> <http://onelab.info/mailman/listinfo/gmsh>
> *>>>* —
> *>* Prof. Christophe Geuzaine
> *>* University of Liege, Electrical Engineering and Computer Science
> *>* http://www.montefiore.ulg.ac.be/~geuzaine 
> <http://www.montefiore.ulg.ac.be/~geuzaine>
> *>>* Free software: http://gmsh.info <http://gmsh.info/> | http://getdp.info 
> <http://getdp.info/> | http://onelab.info <http://onelab.info/>
> *>>
>
> --
> Max Orok
> Summer Studentwww.mevex.com
>
>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Apply "refine by splitting" to a single transfinite surface

2019-03-06 Thread Max Orok
Hello Aaron,

This is kind of a dumb way, but taking your question literally, I made two
separate mesh files, refining just one and then merged them with these geo
commands:

Merge "mesh1.msh";
Merge "mesh2.msh";

This method however discards the geometry. The weird part is at the
boundary between the two; what should happen there for flow simulations,
etc?

[image: image.png]

Personally, for a real problem I would either increase the transfinite
resolution on the lines I wanted to be more refined or add a size field
(area with a different mesh refinement). The documentation has more
information on these options. Perhaps using mesh partitions could work as
well? I'm not really sure what those are to be honest but it sounds like
similar idea.

Sincerely,
Max



On Tue, Mar 5, 2019 at 4:06 PM Aaron Matthew Baier-Reinio <
ambaierrei...@edu.uwaterloo.ca> wrote:

> Hello,
>
> In the following toy example I have two adjacent squares, which are meshed
> using the transfinite algorithm:
>
> Point(1) = {0, 0, 0, 1.0};
> Point(2) = {1, -0, 0, 1.0};
> Point(3) = {1, 1, 0, 1.0};
> Point(4) = {0, 2, 0, 1.0};
> Point(5) = {0, 1, 0, 1.0};
> Point(6) = {1, 2, 0, 1.0};
>
> Line(1) = {4, 5};
> Line(2) = {5, 1};
> Line(3) = {1, 2};
> Line(4) = {3, 2};
> Line(5) = {3, 6};
> Line(6) = {6, 4};
> Line(7) = {5, 3};
>
> Curve Loop(1) = {1, 7, 5, 6};
> Plane Surface(1) = {1};
> Curve Loop(2) = {7, 4, -3, -2};
> Plane Surface(2) = {2};
>
> Transfinite Curve {6, 5, 7, 1, 4, 3, 2} = 10 Using Progression 1;
> Transfinite Surface {1};
> Transfinite Surface {2};
>
> When I press "refine by splitting", the number of elements in each square
> is doubled. I was wondering if there is a way to apply "refine by
> splitting" to the top square only, so that the number of elements in the
> top square is doubled, while the number of elements in the bottom square
> doesn't change. How might I go about doing this?
>
>
> Thanks for the help,
> Aaron
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Area/Volume of physical groups

2019-03-06 Thread Max Orok
Hello Johannes,

Volume case:
I think you can use the Plugin "MeshVolume" for this, calling it through
the plugin API interface.

Here is a link to the implementation:
https://gitlab.onelab.info/gmsh/gmsh/blob/master/Plugin/MeshVolume.cpp

Surface case:
Perhaps you could use the Integrate Plugin? I think you would have to first
have to make a physical group of just the 2D boundary elements and then use
the integrate plugin with a value of 1 (see discussion in link for more
info)
https://gitlab.onelab.info/gmsh/gmsh/merge_requests/197

I hope this helps!
Max


On Wed, Mar 6, 2019 at 11:23 AM Johannes  wrote:

> Hello,
>
> is there a way to get the surface area or volume of a physical group via
> the Gmsh API?
>
> Kind Regards
> Johannes
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] GMSH parsing is very slow

2019-01-31 Thread Max Orok
Hello,

Are you referring to an input geo file which is taking so long?
What sort of operations are you doing in the file?

Sincerely,
Max

On Thu, Jan 31, 2019 at 8:21 AM Al Sc  wrote:

> Dear Sir or Madam,
>
> some gmsh-file of mine (roughly 10 lines) takes extremely much time to
> load: Just the parsing of gmsh (in both version 3.x.x and 4.x.x) takes
> about 45 minutes to 1 hour.
> However, in contrast, the parsing of the resulting mesh, which is of
> similar complexity, takes only some seconds. Since I must mesh many
> variants of this structure, that issue is really critical for me.
> Are there some general recommendations on how to improve the startup time
> of gmsh?
>
> Best regards
>
> A. S.
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Post-processing stress field

2019-01-30 Thread Max Orok
Yes, the stresses belong in the $ElementData section for sure.
I think to correctly display it, you'll need to create rows of element data
with 10 entries - 1 for the element number and 9 for the stress tensor
values:

1 sigx sigxy sigxz sigxy sigy sigyz sigxz sigyz sigz

I don't know if copying and pasting this pattern in ElementData will work
without some tweaks... (there is an InterpolationScheme section that I
don't quite understand). If it were me, I would add the data using the gmsh
API and it will handle the output format how it likes.

Sincerely,
Max


On Wed, Jan 30, 2019 at 2:42 PM Gaetano Camarda  wrote:

> Thanks for your help, but I think I have not understood well.
> I have a mesh all brick (8 nodes) and my stress field matrix is composed
> this way:
> 1 sigx sigy sigz sigxy sigyz sigxz
>... .....
>
> In each row is express the stress state of the element, I think I have to
> copy this matrix into .msh file as $ElementData, but I do not unsterstand
> well the input format, is that right this way?
>
>
> Outlook <https://aka.ms/qtex0l> per iOS
> --
> *Da:* Max Orok 
> *Inviato:* martedì, gennaio 29, 2019 7:14 PM
> *A:* Gaetano Camarda
> *Cc:* gmsh@onelab.info
> *Oggetto:* Re: [Gmsh] Post-processing stress field
>
> Hello Gaetano,
>
> Here is a short program to plot 3x3 tensor data using the C++ gmsh API (it
> shouldn't be too hard to port to Python or Julia if you're more comfortable
> there). It only plots data for one element, but can be extended for your
> case.
>
> The "addModelData" call is expecting a vector of vectors with 9 entries
> each for this case.
> I think the vector ordering corresponding to the matrix is like this:
> [elt11, elt12, elt13, elt21, elt22, ...]
>
> I assume the stress matrix is symmetric and so only has 6 unique entries.
> Therefore your vector entries will look like [x xy xz xy y yz xz yz z]
> The tricky part will be importing the data in a sensible way.
>
> Perhaps you could parse a CSV using python and add entries to the data
> vector in a loop?
> Please find attached the program as well as example input mesh and output
> mesh files.
>
>
>
> [image: image.png]
>
> Sincerely,
> Max
>
> On Tue, Jan 29, 2019 at 11:24 AM Gaetano Camarda 
> wrote:
>
>> Hello everyone,
>>
>> I’m having some difficult on post processing a mesh I created.
>>
>> I create a mesh on Gmsh all Hexa (so a brick with 8 nodes), i use this
>> mesh and import it on Matlab,
>>
>> there i run some analisys and find the stress matrix:
>>
>> [sigx sigy sigz sigxy sigyz sigxz]
>>
>> …..…..…..   …..…..…..
>>
>>
>>
>> Now I would like to visualize the stress field on Gmsh, but I do not find
>> any way to do so, I can export the matrix,
>>
>> I tried to generete a *.pos file, but I didn’t find a solution.
>>
>>
>>
>> Inviato da Posta
>> <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=02%7C01%7C%7Cca31cd7089a2464649bc08d68615abee%7C84df9e7fe9f640afb435%7C1%7C0%7C636843824966724800=B9ULg21XHyAFBAd6yWI8Wsc%2B9fTHxhibsTu5e1UtiUM%3D=0>
>> per Windows 10
>>
>>
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
>> <https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fonelab.info%2Fmailman%2Flistinfo%2Fgmsh=02%7C01%7C%7Cca31cd7089a2464649bc08d68615abee%7C84df9e7fe9f640afb435%7C1%7C0%7C636843824966734804=x5CcVoLrp3YNu69ZWMj3fvkDM1zD5CNYD4soeJ25tfo%3D=0>
>>
>
>
> --
> Max Orok
> Contractor
> www.mevex.com
> <https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mevex.com=02%7C01%7C%7Cca31cd7089a2464649bc08d68615abee%7C84df9e7fe9f640afb435%7C1%7C0%7C636843824966734804=9Qnyosr1z%2BWkN%2FpOeuE8LZewBbv0q0WUfPa92IL3m9M%3D=0>
>
>
>

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Post-processing stress field

2019-01-29 Thread Max Orok
Hello Gaetano,

Here is a short program to plot 3x3 tensor data using the C++ gmsh API (it
shouldn't be too hard to port to Python or Julia if you're more comfortable
there). It only plots data for one element, but can be extended for your
case.

The "addModelData" call is expecting a vector of vectors with 9 entries
each for this case.
I think the vector ordering corresponding to the matrix is like this:
[elt11, elt12, elt13, elt21, elt22, ...]

I assume the stress matrix is symmetric and so only has 6 unique entries.
Therefore your vector entries will look like [x xy xz xy y yz xz yz z]
The tricky part will be importing the data in a sensible way.

Perhaps you could parse a CSV using python and add entries to the data
vector in a loop?
Please find attached the program as well as example input mesh and output
mesh files.



[image: image.png]

Sincerely,
Max

On Tue, Jan 29, 2019 at 11:24 AM Gaetano Camarda  wrote:

> Hello everyone,
>
> I’m having some difficult on post processing a mesh I created.
>
> I create a mesh on Gmsh all Hexa (so a brick with 8 nodes), i use this
> mesh and import it on Matlab,
>
> there i run some analisys and find the stress matrix:
>
> [sigx sigy sigz sigxy sigyz sigxz]
>
> …..…..…..   …..…..…..
>
>
>
> Now I would like to visualize the stress field on Gmsh, but I do not find
> any way to do so, I can export the matrix,
>
> I tried to generete a *.pos file, but I didn’t find a solution.
>
>
>
> Inviato da Posta <https://go.microsoft.com/fwlink/?LinkId=550986> per
> Windows 10
>
>
> _______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
// Jan 29 MXO

// example to plot 3x3 tensor data using gmsh API

#include 
#include 
#include "gmsh.h"

int main(){

// step 1 of 2 -> import data for plotting (need the mesh and the simulation 
data)

  gmsh::initialize();

  // open mesh file to use as reference for plotting
  // we will write our results to another mesh file for output
  gmsh::open("model.msh");

  // tell gmsh what elements of the mesh we want to plot data for
  std::vector elt_numbers;
  // only plot data for element 1 for simplicity
  elt_numbers.emplace_back(1);

  // fill a data vector corresponding to the element vector
  // the data vector's elements are vectors of length 9 (3x3 tensor)
  std::vector> elt_data;

///

  // this is the tricky part -> how to import data in an intelligent way?
  // here we make a single zero vector of length 9 for demonstration
  elt_data.emplace_back(std::vector(9, 0.0));

///

// step 2 of 2 -> ask Gmsh API to plot the data (see gmsh.h for reference)

  //get model name
  std::vector modelNames;
  gmsh::model::list(modelNames);
  auto modelName = modelNames[0];

  auto viewTag = gmsh::view::add("stress-data");

  gmsh::view::addModelData(viewTag, 0, modelName,
"ElementData", elt_numbers, elt_data, 0.);

  //toggle here to see behaviour
  gmsh::view::write(viewTag, "stress-data.msh");

  //end gmsh run
  gmsh::finalize();
  return 0;
}


model.msh
Description: Binary data


stress-data.msh
Description: Binary data
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Gradient plugin generating all zero vectors.

2018-12-18 Thread Max Orok
Hello Joshua,

It may be because the view data sets are scalar values.
The gradient operation is meant for vector fields as the derivative of any
scalar value is zero.
You can try the plugin on higher-order data and check this hypothesis.

Sincerely,
Max

On Tue, Dec 18, 2018 at 1:03 PM Josh Thompson  wrote:

> Hello,
>
> If I attempt to run the Gradient plugin on any view in any mesh, the
> resulting view is composed completely of zero vectors. What could be
> causing this behaviour?
>
> Thanks,
> Joshua Thompson
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] How do I set the random number seed with a "Mesh.Seed" option for deterministic mesh generation?

2018-10-26 Thread Max Orok
Hi Thomas,

I first tried to set the random factors using:
Mesh.RandomFactor = 1e-9;
Mesh.RandomFactor3D = 1e-9;

I think the bug is elsewhere however...
With your file, I get a warning the first time and none the subsequent
times.
I think it is due to internal state with the mesher remembering the choice
of MeshAdapt?
Switching from Delauney to MeshAdapt halfway might cause different point
spacing etc.

Here are some pictures showing the two consecutive mesh logs

1st time:


2nd time (same window):


On closing Gmsh and trying again, this repeats.

Instead, to fix your problem, you can set the meshing algo to MeshAdapt
ahead of time by changing the line here:
Mesh.Algorithm = 1; // changed to MeshAdapt

Three repeated trials gave identical output files.

p.s. just in case, all of the current / modified options can be looked
through and searched using Ctrl-Shift-H or Help -> Current Options and
Workspace

Sincerely,
Max

On Fri, Oct 26, 2018 at 12:44 PM, Thomas Kiel  wrote:

> Dear Gmshers,
>
> as I already pointed out in an earlier email (s.
> http://onelab.info/pipermail/gmsh/2018/012045.html), I had problems with
> reproducing the exact same mesh twice. Since this email was unfortunately
> html encoded I think it was overlooked. Yet I like to apologize to ask
> again, this time in text formatted email, how to set the random number
> generator seed with an outside option?
>
> I know, that a grep to "srand" within the gmsh git repository gives
> several times hard-coded initialized seeds, e.g.
>
> Geo/SOrientedBoundingBox.cpp:326:  srand((unsigned)time(0));
> Mesh/Levy3D.cpp:624:  srand(time(NULL));
> Mesh/Levy3D.cpp:1359:srand(time(NULL));
> Mesh/meshGFaceRecombine.cpp:245:  srand(time(NULL));
> Mesh/meshGFaceLloyd.cpp:394:  srand(time(NULL));
>
> yet I am not sure whether these influence my mesh generation. A
> minimalistic test file which causes different meshes at consecutive runs in
> my case, is
>
>
> //+
> SetFactory("OpenCASCADE");
>
> Mesh.CharacteristicLengthMin = 0.001;
> Mesh.CharacteristicLengthMax = 2.0;
>
> Mesh.CharacteristicLengthExtendFromBoundary = 1;
>
> Mesh.Algorithm = 5;
> Mesh.Smoothing = 3;
> Mesh.Algorithm3D = 1;
>
> Box(1) = {0, -0.5, -0.5, 1, 1, 1};
> Box(2) = {-1, -0.5, -0.5, 1, 1, 1};
> Sphere(3) = {0.5, 0.0, 0.0, 0.3, -Pi/2, Pi/2, 2*Pi};
>
> Coherence;
>
> surfs_box1() = Unique(Abs(Boundary{ Volume{4}; } ));
> lines_box1() = Unique(Abs(Boundary{ Surface{surfs_box1()}; } ));
> pts_box1() = Unique(Abs(Boundary{ Line{lines_box1()}; } ));
>
> surfs_sphere() = Unique(Abs(Boundary{ Volume{3}; } ));
> lines_sphere() = Unique(Abs(Boundary{ Surface{surfs_sphere()}; } ));
> pts_sphere() = Unique(Abs(Boundary{ Line{lines_sphere()}; } ));
>
> surfs_box2() = Unique(Abs(Boundary{ Volume{2}; } ));
> lines_box2() = Unique(Abs(Boundary{ Surface{surfs_box2()}; } ));
> pts_box2() = Unique(Abs(Boundary{ Line{lines_box2()}; } ));
>
> // sorted from largest to smallest:
> Characteristic Length{pts_box2()} = 0.5;
> Characteristic Length{pts_sphere()} = 0.2;
> Characteristic Length{pts_box1()} = 0.1;
>
>
>
> I tested this on a machine running Ubuntu 16.04 and installed the
> out-of-the-box gmsh 4.0.4 version from the webpage. If any further detail
> on the running machine is required please tell me.
> I hope you can help me out.
>
> Thanks a lot in advance and best regards,
>
> Thomas Kiel
>
> --
> Thomas Kiel
> Theoretische Optik und Photonik
>
> Humboldt-Universität zu Berlin, Institut für Physik
> Newtonstraße 15, 12489 Berlin
> <https://maps.google.com/?q=Newtonstra%C3%9Fe+15,+12489+Berlin=gmail=g>
>
> Tel.:   +49 30 2093 7999
> E-Mail: thomas.k...@physik.hu-berlin.de
> Web:https://top.physik.hu-berlin.de/people/thomas-kiel
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>



-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Fwd: Max number of fields

2018-10-26 Thread Max Orok
Hello Alessandro,

I tried to add fields to an empty model using the attached program.
I think your main problem would be with the time needed to insert in a map.

Here are some rough timings from adding the "Box" size field.

1min   -  50,000
4min   -  90,000
5min   -100,000
6.5 min   -110,000
12 min-150,000

For really large numbers (millions, etc.), you might need preallocation
instead of adding one-by-one.
I don't think this is possible with the current SDK.
The SDK C++ header's add function "only" has an int return value, so around
4 billion is nominally the front-end limit.

If the header was ever modified, I think the background meshes are tracked
with a pointer map (from BackgroundMeshManager.h):

static std::map data;

Using the max_size map method I got around 3.8e17.
The real number is probably much lower than that because of allocation
problems etc.

Sincerely,
Max

On Fri, Oct 26, 2018 at 6:01 AM, Alessandro Vicini <
alessandro.vic...@sitael.com> wrote:

>
>
> Hello Gmsh users, is there some limitation whatsoever to the number of
> fields that can be defined for mesh size control? I think I might need a
> “huge” number of fields for some automatic adaptive grid refinement…
>
>
>
> A.
>
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>


-- 
Max Orok
Contractor
www.mevex.com
#include "gmsh.h"
#include 

int main() {
  gmsh::initialize();
  int i {0};
  std::string fieldType {"Box"};

  try {
while(true) {
  gmsh::model::mesh::field::add(fieldType);
  if (!(i % 1)) {
std::cout << i << std::endl;
  }
  i++;
}
  }
  catch(...){
std::cout << "exception thrown" << std::endl;
  }

  std::cout << "max number of " << fieldType << " fields is " << i << std::endl;
  gmsh::finalize();
}
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Tips on large, tricky models?

2018-10-18 Thread Max Orok
Hello all,

I am trying to model a large, tricky problem in Gmsh.
Smaller cases succeed individually but larger cases are much more
difficult.
Does anyone have tips on "all-out" extreme meshing for cases that seem
intractable?

The small files start with "test_tube_with_stopper" and the larger files
start with "test_tube_small_box"

A brep is attached for the large case as the Boolean Delete took around 5
hours! It was sped up by setting the option "Geometry.OCCParallel=1" however.


Thank you for your time!

Sincerely,
Max
-- 
Max Orok
Contractor
www.mevex.com

 test_tube_small_box_w_air.brep
<https://drive.google.com/a/mevex.com/file/d/1mu9fY2Dy4oef-LpaUIkB9PsdJOPUDJ8r/view?usp=drive_web>
 test_tube_small_box_w_air.geo
<https://drive.google.com/a/mevex.com/file/d/1b0IEqw5oiF_tZsoXoqWvRykfK3Zqszqy/view?usp=drive_web>
 test_tube_small_box_w_air.stp
<https://drive.google.com/a/mevex.com/file/d/1ezgXzJKp_y7ME4RG42R7xzxclbQX8-Qp/view?usp=drive_web>


test_tube_with_stopper.geo
Description: Binary data


test_tube_with_stopper.stp
Description: Binary data
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Extracting the electric field data

2018-09-30 Thread Max Orok
Hi Mansour,

Typically I use a script to extract all of the data and put in a vector,
etc.
Attached is an example in C++.

Through the GUI, you can use the command
Export ->  Post-processing - Gmsh POS  [or] Post-processing - Generic TXT
[or the other post processing formats]

For this method, the output files will still have the element data, but
only to tie the values to the right elements.

[image: image.png]
Sincerely,
Max Orok

On Sun, Sep 30, 2018 at 10:11 AM mansour alawi 
wrote:

> Dear there,
>
> I have been using GMSH software for quite some time to analyse the outcome
> of brain electric stimulation (TMS) generated by Simnibs software. However,
> recently I'm facing difficulties in extracting the electric field data, in
> other words, I wish to have the results into numbers instead of the colour
> bar as shown in the attachment.
>
> I have tried the export functions. However, the data I get wasn't labelled
> to differentiate the brain structure from the electric field data.
>
> I would like to seek your help in this regard, what function I can use to
> have the electric field data and brain structure data separated and in a
> numerical form not colour bar form.
>
> --
>
> *Best regards *
> *Mansour Ayman Alawi *
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
#include "gmsh.h"
#include 
#include 

// WARNING: this script only works for extracting scalar data,
// however, it could be modified for higher orders

// function to extract scalar data from the result vector
inline std::vector unformat_data(std::vector> data) 
{
  std::vector unformatted;
  for (auto dataIt = data.cbegin(); dataIt != data.cend(); ++dataIt){
unformatted.emplace_back((*dataIt)[0]);
  }
  return unformatted;
}

int main(void) {
  gmsh::initialize();
  // open results mesh file
  puts("opening file...");
  gmsh::open("results.msh");
  // get the numbers of all of the views
  std::vector viewTags;
  gmsh::view::getTags(viewTags);
  // gmsh data format variables
  std::string dataLabel;
  std::vector allLabels;
  std::vector eltNumbers;
  int numComponents;
  double viewTime;
  std::vector> data;
  std::vector> viewData;

  puts("extracting data");
  // loop over views and extract element data
  // assume that view tags are 0-N
  for (auto view : viewTags){
printf("reading view %d\n", view);
gmsh::view::getModelData(view, 0, dataLabel, eltNumbers, data, viewTime, 
numComponents);
// get the view name in a slightly convoluted way
std::stringstream viewOpt;
viewOpt << "View[" << view << "].Name";
std::string viewName;
gmsh::option::getString(viewOpt.str(), viewName);
allLabels.emplace_back(viewName);
// save the (scalar) data we care about
viewData.emplace_back(unformat_data(data));
  }

  // print the first few data for each view
  for (auto i = 0; i < allLabels.size(); ++i) {
printf("%s\n", allLabels[i].c_str());
for (auto j = 0; j < 10 && j < viewData[i].size(); ++j) {
  printf("%f\n", viewData[i][j]);
}
  }

  gmsh::finalize();
}
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] gmsh crashing with no error message

2018-09-26 Thread Max Orok
Hi Dominic,

This looks like undefined behaviour, in that the format specifier should be
correct to prevent crashing.
The program is likely trying to dereference 4, which is probably a
segmentation fault.

Sincerely,
Max Orok

On Wed, Sep 26, 2018 at 8:26 AM Dominic North 
wrote:

> Hi Everyone,
> I hope you can help please!
>
> Gmsh is crashing whenever an error occurs – the whole program stops
> working and a Windows error message appears saying: “gmsh.exe has stopped
> working.”
>
>
>
> This happens even on this one-line script (“testFile.geo”, in the same
> directory as gmsh.exe):
>
>
>
>
>
> Printf("testLine %s", 4);
>
>
>
>
>
>
>
> NOTE, if the format specifier is correct, there is no error. i.e.
> “testLine %g”, 4); .
>
> This error occurs if the file is loaded in the GUI, or via command line.
>
>
>
> If anyone can help I would be very grateful!
> Best regards,
> Dominic
>
>
>
> Version info:
>
>
>
> C:\ONELAB>Version  : 4.0.2-git-766232cc6
>
> License  : GNU General Public License
>
> Build OS : Windows64
>
> Build date   : 20180914
>
> Build host   : gmsh.info
>
> Build options: 64Bit Ann Bamg Bfgs Blas Blossom Cgns DIntegration Fltk
> Gmm Hxt Jpeg(Fltk) Kbipack Lapack MathEx Med Mesh Metis Mmg3d Mpeg
> NativeFileChooser Netgen NoSocklenT ONELAB ONELABMetamodel OpenCASCADE
> OpenGL OptHom PETSc Parser Plugins Png(Fltk) Post SLEPc Solver TetGen/BR
> Voro++ Zlib(Fltk)
>
> FLTK version : 1.4.0
>
> PETSc version: 3.9.3 (complex arithmtic)
>
> OCC version  : 7.3.1
>
> MED version  : 3.3.1
>
> Packaged by  : nt authority system
>
> Web site     : http://gmsh.info
>
> Mailing list : gmsh@onelab.info
>
>
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] build conformal mesh from STEP file using only the GUI

2018-09-25 Thread Max Orok
Hello Matthias,

Both of those commands are under the Geometry -> Elementary entities menu.

[image: image.png]
While the GUI is very nice, I personally prefer using a geo file and
opening it in the GUI, since it is a bit more reproducible for tricky
models.

Sincerely,
Max

On Tue, Sep 25, 2018 at 5:28 AM Zenker, Dr. Matthias <
matthias.zen...@erbe-med.com> wrote:

> Hi,
>
>
>
> I have a simple question and apologize if this has been answered before –
> I didn’t find the answer in the archive or the gmsh manual.
>
>
>
> I want to do the following using the gmsh GUI:
>
>
>
> 1.   Import a STEP file containing several bodies
>
> 2.   remove duplicate entities, i.e. the duplicated interface(s)
> between the bodies
>
> 3.   make a conformal 3D mesh, i.e. adjacent bodies should be
> connected so that heat can flow between them.
>
>
>
> This can be achieved with commands in a geo file, invoking the OpenCASCADE
> toolbox and the coherence command.
>
> Can it also be done using only the GUI? More specifically, how do I invoke
> the OpenCASCADE toolbox from the GUI?
>
>
>
> Thanks for helpful hints.
>
>
>
> Matthias
> --
>
> Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen Geschaeftsfuehrer:
> Christian O. Erbe, Reiner Thede Registergericht: Stuttgart HRB 380137
>
> _______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] gmsh 4.0.1 mesh file write bug

2018-09-24 Thread Max Orok
 Hi Rod,

If Physical Surfaces (Volumes, etc. ) are set, only elements which are part
of a Physical Group are saved in the mesh file.
By setting the Mesh.SaveAll option to 1 (default is 0), you will then save
all elements to the mesh file.

Sincerely,
Max Orok

On Mon, Sep 24, 2018 at 5:28 AM Rob Govers  wrote:

> Hi -
>
> I run into the issue that the following commands:
>
> SetFactory("OpenCASCADE");
> Cylinder(1) = {-1, -0, 0, 2, 0, 0, 4, 2*Pi};
> Cylinder(2) = {-1.1, -0, 0, 2.2, 0, 0, 0.5, 2*Pi};
> BooleanDifference{Volume{1}; Delete; }{Volume{2};Delete;}
> Physical Surface(1000) = {4};
>
>
> followed by 3D meshing and write to a .msh file, do not result in a mesh
> file that contain the 3D results. The message console indicates that 204
> nodes and 1029 are generated, they are nicely shown in the GUI, yet the
> saved output file has only 17 nodes and 26 triangular elements. This result
> is the same for different .msh file output formats, so that does not appear
> to be the issue. However, when I leave out the "Physical Surface(1000) =
> {4};”, the mesh file does contain the complete results.
>
>
> Info: Gmsh version   : 4.0.1
> Info: Build OS   : MacOSX
> Info: Build options  : 64Bit Ann Bamg Bfgs Blas(Custom) Blossom Cgns
> DIntegration Dlopen Fltk Gmm Hxt Jpeg(Fltk) Kbipack Lapack(Custom) MathEx
> Med Mesh Metis Mmg3d Mpeg NativeFileChooser Netgen ONELAB ONELABMetamodel
> OpenCASCADE OpenGL OptHom PETSc Parser Plugins Png(Fltk) Post SLEPc Solver
> TetGen/BR Voro++ Zlib
> Info: Build date : 20180907
> Info: Build host : gmsh.info
> Info: Packager   : geuzaine
> Info: Executable : /Applications/Gmsh.app/Contents/MacOS/gmsh
> Info: Launch date: Mon Sep 24 09:35:54 2018
> Info: Command line   : /Applications/Gmsh.app/Contents/MacOS/gmsh
>
> _______
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] bulk import of physical names?

2018-09-01 Thread Max Orok
Hi everyone,

Is there some way to import physical name-like data in bulk from step
files? The data is not ordered in any way so we can't assign groups
programmatically in a geo file.

There seems to be a way to import colour data in the OCC input file handler
here:



The OCC methods include "ReadMaterials", see

https://www.opencascade.com/doc/occt-6.9.1/refman/html/class_s_t_e_p_c_a_f_control___reader.html

but could Colors also be used as a workaround somehow?

Thanks for your time,

-- 
Max Orok
Contractor
Mevex Corp.
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Recommendation for scripting in gmsh

2018-08-26 Thread Max Orok
Well, .geo file scripting is nice if you only need a few commands and don't
want to write a large program.
It is also useful for interacting with other Gmsh users as a sort of lingua
franca.

On the other hand, I would lean towards the API if you'd like to write a
larger program that takes full advantage of Gmsh's features
with the possibility of interfacing with other programs.

In terms of functionality, I would guess they're broadly similar, but as
the API develops it is likely more and more features will be added there.

On Sun, Aug 26, 2018 at 12:10 PM, Hector Espinoza 
wrote:

> Hello:
>
> In gmsh 4.0 one can use scripts to generate a geometry/mesh in the form of
> a .geo file or using the python/julia API
>
> Which is the preferred method to have the most functionality of gmsh?
>
> For example, element renumbering appears to be implemented in the API but
> not in the .geo interpreter.
>
> Cheers,
>
> Héctor Espinoza
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>


-- 
Max Orok
Summer Student
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] duplicate result views

2018-08-25 Thread Max Orok
Thinking about the .opt file, of course it doesn't work the second time:
the view is numbered differently. The other problem hopefully has a real
cause!

On Sat, Aug 25, 2018 at 11:34 AM, Max Orok  wrote:

> Here is your basic solver (it seems any solver will do) and a mesh file
> that shows the issue.
>
> With the solver open, open the .msh file. There should be two duplicate
> views loaded into the GUI.
> In addition, the .opt file (to not open the view automatically) is ignored
> the second time it is loaded.
>
> Without the solver loaded (i.e. no run button in the gui) the duplicate
> views don't show up.
> I think the problem may be bound up in the database files; I had an old
> .db file that when loaded, did not have this problem.
>
> On Sat, Aug 25, 2018 at 3:35 AM, Christophe Geuzaine 
> wrote:
>
>>
>> Can you send an example?
>>
>> > On 23 Aug 2018, at 22:48, Max Orok  wrote:
>> >
>> > Hi everyone,
>> >
>> > On loading simulation results into the Gmsh GUI after running a C++
>> solver from it, there are duplicates of each view loaded. It seems the
>> solver is running twice, the second time loading the views? Is there anyway
>> to disable this?
>> >
>> > --
>> > Max Orok
>> > Summer Student
>> > www.mevex.com
>> >
>> >
>> > ___
>> > gmsh mailing list
>> > gmsh@onelab.info
>> > http://onelab.info/mailman/listinfo/gmsh
>>
>> —
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science
>> http://www.montefiore.ulg.ac.be/~geuzaine
>>
>> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>>
>>
>
>
> --
> Max Orok
> Summer Student
> www.mevex.com
>
>
>


-- 
Max Orok
Summer Student
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] duplicate result views

2018-08-23 Thread Max Orok
Hi everyone,

On loading simulation results into the Gmsh GUI after running a C++ solver
from it, there are duplicates of each view loaded. It seems the solver is
running twice, the second time loading the views? Is there anyway to
disable this?

-- 
Max Orok
Summer Student
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Having problems linking gmsh sdk libraries

2018-07-30 Thread Max Orok
Hi Longhui,

This might not be super helpful but here is the compiler command to get
t1.cpp to compile fresh out of the 64bit SDK using MinGW:

cd /gmsh-git-Windows64-sdk
g++ t1.cpp -Iinclude -Llib -lgmsh

Please note I copied t1.cpp to the top level directory above bin, include,
lib, share.
-I specifies the include directory, -L the dll directory, and -l the actual
dll to link.

Perhaps you can try with cl.exe on the command line with the corresponding
flags?

Max




On Sun, Jul 29, 2018 at 9:16 PM, Li Longhui  wrote:

> Hi Max,
>
>
>
> Thank you for your quick feedbacks.
>
>
>
> I followed your advice trying with the wrap file but it behaved same.
>
>
>
> I did more research with findings below.
>
>
>
> On windows, to release a dynamic library, three types of files are to be
> released.
>
> 1) The header file .h
>
> In this file declarations of APIs will be described, such as
>
> gmsh::initialized()
>
>   this file can be included in source files using APIs within.
>
>
>
> 2) The linkage file .lib
>
> This file tells in linkaging stage which .dll file and which APIs should
> be linkaged and accordingly will be called during execution.
>
> This file will always be generated together with the .dll file.
>
> Actually there is some tool from mingw that will generating .lib file by
> extracting information from .dll file
>
>
>
> 3) The executable file   .dll
>
> This is the actual executable file and used only during execution stage.
>
>
>
> Following the findings above, I was not able to find the corresponding
> .lib file from the .dll file.
>
>
>
> As this is a generic issue, I am wondering if someone can help.
>
>
>
> Please feel free to let me know in case of any issues.
>
>
>
> Thanks Much,
>
> Longhui
>
>
>
> *发件人:* Max Orok [mailto:mo...@mevex.com]
> *发送时间:* 2018年7月30日 5:34
> *收件人:* Li Longhui ; gmsh@onelab.info
> *主题:* Re: [Gmsh] Having problems linking gmsh sdk libraries
>
>
>
> Hello Longhui,
>
>
>
> Not a VS expert but have you tried using the cwrap versions of these
> files?
>
> I got it to work on Windows with that method.
>
> It is explained nicely here: https://gitlab.onelab.info/
> gmsh/gmsh/tree/master/api
>
>
>
> The following is taken from the relevant readme.md file:
>
>
>
> "The additional file `gmsh.h_cwrap' redefines the C++ API in terms of the
> C API.
> This is provided as a convenience for users of the binary Gmsh SDK whose
> C++
> compiler ABI is not compatible with the ABI of the C++ compiler used to
> create
> the SDK. To use these C++ bindings of the C API instead of the native C++
> API,
> simply rename `gmsh.h_cwrap' as `gmsh.h'. Note that this will lead to
> (slightly)
> reduced performance compared to using the native Gmsh C++ API, as it
> entails
> additional data copies between the C++ wrapper, the C API and the native
> C++
> code."
>
>
>
> The libgmsh.dll is essential for sure, not sure about the .lib. I also had
> to put the gmsh-3.0.dll in the same folder as my executable.
>
> And if not, there's always Python!
>
>
>
> Good luck!
>
> Max Orok
>
>
>
> On Sun, Jul 29, 2018 at 10:55 AM, Li Longhui 
> wrote:
>
> Greetings,
>
>
>
> This is Longhui.
>
>
>
> I am evaluating the gmsh sdks with C/C++ on windows, and having problems
> linking the SDK libraries.
>
>
>
> I am wondering if some experts can have a look?  Thanks.
>
>
>
> Here are what I have done
>
> 1. In Visual Studio 2015, create a function as below
>
>
>
> 2. Configure the sdk include path and the sdk library path
>
>
>
> The codes can be built without compiling errors, but having linkage errors
>
>
>
> I have tried with both 32-bit and 64-bit sdks, and they have behaved
> exactly same.
>
>
>
> Should I have the Can I have the two files
>
> libgmsh.dll
>
> libgmsh.lib
>
>
>
> Do we need a libgmsh.dll and libgmsh.lib file?
>
>
>
> Any advices will be greatly appreciated/
>
>
>
> Thanks Much,
>
> Longhui
>
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>
>
>
> --
>
> Max Orok
>
> Summer Student
>
> www.mevex.com
>
> [image: 图像已被发件人删除。]
>



-- 
Max Orok
Summer Student
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Having problems linking gmsh sdk libraries

2018-07-29 Thread Max Orok
Hello Longhui,

Not a VS expert but have you tried using the cwrap versions of these files?
I got it to work on Windows with that method.
It is explained nicely here:
https://gitlab.onelab.info/gmsh/gmsh/tree/master/api

The following is taken from the relevant readme.md file:

"The additional file `gmsh.h_cwrap' redefines the C++ API in terms of the C
API.
This is provided as a convenience for users of the binary Gmsh SDK whose C++
compiler ABI is not compatible with the ABI of the C++ compiler used to
create
the SDK. To use these C++ bindings of the C API instead of the native C++
API,
simply rename `gmsh.h_cwrap' as `gmsh.h'. Note that this will lead to
(slightly)
reduced performance compared to using the native Gmsh C++ API, as it entails
additional data copies between the C++ wrapper, the C API and the native C++
code."

The libgmsh.dll is essential for sure, not sure about the .lib. I also had
to put the gmsh-3.0.dll in the same folder as my executable.
And if not, there's always Python!

Good luck!
Max Orok

On Sun, Jul 29, 2018 at 10:55 AM, Li Longhui  wrote:

> Greetings,
>
>
>
> This is Longhui.
>
>
>
> I am evaluating the gmsh sdks with C/C++ on windows, and having problems
> linking the SDK libraries.
>
>
>
> I am wondering if some experts can have a look?  Thanks.
>
>
>
> Here are what I have done
>
> 1. In Visual Studio 2015, create a function as below
>
>
>
> 2. Configure the sdk include path and the sdk library path
>
>
>
> The codes can be built without compiling errors, but having linkage errors
>
>
>
> I have tried with both 32-bit and 64-bit sdks, and they have behaved
> exactly same.
>
>
>
> Should I have the Can I have the two files
>
> libgmsh.dll
>
> libgmsh.lib
>
>
>
> Do we need a libgmsh.dll and libgmsh.lib file?
>
>
>
> Any advices will be greatly appreciated/
>
>
>
> Thanks Much,
>
> Longhui
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>


-- 
Max Orok
Summer Student
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] segfaults on linux but not windows with SDK

2018-07-27 Thread Max Orok
Yes, there was an issue with the cwrap header but the regular header was
fine after all.
Sorry for the trouble!

Max Orok

On Fri, Jul 27, 2018 at 1:58 AM, Christophe Geuzaine 
wrote:

>
>
> On 10 Jul 2018, at 17:32, Max Orok  wrote:
>
> Hello all,
>
> Sorry for the newbie question. I have some C++ code that has successfully
> built and ran using the windows gmsh SDK but which causes a segfault on
> ubuntu when trying to call gmsh::initialize(). I have tried the basic gmsh
> C++ header and .so files, using the cwrap and gmshc.h version of the gmsh
> header file, defining the ABI number for g++ as 0, (and 1 just for kicks),
> and finally recompiling the .so from source with the same compiler as the
> other code, all to no avail. Is there anything further I can try apart from
> wrestling with gdb?
>
>
> Did you fix the issue ?
>
> CG
>
>
> Thanks for your time,
> Max Orok
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>
>


-- 
Max Orok
Summer Student
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh