Re: [Gmsh] Bug open cascade

2017-09-25 Thread Christophe Geuzaine

We are working on it - it's not perfect yet, but the latest nightly snapshot 
works on your test-case. Give it a try?

(The issue is linked to the way OpenCASCADE deals with e.g. spheres, which 
involves singular parametrizations.)


> On 25 Sep 2017, at 09:50, Pierre K <pierre.kerfri...@gmail.com> wrote:
> 
> Hi, this "as-short-as-it-gets" code produces an erroneous mesh. The bug gets 
> worse as the cutting plane gets closer to the equator of the sphere. Is this 
> fixable?
> 
> 
> SetFactory("OpenCASCADE"); 
> Box(2) = {1, -1, -1, 2, 2, 2}; 
> Sphere(3) = {0.95,0.2,0.2,0.7, -Pi/2,Pi/2, 2*Pi};
> BooleanDifference{ Volume{3}; Delete; }{ Volume{2}; Delete; }
> 
> 
> All the best
> 
> Pierre
> 
> -
> Dr. Pierre KERFRIDEN, Senior Lecturer, Cardiff University, UK
> https://www.cardiff.ac.uk/people/view/364400-kerfriden-pierre
> Too brief? Here's why! http://emailcharter.org
> 
> 
> ___
> 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


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


Re: [Gmsh] Cylinder (not periodic) meshing problem

2017-10-02 Thread Christophe Geuzaine

Dear Giampiero,

Indeed, there are still some issues with OpenCASCADE models when the dimensions 
are very large (or very small).

For the time being, rescale your model. For example, just dividing all lengths 
by 10 fixes the issue:

SetFactory("OpenCASCADE");
Mesh.CharacteristicLengthMin = 20;
Mesh.CharacteristicLengthMax = 20;

//Definisco il cilindro com e coppia di superfici no periodiche (altrimenti non 
posso usare i Boolean)
Circle(1) = {0,0,0, 905, 0, Pi};
Extrude{0,0,611}{Line{1};}

You can still save the mesh with another scaling with the Mesh.ScalingFactor 
(e.g. "Mesh.ScalingFactor=10;") option.

Christophe


> On 1 Oct 2017, at 19:28, ing. Nobile - OAC Ingegneria 
> <gnob...@oacingegneria.com> wrote:
> 
> Dear all,
> 
> I have problem meshing an half cylinder.
> 
> From a first look the mesh seems very good
> 
> 
> 
> 
> But along the upper/lower border there are very deformed and overlapped mesh 
> surfaces.
> 
> 
> 
> For example elements 7730 and 7728 in the picture (overlapped, made with the 
> same nodes, and very deformed)
> 
> 
> 
> 
> 
> Am I missing something before the 2D meshing process?
> 
> I attached the script with the geometry. 
> 
> Thanks very much.
> 
> 
> Giampiero
> 
> 
> Ing. Giampiero Nobile, PhD   |   OAC Ingegneria
> 
> Mobile:  +39 3494632155 
> Office:   +39 0108698603
> 
> www.oacingegneria.com
> 
><24795144.jpg>
> 
> ___
> 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


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


Re: [Gmsh] problems (with opencascade?)

2017-09-27 Thread Christophe Geuzaine


> On 27 Sep 2017, at 09:19, Alessandro Vicini <alessandro.vic...@sitael.com> 
> wrote:
> 
> 
> Hello, I still have some issues when using OpenCascade and Boolean operations.
> For the attached geo file, when I generate the 2D mesh it can be seen from 
> the attached picture that the vertical edge in the front is duplicated (mesh 
> is different on the two sides). To work this out I have to delete one of the 
> lateral surfaces of the box and to reconstruct it.
> Is this an expected behavior, or is it possible to avoid it? Thank you.

Your geometry construction seems a bit convoluted... And indeed to create 
duplicate curves on the boundary of the surfaces.

Quick fix: just "fragment" everything at the end, which will remove the 
duplicates:

s() = Surface "*";
BooleanFragments{ Surface{s()}; Delete; }{}



> 
> A.
> 
> 
> ___
> 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


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


Re: [Gmsh] gmsh versioning scheme

2017-09-27 Thread Christophe Geuzaine


> On 27 Sep 2017, at 12:11, Nico Schlömer <nico.schloe...@gmail.com> wrote:
> 
> Thanks Christophe, this info will help me getting the version numbers and 
> file names for Debian straight.
> 

Note that I would strongly discourage Debian from distributing the library 
version of Gmsh and the Python and Java bindings for now. This gives the false 
idea to users that we actually support an API, which we do not (yet). 
Distributing the library and possibly the bindings will be a good idea once a 
stable and document API is ready.

See the end of my presentation at the last Gmsh workshop: 

https://gitlab.onelab.info/gmsh/gmsh/wikis/ThirdGmshWorkshop/geuzaine_gmshWorkshop2017.pdf

> Cheers,
> Nico
> 
> On Wed, Sep 27, 2017 at 12:09 PM Christophe Geuzaine <cgeuza...@ulg.ac.be> 
> wrote:
> 
> 
> > On 26 Sep 2017, at 15:24, Nico Schlömer <nico.schloe...@gmail.com> wrote:
> >
> > Hi everyone,
> >
> > A few quick questions on Gmsh's versioning scheme:
> >
> >  * When do you bump the major version?
> 
> Major rewrites (we're only at version 3, after 20+ years :-)
> 
> >  * When do you bump the minor version?
> 
> Important new features
> 
> >  * Is API change reflected by version bumps?
> >
> 
> Not yet, there is no documented/supported API.
> 
> Creating and supporting an API is one of the things we plan in the 
> not-so-distant future.  See https://gitlab.onelab.info/gmsh/gmsh/issues/188
> 
> Christophe
> 
> 
> > Cheers,
> > Nico
> > ___
> > 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
> 

-- 
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


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


Re: [Gmsh] Intersection between cylinder surface and plane surface

2017-09-27 Thread Christophe Geuzaine


> On 26 Sep 2017, at 17:43, ing. Nobile - OAC Ingegneria 
> <gnob...@oacingegneria.com> wrote:
> 
> Dear Guillaume,
> 
> thanks for your fast reply.
> 
> I've tried, but for some reason, it seems not working with the cylinder 
> surface.
> I used the same process with a plane surface and all it was good.
> 
> Let me know if you find a solution. This is crucial to me because I have to 
> model
> a 2D cylinder full of stiffeners :-)
> 
> I attached the GMSH .geo file I'm using, maybe there is a bug that I cannot 
> see.
> 

It's a limitation of the current Gmsh version: embedded lines/vertices are only 
taken into account for non-periodic surfaces. The generalization to periodic 
surfaces (e.g. the cylinder) is on our TODO list.

Workaround: make your surface non-periodic (e.g split it in 2).


> Best regards
> 
> Giampiero Nobile
> 
> 
> 
> Ing. Giampiero Nobile, PhD   |   OAC Ingegneria
> 
> Mobile:  +39 3494632155 
> Office:   +39 0108698603
> 
> www.oacingegneria.com
> 
><24795144.jpg>
> 
> 
> 2017-09-26 16:17 GMT+02:00 DILASSER Guillaume <guillaume.dilas...@cea.fr>:
> Hello,
> 
>  
> 
> I guess the easiest way to achieve what you are trying to do would be to use 
> the Line {} In Surface {} ; command referenced in the documentation here. To 
> be more precise, assuming that the elementary IDs of the cylinder surface id 
> is   and that of the common line is , you would declare Line 
> {} In Surface {} ;. Let me know if it worked,
> 
>  
> 
> Sincerely Yours,
> 
>  
> 
> Guillaume DILASSER
> 
> Doctorant DACM / LEAS
> 
> CEA - Centre de Saclay - Bât.123 - PC 319c
> 
> 91191 Gif sur Yvette Cedex - France -
> 
>  
> 
> guillaume.dilas...@cea.fr
> 
>  
> 
> De : gmsh [mailto:gmsh-boun...@ace20.montefiore.ulg.ac.be] De la part de ing. 
> Nobile - OAC Ingegneria
> Envoyé : mardi 26 septembre 2017 14:36
> À : gmsh@onelab.info
> Objet : [Gmsh] Intersection between cylinder surface and plane surface
> 
>  
> 
> Dear all, 
> 
>  
> 
> sorry for the trivial question but I'm a beginner of GMSH.
> 
> I'm trying to create a 2D mesh as result of the intersection of a cylinder 
> surface and a rectangle 
> 
> surface. 
> 
> Is not clear to me how is the correct procedure to do this keeping the 
> intersection line as belonging
> 
> to both the surfaces
> 
>  
> 
> I attach an image of what I mean. Sorry I dont know if it is possible to 
> attach figure in the forum, please tell me if not.
> 
>  
> 
>  
> 
> 
> 
> 
> 
>  
> 
>  
> 
> Ing. Giampiero Nobile, PhD   |   OAC Ingegneria
> 
>  
> 
> Mobile:  +39 3494632155 
> 
> Office:   +39 0108698603
> 
>  
> 
> www.oacingegneria.com
> 
>  
> 
>
> 
>  
> 
>  
> 
> 
> 
> Mail priva di virus. www.avast.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


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


Re: [Gmsh] extrude OpenCASCADE Boolean union doesn't work

2017-09-27 Thread Christophe Geuzaine


> On 27 Sep 2017, at 14:03, Nico Schlömer <nico.schloe...@gmail.com> wrote:
> 
> Hi everyone,
> 
> The following code forms a union of a rectangle and two disks, and aims to 
> extrude the resulting shape.
> ```
> SetFactory("OpenCASCADE");
> 
> Mesh.CharacteristicLengthMin = 0.1;
> Mesh.CharacteristicLengthMax = 0.1;
> 
> s0 = news;
> Rectangle(s0) = {-1.0, -1.0, 0.0, 2.0, 2.0};
> 
> s1 = news;
> Disk(s1) = {-1.0, 0.0, 0.0, 0.5};
> 
> s2 = news;
> Disk(s2) = {1.0, 0.0, 0.0, 0.5};
> 
> bo1[] = BooleanUnion{Surface {s0}; Delete;} {Surface {s1,s2}; Delete;};
> 
> ex1[] = Extrude{0,0,1}{Surface{bo1};};
> ```
> However, it appears that only the _difference_ between the rectangle and the 
> disks is extruded.
> 
> Any idea what's going on?

The last line should be 

ex1[] = Extrude{0,0,1}{Surface{bo1()};};


> 
> Cheers,
> Nico
> _______
> 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


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


Re: [Gmsh] extrude OpenCASCADE Boolean union doesn't work

2017-09-27 Thread Christophe Geuzaine


> On 27 Sep 2017, at 14:09, Nico Schlömer <nico.schloe...@gmail.com> wrote:
> 
> > ex1[] = Extrude{0,0,1}{Surface{bo1()};};
> 
> As a general rule, do OpenCASCADE entities always only work with round 
> brackets?
> 

No, it's just that "bo1()" is a list: "bo1" refers to the first element in the 
list; "bo1()" (or "bo1[]", parentheses and square brackets can both be used - I 
tend to prefer parentheses) returns the full list.

> Cheers,
> Nico
> 
> On Wed, Sep 27, 2017 at 2:07 PM Christophe Geuzaine <cgeuza...@ulg.ac.be> 
> wrote:
> 
> 
> > On 27 Sep 2017, at 14:03, Nico Schlömer <nico.schloe...@gmail.com> wrote:
> >
> > Hi everyone,
> >
> > The following code forms a union of a rectangle and two disks, and aims to 
> > extrude the resulting shape.
> > ```
> > SetFactory("OpenCASCADE");
> >
> > Mesh.CharacteristicLengthMin = 0.1;
> > Mesh.CharacteristicLengthMax = 0.1;
> >
> > s0 = news;
> > Rectangle(s0) = {-1.0, -1.0, 0.0, 2.0, 2.0};
> >
> > s1 = news;
> > Disk(s1) = {-1.0, 0.0, 0.0, 0.5};
> >
> > s2 = news;
> > Disk(s2) = {1.0, 0.0, 0.0, 0.5};
> >
> > bo1[] = BooleanUnion{Surface {s0}; Delete;} {Surface {s1,s2}; Delete;};
> >
> > ex1[] = Extrude{0,0,1}{Surface{bo1};};
> > ```
> > However, it appears that only the _difference_ between the rectangle and 
> > the disks is extruded.
> >
> > Any idea what's going on?
> 
> The last line should be
> 
> ex1[] = Extrude{0,0,1}{Surface{bo1()};};
> 
> 
> >
> > Cheers,
> > Nico
> > ___
> > 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
> 

-- 
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


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


Re: [Gmsh] Boundary Layer around hemi sphere in a cube

2017-10-11 Thread Christophe Geuzaine


> On 30 Sep 2017, at 11:33, Nilanka Indunil Kumari Ekanayake 
> <nekanay...@student.unimelb.edu.au> wrote:
> 
> Hi,
> 
> I've created the following mesh. For the boundary layer I've used extrude 
> command. As I need to define physical volume for the farfield (bounded by the 
> box and hemisphere). Here I considered two volumes created by a seperate 
> Surface loops. One is volume is the extruded volume and the other volume is 
> outside extruded surface (bounded by the block). 
> 
> However, when I check the surface face, I see some overlapping in the 
> boundary and around it (specially in volume surface).
> 
> Also I would like to have have qaud dominated mesh in the volume? Any method 
> to get it ?
> 

These algorithms are still in development, and not ready for production use. 
For your simple geometry I would advise generating a fully structured grid.

> The critical task was to define the cut plane. 
> 
> Volume faces - Non uniformity around  boundary layer (Due to face 
> overlapping?)

No: it's just that without an explicit extrusion direction, Extrude uses the 
(smoothed) normal field computed on the surface triangles to compute the 
extrusion direction. Here you then extrude "not quite" in the symmetry plane.

For such a simple geometry, I would recommend explicitly extruding a 2D mesh 
(and thus creating the boundary layer directly) using e.g. a rotation.

Christophe

> 
> 
> 
> Cheers,
> Nilanka
> 
> ___
> 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


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


Re: [Gmsh] Doubt about gmsh

2017-10-11 Thread Christophe Geuzaine


> On 5 Oct 2017, at 16:03, Luca Azzolin <azzolinl...@outlook.com> wrote:
> 
> Dear Mr./Mrs.,
> 
> I have been using gmsh to mesh this biventricle_together.stl file. The things 
> that I wanted to do are:
> - fill the gap between the external boundary and the 2 internal boundaries 
> with 3D elements ( so that I will have a volume with 2 holes );
> - mesh this final volume;
> but I had some problems in trying to do that.
> I have imported the file as .stl but now how can I create that volume with 2 
> holes?
> 

Your volume is not closed. Gmsh currently does not have tools to fix this, as 
it expects a topologically correct geometry as input.


> Thank you so much.
> 
> Best regards,
> 
> Luca Azzolin
> ___
> 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


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


Re: [Gmsh] Status of Face BC for CGNS exportation

2017-10-17 Thread Christophe Geuzaine


> On 16 Oct 2017, at 14:22, Bruno Blais <blais.br...@gmail.com> wrote:
> 
> Hello Everyone,
> 
> 
> I have found the following message dated from 2009 regarding the 
> implementation of Face boundary conditions (instead of vertex) for export in 
> the CGNS mesh format. I was wondering if there were any planned updates in 
> increasing the support for CGNS format? Some interesting open source software 
> (like SU2, even though the SU2 format is supported by gmsh) use the CGNS file 
> format and it is quite a portable / interesting /compact mesh format from our 
> experience. Best regards.
> 

Koen Hillewaert (in CC) has been hard at work rewriting/improving CGNS support 
in Gmsh; you can follow his work by cloning the "cgnsUnstructured" branch in 
our git repo. He is probably the right person to answer your question...

Christophe



> Quoting Daniele  >:
> 
> >
>  When I save in cgns format, i cannot select "Face" in Write dummy BC, but
> 
> >
>  only Vertex. Why? Thanks for your help
> 
> >
> 
> Simply because the code for face-based connectivity and BC is not  
> finished.  It is on a to-do list though.
> 
> Stephen
> 
> 
> This message was sent using IMP, the Internet Messaging Program.
> 
> 
> 
> 
> 
> 
> 
> ___
> 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


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


Re: [Gmsh] Interpolating mesh values

2017-11-28 Thread Christophe Geuzaine


> On 27 Nov 2017, at 23:41, Mayank Jog <mayank...@gmail.com> wrote:
> 
> Hello,
> I've started using gmsh recently, and I wonder if there is a functionality to 
> interpolate data. 
> 
> I have a mesh, and a value associated with each element of the mesh (electric 
> potential)*. 
> I want to use this mesh to calculate the value of the electric potential on a 
> uniform cartesian grid specified by points (= (x, y, z) ; known in 
> millimeters; = same unit as in $nodes) 

Plugin(Probe) for a single evaluation; or Plugin(CutGrid) and Plugin(CutBox) 
for multiple evaluations on regular grids.

For example:

Merge "data.msh";
Plugin(Probe).X = 0.3;
Plugin(Probe).Y = 0.3;
Plugin(Probe).Z = 0.3;
Plugin(Probe).Run;


> 
> I'm guessing some sort of interpolation is needed...how would I go about it? 
> 
> I tried using MATLAB functions to interpolate, but they all use triangulation 
> techniques which work for convex volumes. My volume is non-convex (it has a 
> U-shape)...how would I do the interpolation? Does gmsh have a function to 
> interpolate? 
> 
> Thank you,
> Mayank
> 
> *I have the  original mesh (containing $nodes, $elements, and $elementdata) 
> in .msh format.
> ___
> 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


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


Re: [Gmsh] GMSH Linux32bit updates

2017-11-22 Thread Christophe Geuzaine


> On 21 Nov 2017, at 15:16, La alll <calculi...@yahoo.com> wrote:
> 
> Hello!
> I had troubles to compile GMSH under linux32 bit (opencascade is not linking) 

We've added some detailed compilation instructions here: maybe this will help? 
https://gitlab.onelab.info/gmsh/gmsh/wikis/Gmsh-compilation

> Is it possible to make official binary file?
> Linux32 is very popular under virtualbox, especially for education

We could try to set this up again, but from anecdotal evidence it seemed like 
32 bit Linux is getting quite rare these days.

@AllGmshUsers: is there a real demand for this? (It's just a bit annoying to 
maintain the infrastructure, even when dockerized/virtualized, for one more 
arch.)

Christophe

> Regards
> ___
> 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


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


Re: [Gmsh] Having trouble to mesh muilti-domain geometries

2017-11-03 Thread Christophe Geuzaine


> On 3 Nov 2017, at 13:23, Wesley Ranger <met...@outlook.com> wrote:
> 
> Hi guys
> 
> I am having trouble meshing a geometry composed of 3 kinds of materials. 
> Let's call them material A, B and C.
> 
> The 3 material in the geometry has 2 interfaces. I defined several physical 
> surfaces and 3 physical domains.
> 
> Weird things happened then. In the resulting mesh, the vertices on A/B 
> interface are well aligned, i.e. each vertex on A/B interface and belongs to 
> A mesh has an identical copy in B mesh. They have the same coordinates, so I 
> can connect them in solving stage.
> 
> However, the vertices on B/C are not well aligned. A vertex belongs to C mesh 
> may be located in the middle of a facet which belongs to B mesh.
> 
> It is hard to describe using words, so I posted a question here:
> 
> https://stackoverflow.com/questions/47095493/any-way-to-make-gmsh-to-use-the-same-vertex-set-on-both-sides-of-a-material-boun
> 
> Any way to make gmsh to use the same vertex set on both sides of a material 
> boundary?

Your step file probably contains volumes that are topologically not connected, 
i.e. there are 2 surfaces (at the same location) for each internal boundary. 
Gmsh then creates 2 independent surface meshes, one for each surface. If you 
remove the duplicates, Gmsh will generate a single surface mesh for each 
interface, and your volume mesh will be conformal.

You can use the new CAD features in Gmsh to remove these duplicate internal 
surfaces. With the stable release, you can do

SetFactory("OpenCASCADE");
v() = ShapeFromFile("file.step");
BooleanFragments{ Volume{v()}; Delete; }{}

With the latest development snapshots, you can use the "Coherence" shortcut 
(which does exactly the same thing):

SetFactory("OpenCASCADE");
Merge "file.step";
Coherence;

Christophe

PS : Physical definitions have no influence on mesh generation - they are just 
a way to group/name entities for exporting.




> I am trying to mesh a complex geometry composed of 3 kinds of materials, like 
> below: The geometry is imported from a *.stp file. I defined several physical 
> surfaces and 3 physical domains in the ...
> stackoverflow.com
> Anyone, please give me some suggestions to handle this. Thank you!
> ___
> 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


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


Re: [Gmsh] GMSH Linux32bit updates

2017-12-02 Thread Christophe Geuzaine

32 bit Linux builds are back - let me know if you see any problems with them.

Cheers,

Christophe

> On 22 Nov 2017, at 15:13, La alll <calculi...@yahoo.com> wrote:
> 
> Sorry,
> I meant that I have windows version 32 bit, but in this case CalculiX has 
> limitation and it is not fully functional.
> Virtualbox 64 bit requires reset BIOS, what is not always possible.
> It is why windows users download CalculiX Launcher with GMSH 32 bit
> Latest GMSH has many useful updates, so it would be nice to provide this 
> package.
> https://youtu.be/SrgSgrycIIk
> 
> 
> 
> 
> On Wednesday, November 22, 2017 7:34 AM, Christophe Geuzaine 
> <cgeuza...@uliege.be> wrote:
> 
> 
> 
> 
> > On 21 Nov 2017, at 15:16, La alll <calculi...@yahoo.com> wrote:
> > 
> > Hello!
> > I had troubles to compile GMSH under linux32 bit (opencascade is not 
> > linking) 
> 
> We've added some detailed compilation instructions here: maybe this will 
> help? https://gitlab.onelab.info/gmsh/gmsh/wikis/Gmsh-compilation
> 
> > Is it possible to make official binary file?
> > Linux32 is very popular under virtualbox, especially for education
> 
> We could try to set this up again, but from anecdotal evidence it seemed like 
> 32 bit Linux is getting quite rare these days.
> 
> @AllGmshUsers: is there a real demand for this? (It's just a bit annoying to 
> maintain the infrastructure, even when dockerized/virtualized, for one more 
> arch.)
> 
> Christophe
> 
> 
> > Regards
> 
> > ___
> > 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
> 
> 
> 


-- 
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


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


Re: [Gmsh] Geometry.OCCTargetUnit

2017-12-04 Thread Christophe Geuzaine


> On 4 Dec 2017, at 10:59, Jeremy Theler <jer...@seamplex.com> wrote:
> 
> Is the new property Geometry.OCCTargetUnit working as expected?
> 

Yes.

> How can I revert back to the original behavior, i.e. do not assume anything 
> about units in an imported OCC model and leave them as "non-dimensional"?

Actually, when importing a STEP and IGES file with OpenCASCADE a "target unit" 
was always set - and it was set to "MM", i.e. millimeters.

To revert millimeters, use Geometry.OCCTargetUnit = "MM";

Christophe

> 
> Thanks
> --
> Jeremy Theler
> www.seamplex.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


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


Re: [Gmsh] Feedback on new Gmsh API

2017-12-04 Thread Christophe Geuzaine


> On 4 Dec 2017, at 09:40, Marek Wojciechowski <mw...@p.lodz.pl> wrote:
> 
> Dnia niedziela, 3 grudnia 2017 09:19:27 CET Christophe Geuzaine pisze:
>> To achieve these goals the API
>> 
>> - is purely functional
>> - only uses basic types from the target language (C++, C or Python)
>> - is automatically generated from a master API description file
>> - is fully documented
> 
> Great news! I looked into Python API and it looks very nice. I have two 
> questions however:
> 
> 1. How do i build libgmshc.so library which needs to be imported in python 
> API 
> file?

See demos/api/README.txt : basically, you need to either explicitly build the 
shared Gmsh libraries (cmake -DENABLE_BUILD_SHARED=1 ..; make), or the dynamic 
Gmsh app, which will build the shared libraries (cmake -DENABLE_BUILD_DYNAMIC=1 
..; make). Building the dynamic app is probably the most convenient, as you 
will get both the app and the libs. Note that both the main libgmsh and the 
small C wrapper libgmshc will be built automatically.

Then you need to install the libraries with "make install". Currently this will 
also install a copy of libgmshc in the gmsh/api directory, so that you can use 
it directly with the Python module. We will definitely improve the installation 
process later.

> 2. What about the gmshpy wrapper - it will be dropped?
> 

No, but it should be reserved for internal Gmsh (and related projects) 
development. You can build this internal developer API and the related bindings 
(these are generated by swig) with -DENABLE_INTERNAL_DEVELOPER_API=1. But I 
don't recommend it unless you really need them: they are unsupported and 
undocumented. Gmsh packagers (e.g. Debian) will also be notified that they 
should not ship this internal development API.

Cheers,

Christophe

> 
> Pregards,
> -- 
> Marek Wojciechowski 
> 
> 
> 
> --- 
> Politechnika Łódzka 
> Lodz University of Technology 
> 
> Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata. 
> Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez 
> pomyłkę 
> prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie. 
> 
> This email contains information intended solely for the use of the individual 
> to whom it is addressed. 
> If you are not the intended recipient or if you have received this message in 
> error, 
> please notify the sender and delete it from your system. 
> 
> 
> 
> ___
> 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


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


Re: [Gmsh] Finding entity properties

2017-12-04 Thread Christophe Geuzaine


> On 3 Dec 2017, at 11:40, andrew <armit...@gmail.com> wrote:
> 
> Hi,
> 
> Is there a way to access the properties of an entity like 
> area/volume/length?. For example in the Boolean.geo demo is there a command 
> like
> 
> Volume[8].Area or Volume[8].volume?
> 

No, this is not trivial. The best way is to mesh the entity, and to compute the 
volume. See

https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/post_processing/compute_area_volume.geo

for an example.

> Or is there a way to do it in the API?
> 

Yes, you could use the new API to reproduce the same workflow as in the above 
script.

Christophe

> kind regards
> Andrew
> 
> ___
> 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


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


[Gmsh] Feedback on new Gmsh API

2017-12-03 Thread Christophe Geuzaine

Dear all,

One of our main goals for the next versions of Gmsh is the release of a stable 
Application Programming Interface (API), allowing users/developers to easily 
embed Gmsh (as a library) in their own codes. The design goals for this API are 
the following: the API should

- allow to do everything that can be done in .geo files (and then more)
- be robust, in particular to wrong input data (i.e. "never crash")
- allow to do simple things, simply
- be maintainable over the long run

To achieve these goals the API

- is purely functional
- only uses basic types from the target language (C++, C or Python)
- is automatically generated from a master API description file
- is fully documented

An initial version of the API has landed in the Git repository, and we would 
like to get your early feedback. It is defined in the 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/api directory:

  - C++ header: https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmsh.h
  - C header: https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmshc.h
  - Python module: https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmsh.py

Several examples on how to use the C++ and Python API are available in the 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/api directory. In 
particular, this directory contains C++ and Python versions of several of the 
.geo tutorials from https://gitlab.onelab.info/gmsh/gmsh/blob/master/tutorial.

We plan to release a first (beta) version of the API in Gmsh 3.1, and a first 
stable version in Gmsh 4.0.

You can send your feedback directly to the mailing list, or comment in the 
issue tracker https://gitlab.onelab.info/gmsh/gmsh/issues/188.

Thanks,

Christophe

-- 
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


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


Re: [Gmsh] Transfinite Surface with OpenCASCADE engine

2017-12-07 Thread Christophe Geuzaine


> On 7 Dec 2017, at 17:20, Guillaume Parent <guillaume.par...@univ-artois.fr> 
> wrote:
> 
> Good day everyone,
> 
> I'm experiencing some trouble with transfinite meshes.
> I made a small example (see attached file).
> 
> In this example, I made two cases :
>   • Case == 1 : transfinite mesh on a 4-point surface. This is a success.
>   • Case == 2 : transfinite mesh on a 3-point surface, I get the 
> following error message : "Error   : Surface 2 cannot be meshed using the 
> transfinite algo 29 != 9
> Is this just a matter of algo or is it just impossible to perform a 
> transfinite mesh on that king of geometry?

The first corner point should be singular point: try

Transfinite Surface{2} = {5, 2, 1};


> 
> Guillaume.
> 
> 
> -- 
> Guillaume PARENT
> Maître de Conférences en Génie Electrique
> Université d'Artois
> Laboratoire Systèmes Electrotechniques et Environnement
> 
> Faculté des Sciences Appliquées
> Technoparc Futura 62400 BETHUNE France
> Tél : (33) (0)3 21 63 72 44
> E-mail : guillaume.par...@univ-artois.fr
> ___
> 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


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


Re: [Gmsh] Geometry.OCCTargetUnit

2017-12-05 Thread Christophe Geuzaine

You need to specify Geometry.OCCTargetUnit before loading the step...

CG

> On 5 Dec 2017, at 12:13, jeremy theler <jer...@seamplex.com> wrote:
> 
> Find attached one step file that works with 3.0.6 but fails with newest git 
> using Geometry.OCCTargetUnit = "MM";
> 
> Both versions give the same mesh if I set the new lc to 1e-3 times the old lc.
> 
> On Mon, Dec 4, 2017 at 9:16 AM jeremy theler <jer...@seamplex.com> wrote:
> Hi Chrstophe
> 
> I tried setting it to "MM" and the result was the same. I will take a look 
> again and send a mwe illustrating the issue.
> 
> Regards
> jeremy
> 
> 
> On Mon, Dec 4, 2017, 08:45 Christophe Geuzaine <cgeuza...@uliege.be> wrote:
> 
> 
> > On 4 Dec 2017, at 10:59, Jeremy Theler <jer...@seamplex.com> wrote:
> >
> > Is the new property Geometry.OCCTargetUnit working as expected?
> >
> 
> Yes.
> 
> > How can I revert back to the original behavior, i.e. do not assume anything 
> > about units in an imported OCC model and leave them as "non-dimensional"?
> 
> Actually, when importing a STEP and IGES file with OpenCASCADE a "target 
> unit" was always set - and it was set to "MM", i.e. millimeters.
> 
> To revert millimeters, use Geometry.OCCTargetUnit = "MM";
> 
> Christophe
> 
> >
> > Thanks
> > --
> > Jeremy Theler
> > www.seamplex.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
> 
> -- 
> --
> jeremy theler
> www.seamplex.com
> -- 
> --
> jeremy theler
> www.seamplex.com
> 


-- 
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


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


Re: [Gmsh] gmsh mesh refine exponential left bottom corner of a quader

2017-12-05 Thread Christophe Geuzaine


> On 4 Dec 2017, at 14:07, <baris.ay...@stud.hs-hannover.de> 
> <baris.ay...@stud.hs-hannover.de> wrote:
> 
> To whom it may concern, 
> 
> I want to refine the left bottom corner of an homogenous mesh of a square, 
> exponential with the translation function "e^-lambda*x". The solution should 
> be a stiffness matrix. 
> 
> I don´t have an approach how to  solve this problem. Can you give tell me the 
> proceeding, pls.
> 
> 

Here's one way to do this:

Point(1) = {0,0,0};
Point(2) = {1,0,0};
Point(3) = {1,1,0};
Point(4) = {0,1,0};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};

// computes the distance to point 1
Field[1] = Distance;
Field[1].NodesList = {1};

// computes a function of the value returned by field 1 ("F1")
Field[2] = MathEval;
Field[2].F = "Exp(-7*(1-F1))";

// applies field 2 as background mesh
Background Field = 2;

CG

> With best regards
> 
> Baris Aydin
> Hochschule Hannover
> ___
> 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


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


Re: [Gmsh] Gmsh Viewer in a Qt software

2017-12-06 Thread Christophe Geuzaine


> On 6 Dec 2017, at 11:27, Damien David <damien.da...@insa-lyon.fr> wrote:
> 
> Dear Sir,
> 
> I am building a little software with an GUI on Qt. 
> This software integrates some gmsh code to
> -read ".geo" files
> -do surface meshing
> -use to the mesh coordinates to compute radiation heat exchange.
> 
> I would like to integrate in my GUI a little window which shows the geometry 
> in 3D.
> What kind of library would you advise me to use for this 3D window?
> Do you think it is possible to reuse the fltk functions?
> 

Sure. See gmsh/Qt for a simple (outdated, but you'll get the idea) example. 
Eventually we will probably give access to the vertex arrays produced by Gmsh 
directly in the API, so that these vertex arrays can be used in any OpenGL 
renderer.


> Thank you
> 
> Damien DAVID
> Maître de Conférence
> CETHIL-UMR5008
> 9 rue de la physique 69621 Villeurbanne
> mail: damien.da...@insa-lyon.fr
> Université Lyon 1
> INSA de Lyon
> 
> ___
> 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


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


Re: [Gmsh] Feedback on new Gmsh API

2017-12-06 Thread Christophe Geuzaine


> On 5 Dec 2017, at 16:26, Juan Sanchez <juan.e.sanc...@gmail.com> wrote:
> 
> Thanks for doing this.
> 
> Will it be possible for commands sent to the API to be serialized to a
> GEO file?

For the most part, yes: with the built-in cad kernel you can serialize to a 
.geo file (with gmsh::write("file.geo")); for opencascade you can serialize to 
brep (with gmsh::write("file.brep")).

>  This is so the structure can be programmatically defined in
> a scripting language, and have the result sent to someone without the
> API.  In addition, is it possible to view the results debugged in the
> GUI?

Yes, either using the above serialized files and the standalone Gmsh app, or 
directly with the new small API for the graphical user interface. See 
demos/api/gui.{py,cpp} for an example.

Christophe

> 
> Regards,
> 
> Juan
> 
> 
> On Sun, Dec 3, 2017 at 2:19 AM, Christophe Geuzaine <cgeuza...@uliege.be> 
> wrote:
>> 
>> Dear all,
>> 
>> One of our main goals for the next versions of Gmsh is the release of a 
>> stable Application Programming Interface (API), allowing users/developers to 
>> easily embed Gmsh (as a library) in their own codes. The design goals for 
>> this API are the following: the API should
>> 
>> - allow to do everything that can be done in .geo files (and then more)
>> - be robust, in particular to wrong input data (i.e. "never crash")
>> - allow to do simple things, simply
>> - be maintainable over the long run
>> 
>> To achieve these goals the API
>> 
>> - is purely functional
>> - only uses basic types from the target language (C++, C or Python)
>> - is automatically generated from a master API description file
>> - is fully documented
>> 
>> An initial version of the API has landed in the Git repository, and we would 
>> like to get your early feedback. It is defined in the 
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/api directory:
>> 
>>  - C++ header: https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmsh.h
>>  - C header: https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmshc.h
>>  - Python module: 
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/api/gmsh.py
>> 
>> Several examples on how to use the C++ and Python API are available in the 
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/api directory. In 
>> particular, this directory contains C++ and Python versions of several of 
>> the .geo tutorials from 
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/tutorial.
>> 
>> We plan to release a first (beta) version of the API in Gmsh 3.1, and a 
>> first stable version in Gmsh 4.0.
>> 
>> You can send your feedback directly to the mailing list, or comment in the 
>> issue tracker https://gitlab.onelab.info/gmsh/gmsh/issues/188.
>> 
>> Thanks,
>> 
>> Christophe
>> 
>> --
>> 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
>> 
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
> 
> ___
> 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


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


Re: [Gmsh] Error in -save_all option

2017-12-06 Thread Christophe Geuzaine


> On 6 Dec 2017, at 13:45, Markand Pathak <markand.pmtm...@sot.pdpu.ac.in> 
> wrote:
> 
> Respected,
> 
> I am using gmsh to generate 2d mesh for large number of similar 
> geometries(2D).
> My command looks like..
> 
> gmsh -2 input.geo -o output.inp
> 
> When i import the generated inp file to fluent it shows error that the given 
> mesh is 3d instead of 2d. 
> 
> However using gui when i export as inp while enabling both options save all 
> and save physical groups, the mesh can be imported successfully with all 
> physical groups visible in boundary zones of fluent.
> 
>  In command line -save_all(as per documentation) is not defined and gives 
> error. After some trial and error I can do same with option -saveall( note: 
> removed underscore) 

Indeed; this is now fixed.

> 
> Now problem is i can import mesh in fluent successfully but physical groups 
> are no longer available in mesh as well as fluent. And there is no command 
> line option to save physical groups. Please help with the command line 
> options to preserve groups definition.
> 

Add

Mesh.SaveAll = 1;
Mesh.SaveGroupsOfNodes = 1;

in your .geo file.


> 
> Thank you!
> 
> Markand Pathak
> ___
> 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


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


Re: [Gmsh] Multi threading calls to GModel

2017-12-08 Thread Christophe Geuzaine


> On 7 Dec 2017, at 18:41, Pablo Antolin <pablo.anto...@epfl.ch> wrote:
> 
> Hello everybody,
> 
> I am using Gmsh inside my own code, through the API, to mesh a lot of very 
> small geometries that are independent one from the other. My goal is to 
> produce for every geometry the coarsest mesh possible.
> 
> In order to speedup the process, I've tried to create a single GModel for 
> every geometry and to process them in parallel (using openmp). However, due 
> to certain runtime errors I am getting, it seems that either I am doing 
> something wrong in my code or it is not thread-safe to create multiple 
> instances of the GModel class and to work with them in parallel.

GModel is not yet thread-safe. It might be eventually, but it's best for now to 
use multi-threading *inside* GModel - you can test by enabling OpenMP support 
and setting e.g. "-nt 8" on the command line. More comprehensive 
multi-threading support will arrive after we release the first stable API in 
Gmsh 4.0.

PS : you should probably not use the internal classes directly. Have a look at 
the new API instead (see gmsh/api and gmsh/demos/api).

> 
> On the other hand, I've seen that Gmsh offers multithreading parallelization.
> My question is: can I benefit from that?
> If different regions (corresponding to different geometries) are meshed in 
> parallel, my code would speedup; if the parallelism is perform inside the 
> mesh process of every region/geometry, probably the code would remain mostly 
> serial.
> 
> After meshing all the geometries, I check them, looking for possible negative 
> jacobians. For the ones that present negative jacobians I either refined them 
> or use the high-order optimization algorithm. But this process is only 
> executed for the geometries presenting negative jacobians.
> 
> So, my second question is: after meshing the first GModel (hopefully in 
> parallel), can I remove or deactivate some of the regions / elements (present 
> in the first GModel) that are already valid (their jacobians are positive 
> everywhere)? Then, I would refine/optimize only the ones that present 
> negative jacobians.
> 
> 
> Thanks for the support.
> Best regards,
> 
> 
> -- 
> 
> Pablo Antolin
> Researcher
> Chair of Numerical Modelling and Simulation 
> Institute of Mathematics
> Ecole polytechnique fédérale de Lausanne
> 
> 
> ___
> 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


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


Re: [Gmsh] (no subject)

2017-12-08 Thread Christophe Geuzaine


> On 8 Dec 2017, at 16:33, Leuteris Ch <lhouliara...@gmail.com> wrote:
> 
> Hello, I am new to CFD and its computational tools and I would like to ask 
> you a question about a Gmsh. Is it possible to inport an stl geometry from 
> Solidwork for instance and make a mesh on it? All the tutorials I found only 
> explain how to make a geometry from scratch instead of inporting it.

Export to STEP ; then you can import the STEP in Gmsh.

> 
> Thank you
> Leuteris
> ___
> 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


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


Re: [Gmsh] Error : Self intersecting surface mesh, computing intersections

2017-12-08 Thread Christophe Geuzaine

Dear Berta,

Your surface meshes intersect (see attached picture) because your geometry is 
incorrect : the end of the cylinders overlap with the rectangular faces. Either 
define the rectangular faces with circular) holes, or use the new OpenCASCADE 
kernel to intersect the solids.

Christophe

> On 7 Dec 2017, at 20:00, Berta Beltran <belt...@ualberta.ca> wrote:
> 
> Hi  all, 
> 
> I am trying to emulate this results (see attached figure)  from some previous 
> simulations done with COSMOL Multiphysics for the electric potential of our 
> device. I am creating the geometry and meshing it with Gmsh and then I will 
> use Elmer to calculate the potential and electric fields. 
> 
> 
> 
> 
> 
> 
> I have programed a file called small_cell.geo (attached) with a bounding box 
> and 3 perpendicular wires inside. I want to have mirror conditions along the 
> 4 long sides of the box as I will be periodically repeating this cell to make 
> a bigger detector and therefore I need the wires to touch the walls. 
> 
> The geometry file seems to be ok if I look at it with Gmsh (see attached 
> file) 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> But when I try to mesh this geometry by doing in the command line 
> 
> #gmsh small_cell.geo -3 -order 2 
> 
> I get the following error 
> 
> Error   : Self intersecting surface mesh, computing intersections (this could 
> take a while)
> 
> 
> 
> Error   : --
> Error   : Mesh generation error summary
> Error   : 0 warnings
> Error   : 1 error
> Error   : Check the full log for details
> Error   : --
> 
> 
> 
> 
> If I have a look at the  intersect.pos  file with Gmsh I see that the points 
> where the wires touch the bounding box walls are the problems (see attached 
> figure) 
> 
> 
> 
> 
> 
> But as I have mentioned I want the wires to touch the walls so that I can 
> have mirror conditions when I calculate the electric field with Elmer. 
> 
> Any suggestion of how can I get right of this error ? 
> All my geometry files are attached to this email. 
> 
> Thanks in advance 
> 
> Berta 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> 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


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


Re: [Gmsh] Ghost Cells

2017-12-08 Thread Christophe Geuzaine


> On 5 Dec 2017, at 21:37, Sudhi P V <sudh...@cmail.carleton.ca> wrote:
> 
> Hi, 
> 
> I am using 'gmsh' to mesh and partition a domain in to number of parts for 
> easier and faster analysis. 
> During this process, I encountered with some -ve partition IDs in the MSH 
> file. Upon referring to gmsh documentation, it was found to be named as Ghost 
> Cells.
> 
> I wanted to know the significance of these Ghost cells. Why are they called 
> so ?

They allow to simplify the communication between adjacent partitions in some 
parallel codes.

The partitioner is in the process of being rewritten from scratch - and ghost 
cells will not be created by default anymore.

Christophe

> and the use of representing them like this in any important calculations.
> 
> I am attaching a msh file for your reference. I have meshed a simple square 
> in four partitions.
> 
> 
> 
> Regards,
> 
> Sudhi
> ___
> 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


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


Re: [Gmsh] Meshing elements nodes numbers

2017-12-08 Thread Christophe Geuzaine


> On 8 Dec 2017, at 20:26, Emad Omar <emad.o...@fayoum.edu.eg> wrote:
> 
> Dear Sire,
> 
> kindly when i export the meshing data in any extension, the elements node 
> numbering is different from the appeared in the 3D in Gmesh file. For more 
> illustrating the element number 501, its nodes 60,10,100,45, but in 3D 
> showing different nodes 1200,300,42,19???. what is the problem.
> 

In the default mesh format Gmsh renumbers the vertices and the elements to make 
continuous tag sequences. Load the mesh from file to check.

(Future versions of the mesh format will not renumber by default.)

> BR
> Emad Omar Ali
> Teaching Assistant, Civil Engineering Department,
>  Fayoum Univercity
> Mob: 01098068893
> E-mail: eo...@fayoum.edu.eg
> 
> ___
> 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


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


Re: [Gmsh] .step file editing

2018-05-14 Thread Christophe Geuzaine

Hi Marco,

Yes, you can edit STEP files: see e.g. 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/import2.geo 
. 
Notice the "SetFactory("OpenCASCADE") line at the beginning of the .geo file, 
which means that the STEP file will be imported as an OpenCASCADE model - we 
then provide all the classical functionalities to modify the resulting shapes 
(deleting parts, applying transformations and boolean operations, etc.), 
directly in the .geo file.

What we never do is translate between CAD kernels: so you will never be able to 
"export" to the native GEO geometry kernel (this kernel does not know about 
many of the geometrical primitives in the STEP format). You directly work with 
the native CAD representation of the geometry (here with OpenCASCADE). Future 
releases of Gmsh will provide the same kind of functionality with other CAD 
kernels, like Parasolid.

To export a "dead" (non parametric) version of your geometry, you should use 
the native "dead" format of the underlying CAD kernel. With OpenCASCADE, you 
just export as a BREP file, i.e. by adding

Save "output.brep";

in your .geo file.

Christophe


> On 14 May 2018, at 16:15, Marco Tiberga  wrote:
> 
> Dear GMSH developers,
>  
> I was looking into the GMSH reference manual to see whether it is possible to 
> read .STEP files, to edit them, and/or to export them to .geo format.
> I guess that the FAQ 4 in Appendix E.4 answers my questions.
>  
> However, it is not clear to me whether we can or not delete entities, after 
> merging a .STEP file into a .geo one (this feature is both indicated as 
> something already available and something coming in a later release).
> Also, I was wondering whether the possibility export .STEP files to .geo 
> format is actually something coming in the near-future releases or later.
>  
> Thanks a lot for the clarification.
>  
> 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 
> 
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Point coordinates at python api

2018-05-17 Thread Christophe Geuzaine


> On 16 May 2018, at 22:26, Roman Butov  wrote:
> 
> How could I get point coordinates at python api?


gmsh.model.getBoundingBox(0, point_tag)


> Best regards, Roman
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh


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


Re: [Gmsh] QMorph

2018-05-17 Thread Christophe Geuzaine


> On 15 May 2018, at 18:22, swarsi  wrote:
> 
> is the meshGFaceQuadrilateralize.cpp a complete implementation of the qmorph 
> algorithm?

We currently don't use that implementation: I advise you use our own 
recombination strategy instead 
(http://gmsh.info/doc/preprints/gmsh_quad_preprint.pdf 
)

> if so, how can i call this function to recombine a 2D mesh into quads?
> 
> thank you for any help.
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] Strange Mesh using ThruSections

2018-05-17 Thread Christophe Geuzaine

Use the latest snapshot: it fixes many small issues with the OpenCASCADE 
kernel, including setting of mesh sizes.

Christophe

> On 10 May 2018, at 00:23, Leonardo Roncetti  wrote:
> 
> I get a strange result when trying to mesh surfaces created with lines and 
> ThruSections. 2 surfaces are meshed fine (1  and 4), but 2 and 3 have weird 
> meshes. Code is below, as well as a picture.
>  
> lc=1.0;
> lcp=1.0;
> SetFactory("OpenCASCADE");
> // 
> // ** Malha  **
> // 
> Mesh.CharacteristicLengthFactor = 1.;
> Mesh.CharacteristicLengthMin = 0;
> Mesh.CharacteristicLengthMax = 1e22;
> //Mesh.RecombineAll = 1;
> // 
> // **   Importing   **
> // 
> Point(1) = {11.1370602317822, -7.48705927522542, 0.856847623780698, lcp};
> Point(2) = {11.6324935551766, -7.48705927522542, 0.856847623780698, lcp};
> Point(3) = {11.6324935551766, -6.83985372741768, 0.856847623780698, lcp};
> Point(4) = {11.1370602317822, -6.83985372741768, 0.856847623780698, lcp};
> Line(1) = {1, 2};
> Line(2) = {2, 3};
> Line(3) = {3, 4};
> Line(4) = {4, 1};
> Line Loop(1) = {1, 2, 3, 4};
> Point(5) = {11.1370602317822, -7.48705927522542, 0, lcp};
> Point(6) = {12.0250173524881, -7.48705927522542, 0, lcp};
> Point(7) = {12.0250173524881, -6.43573787853473, 0, lcp};
> Point(8) = {11.1370602317822, -6.43573787853473, 0, lcp};
> Line(5) = {5, 6};
> Line(6) = {6, 7};
> Line(7) = {7, 8};
> Line(8) = {8, 5};
> Line Loop(2) = {5, 6, 7, 8};
> Wire(300) = {1,2,3,4}; 
> Wire(301) = {5,6,7,8};
> Ruled ThruSections{300, 301}
>  
> Best regards,
> Leonardo
>  
>  
> ___
> gmsh mailing list
> gmsh@onelab.info 
> http://onelab.info/mailman/listinfo/gmsh 
> 
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Uniform element size throughout the geometry

2018-05-17 Thread Christophe Geuzaine

With the default algorithm evrything looks ok to me (don't use -algo front3d 
unless you really have to).

> On 9 May 2018, at 17:12, Harris FAROOQ  
> wrote:
> 
> Hello,
> 
> I am trying to get a uniform element size throughout the geometry. I have 
> tried giving a constant value to element size and mesh "mesh size fields" but 
> they do not work i.e. I get a uniform mesh at the boundary but inside the 
> geometry, the elements are coarse.
> 
> I have also attached an image to clarify the problem.
> 
> I have also tried:
> -algo front3d -3
> 
> or
> 
> -algo front3d -3 -optimize_netgen
> but these options do not give a uniform mesh inside the geometry.
> 
> Is it possible to get a uniform mesh size throughout the geometry?
> 
> My geo file looks like this: 
> 
> Point(1) ={0.315650761382760, 0.894382926819093, -0.302448630706616, 
> 0.100};
> Point(2) ={1.298440033476073, 1.362940371711625, 0.283099223758606, 
> 0.100};
> Point(3) ={1.298440033476073, 0.894382926819093, -0.262655810088256, 
> 0.100};
> Point(4) ={0.735232865266709, 1.411647357936784, 0.283099223758606, 
> 0.100};
> Point(5) ={0.340187717154710, 1.411647357936784, 0.311264675576753, 
> 0.100};
> Point(6) ={0.298440033476073, 0.457103015216639, 0.283099223758606, 
> 0.100};
> Point(7) ={0.903394885364074, 0.894382926819093, 0.697551369293384, 
> 0.100};
> Point(8) ={1.298440033476073, 0.894382926819093, 0.669385917475237, 
> 0.100};
> Point(9) ={0.340187717154710, 0.848927269539238, 0.697551369293384, 
> 0.100};
> Point(10) ={0.340187717154709, 0.411647357936784, 0.243306403140246, 
> 0.100};
> Point(11) ={0.735232865266709, 0.411647357936784, 0.283099223758606, 
> 0.100};
> Point(12) ={1.298440033476073, 0.457103015216640, 0.283099223758606, 
> 0.100};
> Point(13) ={0.903394885364074, 0.894382926819093, -0.302448630706616, 
> 0.100};
> Point(14) ={0.298440033476073, 0.894382926819093, -0.262655810088257, 
> 0.100};
> Point(15) ={0.322976989248022, 1.411647357936784, 0.283099223758606, 
> 0.100};
> Point(16) ={0.340187717154710, 0.943089913044252, 0.697551369293384, 
> 0.100};
> Point(17) ={0.315650761382760, 0.894382926819093, 0.697551369293384, 
> 0.100};
> Point(18) ={0.340187717154709, 0.848927269539238, -0.302448630706616, 
> 0.100};
> Point(19) ={0.322976989248022, 0.411647357936784, 0.283099223758606, 
> 0.100};
> Point(20) ={0.340187717154710, 0.411647357936784, 0.311264675576753, 
> 0.100};
> Point(21) ={0.340187717154709, 1.411647357936784, 0.243306403140246, 
> 0.100};
> Point(22) ={0.340187717154709, 0.943089913044252, -0.302448630706616, 
> 0.100};
> Point(23) ={0.298440033476073, 1.362940371711625, 0.283099223758606, 
> 0.100};
> Point(24) ={0.298440033476073, 0.894382926819093, 0.669385917475237, 
> 0.100};
> Point(25) ={0.340187717154710, -0.056910086955748, 0.697551369293384, 
> 0.100};
> Point(26) ={0.903394885364075, -0.105617073180907, 0.697551369293384, 
> 0.100};
> Point(27) ={1.322976989248022, 0.411647357936784, 1.283099223758606, 
> 0.100};
> Point(28) ={1.298440033476073, 0.362940371711625, 1.283099223758606, 
> 0.100};
> Point(29) ={0.340187717154710, 0.411647357936784, 1.243306403140246, 
> 0.100};
> Point(30) ={1.298440033476073, 0.457103015216639, 1.283099223758606, 
> 0.100};
> Point(31) ={1.340187717154710, -0.056910086955748, 0.697551369293384, 
> 0.100};
> Point(32) ={1.315650761382761, 0.894382926819093, 0.697551369293384, 
> 0.100};
> Point(33) ={0.735232865266709, 0.411647357936784, 1.283099223758606, 
> 0.100};
> Point(34) ={1.298440033476073, 0.894382926819093, 0.737344189911744, 
> 0.100};
> Point(35) ={1.298440033476074, -0.105617073180907, 0.737344189911744, 
> 0.100};
> Point(36) ={1.298440033476073, 0.362940371711625, 0.283099223758606, 
> 0.100};
> Point(37) ={1.315650761382761, -0.105617073180907, 0.697551369293384, 
> 0.100};
> Point(38) ={1.298440033476073, -0.105617073180907, 0.669385917475237, 
> 0.100};
> Point(39) ={1.340187717154710, 0.411647357936784, 1.243306403140246, 
> 0.100};
> Point(40) ={1.322976989248022, 0.411647357936784, 0.283099223758606, 
> 0.100};
> Point(41) ={1.340187717154710, 0.848927269539238, 0.697551369293384, 
> 0.100};
> Point(42) ={1.340187717154710, 0.411647357936784, 0.311264675576753, 
> 0.100};
> Line(1) = {2, 3};
> Line(2) = {3, 12};
> Line(3) = {12, 8};
> Line(4) = {8, 2};
> Line(5) = {2, 4};
> Line(6) = {4, 21};
> Line(7) = {21, 22};
> Line(8) = {22, 13};
> Line(9) = {13, 3};
> Line(10) = {8, 7};
> Line(11) = {7, 16};
> 

Re: [Gmsh] Gmsh Python API

2018-05-21 Thread Christophe Geuzaine


> On 21 May 2018, at 18:54, Alejandro Pina <ajp...@gmail.com> wrote:
> 
> Thanks Christophe for replying. I have attached a picture after adding the 
> line you suggested. 
> In the picture you can also see the API version I am using and built number. 
> The size of triangles does not respond to any value set on ‘lc’.

By default gmsh.intialize() reads the Gmsh configuration files it finds on your 
system; my guess is that you have some options set in .gmshrc or .gmsh-options 
to change the default meshing algorithm (your log shows that you're using 
Frontal, which is not the default) and the mesh size.

Try

   gmsh.initialize('', False)

which will disable reading of the config files.



> Best,
> Alejandro 
> 
> From: Christophe Geuzaine <geuza...@gmail.com <mailto:geuza...@gmail.com>>
> Date: Monday, May 21, 2018 at 7:36 AM
> To: Alejandro Pina <ajp...@gmail.com <mailto:ajp...@gmail.com>>
> Cc: <gmsh@onelab.info <mailto:gmsh@onelab.info>>
> Subject: Re: [Gmsh] Gmsh Python API
> 
> 
> It works fine over here: are you sure you are editing/examining the correct 
> input/output files?
> 
> Add
> 
>   gmsh.fltk.run()
> 
> before gmsh.finalize() - it will launch the GUI so that you  can inspect the 
> model interactively.
> 
>> On 20 May 2018, at 21:03, Alejandro Pina <ajp...@gmail.com 
>> <mailto:ajp...@gmail.com>> wrote:
>> 
>> Dear List,
>> 
>> I have been trying to use the Python API but my meshing does not respond to 
>> the mesh size that I set when adding the points. I reproduced my problem in 
>> the following example. So no matter what value I set on ‘lc’, the surface 
>> always happens to have only four triangles.
>> 
>> Hope you can help me figure it out and be able to control the meshing. I am 
>> also attaching the resulting 'MyTest.msh’ file. 
>> 
>> import gmsh
>> 
>> gmsh.initialize()
>> gmsh.option.setNumber("General.Terminal", 1)
>> gmsh.model.add("MyTest")
>> lc = 1e-4
>> gmsh.model.geo.addPoint(0, 0, 0, lc, 1)
>> gmsh.model.geo.addPoint(.1, 0,  0, lc, 2)
>> gmsh.model.geo.addPoint(.1, .3, 0, lc, 3)
>> gmsh.model.geo.addPoint(0, .3, 0, lc, 4)
>> gmsh.model.geo.addLine(1, 2, 1)
>> gmsh.model.geo.addLine(3, 2, 2)
>> gmsh.model.geo.addLine(3, 4, 3)
>> gmsh.model.geo.addLine(4, 1, 4)
>> gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1)
>> gmsh.model.geo.addPlaneSurface([1], 1)
>> gmsh.model.addPhysicalGroup(2, [1], 1)
>> gmsh.model.setPhysicalName(2, 1, "My surface")
>> gmsh.model.geo.synchronize()
>> gmsh.model.mesh.generate(2)
>> gmsh.write("MyTest.msh")
>> gmsh.finalize()
>> 
>> Thanks,
>> Alejandro
>> 
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> http://onelab.info/mailman/listinfo/gmsh 
>> <http://onelab.info/mailman/listinfo/gmsh>
> 
> 

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


Re: [Gmsh] Visualising point data imported from MED files

2018-05-18 Thread Christophe Geuzaine

Your file is almost correct: you just need to fix the node indices in the point 
elements (you start referencing nodes at index 0, while the nodes actually 
start at 1).

(I have patched Gmsh to not crash anymore when the indices are incorrect.)

Cheers,

Christophe

> On 18 May 2018, at 09:20, Tomasz Koziara <t.kozi...@gmail.com> wrote:
> 
> Dear Christophe,
> 
> Here is an output file with POINT1 elements exported using the previously 
> quoted lines of code:
> 
> https://www.dropbox.com/s/izu5o15b2ow8y9u/spring_system0rb_ele.med.gz?dl=0 
> <https://www.dropbox.com/s/izu5o15b2ow8y9u/spring_system0rb_ele.med.gz?dl=0>
> 
> And here is a stack trace of the crush which I am getting on a OS X 10.10.5 
> when opening this file with Gmsh 3.0.6:
> 
> https://www.dropbox.com/s/q4fdk6thv2woy7q/spring_system0rb_bug.txt.gz?dl=0 
> <https://www.dropbox.com/s/q4fdk6thv2woy7q/spring_system0rb_bug.txt.gz?dl=0>
> 
> If there is a better way of annotating the MED file with elements information 
> in this case, I would appreciate an advice:)
> 
> Best regards,
> Tomek
> 
> 
> On 17 May 2018 at 21:36, Christophe Geuzaine <geuza...@gmail.com 
> <mailto:geuza...@gmail.com>> wrote:
> 
> HI Tomasz,
> 
> I'm not sure that we have actually tested it, but looking back at our MED 
> reader we should handle the case. Don't hesitate to send your tentative MED 
> files with point elements in them - we'll have a look.
> 
> Ch.
> 
>> On 17 May 2018, at 21:32, Tomasz Koziara <t.kozi...@gmail.com 
>> <mailto:t.kozi...@gmail.com>> wrote:
>> 
>> Ha, ha:) I tried that, but failed, for the time being:) I only have the 
>> examples distributed with MED library to provide inspiration; That was the 
>> code:
>> 
>> std::vector conn;
>> for (i = 0; i < num; i ++)
>> {
>>   conn.push_back(i);
>> }
>> 
>> ASSERT (MEDmeshElementConnectivityWr(fid, meshName, MED_NO_DT, MED_NO_IT, 
>> 0., MED_CELL, MED_POINT1,
>> MED_NODAL, MED_FULL_INTERLACE, conn.size(), [0]) >= 0, "Could 
>> not write MED elements");
>> 
>> which is just a minor modification of the standard output for volumetric 
>> elements; do feel free to advice on a more suitable way of doing that:) 
>> Thank You; Tomek
>> 
>> On 17 May 2018 at 21:09, Christophe Geuzaine <geuza...@gmail.com 
>> <mailto:geuza...@gmail.com>> wrote:
>> 
>> Gmsh displays all meshes and post-processing data based on elements: so 
>> indeed you will need to add "point elements" (1 point for each vertex) in 
>> the med file in order to visualize it.
>> 
>> Christophe
>> 
>> 
>>> On 17 May 2018, at 14:56, Tomasz Koziara <t.kozi...@gmail.com 
>>> <mailto:t.kozi...@gmail.com>> wrote:
>>> 
>>> Dear Christophe,
>>> 
>>> Here: 
>>> https://www.dropbox.com/s/ve8rm3qjyvew1uq/spring_system0rb.med.gz?dl=0 
>>> <https://www.dropbox.com/s/ve8rm3qjyvew1uq/spring_system0rb.med.gz?dl=0>
>>> 
>>> Best regards,
>>> Tomek
>>> 
>>> 
>>> 
>>> On 17 May 2018 at 08:50, Christophe Geuzaine <geuza...@gmail.com 
>>> <mailto:geuza...@gmail.com>> wrote:
>>> 
>>> Can you send a (small) example file?
>>> 
>>>> On 14 May 2018, at 13:08, Tomasz Koziara <t.kozi...@gmail.com 
>>>> <mailto:t.kozi...@gmail.com>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Continuing development of MED export in parmec <http://parmes.org/parmec/> 
>>>> I keep using Gmsh to test it. This time I am exporting nodes with time 
>>>> dependent scalar and vector fields attached to them. There are no elements 
>>>> or connectivity declared in the mesh. After import Gmsh shows all the 
>>>> views (per field) but I am not able to visualise anything. I would 
>>>> appreciate a helpful hint or comment:)
>>>> 
>>>> Thank you,
>>>> Tomek
>>>> ___
>>>> gmsh mailing list
>>>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>>>> http://onelab.info/mailman/listinfo/gmsh 
>>>> <http://onelab.info/mailman/listinfo/gmsh>
>>> 
>>> 
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>>> http://onelab.info/mailman/listinfo/gmsh 
>>> <http://onelab.info/mailman/listinfo/gmsh>
>> 
>> 
> 
> 

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


Re: [Gmsh] QMorph

2018-05-17 Thread Christophe Geuzaine


> On 17 May 2018, at 18:31, swarsi <swars...@gmail.com> wrote:
> 
> thank you for your response. what i did was to read and STL file into GMSH 
> and then i used the Recombine 2D with default option of Blossom but i got a 
> quad dominant mesh with approximately 15-20% triangles. should this not have 
> given the same results as the paper that was linked above?

You need the correct number of nodes on the boundary ; we also currently don't 
recombine if the quality of the quads is very bad. If you absolutely need 
full-quad, you can allply blossom, then subdivide once.


> 
> thanks 
> 
> On Thu, May 17, 2018 at 1:49 AM, Christophe Geuzaine <geuza...@gmail.com 
> <mailto:geuza...@gmail.com>> wrote:
> 
> 
>> On 15 May 2018, at 18:22, swarsi <swars...@gmail.com 
>> <mailto:swars...@gmail.com>> wrote:
>> 
>> is the meshGFaceQuadrilateralize.cpp a complete implementation of the qmorph 
>> algorithm?
> 
> We currently don't use that implementation: I advise you use our own 
> recombination strategy instead 
> (http://gmsh.info/doc/preprints/gmsh_quad_preprint.pdf 
> <http://gmsh.info/doc/preprints/gmsh_quad_preprint.pdf>)
> 
>> if so, how can i call this function to recombine a 2D mesh into quads?
>> 
>> thank you for any help.
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> http://onelab.info/mailman/listinfo/gmsh 
>> <http://onelab.info/mailman/listinfo/gmsh>
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] get mesh volume

2018-05-17 Thread Christophe Geuzaine

Hi Juan - Indeed, Gmsh does not guarantee that the Delaunay criterion is 
satisfied.

Christophe


> On 3 May 2018, at 22:00, Juan Sanchez <juan.e.sanc...@gmail.com> wrote:
> 
> Hello,
> 
> Does anyone know how to get gmsh to output a mesh, where all
> tetrahedra meet the Delaunay condition of having their circumcenter
> inside their volume?  For my example, it seems like this condition is
> not being met, even though I have tried these options:
> Mesh.OptimizeNetgen=1;
> Mesh.OptimizeThreshold=1;
> 
> Regards,
> 
> Juan
> 
> 
> On Tue, May 1, 2018 at 7:51 AM, Juan E. Sanchez
> <juan.e.sanc...@gmail.com> wrote:
>> Hello,
>> 
>> Thanks for the check, and the useful script.
>> 
>> Upon further analysis, the circumcenter of many of the tetrahedron are
>> outside their respective volumes.  This is where the additional volume is
>> coming from in my calculations.
>> 
>> This is affecting the results of the control volume method I am using, since
>> the total volume of the structure is not conserved.
>> 
>> Is there anything I can do to force the circumcenters to be inside of the
>> tetrahedron?
>> 
>> Regards,
>> 
>> Juan
>> 
>> 
>> 
>> On 5/1/18 2:01 AM, Christophe Geuzaine wrote:
>>> 
>>> 
>>> You can run this script, e.g. compute_volume.geo :
>>> 
>>> Merge "3dblock.msh";
>>> Plugin(NewView).Run;
>>> Plugin(ModifyComponents).Expression0 = "1";
>>> Plugin(ModifyComponents).Run;
>>> Plugin(Integrate).Dimension = 3;
>>> Plugin(Integrate).Run;
>>> 
>>> You'll get
>>> 
>>> Info: Running '/Applications/Gmsh.app/Contents/MacOS/gmsh vol.geo -'
>>> [Gmsh 3.0.7, 1 node, max. 1 thread]
>>> Info: Started on Tue May  1 09:00:57 2018
>>> Info: Reading 'vol.geo'...
>>> Info: Reading '3dblock.msh'...
>>> Info: 6790 vertices
>>> Info: 32825 elements
>>> Info: Done reading '3dblock.msh'
>>> Info: Running Plugin(NewView)...
>>> Info: Done running Plugin(NewView)
>>> Info: Running Plugin(ModifyComponents)...
>>> Info: Done running Plugin(ModifyComponents)
>>> Info: Running Plugin(Integrate)...
>>> Info: Step 0: integral = 1.803e-15
>>> Info: Done running Plugin(Integrate)
>>> Info: Done reading 'vol.geo'
>>> Info: Stopped on Tue May  1 09:00:57 2018
>>> 
>>> 
>>> 
>>>> On 30 Apr 2018, at 22:58, Juan E. Sanchez <juan.e.sanc...@gmail.com
>>>> <mailto:juan.e.sanc...@gmail.com>> wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> Is there a way to get the mesh volume calculated by gmsh?
>>>> 
>>>> My simulator is calculating a volume of 1.09e-15 for the attached
>>>> structure, but it should be 1e-15.
>>>> 
>>>> Before I added these flags
>>>> Mesh.OptimizeNetgen=1;
>>>> Mesh.OptimizeThreshold=1;
>>>> 
>>>> I was getting 1.17e-15.
>>>> 
>>>> I am summing the volume for each tetrahedron sub volume from the edge
>>>> center, to the element center, to the centers of each triangle face of the
>>>> edge.
>>>> 
>>>> If my calculation is correct, are there flags I can use to improve the
>>>> situation?
>>>> 
>>>> I am running version 3.06.
>>>> 
>>>> gmsh -3 3dblock.geo
>>>> 
>>>> 
>>>> Regards,
>>>> 
>>>> Juan
>>>> <3dblock.geo>___
>>>> gmsh mailing list
>>>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>>>> http://onelab.info/mailman/listinfo/gmsh
>>> 
>>> 
>> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh


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


Re: [Gmsh] Visualising point data imported from MED files

2018-05-17 Thread Christophe Geuzaine

Gmsh displays all meshes and post-processing data based on elements: so indeed 
you will need to add "point elements" (1 point for each vertex) in the med file 
in order to visualize it.

Christophe

> On 17 May 2018, at 14:56, Tomasz Koziara <t.kozi...@gmail.com> wrote:
> 
> Dear Christophe,
> 
> Here: https://www.dropbox.com/s/ve8rm3qjyvew1uq/spring_system0rb.med.gz?dl=0 
> <https://www.dropbox.com/s/ve8rm3qjyvew1uq/spring_system0rb.med.gz?dl=0>
> 
> Best regards,
> Tomek
> 
> 
> 
> On 17 May 2018 at 08:50, Christophe Geuzaine <geuza...@gmail.com 
> <mailto:geuza...@gmail.com>> wrote:
> 
> Can you send a (small) example file?
> 
>> On 14 May 2018, at 13:08, Tomasz Koziara <t.kozi...@gmail.com 
>> <mailto:t.kozi...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> Continuing development of MED export in parmec <http://parmes.org/parmec/> I 
>> keep using Gmsh to test it. This time I am exporting nodes with time 
>> dependent scalar and vector fields attached to them. There are no elements 
>> or connectivity declared in the mesh. After import Gmsh shows all the views 
>> (per field) but I am not able to visualise anything. I would appreciate a 
>> helpful hint or comment:)
>> 
>> Thank you,
>> Tomek
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> http://onelab.info/mailman/listinfo/gmsh 
>> <http://onelab.info/mailman/listinfo/gmsh>
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] Geometry from an order 2 surface mesh

2018-06-14 Thread Christophe Geuzaine

Hi Jerome,

Yes indeed - all our meshing algorithms currently generate 1st order 
geometrical elements, starting from 1st order geometrical elements on the 
boundary. The meshes are then "curved" later on. I will add the ability to 
re-use a given high-order discrete surface input when we curve to our TODO 
list. But it's not trivial.

Christophe

> On 1 Jun 2018, at 14:56, Jerome Robert  wrote:
> 
> Hi all,
> 
> I am trying to fill an existing order 2 3D triangular mesh with order 2 
> tetrahedron. In the result mesh, the order 2 vertices of my input mesh are 
> all moved so they were linearly interpolated. So everything is as if my input 
> mesh was used by gmsh as an order 1 surface.
> 
> Here is my .geo:
> 
> // Various options I tryed with no luck
> //Mesh.SecondOrderExperimental=1;
> //Mesh.ElementOrder = 2;
> //Mesh.SecondOrderLinear = 0;
> //Mesh.Algorithm3D = 1;
> 
> // surf.unv contains only order 2 triangles
> Merge "surf.unv";
> Surface Loop(2) = {1};
> Volume(3) = {2};
> Characteristic Length {3} = 1000;
> 
> Which I run with gmsh 3.0.6:
> 
> $ gmsh -3 my.geo -o my.msh
> 
> My understanding is that my input mesh is converted to order 1 by this 
> SetOrder1 call:
> 
> https://gitlab.onelab.info/gmsh/gmsh/blob/a4306e50a3916dd52f72edce56c05f36954f3f0a/Mesh/Generator.cpp#L979
> 
> Interpolation on GEntity::DiscreteSurface or GEntity::DiscreteCurve is also 
> always linear.
> 
> So there seems to be no way to use an order 2 mesh as a gmsh GModel. 
> 
> Is that correct ? If not what would be the way to do it ?
> 
> Regards,
> 
> Jerome
> 
> ___
> 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

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


Re: [Gmsh] Crash in Delaunay Quad 2d mesh using the Gmsh-api

2018-06-13 Thread Christophe Geuzaine

I cannot reproduce the crash with the latest snapshot.

Instead of generating a .geo file and using the undocumented private api, I 
would encourage you to try the new stable api - it's available in C++, C, 
Python and Julia.

Here's your example written using the Python api :

*** test.py ***

import gmsh

gmsh.initialize()

gmsh.option.setNumber("General.Terminal", 1)
gmsh.option.setNumber("Mesh.Algorithm", 5) # delquad
gmsh.option.setNumber("Mesh.RecombineAll", 1)

gmsh.model.geo.addPoint(2.0, 3.0, 0.0)
gmsh.model.geo.addPoint(1.0, 3.0, 0.0)
gmsh.model.geo.addPoint(0.0, 3.0, 0.0)
gmsh.model.geo.addPoint(0.0, 1.5, 0.0)
gmsh.model.geo.addPoint(0.0, 0.0, 0.0)
gmsh.model.geo.addPoint(1.0, 0.0, 0.0)
gmsh.model.geo.addPoint(2.0, 0.0, 0.0)
gmsh.model.geo.addPoint(2.0, 1.5, 0.0)
gmsh.model.geo.addLine(1, 2)
gmsh.model.geo.addLine(2, 3)
gmsh.model.geo.addLine(3, 4)
gmsh.model.geo.addLine(4, 5)
gmsh.model.geo.addLine(5, 6)
gmsh.model.geo.addLine(6, 7)
gmsh.model.geo.addLine(7, 8)
gmsh.model.geo.addLine(8, 1)
gmsh.model.geo.addCurveLoop([1, 2, 3, 4, 5, 6, 7, 8])
gmsh.model.geo.addPlaneSurface([1], 1)

gmsh.model.geo.synchronize()

for i in range(1,9):
gmsh.model.mesh.setTransfiniteCurve(i, 2)

gmsh.fltk.run()

gmsh.finalize()

***



> On 13 Jun 2018, at 15:12, Konstantinos Iatridis  
> wrote:
> 
> Hello gmsh developers and community
>  
> First of all “thank you” to the developers and researchers of gmsh for this 
> great project.
>  
> I have built gmsh 3.0.6 as windows DLL and use it to generate 2d quad meshes 
> from a C++ test application.
> I create programmatically a .geo file and send it for meshing using the gmsh 
> API.
> All 2d mesh algorithms are working (BAMG produces bad results but it doesn’t 
> crash) with the exception of DelQuad which crashes in function:
> backgroundMesh::updateSizes() in these lines:
>   if (s0->second < s1->second)s1->second = 
> std::min(s1->second,_beta*s0->second);
>   else s0->second = std::min(s0->second,_beta*s1->second);
> Following the debugger I realized that backgroundMesh is called only for 
> DelQuad algorithm.
> However, the same .geo file, is meshed correctly using the gmsh stand-alone 
> application with DelQuad enabled and produces a very good result.
> I would appreciate any help on how to achieve the same result using DelQuad 
> from the own test application.
>  
> The code used to mesh the geo file is:
>  
> std::string geofile; //..
> std::string mshfile; //..
> GmshInitialize();
> GmshSetOption("General", "Verbosity", 100.);
> //(1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, 7 = BAMG, 8 = DelQuad)
> GmshSetOption("Mesh", "Algorithm", 8.0);
> GmshSetOption("Mesh", "RecombineAll", 1.0);
> GmshSetOption("Mesh", "RecombinationAlgorithm", 1.0);
> GModel *m = new GModel();
> if (m->readGEO(geofile.c_str()) == 1) {
> m->mesh(2);
> m->indexMeshVertices(true);
> m->writeMSH(mshfile.c_str());
> }
> delete m;
> GmshFinalize();
>  
> An example Geo file as produced by my program is:
>  
> Point(1) = {2.00, 3.00, 0.00} ;
> Point(2) = {1.00, 3.00, 0.00} ;
> Point(3) = {0.00, 3.00, 0.00} ;
> Point(4) = {0.00, 1.50, 0.00} ;
> Point(5) = {0.00, 0.00, 0.00} ;
> Point(6) = {1.00, 0.00, 0.00} ;
> Point(7) = {2.00, 0.00, 0.00} ;
> Point(8) = {2.00, 1.50, 0.00} ;
> Line(1) = {1, 2} ;
> Line(2) = {2, 3} ;
> Line(3) = {3, 4} ;
> Line(4) = {4, 5} ;
> Line(5) = {5, 6} ;
> Line(6) = {6, 7} ;
> Line(7) = {7, 8} ;
> Line(8) = {8, 1} ;
> Line Loop(1) = { 1,2,3,4,5,6,7,8} ;
> Plane Surface(1) = {1} ;
> Transfinite Line {1} = 2 Using Progression 1 ;
> Transfinite Line {2} = 2 Using Progression 1 ;
> Transfinite Line {3} = 2 Using Progression 1 ;
> Transfinite Line {4} = 2 Using Progression 1 ;
> Transfinite Line {5} = 2 Using Progression 1 ;
> Transfinite Line {6} = 2 Using Progression 1 ;
> Transfinite Line {7} = 2 Using Progression 1 ;
> Transfinite Line {8} = 2 Using Progression 1 ;
>  
> Thank you in advance
>  
> Konstantinos Iatridis
> -itech-
>  
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] openCASCADE error: Unknown entity of dimension x with tag y

2018-06-13 Thread Christophe Geuzaine


> On 13 Jun 2018, at 16:57, Deep Bandivadekar  
> wrote:
> 
> Hello,
> 
> I upgraded my gmsh from 2.10.0 to 3.0.6 for the boolean feature and I wanted 
> test the same.
> It's a fairly straightforward script in which I wanted to locate the 
> intersection of the two diagonals using the boolean operator.
> ---
> i=0;
> Point(i) = {0,0,0,0.5}; o1 = i; i++;
> Point(i) = {0,1,0,0.5}; e1 = i; i++;
> Point(i) = {1,0,0,0.5}; e2 = i; i++;
> Point(i) = {1,1,0,0.5}; e3 = i; i++;
> //Point(i) = {0.5,0.5,0,0.5}; e4 = i; i++;
> 
> Line(i) = {o1, e1}; l1 = i; i++;
> Line(i) = {e1, e3}; l2 = i; i++;
> Line(i) = {e3, e2}; l3 = i; i++;
> Line(i) = {e2, o1}; l4 = i; i++;
> Line(i) = {e1, e2}; l5 = i; i++;
> Line(i) = {e3, o1};
> 
> 
> //+
> SetFactory("OpenCASCADE");
> BooleanIntersection{ Line{9}; }{ Line{10}; }
> ---
> 
> I get following error statements:
> Error: Unknown OpenCASCADE entity of dimension 1 with tag 9
> Error: , line 18: Could not apply booleanoperator
> 
> What is the issue here? Can someone help?
> 

You change the CAD kernel to OpenCASCADE after having created the points and 
lines - which are thus created with the default (built-in) kernel, and are thus 
unknown to OpenCASCADE. (Also, BooleanIntersection in OpenCASCADE does not deal 
with curves - use BooleanFragments instead.)

Here's the corrected script:

SetFactory("OpenCASCADE");

i=1;
Point(i) = {0,0,0,0.5}; o1 = i; i++;
Point(i) = {0,1,0,0.5}; e1 = i; i++;
Point(i) = {1,0,0,0.5}; e2 = i; i++;
Point(i) = {1,1,0,0.5}; e3 = i; i++;
//Point(i) = {0.5,0.5,0,0.5}; e4 = i; i++;

i=1;
Line(i) = {o1, e1}; l1 = i; i++;
Line(i) = {e1, e3}; l2 = i; i++;
Line(i) = {e3, e2}; l3 = i; i++;
Line(i) = {e2, o1}; l4 = i; i++;
Line(i) = {e1, e2}; l5 = i; i++;
Line(i) = {e3, o1};

BooleanFragments{ Line{5}; Delete; }{ Line{6}; Delete; }





> 
> _______
> 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

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


Re: [Gmsh] Crash in Delaunay Quad 2d mesh using the Gmsh-api

2018-06-14 Thread Christophe Geuzaine

Can you download the binary SDK from the website and test my python script with 
that?

Christophe

> On 14 Jun 2018, at 16:47, Konstantinos Iatridis  
> wrote:
> 
> Thank you for the fast response!
> I downloaded the current gmsh version from github.
> I build it again as dll.
> Configuring gmsh I changed the following switches to reduce dependencies:
> . ENABLE_ACIS=0
> . ENABLE_BLAS_LAPACK=0
> . ENABLE_FLTK=0
> . ENABLE_OCC=0
> . ENABLE_OCC_CAF=0
> . ENABLE_OPENMP=0
> . ENABLE_OSMESA=0
> . ENABLE_OPTHOME=0
> 
> My compiler is visual studio 2015.
> I modified the code of my app following your Python example. In your example
> you set the Algorithm =5 but as far as I can see the desired algorithm for
> me is =8. I tested both:
> 
> std::string geofile; //..
> std::string mshfile; //..
> gmsh::initialize();
> gmsh::option::setNumber("General.Terminal", 1);
> gmsh::option::setNumber("Mesh.Algorithm", 5); //5: runs ok, 8: crash!
> gmsh::option::setNumber("Mesh.RecombineAll", 1);
> gmsh::option::setNumber("Mesh.RecombinationAlgorithm", 1);
> gmsh::open(geofile.c_str());
> gmsh::model::geo::synchronize();
> gmsh::model::mesh::generate(2);
> gmsh::write(mshfile.c_str());
> gmsh::finalize();
> 
> As in the previous version
> -Algorithm 5 runs ok
> -Algorithm 8 crashes and as I can see from my debugger still in
> backgroundMesh::updateSizes()
> 
> Could the build options or the compiler version affect the Delaunay Quad
> Algorithm?
> Can you verify that the same code runs in your configuration with Algorithm
> =8?
> Any suggestion on what could cause the crash?
> 
> Thank you in advance
> 
> Konstantinos Iatridis
> -itech
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> 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

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


Re: [Gmsh] bug in mesh generation

2018-06-18 Thread Christophe Geuzaine

Dear Andrew,

Does the latest snaphot produce the same invalid mesh? If so, can you try 
without the recombination + with the MeshAdapt 2D algorithm?

Thanks,

Christophe

> On 17 Jun 2018, at 00:20, andrew  wrote:
> 
> Hi,
> 
> When I try to create a mesh with the following file I get an error when 
> converting it with gmshToFoam. After some research I found that gmsh produces 
> a problematic cell.
> 
> Can this be avoided?
> 
> I am using gmsh 3.0.6 and this happens both in Linux and windows.
> 
> kind regards
> 
> Andrew
> 
> ___
> 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

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


Re: [Gmsh] Gmsh how to extract the node ID's on a given 3D Mesh Boundary Surface

2018-06-18 Thread Christophe Geuzaine


> On 17 Jun 2018, at 11:12, Zuheyr Alsalihi  wrote:
> 
> 
> Hello,
> Is there a way to get the node ID's of  the elements that lie on a boundary 
> surface in a 3d solid mesh where I mark the
> surface by creating a physical surface. 

Load the mesh and retrieve the elements tagged with the physical group; then 
loop over the elements and get the nodes.

(The gmsh::model::mesh::getNodesForPhysicalGroup function in the Gmsh API does 
just that.)



> 
> Thank you for reading!
> 
> Best,
> -- 
> Zuheyr Alsalihi
> ___
> 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

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


Re: [Gmsh] Problem with GMSH using command line reclassify option

2018-06-18 Thread Christophe Geuzaine

Dear Jacinto,

Have you found the origin of the problem? If not, create an issue on our gitlab 
and attach the file - we'll look into it.

Christophe

> On 11 Jun 2018, at 18:46, Jacinto Artigas  wrote:
> 
> Hi, I'm trying to reorder the elements of a 2D mesh using the  -reclassify 
> command line, but when the mesh has more than 92k elements, gmsh stays frozen 
> and does nothing else.
> 
> Below I leave an example of the output using command line
> 
> Info: Started on Mon Jun 11 09:10:51 2018
> Info: Reading 'TMesh.msh' ...
> Info: 45557 vertices
> Info: 90200 elements
> Info: Done reading 'TMesh.msh'
> Info: Writing 'TMesh.msh' ...
> Info: Done writing 'TMesh.msh'
> Info: Stopped on Mon Jun 11 09:10:52 2018
> 
> Work well!
> 
> but here
> 
> Info: Started on Mon Jun 11 09:13:39 2018
> Info: Reading 'TMesh.msh' ...
> Info: 46914 vertices
> Info: 92901 elements
> Info: Done reading 'TMesh.msh'
> 
> It stays frozen and does nothing else
> 
> ___
> 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

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


Re: [Gmsh] Bug with transfinite interface

2018-05-30 Thread Christophe Geuzaine


> On 25 May 2018, at 16:26, Quentin Goestchel  
> wrote:
> 
> Dear Sir or Madam,
> 
> I would like to thank you for the great work which has been done to develop 
> the open-source Gmsh software. 
> I am currently working on a 3D numerical method and I think I have found a 
> bug in the 3D meshing algorithm. I was trying to generate a transfinite bulk 
> in a mesh (to have a constant orthogonality of the elements), and an 
> unstructured layer around it, as shown in the enclosed 
> "sphereTransfinite.png". 
> 

This is "normal" the (non-recombined) 3D transfinite algorithm does not try to 
enforce the compatibility between the volume and surface meshes. It's actually 
impossible without modifying the 2D mesh a posteriori in some configuration 
(since we also generate the 2D mesh first). You should specify the corners of 
the transfinite interpolation in the right order to have the match.

PS: Using Extrusion instead of Transfinite, Gmsh will try to perform the 
modifications automatically.

> Everything was going fine until I noticed a big error on my discretized 
> spherical surface, computed with the sum of the areas of the boundary faces. 
> I found out that my code was unable to find the neighbours of many 
> tetrahedrons around the bulk mesh because many faces were not matching but 
> crossing each other edges, as shown in sphereTransfinite_err.png . 
> I didn't find any topics about such problem so I assume that you didn't know 
> about it, but I might be wrong. 
> Best regards, 
> -- 
> Quentin Goestchel  | Etudiant - Année ARPE 
> Département Génie Civil 
> +33(0)6 83 75 57 53   |  
> quentin.goestc...@ens-paris-saclay.fr <mailto:prenom@ens-paris-saclay.fr> 
> ENS Cachan - 61 avenue du Président Wilson 94235 Cachan CEDEX 
> 
> www.ens-paris-saclay.fr <http://www.ens-paris-saclay.fr/>
> 
> <http://www.ens-paris-saclay.fr/>_______
> 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

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


Re: [Gmsh] issue concerning the boolean difference of two volumes?

2018-05-30 Thread Christophe Geuzaine

Try with the latest snapshots: the issue seems fixed.

Christophe

> On 30 May 2018, at 15:02, Bertrand Thierry  wrote:
> 
> Hello Nicu,
> 
> The same problem on my computer. I guess it comes from a tolerance problem 
> with the boolean operators.
> Adding this to your code :
> Geometry.ToleranceBoolean = 0.001;
> makes it work again.
> 
> (however, I'm not sure if it's the right way to deal with it, maybe someone 
> else will confirm (ou pas) ?)
> 
> Bert
> 
> On 05/30/2018 12:08 PM, Nicolae Cindea wrote:
>> 
>> Dear all, 
>> 
>> I think there is an issue concerning the difference (or the intersection) of 
>> two volumes. The following code: 
>> 
>> // here starts the code 
>> SetFactory("OpenCASCADE"); 
>> 
>> L = 0.5;   // cylinder length [0, L] 
>> l = 1.00;  // triangle edge 
>> r = 0.050; // radius of the sphere 
>> 
>> h = l * Sqrt(3) / 2; 
>> 
>> Sphere(2) = { 0, 0, 0, r }; 
>> 
>> Point(101) = {  h / 3, 0, -l / 2 }; 
>> Point(102) = {  h / 3, 0,  l / 2 }; 
>> Point(103) = { -2 * h / 3, 0,  0 }; 
>> 
>> Line(201) = { 102, 103 }; 
>> Line(202) = { 103, 101 }; 
>> Line(203) = { 101, 102 }; 
>> 
>> Line Loop(204) = {201, 202, 203}; 
>> 
>> Surface(3) = { 204 }; 
>> 
>> Translate { -0.108320, 0, -0.062538 } { Surface{3};} 
>> out[] = Extrude { 0, L, 0 }{ Surface{3}; }; 
>> 
>> 
>> BooleanDifference(8) = { Volume{3}; Delete; }{ Volume{2}; Delete; }; 
>> // here ends the code 
>> 
>> 
>> gives the following error "Error   : Intersection operation cannot be 
>> performed". Nevertheless, replacing the line 
>> Translate { -0.108320, 0, -0.062538 } { Surface{3};} 
>> by 
>> Translate { -0.108320, 0, -0.062537 } { Surface{3};} 
>> the error message disappears and everything work as supposed. 
>> 
>> Can somebody reproduce this comportment? Since the above .geo file is 
>> generated from another language I'm searching a workaround to avoid the 
>> problematic situations. 
>> 
>> Thank you. 
>> 
>> Regards, 
>> Nicolae. 
>> 
>> PS: my gmsh -info 
>> 
>> Version  : 3.0.6 
>> License  : GNU General Public License 
>> Build OS : Linux64 
>> Build date   : 20171105 
>> Build host   : gmsh.info 
>> Build options: 64Bit Ann Bamg Bfgs Blas(Generic) Blossom C++11 Chaco 
>> DIntegration Dlopen Fltk Gmm Jpeg(Fltk) Kbipack Lapack(Generic) 
>> LinuxJoystick MathEx Med Mesh Metis Mmg3d Mpeg Netgen ONELAB ONELABMetamodel 
>> OpenCASCADE OpenGL OptHom PETSc Parser Plugins Png(Fltk) Post SLEPc Solver 
>> Taucs TetGen/BR Tetgen1.5 Voro3D Zlib 
>> FLTK version : 1.3.4 
>> PETSc version: 3.7.5 (complex arithmtic) 
>> OCC version  : 7.1.0 
>> MED version  : 3.2.0 
>> Packaged by  : gitlab-runner 
>> Web site : http://gmsh.info <http://gmsh.info/> 
>> Mailing list : gmsh@onelab.info <mailto:gmsh@onelab.info> 
>> 
>> ___ 
>> gmsh mailing list 
>> gmsh@onelab.info <mailto:gmsh@onelab.info> 
>> http://onelab.info/mailman/listinfo/gmsh 
>> <http://onelab.info/mailman/listinfo/gmsh> 
> 
> -- 
> Bertrand THIERRY
> CNRS researcher (Chargé de Recherche)
> Laboratoire Jacques-Louis Lions
> Sorbonne Université
> Office 310, Corridor 15/25
> Tel: +33 (0)1 44 27 72 01
> https://www.ljll.math.upmc.fr/bthierry 
> <https://www.ljll.math.upmc.fr/bthierry>___
> 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

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


Re: [Gmsh] single layer extrusion

2018-05-30 Thread Christophe Geuzaine


> On 28 May 2018, at 18:36, andrew  wrote:
> 
> 
> Hi,
> 
> I am trying to make a 3d mesh from an extruded 2d mesh. I use the code 
> attached but when I run the code I get 2 layers instead of one. Is there a 
> way to get a single extruded layer or I am doing something wrong?
> 

This is due to the fact that you set "Mesh.SubdivisionAlgorithm".

(Note that in 3D you should set "Mesh.SubdivisionAlgorithm = 2" to get a 
conformal mesh.)


> Kind regards
> 
> Andrew
> 
> ___
> 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

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


Re: [Gmsh] How to make a rotationally periodic 3D mesh

2018-06-24 Thread Christophe Geuzaine


> On 24 Jun 2018, at 14:41, Zuheyr Alsalihi  wrote:
> 
> Hello,
> 
> I just needed to better explain my previous question:
> 
> I need to make a triangular cake slice shaped 3d solid mesh using gmsh 3.0.6 
> where the 2nd side is the rotational periodic surface of the first side 
> surface of the mesh. The rotation angle is 2*Pi/N where N is the number of 
> slices.
> 
> To make it visually clear, if N=1, left periodic surface would be close on 
> itself and the rotation angle would be 2*Pi.
> 
> The geometry is imported through a step file and all I have to force is to 
> make gmsh generate a rotationally periodic mesh on the periodic surfaces.
> 
> I just cannot succeed to find the correct syntax to the statement
> 
> //Periodic Surface { expression-list } = { expression-list } Rotate { 
> expression-list } ;
> 
> To tell gmsh that gthe mesh on the left periodic surface, master, is going to 
> be rotated by an angle 2*Pi/N to make the mesh on the other slave periodic 
> surface.
> 

I've clarified the doc and added a rotation example in 

https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/periodic.geo 
<https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/periodic.geo>

Note that if your whole geometry is rotation-invariant, you should probably 
just 

- import the 2D slice 

- extrude+rotate the 2D slice, together with the mesh.

(See e.g. 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/revolve2.geo 
<https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/revolve2.geo>)

This way you won't have to specify periodicity - the mesh will automatically be 
periodic.

Christophe



> I must have some conceptual problem. Thank you for reading.
> 
> Best regards.
> 
> 
> -- 
> Dr. Zuheyr Alsalihi
> Senior Research Engineer
> Turbomachinery and Propulsion and
> Aeronautics and Aerospace Departments
> von Karman Institute for Fluid Dynamics
> Waterloosesteenweg 72, B-1640 Sint-Genesius-Rode, Belgium
> Direct Line: +32 (0)2 359 98 65
> Fax: +32 (0)2 359 96 00
> E-mail: alsal...@vki.ac.be
> http://www.vki.ac.be
> 
> ___
> 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

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


Re: [Gmsh] Bug in Statistics window

2018-06-24 Thread Christophe Geuzaine



> On 23 Jun 2018, at 13:01, andrew  wrote:
> 
> 
> Hi,
> 
> When I use the windows Gui I load a file and mesh it. I open the statistics 
> window and I get the statistics. I reload (with the statistics window still 
> open) and I remesh. If I press update on the always on statistics window gmsh 
> hangs and exits. If I close the statistics window and reopen it then I get 
> the statistics correctly and the second time. I have noticed this behavior in 
> gmsh for windows. I don't know if anyone can replicate it or it has to do 
> with my system..
> 


Can you try with the latest snapshot?



> kind regards
> 
> Andrew
> 
> ___
> 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

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


Re: [Gmsh] Gmsh Tutorial 1 fails...?

2018-06-24 Thread Christophe Geuzaine


> On 24 Jun 2018, at 18:50, Zuheyr Alsalihi  wrote:
> 
> Dear gmsh Community,
> 
> I am using the following executable downloaded today, 24/06/2018:
> gmsh-3.0.6-Linux64/bin/gmsh
> 
> 
> I copied and pasted the t1.geo from Prof. Geuzaine's gmesh Website which is 
> attached.
> I seem to do a mistake as I get errors which are saved and attached here in 
> error.txt file.
> 

You are trying to open a development version of "t1.geo"  (from the development 
site) with the stable (much older) release of Gmsh. The tutorials corresponding 
to the stable version are bundled with the code.

If you want to use development stuff, just download the latest Gmsh snapshot 
from the website and everything will be ok.

(The development version will become "Gmsh 4.0" soon.)



> In view of my other problems for which I have been asking your valuable help, 
> perhaps
> I am doing some fundamental mistakes as I am a beginner but we would like to 
> use gmsh at our Institute.
> 
> Thank you very for reading.
> 
> Kind regards,
> Zuheyr
> 
> -- 
> Dr. Zuheyr Alsalihi
> Senior Research Engineer
> Turbomachinery and Propulsion, and
> Aeronautics and Aerospace Departments
> von Karman Institute for Fluid Dynamics
> Waterloosesteenweg 72, B-1640 Sint-Genesius-Rode, Belgium
> Direct Line: +32 (0)2 359 98 65
> Fax: +32 (0)2 359 96 00
> E-mail: alsal...@vki.ac.be
> http://www.vki.ac.be_______
> 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

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


Re: [Gmsh] API define periodic line

2018-04-26 Thread Christophe Geuzaine

Hi Artur - it's now in the API: give it a try.

PS: we have started to generate binary SDKs that contain the shared Gmsh 
library and the C++/C headers and Python module (see the *-sdk* files in 
gmsh.info/bin/). The SDK is built using the same compilers as the official 
builds, with the same options (built-in OpenCASCADE, etc.). This should make it 
much easier to develop C++, C or Python code based on Gmsh, without having to 
compile the Gmsh code from scratch.

> On 25 Apr 2018, at 22:30, Christophe Geuzaine <geuza...@gmail.com> wrote:
> 
> 
> Hi Arthur,
> 
> Indeed it's currently missing from the API - we'll add it soon.
> 
> Christophe
> 
>> On 25 Apr 2018, at 13:12, Artur Palha <artur.pa...@gmail.com 
>> <mailto:artur.pa...@gmail.com>> wrote:
>> 
>> Dear Benedikt,
>> 
>> Thank you for your reply. Unfortunately I am unable to understand exactly 
>> what you mean by that. Roughly I think that you define the periodic surface 
>> 2 (for example) to be the translation along [400,0,0] of the surface 1. 
>> Still you make use of the Periodic Surface call. My problem is that I am 
>> unable to find an equivalent function to Periodic Surface in the API of 
>> gmsh. 
>> 
>> To make it clearer: What is the equivalent code using the API of gmsh that 
>> implements:
>> 
>> Periodic Line{mySlaveLine} = {myMasterLine};
>> 
>> Once again thank you for your help.
>> 
>> -artur palha
>> 
>> 
>> On Wed, Apr 25, 2018 at 12:07 PM, Benedikt Oswald 
>> <benedikt.oswald@lspr.swiss <mailto:benedikt.oswald@lspr.swiss>> wrote:
>> Dear Artur, what you can do is something along these lines:
>> 
>> // constrain the boundary surfaces to conformal discretization
>> 
>> // x
>> Periodic Surface {2} = {1} Translate {400,0,0};// ex
>> 
>> // y
>> Periodic Surface {4} = {3} Translate {0,300,0};// ey
>> 
>> // z - floor and roof
>> Periodic Surface {6} = {5} Translate {0,0,150};// ez
>> 
>> in fact, you need to know the id of the geometrical entity (surface)
>> 
>> and transfer it by the requested amount.
>> 
>> Greeetings, Benedikt
>> 
>> 
>> 
>> 
>> Am 25.04.18 um 12:02 schrieb Artur Palha:
>> > Dear All,
>> >
>> > I am trying to use gmsh's API. I can successfully use it to setup my
>> > geometry and generate the mesh. The only issue I am having is that I
>> > cannot find the function (both in Python and C++) to define Periodic
>> > Lines (or Periodic Surfaces). Does anyone know this?
>> >
>> > Thank you.
>> >
>> > -artur palha 
>> >
>> >
>> > ___
>> > gmsh mailing list
>> > gmsh@onelab.info <mailto:gmsh@onelab.info>
>> > http://onelab.info/mailman/listinfo/gmsh 
>> > <http://onelab.info/mailman/listinfo/gmsh>
>> 
>> -- 
>> --
>> Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone +41 43 366 
>> 90 74
>> Grubenstrasse 9, CH-8045 Zürich, benedikt.oswald@lspr.swiss 
>> <mailto:benedikt.oswald@lspr.swiss>
>> --
>> 
>> 
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> http://onelab.info/mailman/listinfo/gmsh 
>> <http://onelab.info/mailman/listinfo/gmsh>
>> 
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> http://onelab.info/mailman/listinfo/gmsh
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] filter out elements according to type

2018-04-26 Thread Christophe Geuzaine


> On 25 Apr 2018, at 22:29, Christophe Geuzaine <geuza...@gmail.com> wrote:
> 
> 
> Hi Andrew,
> 
> Not in the current version. This is something we might indeed want to add in 
> the API.

I've added gmsh::model::getType() which return the string type of an entity 
("Circle", etc.) - this could be used to filter the results.

Christophe


> 
> Christophe
> 
>> On 25 Apr 2018, at 17:57, andrew <armit...@gmail.com 
>> <mailto:armit...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I would like to select in a model all the arcs that are in a surface. For 
>> example if I use the line
>> 
>> lines[]=Line "*";
>> 
>> I get all the lines in a model. Is there a similar 
>> 
>> circles[]=Circle "*"; or arcs[]=Arc "*";
>> 
>> command with I will be able to select the circular elements?
>> 
>> thank you in advance
>> 
>> andrew
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> http://onelab.info/mailman/listinfo/gmsh
> 

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


Re: [Gmsh] get mesh volume

2018-05-01 Thread Christophe Geuzaine

You can run this script, e.g. compute_volume.geo :

Merge "3dblock.msh";
Plugin(NewView).Run;
Plugin(ModifyComponents).Expression0 = "1";
Plugin(ModifyComponents).Run;
Plugin(Integrate).Dimension = 3;
Plugin(Integrate).Run;

You'll get 

Info: Running '/Applications/Gmsh.app/Contents/MacOS/gmsh vol.geo -' [Gmsh 
3.0.7, 1 node, max. 1 thread]
Info: Started on Tue May  1 09:00:57 2018
Info: Reading 'vol.geo'...
Info: Reading '3dblock.msh'...
Info: 6790 vertices
Info: 32825 elements
Info: Done reading '3dblock.msh'
Info: Running Plugin(NewView)...
Info: Done running Plugin(NewView)
Info: Running Plugin(ModifyComponents)...
Info: Done running Plugin(ModifyComponents)
Info: Running Plugin(Integrate)...
Info: Step 0: integral = 1.803e-15
Info: Done running Plugin(Integrate)
Info: Done reading 'vol.geo'
Info: Stopped on Tue May  1 09:00:57 2018



> On 30 Apr 2018, at 22:58, Juan E. Sanchez  wrote:
> 
> Hello,
> 
> Is there a way to get the mesh volume calculated by gmsh?
> 
> My simulator is calculating a volume of 1.09e-15 for the attached structure, 
> but it should be 1e-15.
> 
> Before I added these flags
> Mesh.OptimizeNetgen=1;
> Mesh.OptimizeThreshold=1;
> 
> I was getting 1.17e-15.
> 
> I am summing the volume for each tetrahedron sub volume from the edge center, 
> to the element center, to the centers of each triangle face of the edge.
> 
> If my calculation is correct, are there flags I can use to improve the 
> situation?
> 
> I am running version 3.06.
> 
> gmsh -3 3dblock.geo
> 
> 
> Regards,
> 
> Juan
> <3dblock.geo>___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] Evolution of the Skin plugin

2018-05-01 Thread Christophe Geuzaine

HI Nicolas - Indeed, good idea. Note that you can do something similar at 
runtime: select "Draw only skin of 3D views" in the "Visibility" options of the 
view.

(In a script: View.DrawSkinOnly = 1;)

Christophe


> On 17 Apr 2018, at 15:56, Karin  wrote:
> 
> Dear Gmsh Gurus,
> 
> Could it be possible to develop the following evolution of the Skin plugin
> I have a Post view with a mix of 3D and 2D elements, could it be possible
> to specify the Plugin (with a check button for instance) to only operate on
> 3D elements and thus produce visibly unchanged view but much faster to
> animate and manipulate?
> 
> Thanks in advance,
> Nicolas
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh


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


Re: [Gmsh] Build API Demo Linking Static Libraries

2018-05-01 Thread Christophe Geuzaine


> On 16 Apr 2018, at 20:16, Su Tian  wrote:
> 
> Hello All,
>  
> I want to test the OCC and API capabilities using the demo ‘boolean’. I have 
> built OCC and Gmsh into static libraries. When preparing the CMake file for 
> building ‘boolean.exe’, do I need to link all OCC libraries explicitly? 
> (libTK*.a) Do I even need to link all those static libraries required for 
> building the OCC libraries? (freetype and tcltk)

Yes, if you build static libraries you'll have to link them in the final binary 
at the end.

To avoid all these issues we have started producing binary software development 
kits (SDKs): cf. the *sdk* files in http://gmsh.info/bin 

This should make it much easier to develop your own app using Gmsh, as the 
provided dynamic Gmsh lib contains all the dependencies (OpenCASCADE, FLTK, 
PETSc, etc.).

Since yesterday these SDKs even provide an alternate C++ interface (cf. the 
README in the SDK), which allows you to use the C++ API even if your C++ 
compiler (e.g. Microsoft Visual C++) is not ABI-compatible with ours (Mingw 
GCC).

Christophe


>  
> Thank you.
>  
> Su
> 
> 
>  
> This email has been checked for viruses by Avast antivirus software. 
> www.avast.com 
>  
> ___
> gmsh mailing list
> gmsh@onelab.info 
> http://onelab.info/mailman/listinfo/gmsh 
> 
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] ASCII mesh format

2018-05-01 Thread Christophe Geuzaine

Hi Yoann - the 2 files you sent are in format 2...

> On 23 Apr 2018, at 15:25, Yoann LE BARS  wrote:
> 
> 
> Hello everybody out there!
> 
> Well, my troubles are not entirely solved yet: when I look at the
> MSH file in version 3, it seems to me that z values are not only zeros.
> But, after converting, in the version 2 file, z values are either 0 or
> values such as 2.220446049250313e-16, so let say zero.
> 
> However, I have no error message when converting the file:
> 
> $ ./gmsh ~/Données/Cloud/manche/version-maison/manche-maison.msh -save -o 
> ~/Données/Cloud/manche/version-maison/manche-convertie.msh
> 
> Info: Running './gmsh 
> /home/lebarsy/Données/Cloud/manche/version-maison/manche-maison.msh -save -o 
> /home/lebarsy/Données/Cloud/manche/version-maison/manche-convertie.msh' [Gmsh 
> 3.0.7, 1 node, max. 1 thread]
> 
> Info: Started on Mon Apr 23 15:15:55 2018
> 
> Info: Reading 
> '/home/lebarsy/Données/Cloud/manche/version-maison/manche-maison.msh'...
> 
> Info: 28241 vertices
> 
> Info: 56522 elements
> 
> Info: Done reading 
> '/home/lebarsy/Données/Cloud/manche/version-maison/manche-maison.msh'
> 
> Info: Writing 
> '/home/lebarsy/Données/Cloud/manche/version-maison/manche-convertie.msh'...
> 
> Info: Done writing 
> '/home/lebarsy/Données/Cloud/manche/version-maison/manche-convertie.msh'
> 
> Info: Stopped on Mon Apr 23 15:15:55 2018
> 
> 
> Is this a known issue? Is there a way to re-interpolate a bathymetry
> on a mesh?
> 
> The two files are not that big, I attach them to this message:
> “manche-maison.msh” is encoded in ASCII version 3 MSH format, while
> “manche-convertie.msh” uses version2.
> 
> Best regards.
> 
> -- 
> Yoann LE BARS
> http://le-bars.net/yoann
> *Diaspora : yleb...@framasphere.org
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh


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


Re: [Gmsh] Attractor & Distance

2018-04-30 Thread Christophe Geuzaine


> On 27 Apr 2018, at 16:28, Jeremy Theler  wrote:
> 
> Hey all
> 
> What's the difference between fields Attractor and Distance?

Old (Attractor, based on ANN) and new (Distance, based on nanoflann) 
implementation of the same thing. Eventually Attractor will become a synonym 
for Distance.

Christophe

> 
> 
> Regards
> --
> jeremy
> www.seamplex.com 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] filter out elements according to type

2018-04-30 Thread Christophe Geuzaine


> On 27 Apr 2018, at 08:52, andrew <armit...@gmail.com> wrote:
> 
> Hi,
> thank you for your reply.
> I downloaded gmsh-3.0.7- dcaabc7b and I saw in the gmsh.cpp the following code
> 
> GMSH_API void gmsh::model::getType(const int dim,
>const int tag,
>std::string )
> {
>   if(!_isInitialized()){ throw -1; }
>   GEntity *ge = GModel::current()->getEntityByTag(dim, tag);
>   if(!ge){
> Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str());
> throw 2;
>   }
>   type = ge->getTypeString();
> }
> 
> I tried to use the code to a geo script like
> 

This new function is in the C++/C/Python API - not yet in the .geo file 
language.


> L[]= "*";
> 
> tp="";
> 
> getType(1,L[0],tp);
> 
> but I get errors. How can I use it for getting the type in to the tp 
> variable? I also tried different syntaxes but I always get errors.
> 
> kind regards
> 
> andrew
> 
> 
> 
> 
> 2018-04-26 11:01 GMT+03:00 Christophe Geuzaine <geuza...@gmail.com 
> <mailto:geuza...@gmail.com>>:
> 
> 
>> On 25 Apr 2018, at 22:29, Christophe Geuzaine <geuza...@gmail.com 
>> <mailto:geuza...@gmail.com>> wrote:
>> 
>> 
>> Hi Andrew,
>> 
>> Not in the current version. This is something we might indeed want to add in 
>> the API.
> 
> I've added gmsh::model::getType() which return the string type of an entity 
> ("Circle", etc.) - this could be used to filter the results.
> 
> Christophe
> 
> 
>> 
>> Christophe
>> 
>>> On 25 Apr 2018, at 17:57, andrew <armit...@gmail.com 
>>> <mailto:armit...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> I would like to select in a model all the arcs that are in a surface. For 
>>> example if I use the line
>>> 
>>> lines[]=Line "*";
>>> 
>>> I get all the lines in a model. Is there a similar 
>>> 
>>> circles[]=Circle "*"; or arcs[]=Arc "*";
>>> 
>>> command with I will be able to select the circular elements?
>>> 
>>> thank you in advance
>>> 
>>> andrew
>>> 
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>>> http://onelab.info/mailman/listinfo/gmsh 
>>> <http://onelab.info/mailman/listinfo/gmsh>
>> 
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] Issues with OpenCascade

2017-10-26 Thread Christophe Geuzaine

Hi Alessandro,

> On 23 Oct 2017, at 12:34, Alessandro Vicini <alessandro.vic...@sitael.com> 
> wrote:
> 
> Hullo everybody,
> 
> I find the following issues when using OpenCascade:
> 
> 1) I start from the geometry of the attached test_00.geo: one cube, with a 
> cubic hole;
> 2) Now if I want to apply a rotation to the inner cube (test_01.geo), I 
> obtain that only the edges are rotated, and the original cube is conserved. 
> This does not happen when the built-in geometry kernel is used (the applied 
> rotation does not modify the surface loops that define the volume);

Indeed. With OpenCASCADE all operations actually create new shapes; for 
transformations we try to re-bind the new shapes to the old tags when possible 
- it's not the case here since the old shapes are still used in the volume.

> 3) On the other hand, if I first apply the rotation (test_02.geo) and then 
> define the volume (test_03.geo), the inner surface loop is not recognized as 
> a closed volume.

That's a limitation of the way we currently perform the transformation 
operations (we do it "shape by shape") : this creates duplicate entities (here 
lines) on the boundaries. Currently you'll need to apply 

  BooleanFragments{ Surface{1:6}; Delete; }

to get rid of them. Then you'll be able to define a closed volume.

Christophe

> 
> Is there some way to work this out? Especially point 2) is an issue for me, 
> as for my application I'd need to append the rotation command at the end of 
> the geo file (i.e. after volume has been defined).
> 
> A.
> ___
> 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


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


Re: [Gmsh] rotation of cube formed from extruded plane surface fails when meshed.

2017-10-26 Thread Christophe Geuzaine

Hi Mark,

Extruded meshes (using Layers) are only supported on the unmodified geometrical 
extrusion, both with the built-in and the Opens Cascade kernels. The reason is 
that the mesh is generated using the original extrusion specification 
(translation vector or rotation): if the geometry is modified this 
specification becomes invalid. In some simple cases it could be recomputed 
(e.g. in your example), but in general cases (the shape gets cut by another 
one) it cannot...

We will add an explicit point about this in the docs.

Thanks for the feedback,

Christophe

> On 24 Oct 2017, at 22:01, kilgore trout <convectedacoust...@gmail.com> wrote:
> 
> Hi everyone.
> 
> If I specify four points, create lines to make a square, define a plane 
> surface then extrude that surface to form a cube, then rotate that cube.  
> meshing fails.  Can someone please tell me how to rotate my cube and mesh it 
> okay please? :)
> 
> Best regards,
> 
> Mark.
> 
> Point(1) = {2.6, -0.2, 0, 1.0};
> Point(2) = {2.6, 0.3, 0, 1.0};
> Point(3) = {3.1, 0.3, 0, 1.0};
> Point(4) = {3.1, -0.2, 0, 1.0};
> Line(1) = {2, 3};
> Line(2) = {3, 4};
> Line(3) = {4, 1};
> Line(4) = {1, 2};
> Line Loop(1) = {1, 2, 3, 4};
> Plane Surface(1) = {1};
> 
> Extrude {0, 0, 1} {
>   Surface{1}; Layers{5}; Recombine;
> }
> 
> // Okay to here.  Mesh is valid.  Cube mesh generated.
> 
> Rotate {{0, 1, 0}, {0, 0, 0}, Pi/4} {
>   Point{6}; Point{10}; Point{5}; Point{14}; Point{3}; Point{4}; Point{2}; 
> Point{1}; Line{7}; Line{6}; Line{9}; Line{8}; Line{12}; Line{2}; Line{16}; 
> Line{1}; Line{11}; Line{20}; Line{3}; Line{4};
> }
> 
> // Add this line and the mesh fails.  How can I rotate my cube?
> _______
> 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


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


Re: [Gmsh] GMSH and MED compilation in Linux-like environment in Windows

2018-01-22 Thread Christophe Geuzaine


> On 22 Jan 2018, at 11:02, Christophe Trophime 
> <christophe.troph...@lncmi.cnrs.fr> wrote:
> 
> Hi Christophe,
> could you comment about the patches that are required for med in gmsh?
> Are they backport to more recent med release to your knowledge?
> 

I have no idea... I should probably try with the latest stable release of MED 
and see if/where patches are needed for our build machines. I always have 
trouble finding the latest release of MED online: can you point us to the 
archive?

CG

> Best
> C
> 
> Christophe TROPHIME 
> Research Engineer 
> 
> CNRS - LNCMI 
> 25, rue des Martyrs 
> BP 166 
> 38042 GRENOBLE Cedex 9 
> FRANCE 
> 
> Tel : +33 (0)4 76 88 90 02 
> Fax : +33 (0) 4 76 88 10 01 
> Office U 19 
> M@il : christophe.troph...@lncmi.cnrs.fr
> 
> - Original Message -
>> From: "Christophe Geuzaine" <cgeuza...@uliege.be>
>> To: "jean-pierre ducreux" <themis@gmail.com>
>> Cc: gmsh@onelab.info
>> Sent: Sunday, January 21, 2018 8:20:15 PM
>> Subject: Re: [Gmsh] GMSH and MED compilation in Linux-like environment in 
>> Windows
> 
>> Hi Jean-Pierre,
>> 
>> I've put a copy of the sources we use for the current Windows64 build over 
>> here:
>> 
>> http://gmsh.info/beta/med-3.2.0_patched_for_gmsh.tgz
>> 
>> Hope this helps,
>> 
>> CG
>> 
>>> On 8 Jan 2018, at 15:19, jean-pierre ducreux <themis@gmail.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I've found in a previous mail from Pierre Julliard (September 2015) almost 
>>> the
>>> question I'm facing today. I quote :
>>> 
>>> "I have heard that windows version of GMSH is compiled in Cygwin.
>>> If that is true, and knowing that GMSH is interfaced with MED library
>>> to read MED files, I would like to know how MED library is obtained to
>>> compile GMSH in Cygwin?
>>> 
>>> I guess MED sources are compiled first in a Cygwin environement.
>>> As I am actually trying to do so without success, I would like to know
>>> if MED sources have to be modified?
>>> 
>>> If so, please, could someone indicate me where I could find the
>>> modified MED sources to be able to compile it in a Cygwin environment?
>>> 
>>> ..."
>>> 
>>> 
>>> Christophe answered :
>>> "
>>> The official Gmsh version for Windows is compiled with the MinGW compiler
>>> toolchain (gcc 4.5.3), using a Cygwin shell. I don't quite remember what I 
>>> had
>>> to modify in MED to make it compile... I've put the full archive of the 
>>> sources
>>> I used here: http://geuz.org/gmsh/beta/med-3.0.6_gmsh_win64.tgz;
>>> 
>>> Unfortunately the link is broken.
>>> 
>>> I will use MSYS2 environment with mingw insted of cygwin. I guess that
>>> compilation
>>> options will be fairly the same. Any help to obtain MED library with mingw 
>>> will
>>> be greatly appreciated.
>>> 
>>> I thank you in advance for your help.
>>> Best regards,
>>> 
>>> Jean - Pierre
>>> 
>>> _______
>>> 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
>> 
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
> 
> ___
> 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


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


Re: [Gmsh] Bug: Extrusion with rotation by PI creates flat surface

2018-01-26 Thread Christophe Geuzaine

Dear Daniel,

That's expected with the built-in kernel, which only supports circle arcs < Pi. 

Use the new OpenCASCADE integration for such things: just add 
SetFactory("OpenCASCADE"); at the begining of your file.

Christophe


> On 26 Jan 2018, at 18:31, Daniel Huebner <daniel.hueb...@fau.de> wrote:
> 
> Dear List,
> 
> I am trying to extrude a rectangle with a rotation by PI. However this 
> results in a flat surface instead of half of an cylinder. Please find a 
> minimal .geo example below.
> 
> My Gmsh version is 3.0.5 and I am running on openSUSE Leap 42.2.
> 
> I have tested older Gmsh versions as well: The example is working with Gmsh 
> version 2.8.5, but not with version 2.15.0.
> 
> Best regards
> Daniel
> 
> 
> 
> 
> Point(1) = {.5, 0, 0, 1.};
> Point(2) = {1., 0, 0, 1.};
> Point(3) = {1., 1., 0, 1.};
> Point(4) = {.5, 1., 0, 1.};
> 
> Line(1) = {1, 2};
> Line(2) = {2, 3};
> Line(3) = {3, 4};
> Line(4) = {4, 1};
> 
> Line Loop(1) = {1, 2, 3, 4};
> 
> Plane Surface(1) = {1};
> new_surf[] = Translate {0, 1.5, 0} { Duplicata{ Surface{1}; } };
> 
> // Correct
> Extrude { {0,1,0}, {0,0,0}, Pi*.9 } { Surface{1}; }
> // False
> Extrude { {0,1,0}, {0,0,0}, Pi } { Surface{new_surf[0]}; }
> 
> 
> 
> 
> _______
> 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


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


Re: [Gmsh] Conformal mesh, no tetrahedra in region, BooleanDifference

2018-01-26 Thread Christophe Geuzaine


> On 26 Jan 2018, at 18:49, Loic Thulliez <loicthull...@hotmail.fr> wrote:
> 
> Hello,
> I have not figured out my problem, if someone could look at it, I will 
> greatly appreciate.

With 

  BooleanDifference{ Volume{A}; Delete; }{ Volume{B}; }

you generate a non-conformal geometry: the surface "between" result and B 
(which you don't delete) will be duplicated. You can either merge the two 
surfaces, or, simpler, just do

  BooleanFragments{ Volume{A}; Delete; }{ Volume{B}; Delete; }

which does what you want in one step.

Christophe



> Best,
> 
> Loïc
> De : Loic Thulliez <loicthull...@hotmail.fr>
> Envoyé : vendredi 19 janvier 2018 15:04:53
> À : gmsh@onelab.info
> Objet : Conformal mesh, no tetrahedra in region, BooleanDifference
>  
> Hello all,
> 
> I am trying to create a conformal mesh with two volumes vol1 and vol2, with 
> vol2 in vol1. I use the fonction vol3= BooleanDifference {Volume{vol1}; 
> Delete;}{Volume{vol2};} to create a conformal mesh, since I want to keep the 
> vol2 as it is to apply some boundary conditions to it.
> But when I perform the meshing, the "no tetrahedra in region N°=Volume" 
> occurs for each volume... 
> Sometimes with specific geometry values I succeed to mesh the all things, but 
> it is not satisfactory. If I do vol3= BooleanDifference {Volume{vol1}; 
> Delete;}{Volume{vol2}; Delete;}, it seems to work fine, but in this case the 
> final result is not what I want.
> Do you have any idea from where my problem is? 
> You will find my .geo files in attachement and the file to look at 
> preferentially is "main.geo". 
> 
> Thank you in advance for your help,
> Loïc
> 
> ___
> 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


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


Re: [Gmsh] Extruding a 2D Surface Created in FreeCAD

2018-01-31 Thread Christophe Geuzaine


> On 31 Jan 2018, at 19:39, James Gross  wrote:
> 
> Hi people,
> 
> I am hoping to use Gmsh to create a 2D mesh for OpenFOAM. I've created the 
> original 2D surface in FreeCAD and exported it as a BRep file. 
> 
> When I try to extrude the surface, it doesn't work. There are no error 
> messages, but the surface hasn't been extruded. When I created the geometry 
> in Gmsh, there was no issue with extrusion.
> 
> Here is a shortened version of the script.
> 

Add SetFactory(“OpenCASCADE”) at the beginning of the file.


> Merge "Part.brep";
> 
> Recombine Surface{1};
> 
> out[] = Extrude {0,0,1}
> {
>   Surface {1}; Layers{1}; Recombine;
> };
> 
> Mesh.Smoothing = 100;
> 
> Thanks.
> 
> James 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

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


Re: [Gmsh] Error of meshing result of Gmsh

2018-01-28 Thread Christophe Geuzaine

Dear Jun-yeong,

In Gmsh 3.0.6 the Surface() command duplicates the curves on its boundary, 
which in your model leads to some duplicated 1D meshes (you can check by e.g. 
displaying the line numbers in the gui).

Download the latest automated snapshot: this issue should be resolved. Attached 
is your file, modified to work with the newest builds - everything seems ok.

Christophe


yoon3d_new.geo
Description: Binary data


> On 28 Jan 2018, at 13:30, 허준영 <lion...@gmail.com> wrote:
> 
> Hi, I'm a student in Doctor's degree.
> My main working subjects are geophysical modeling and inversion.
> 
> I made simple '.geo' file and tested, but the meshing results have errors in 
> it.
> My Gmsh version is recent version(3.0.6). I added my '.geo' file and results.
> 'yoon3d_0.8.mesh' is the result of the h=0.8 in '.geo' file and
> 'yoon3d_0.2.mesh' is the result of the h=0.2' in '.geo' file.
> 
> The first error is the overlapped or duplicated vertices.
> For example, the point 84 and 120 are in same positions in 'yoon3d_0.8.mesh'
> And maybe, as the result of the duplicated points, some faces are also 
> intersecting.
> 
> Also, if I set smaller meshes, like 'yoon3d_0.2.mesh', severe errors are 
> occur in 2D meshing already.
> When you take a look at the outer surfaces of the 'yoon3d_0.2.mesh', you can 
> find some surfaces has the triangles which are overlapped badly.
> 
> Are these errors the results of the errors in my '.geo' file that I couldn't 
> catch?
> I can't figure out what's the problem. 
> 
> 
> -- 
> 
> Jun-yeong Heo 
> 
> Master Student 
> 
> Dept.of Energy Systems Engineering, College of Engineering, Seoul National 
> University 
> 
> ADDRESS: 1 Gwanak-ro, Gwanak-gu, Seoul, 151-744, Korea 
> 
> TEL: +82-2-880-7220 // FAX: +82-2-871-8938 // Mobile: +82-10-8386-8009
> _______
> 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

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


Re: [Gmsh] Error of meshing result of Gmsh

2018-01-28 Thread Christophe Geuzaine


> On 28 Jan 2018, at 17:04, Christophe Geuzaine <cgeuza...@uliege.be> wrote:
> 
> 
> Dear Jun-yeong,
> 
> In Gmsh 3.0.6 the Surface() command duplicates the curves on its boundary, 
> which in your model leads to some duplicated 1D meshes (you can check by e.g. 
> displaying the line numbers in the gui).
> 
> Download the latest automated snapshot: this issue should be resolved. 
> Attached is your file, modified to work with the newest builds - everything 
> seems ok.
> 

PS: you can remove the last "Coherence;" in the file; I added it for debugging 
but it is useless (and slows down the model).

> Christophe
> 
> 
>> On 28 Jan 2018, at 13:30, 허준영 <lion...@gmail.com> wrote:
>> 
>> Hi, I'm a student in Doctor's degree.
>> My main working subjects are geophysical modeling and inversion.
>> 
>> I made simple '.geo' file and tested, but the meshing results have errors in 
>> it.
>> My Gmsh version is recent version(3.0.6). I added my '.geo' file and results.
>> 'yoon3d_0.8.mesh' is the result of the h=0.8 in '.geo' file and
>> 'yoon3d_0.2.mesh' is the result of the h=0.2' in '.geo' file.
>> 
>> The first error is the overlapped or duplicated vertices.
>> For example, the point 84 and 120 are in same positions in 'yoon3d_0.8.mesh'
>> And maybe, as the result of the duplicated points, some faces are also 
>> intersecting.
>> 
>> Also, if I set smaller meshes, like 'yoon3d_0.2.mesh', severe errors are 
>> occur in 2D meshing already.
>> When you take a look at the outer surfaces of the 'yoon3d_0.2.mesh', you can 
>> find some surfaces has the triangles which are overlapped badly.
>> 
>> Are these errors the results of the errors in my '.geo' file that I couldn't 
>> catch?
>> I can't figure out what's the problem. 
>> 
>> 
>> -- 
>> 
>> Jun-yeong Heo 
>> 
>> Master Student 
>> 
>> Dept.of Energy Systems Engineering, College of Engineering, Seoul National 
>> University 
>> 
>> ADDRESS: 1 Gwanak-ro, Gwanak-gu, Seoul, 151-744, Korea 
>> 
>> TEL: +82-2-880-7220 // FAX: +82-2-871-8938 // Mobile: +82-10-8386-8009
>> ___
>> 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
> 
> ___
> 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


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


Re: [Gmsh] Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates aditional surfaces

2018-02-07 Thread Christophe Geuzaine


Use the latest automatic snapshot: it contains many improvements w.r.t. 
opencascade.


> On 7 Feb 2018, at 19:26, Jacob Abdelfatah Ndioubnane <jacoba...@outlook.es> 
> wrote:
> 
> Thank you for your answer. I tried your boolean fragments command and gets me 
> in that line the following error:
>  
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'...
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'...
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'...
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'...
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'
> Error   : 'C:\Users\Jacob\Documents\Cube\Cube.geo', line 7 : syntax error (:)
> Error   : 'C:\Users\Jacob\Documents\Cube\Cube.geo', line 7 : syntax error (;)
> Error   : 'C:\Users\Jacob\Documents\Cube\Cube.geo', line 7 : syntax error (})
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'
> Info: Writing 'C:\Users\Jacob\Documents\Cube\cube.log'...
>  
> Instead of that I proved to use BooleanFragments{ Surface{1:6}; Delete; }{ }, 
> but when apply the Surface loop appears 6 more surfaces and the volumen is 
> referenced to them.
>  
> <77EC94B488A34710A037994804FB02A5.png>
>  
> I also tried to use Geometry.OCCAutoFix = 0, and gets me the output:
>  
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'...
> Error   : Unknown number option 'Geometry.OCCAutoFix'
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'...
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'...
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'
> Info: Reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'...
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'
> Info: Done reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'
> Info: Writing 'C:\Users\Jacob\Documents\Cube\Cube2.log'...
>  
> I attach the script what I used to do that.
>  
> Best Regards 
> Jacob
>  
> Enviado desde Correo <https://go.microsoft.com/fwlink/?LinkId=550986> para 
> Windows 10
>  
> De: Christophe Geuzaine <mailto:cgeuza...@uliege.be>
> Enviado: miércoles, 7 de febrero de 2018 17:21
> Para: Jacob Abdelfatah Ndioubnane <mailto:jacoba...@outlook.es>
> CC: Christophe Geuzaine <mailto:cgeuza...@ulg.ac.be>; gmsh@onelab.info 
> <mailto:gmsh@onelab.info>; G. D. McBain <mailto:gdmcb...@protonmail.com>
> Asunto: Re: [Gmsh] Boolean Fragments. Créate 3d mesh from surfaces. Surface 
> Loop creates aditional surfaces
>  
>  
> 
> 
> On 7 Feb 2018, at 09:07, Jacob Abdelfatah Ndioubnane <jacoba...@outlook.es 
> <mailto:jacoba...@outlook.es>> wrote:
>  
> Is thiis would be related to the normals of the surfaces?. I noticed that the 
> normals is oriented outward. So i tried to invert the normals but i cannt 
> find a way to do this.
>  
>  
> This works fine here:
>  
> SetFactory("OpenCASCADE");
> Merge "Inlet.brep";
> Merge "Walls.brep";
> Merge "Outlet.brep";
> BooleanFragments{ Surface{:}; Delete; }{ }
> Surface Loop(1) = {1, 5, 2, 3, 6, 4};
> Volume(1) = {1};
> 
> 
> When the orientation of surfaces is inconsistent open cascade will by default 
> automatically reorient the surfaces; unless you set Geomtry.OCCAutoFix = 0.
>  
> 
> 
> I attach a figure below.
>  
> Best Regards
> Jacob<02951EDB824840E597D871724BDD93AD.png>
>  
> Enviado desde Correo <https://go.microsoft.com/fwlink/?LinkId=550986> para 
> Windows 10
>  
> De: Jacob Abdelfatah Ndioubnane <mailto:jacoba...@outlook.es>
> Enviado: martes, 6 de febrero de 2018 22:36
> Para: Christophe Geuzaine <mailto:cgeuza...@ulg.ac.be>; gmsh@onelab.info 
> <mailto:gmsh@onelab.info>; gmsh-ow...@onelab.info 
> <mailto:gmsh-ow...@onelab.info>; gmsh-requ...@ace20.montefiore.ulg.ac.be 
> <mailto:gmsh-requ...@ace20.montefiore.ulg.ac.be>; G. D. McBain 
> <mailto:gdmcb...@protonmail.com>
> Asunto: Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates 
> aditional surfaces
>  
> Hi gmsh users:
>  
> I’m trying to créate a 3d mesh of a cube from a merged 3d surfaces to apply 
> physical groups easily. I applied the booleanFragments operator, and it 
> removes the aditional edges and vértices. However, when I créate a Surface 
> loop, automatically generates aditional surfaces(when i go to 
> tools;vissibility;tree appears 12 surfaces) it 

Re: [Gmsh] Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates aditional surfaces

2018-02-07 Thread Christophe Geuzaine


> On 7 Feb 2018, at 09:07, Jacob Abdelfatah Ndioubnane <jacoba...@outlook.es> 
> wrote:
> 
> Is thiis would be related to the normals of the surfaces?. I noticed that the 
> normals is oriented outward. So i tried to invert the normals but i cannt 
> find a way to do this.
>  

This works fine here:

SetFactory("OpenCASCADE");
Merge "Inlet.brep";
Merge "Walls.brep";
Merge "Outlet.brep";
BooleanFragments{ Surface{:}; Delete; }{ }
Surface Loop(1) = {1, 5, 2, 3, 6, 4};
Volume(1) = {1};

When the orientation of surfaces is inconsistent open cascade will by default 
automatically reorient the surfaces; unless you set Geomtry.OCCAutoFix = 0.


> I attach a figure below.
>  
> Best Regards
> Jacob<02951EDB824840E597D871724BDD93AD.png>
>  
> Enviado desde Correo <https://go.microsoft.com/fwlink/?LinkId=550986> para 
> Windows 10
>  
> De: Jacob Abdelfatah Ndioubnane <mailto:jacoba...@outlook.es>
> Enviado: martes, 6 de febrero de 2018 22:36
> Para: Christophe Geuzaine <mailto:cgeuza...@ulg.ac.be>; gmsh@onelab.info 
> <mailto:gmsh@onelab.info>; gmsh-ow...@onelab.info 
> <mailto:gmsh-ow...@onelab.info>; gmsh-requ...@ace20.montefiore.ulg.ac.be 
> <mailto:gmsh-requ...@ace20.montefiore.ulg.ac.be>; G. D. McBain 
> <mailto:gdmcb...@protonmail.com>
> Asunto: Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates 
> aditional surfaces
>  
> Hi gmsh users:
>  
> I’m trying to créate a 3d mesh of a cube from a merged 3d surfaces to apply 
> physical groups easily. I applied the booleanFragments operator, and it 
> removes the aditional edges and vértices. However, when I créate a Surface 
> loop, automatically generates aditional surfaces(when i go to 
> tools;vissibility;tree appears 12 surfaces) it creates a , and the volume is 
> referenced to the dupplicate surfaces. Im able to créate both 2d and 3d 
> meses, but when i export into freefem as .mesh or .msh is not loaded 
> correctly. Is there any way to solve this problem.  I attach the .geo script 
> below and also the .brep surfaces and the generated .mesh and .msh meses.
>  
> // Gmsh project created on Tue Feb 06 20:13:28 2018
> SetFactory("OpenCASCADE");
>  
> Merge "Inlet.brep";
> Merge "Walls.brep";
> Merge "Outlet.brep";
>  
> s() = Surface "*";
> BooleanFragments{ Surface{s(0)}; Delete; }{ Surface{s({0:#s()-1})}; Delete; 
> }//+
>  
>  
>  
>  
> //+
> Surface Loop(1) = {1, 5, 2, 3, 6, 4};
>  
> Volume(1) = {1};
>  
> Thank you very much in advance.
>  
> Best Regards 
> Jacob
>  
> Enviado desde Correo <https://go.microsoft.com/fwlink/?LinkId=550986> para 
> Windows 10
>  
>  
> ___
> 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

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


Re: [Gmsh] Non constant element sizes on a BSpline

2018-02-07 Thread Christophe Geuzaine


> On 7 Feb 2018, at 09:42, Dorian Depriester <dorian@gmail.com> wrote:
> 
> Hello dear Gmsh users,
>   I would like to mesh a BSpline using non constant element sizes. Here is a 
> MWE:
> 
> Point(1) = {0  , 0  , 0, 0.2};
> Point(2) = {-0.1, 0.5, 0, 0.2};
> Point(3) = {-0.1, 0.8, 0, 0.1};
> Point(4) = {0  , 1  , 0, 0.1};
> Point(5) = {1  , 1  , 0, 0.2};
> Point(6) = {1  , 0  , 0, 0.2};
> BSpline(1) = {1, 2, 3, 4, 5, 6};
> 
> Line(2) = {6, 1};
> Line Loop(1) = {1, 2};
> Plane Surface(1) = {1};
> Mesh 2;
> 
> With the aforementioned code, Gmsh just linearly interpolates from 0.2 to 0.2 
> between Point 1 and Point 6, resulting in constant size along the BSpline. 
> Yet, I would like to get an element size of 0.1 near points 2 and 3.
> 
> Any help would be highly appreciated!
> 
> 
> Note: actually, I would like to control the mesh size depending on the local 
> curvature (Mesh.CharacteristicLengthFromCurvature). Alas, it appears this 
> option does not work (yet?) on BSplines (Gmsh crashes when I try to mesh 
> using this option).

Try the latest version (“automated snapshot”). This works fine here, with both 
the built-in and open cascade kernels, and allows to control the number of 
points based on the curvature (using as reference the number of points on a 
circle):

// SetFactory("OpenCASCADE");
Point(1) = {0  , 0  , 0, 0.2};
Point(2) = {-0.1, 0.5, 0, 0.2};
Point(3) = {-1, 0.8, 0, 0.2};
Point(4) = {0  , 1  , 0, 0.2};
Point(5) = {1  , 1  , 0, 0.2};
Point(6) = {1  , 0  , 0, 0.2};
Spline(1) = {1, 2, 3, 4, 5, 6};
//BSpline(1) = {1, 2, 3, 4, 5, 6};

Line(2) = {6, 1};
Line Loop(1) = {1, 2};
Plane Surface(1) = {1};
Mesh.CharacteristicLengthFromCurvature = 1;
Mesh.MinimumCirclePoints = 50; // points per 2*pi




> Thus, I have computed the local curvature by my own (using Matlab), but I am 
> stuck on the above issue.
> 
> Best regards.
> _______
> 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

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


Re: [Gmsh] how to specifically determine mesh size from imported STEP or BREP File ?

2018-02-07 Thread Christophe Geuzaine


> On 6 Feb 2018, at 11:38, Benedikt Oswald <benedikt.oswald@lspr.swiss> wrote:
> 
> Dear gmsh
> 
> I create geometries in FreeCAD; I export them either in STEP or BREP format.
> 
> Then I import them into gmsh for meshing.
> 
> However, gmsh (3.0.7, current daily snapshot) has a tendency to not
> resolve smooth rounded geometry in this case.
> 
> Is there an elegant way to teach gmsh how to resolve which portions of
> the STEP/BREP
> 
> geometry ?

You can either do it by hand, by explicitly assigning mesh sizes to points (or 
by using fields) - see e.g. 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/baffles.geo

You could also refine automatically depending on curvature (it’s a bit slow in 
the current implementation, but has the advantage of being more automatic):

Merge "ring-rev-100.brep";
Physical Volume(100) = {1};// volume ring
Physical Volume(200) = {2};// air volume
Physical Surface(1000) = {7};// outer truncation boundary
Mesh.CharacteristicLengthMin = 10;
Mesh.CharacteristicLengthMax = 100;
Mesh.CharacteristicLengthFromCurvature = 1;
Mesh.MinimumCirclePoints = 20; // points per 2*pi



> 
> I use an intermediate file such as ring-rev-100-aux.geo with this contents:
> 
> Merge "ring-rev-100.brep";
> Physical Volume(100) = {1};// volume ring
> Physical Volume(200) = {2};// air volume
> Physical Surface(1000) = {7};// outer truncation boundary
> 
> to assign physical tags to volumes & surface ?
> 
> Greetings & thanks, Benedikt
> 
> 
> 
> 
> --
> Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone +41 43 366 
> 90 74
> Grubenstrasse 9, CH-8045 Zürich, benedikt.oswald@lspr.swiss
> --
> 
> ___
> 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

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


Re: [Gmsh] embedded surface not meshed ?

2018-02-12 Thread Christophe Geuzaine


> On 12 Feb 2018, at 21:01, Winfried Boxleitner <winfried.boxleit...@ait.ac.at> 
> wrote:
> 
> dear gmsh developers,
> when running the tutorial file: t15.geo, the embedded surface defined
> with "Surface{s} In Volume{1};" is not included in the 3D mesh; only
> the 2D mesh is determined correctly.
> 
> I used this feature some years ago, and at that time it worked as
> expected.
> 
> what is missing now ?
> 

Make sure you use the 3D Delaunay algorithm (not 3D Frontal, which does not 
handle embedded entities or complex size fields).


> I'm ruinning an up2date version (git pull at: Mon Feb 12 10:10:16 CET 2018)
> Version  : 3.0.7
> Build OS : Linux64
> Build date   : 20180212
> Build host   : gandalf
> Build options: 64Bit Ann Bamg Bfgs Blas(ATLAS) Blossom Cairo DIntegration 
> Dlopen Fltk GMP Jpeg Kbipack Lapack(ATLAS) LinuxJoystick MPI MUMPS MathEx 
> Mesh Metis Mmg3d Mpeg NativeFileChooser Netgen ONELAB ONELABMetamodel 
> OpenCASCADE OpenGL OptHom PETSc Parser Plugins Png Poppler Post SLEPc Solver 
> TetGen/BR Voro++ Zlib
> FLTK version : 1.3.4
> PETSc version: 3.7.5 (real arithmtic)
> OCC version  : 7.1.0
> 
> regards,
> winfried
> 
>  __
> /
> | WINFRIED BOXLEITNER
> | Scientist
> | Security & Communication Technologies
> | Center for Digital Safety & Security
> |
> | AIT Austrian Institute of Technology GmbH
> | Donau-City-Straße 1 | 1220 Vienna | Austria
> | T +43 50550-4164 | M +43 664 8251061 | F +43 50550-4190
> | winfried.boxleit...@ait.ac.at | www.ait.ac.at
> |
> | FN: 115980 i HG Wien | UID: ATU14703506
> | www.ait.ac.at/Email-Disclaimer
> \_________
> 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

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


Re: [Gmsh] refine existing mesh

2018-02-12 Thread Christophe Geuzaine


> On 12 Feb 2018, at 15:42, Juan E. Sanchez <juan.e.sanc...@gmail.com> wrote:
> 
> Hello,
> 
> Unfortunately, I do not have the geometrical description.  Is there a way to 
> convert the mesh to a geometrical description?
> 

No ; we are working on a new implementation of our “reparametrization” 
algorithm, which will allow you to do some of this, but it’s not ready yet...


> Regards,
> 
> Juan
> 
> On 2/12/18 1:21 AM, Christophe Geuzaine wrote:
>>> On 10 Feb 2018, at 22:06, Juan E. Sanchez <juan.e.sanc...@gmail.com 
>>> <mailto:juan.e.sanc...@gmail.com>> wrote:
>>> 
>>> Hello,
>>> 
>>> I have an existing msh file, and a pos file containing a background mesh.  
>>> Is there a script example showing how to use these files to create a 
>>> refined mesh using the background field?
>>> 
>> Start from the geometrical description (not the mesh): this way Gmsh will be 
>> able to place the new vertices correctly, i.e. on the CAD
>> gmsh -3 test.geo -bgm test.pos
>> CG
>>> Using
>>> 
>>> gmsh -3 test.msh -bgm test.pos
>>> 
>>> results in a mesh where there is the same number of nodes and elements, but 
>>> it appears that the physical entity number is lost:
>>> 
>>> last element in original file:
>>> 
>>> 36210 4 3 15 15 0 5786 5791 5792 5800
>>> 
>>> last element in new file:
>>> 
>>> 36210 4 2 0 15 2603 5822 2604 2605
>>> 
>>> Now all of the mesh elements belong to the same physical entity, 0.
>>> 
>>> If I perform a "refine by splitting" in the gui, the physical entity 
>>> information is maintained:
>>> 
>>> 266256 4 2 15 15 42825 10009 41452 9710
>>> 
>>> The file is a 3d tetrahedral mesh, and it also contains triangular surfaces 
>>> to impose boundary conditions.
>>> 
>>> Regards,
>>> 
>>> Juan
>>> 
>>> 
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info <mailto: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
> 
> 
> ___
> 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

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


Re: [Gmsh] error: Cannot bind multiple faces to single tag

2018-02-12 Thread Christophe Geuzaine


> On 12 Feb 2018, at 20:16, Sathyanarayan Rao <sathyanarayan@uclouvain.be> 
> wrote:
> 
> Dear Gmsh team,
> 
> I am following the same syntax as 
> https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/boolean.geo 
> <https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/boolean.geo>
> 
> for generating boolean unioun of surfaces. But however it gives me error as 
> in the subject line. Can you please
>  help me to correctly combine surfaces 1:3 into one surface by a boolean 
> unioun ?
> 

You can only use the declarative syntax

  BooleanUnion(7) = { Surface {1}; Delete; }{ Surface {2:3}; Delete; };

If the operation results in the creation of a single shape. If not, use

 BooleanUnion { Surface {1}; Delete; }{ Surface {2:3}; Delete; }

or

 out() = BooleanUnion { Surface {1}; Delete; }{ Surface {2:3}; Delete; };

If you need the result.


> SetFactory("OpenCASCADE");
> 
> // mesh size description
> 
> cl_1   =  5;
> cl_2   =  0.01;
> 
> Geometry.NumSubEdges = 100; // nicer display of curve
> 
> var1 = 0.02; 
> var2 = 0.1;
> 
> 
> // Define Segment coordinates
> 
> X1 
> ={0,0.000811,0.001097,0.001233,0.00129,0.001325,0.001335,0.001343,0.001346,0.001347,0.001348,0.001348,0.001349,0.001349,0.001349,0.001349,0.001349,0.001349,0.001349,0.0013487};
> Y1 
> ={0,-2.4,-4,-5.6,-7.2,-8.8,-10.4,-12,-13.6,-15.2,-16.8,-18.4,-20,-21.6,-23.2,-24.8,-26.4,-28,-28.96,-29.118};
> 
> Point(newp)  ={X1[1], Y1[1], 0, cl_2};
> 
> // Line 1
> Extrude {var1, var1, 0} {
>   Point{newp-1}; 
> }
> 
> // Line 2
> Extrude {var2, var2, 0} {
>   Point{newp-1}; 
> }
> 
> // Line 3
> Extrude {var1, var1, 0} {
>   Point{newp-1}; 
> }
> 
> 
> // Define 1 segment
> 
> l0 = newl;
> l  = l0;
> nR = #X1[];
> p0  =  newp;
> p   =  p0;
> For i In {0:nR-1}
> Point(newp)  ={X1[i], Y1[i], 0, cl_2};
> EndFor
> p2  =  newp-1;
> Spline(l0)   =  {p:p2};
> 
> Wire(l0) = {l0};
> Extrude { Line{l0-3}; } Using Wire {l0}   //left
> Extrude { Line{l0-2}; } Using Wire {l0}   // center
> Extrude { Line{l0-1}; } Using Wire {l0}   // right
> 
> BooleanUnion(7) = { Surface {1}; Delete; }{ Surface {2:3}; Delete; };
> 
> 
> 
> 
> 
> Best Regards,
> 
> Sathyanarayan Rao, PhD student
> Earth and Life Institute/Environmental Sciences (ELI-e)
> Université catholique de Louvain
> c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
> Phone: 010473827 ( intercom 73827)
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] Issues with gmsh GUI after updating to 3.0.7

2018-02-12 Thread Christophe Geuzaine


> On 12 Feb 2018, at 11:47, James Gross <jgross0...@gmail.com> wrote:
> 
> Hi,
> 
> It had been suggested to me update my gmsh to the latest snapshot in order to 
> fix a problem I was having with boundary layers.
> 
> Fortunately, after updating the problem was fixed. Unfortunately, after I 
> updated I was unable to use the gmsh GUI. Now every time I call gmsh at 
> command line, I am presented with all the command line options. Furthermore, 
> if I attempt to use command line to open a geo file, I am presented with the 
> standard info:
> 

You probably compiled Gmsh without GUI, i.e. without FLTK...


> Info: Running 'gmsh ../Gmsh/Cases/FreeCAD2D/Impeller.geo' [Gmsh 3.0.7, 1 
> node, max. 1 thread]
> Info: Started on Mon Feb 12 00:45:50 2018
> Info: Reading '../Gmsh/Cases/FreeCAD2D/Impeller.geo'...
> Info: Reading '../Gmsh/Cases/FreeCAD2D/Impeller.brep'...
> Info: Done reading '../Gmsh/Cases/FreeCAD2D/Impeller.brep'
> Info: Done reading '../Gmsh/Cases/FreeCAD2D/Impeller.geo'
> 
> However, I am also presented with two extra lines:
> Info: Stopped on Mon Feb 12 00:45:50 2018
> Info: No current model available: creating one
>  
> As a note, I enabled Python wrappers in the new build, however I do not think 
> this would cause an issue with the GUI. 
> 
> I am using Ubuntu 16.04. After a little research, I saw that some Mac users 
> have had issues with using the GUI in the past, but I couldn't find anything 
> similar for Linux users.
> 
> I still have the older version (3.0.6) in my /usr/bin/ directory so I was 
> able to make a temporary workaround by creating an alias that allowed me to 
> call the older version to use the GUI. However it would be greatly preferred 
> to be able to call the GUI with the same command as with other operations.
> 
> Any ideas as to what the issue could be?
> 
> Thanks,
> James
> ___
> 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

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


Re: [Gmsh] stl with double precision

2018-02-11 Thread Christophe Geuzaine


> On 9 Feb 2018, at 03:40, Savio Poovathingal <poova...@umn.edu> wrote:
> 
> Hello, 
> 
> I am using gmsh to generate a 2d grid on a surface and output in stl format 
> with double precision.

You’ll need to hack the code (GmshIO_STL.cpp), as the STL spec specifies single 
precision. See e.g. https://en.wikipedia.org/wiki/STL_(file_format)



> I cannot find a way to do this. I am sure it's a simple hack but I have not 
> been able to figure it out. I need double precision because the solver I use 
> needs triangle info with double precision. Unfortunately, with single 
> precision, flow is "leaking" into the surface because it is not watertight. 
> 
> Any help is appreciated. 
> 
> Thanks, 
> Savio
> 
> -- 
> Savio James Poovathingal
> Postdoctoral Research Scholar
> Molecular Beam Lab
> Department of Chemistry and Biochemistry
> Montana State University
> Bozeman
> Montana, USA 59717.
> ___
> 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

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


Re: [Gmsh] refine existing mesh

2018-02-11 Thread Christophe Geuzaine


> On 10 Feb 2018, at 22:06, Juan E. Sanchez <juan.e.sanc...@gmail.com> wrote:
> 
> Hello,
> 
> I have an existing msh file, and a pos file containing a background mesh.  Is 
> there a script example showing how to use these files to create a refined 
> mesh using the background field?
> 

Start from the geometrical description (not the mesh): this way Gmsh will be 
able to place the new vertices correctly, i.e. on the CAD

gmsh -3 test.geo -bgm test.pos

CG

> Using
> 
> gmsh -3 test.msh -bgm test.pos
> 
> results in a mesh where there is the same number of nodes and elements, but 
> it appears that the physical entity number is lost:
> 
> last element in original file:
> 
> 36210 4 3 15 15 0 5786 5791 5792 5800
> 
> last element in new file:
> 
> 36210 4 2 0 15 2603 5822 2604 2605
> 
> Now all of the mesh elements belong to the same physical entity, 0.
> 
> If I perform a "refine by splitting" in the gui, the physical entity 
> information is maintained:
> 
> 266256 4 2 15 15 42825 10009 41452 9710
> 
> The file is a 3d tetrahedral mesh, and it also contains triangular surfaces 
> to impose boundary conditions.
> 
> Regards,
> 
> Juan
> 
> 
> _______
> 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

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


Re: [Gmsh] Definition fan in BL

2018-02-10 Thread Christophe Geuzaine


> On 9 Feb 2018, at 11:47, Alberto <d039...@polito.it> wrote:
> 
> Dear Gmsh-list,
> 
> Does it exist a parameter to define the number of part to divide the fan 
> angle in the boundary layer? 
> Because it seems that is split always in 5 parts, indipendently of the angle.

Can you try the latest snapshot? The option Mesh.BoundaryLayerFanPoints now 
allows you to specify the number of fan points per PI radians.

Christophe

> 
> 
> Thank you!
> 
> Alberto
> 
> ___
> 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

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


Re: [Gmsh] Error: Unknown Open Cascade entity. Could not apply Boolean operator

2018-02-17 Thread Christophe Geuzaine
Your indices are wrong - see corrected file. You should probably treat the boundaries differently though.

aa.geo
Description: Binary data
On 16 Feb 2018, at 20:01, Sathyanarayan Rao  wrote:Dear Gmsh team,I am using a booleanunion to combine two plane surfaces generated by spline functions.If I set factory to open cascade at beginning of code, then I cannot use Bspline but if I useit after I define all my spline function, the booleanunion doesn't recognize the surfaces created before.Can you please tell me a work around ? How do I combine these surfaces as one single surface ?// mesh size descriptioncl_1   =  2;cl_2   =  1;// boundary points that forms RhizotronPoint(1) = {-5, -10, 0, cl_1};Point(2) = {5, -10, 0, cl_1};Point(3) = {5, 0, 0, cl_1};Point(4) = {-5, 0, 0, cl_1};// lines that connect boundaryLine(1) = {1, 2};Line(2) = {3, 2};Line(3) = {4, 3};Line(4) = {1, 4};Line Loop(4) = {1, -2, -3, -4};// Mesh ParametersMesh.CharacteristicLengthExtendFromBoundary = 0;Mesh.CharacteristicLengthMax = 2;// no. of spline surfaces = 2X1 ={0,0,-0.184,-0.676,-0.7729,-0.8773,-0.9599,-1.194,-1.315,-1.526,-1.599,-1.679,-1.817,-2.236,-2.705,-2.963,-3.165,-3.365,-3.41,-3.499,-3.567,-3.674,-3.767,-3.864,-4.079,-4.152,-4.176,-4.175,-4.253,-4.349,-4.412,-4.455,-4.512,-4.568,-4.606,-4.641,-4.5433,-4.5083,-4.4747,-4.4217,-4.3628,-4.321,-4.2627,-4.1616,-4.0764,-4.0762,-4.0552,-3.991,-3.7831,-3.6828,-3.5911,-3.4828,-3.404,-3.3124,-3.2721,-3.0845,-2.8959,-2.6369,-2.1671,-1.7449,-1.5997,-1.52,-1.4572,-1.2531,-1.1354,-0.89561,-0.80161,-0.69478,-0.61953,-0.13723,0.088029,0.1,0};Y1 ={0,-0.2636,-0.3414,-0.6213,-0.7443,-0.8732,-0.9609,-1.139,-1.218,-1.401,-1.487,-1.598,-1.771,-2.177,-2.615,-2.853,-3.031,-3.398,-3.648,-4.004,-4.126,-4.277,-4.422,-4.574,-4.851,-5.108,-5.228,-5.457,-5.685,-5.848,-5.957,-6.081,-6.195,-6.319,-6.439,-6.654,-6.6753,-6.4603,-6.3549,-6.2379,-6.1197,-5.9984,-5.8985,-5.7257,-5.4736,-5.2346,-5.1329,-4.8985,-4.6328,-4.4759,-4.333,-4.18,-4.0352,-3.6696,-3.4349,-3.0904,-2.9272,-2.6882,-2.2495,-1.8403,-1.6589,-1.5483,-1.4736,-1.2965,-1.22,-1.0375,-0.93855,-0.80673,-0.70383,-0.42979,-0.31104,1.837e-17,0};// Define spline surfacesLN = 91;nR = #X1[ ];p0  =  newp;p   =  p0;For i In {0:nR-1}Point(newp)  =    {X1[i], Y1[i], 0, cl_2};EndForp2  =  newp-1;Spline(91)   =  {p:p2,p};Line Loop(91) = {91};Plane Surface(91) = {91};X2 ={0,0.6623,1.159,1.524,1.654,1.793,1.786,1.82,1.918,2.473,2.551,2.74,2.804,2.827,2.925,2.902,2.8353,2.6431,2.5577,2.0007,1.9187,1.8859,1.8922,1.7531,1.6208,1.248,0.74707,0.084771,0};Y2 ={-0.2636,-1.322,-2.116,-3,-4.022,-4.975,-5.054,-5.729,-5.859,-6.69,-6.869,-7.322,-7.666,-7.748,-7.728,-7.646,-7.2917,-6.8301,-6.6369,-5.8028,-5.7128,-5.0504,-4.9623,-4.0085,-2.9749,-2.0703,-1.269,-0.21055,-0.2636};// Define spline surfacesLN = 92;nR = #X2[ ];p0  =  newp;p   =  p0;For i In {0:nR-1}Point(newp)  =    {X2[i], Y2[i], 0, cl_2};EndForp2  =  newp-1;Spline(92)   =  {p:p2,p};Line Loop(92) = {92};Plane Surface(92) = {92};SetFactory("OpenCASCADE");aa() = BooleanUnion{ Surface {91}; Delete; }{ Surface {92}; Delete; };Physical Surface(1) = {aa()};Best Regards,Sathyanarayan Rao, PhD studentEarth and Life Institute/Environmental Sciences (ELI-e)Université catholique de Louvainc.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
Phone: 010473827 ( intercom 73827)___gmsh mailing listgmsh@onelab.infohttp://onelab.info/mailman/listinfo/gmsh
— Prof. Christophe GeuzaineUniversity of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaineFree software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] Error: Unknown Open Cascade entity. Could not apply Boolean operator

2018-02-17 Thread Christophe Geuzaine


> On 17 Feb 2018, at 12:18, Sathyanarayan Rao <sathyanarayan@uclouvain.be> 
> wrote:
> 
> Hi Christophe,
> 
> when I run your corrected file, I still get :
> 

Which version of Gmsh? The corrected file works with the latest automated 
snapshot.

> 
> Error   : Could not create spline
> Error   : 'Ex3.geo', line 41 : Could not add spline
> Error   : Unknown OpenCASCADE edge with tag 91
> Error   : 'Ex3.geo', line 42 : Could not add line loop
> Error   : Unknown OpenCASCADE line loop with tag 91
> Error   : 'Ex3.geo', line 43 : Could not add plane surface
> Error   : Could not create spline
> Error   : 'Ex3.geo', line 56 : Could not add spline
> Error   : Unknown OpenCASCADE edge with tag 92
> Error   : 'Ex3.geo', line 57 : Could not add line loop
> Error   : Unknown OpenCASCADE line loop with tag 92
> Error   : 'Ex3.geo', line 58 : Could not add plane surface
> Error   : Unknown OpenCASCADE entity of dimension 2 with tag 91
> Error   : 'Ex3.geo', line 60 : Could not apply boolean operator
> 
> 
> Please let me know ?
> 
> Best Regards,
> 
> Sathyanarayan Rao, PhD student
> Earth and Life Institute/Environmental Sciences (ELI-e)
> Université catholique de Louvain
> c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
> Phone: 010473827 ( intercom 73827)
> From: Christophe Geuzaine <cgeuza...@uliege.be>
> Sent: 17 February 2018 11:24:43
> To: Sathyanarayan Rao
> Cc: gmsh@onelab.info; Mathieu Javaux
> Subject: Re: [Gmsh] Error: Unknown Open Cascade entity. Could not apply 
> Boolean operator
>  
> 
> Your indices are wrong - see corrected file. You should probably treat the 
> boundaries differently though.
> 
> 
> 
>> On 16 Feb 2018, at 20:01, Sathyanarayan Rao <sathyanarayan@uclouvain.be 
>> <mailto:sathyanarayan@uclouvain.be>> wrote:
>> 
>> Dear Gmsh team,
>> 
>> I am using a booleanunion to combine two plane surfaces generated by spline 
>> functions.
>> 
>> If I set factory to open cascade at beginning of code, then I cannot use 
>> Bspline but if I use
>> it after I define all my spline function, the booleanunion doesn't recognize 
>> the surfaces created before.
>> 
>> Can you please tell me a work around ? How do I combine these surfaces as 
>> one single surface ?
>> 
>> // mesh size description
>> 
>> cl_1   =  2;
>> cl_2   =  1;
>> 
>> // boundary points that forms Rhizotron
>> Point(1) = {-5, -10, 0, cl_1};
>> Point(2) = {5, -10, 0, cl_1};
>> Point(3) = {5, 0, 0, cl_1};
>> Point(4) = {-5, 0, 0, cl_1};
>> 
>> 
>> // lines that connect boundary
>> Line(1) = {1, 2};
>> Line(2) = {3, 2};
>> Line(3) = {4, 3};
>> Line(4) = {1, 4};
>> Line Loop(4) = {1, -2, -3, -4};
>> 
>> // Mesh Parameters
>> Mesh.CharacteristicLengthExtendFromBoundary = 0;
>> Mesh.CharacteristicLengthMax = 2;
>> 
>> 
>> // no. of spline surfaces = 2
>> 
>> X1 
>> ={0,0,-0.184,-0.676,-0.7729,-0.8773,-0.9599,-1.194,-1.315,-1.526,-1.599,-1.679,-1.817,-2.236,-2.705,-2.963,-3.165,-3.365,-3.41,-3.499,-3.567,-3.674,-3.767,-3.864,-4.079,-4.152,-4.176,-4.175,-4.253,-4.349,-4.412,-4.455,-4.512,-4.568,-4.606,-4.641,-4.5433,-4.5083,-4.4747,-4.4217,-4.3628,-4.321,-4.2627,-4.1616,-4.0764,-4.0762,-4.0552,-3.991,-3.7831,-3.6828,-3.5911,-3.4828,-3.404,-3.3124,-3.2721,-3.0845,-2.8959,-2.6369,-2.1671,-1.7449,-1.5997,-1.52,-1.4572,-1.2531,-1.1354,-0.89561,-0.80161,-0.69478,-0.61953,-0.13723,0.088029,0.1,0};
>> Y1 
>> ={0,-0.2636,-0.3414,-0.6213,-0.7443,-0.8732,-0.9609,-1.139,-1.218,-1.401,-1.487,-1.598,-1.771,-2.177,-2.615,-2.853,-3.031,-3.398,-3.648,-4.004,-4.126,-4.277,-4.422,-4.574,-4.851,-5.108,-5.228,-5.457,-5.685,-5.848,-5.957,-6.081,-6.195,-6.319,-6.439,-6.654,-6.6753,-6.4603,-6.3549,-6.2379,-6.1197,-5.9984,-5.8985,-5.7257,-5.4736,-5.2346,-5.1329,-4.8985,-4.6328,-4.4759,-4.333,-4.18,-4.0352,-3.6696,-3.4349,-3.0904,-2.9272,-2.6882,-2.2495,-1.8403,-1.6589,-1.5483,-1.4736,-1.2965,-1.22,-1.0375,-0.93855,-0.80673,-0.70383,-0.42979,-0.31104,1.837e-17,0};
>> 
>> 
>> // Define spline surfaces
>> 
>> LN = 91;
>> nR = #X1[ ];
>> p0  =  newp;
>> p   =  p0;
>> For i In {0:nR-1}
>> Point(newp)  ={X1[i], Y1[i], 0, cl_2};
>> EndFor
>> p2  =  newp-1;
>> Spline(91)   =  {p:p2,p};
>> Line Loop(91) = {91};
>> Plane Surface(91) = {91};
>> 
>> X2 
>> ={0,0.6623,1.159,1.524,1.654,1.793,1.786,1.82,1.918,2.473,2.551,2.74,2.804,2.827,2.925,2.902,2.8353,2.6431,2.5577,2.0007,1.9187,1.8859,1.8922,1.7531,1.6208,1.248,0.74707,0.084771,0};
>> Y2 
>> ={-0.2636,-1.322,-2.116,-3,-4.022,-4.975,-5.054,-5.729,-5.859,-6

Re: [Gmsh] Mesh volumes partially in contact

2018-02-17 Thread Christophe Geuzaine


> On 17 Feb 2018, at 11:37, Harry Bosch <naufragosdelci...@yahoo.es> wrote:
> 
> I am using Gmsh GUI.
> And I have a problem when meshing volumes that are in contact (being the 
> contact surface of one greater than that of the other). The problem is that 
> in this way the meshes of both volumes do not share all the nodes on the 
> contact surface.
> I believe that this could be done with the cut and merge faces option, which 
> no longer exists in the latest versions.
> I have read that now it must be addressed through Boolean operations. But, on 
> the one hand, I do not want to unite the volumes, since they are going to be 
> of different materials. And on the other hand I do not understand how these 
> operations can be done in the GUI environment.
> May you suggest me how to approach this problem? Is there an example similar 
> to what I mention?

You want to use boolean fragments ; see 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/compsolid.geo 
for an example.


> Thanks in advance for your comments.
> ___
> 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

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


Re: [Gmsh] help in reading element connectivity

2018-02-22 Thread Christophe Geuzaine

PS: there are also some scripts here: 
https://gitlab.onelab.info/gmsh/gmsh/tree/master/utils/converters/matlab

> On 21 Feb 2018, at 19:16, Octavio Castillo Reyes <ocastillore...@gmail.com> 
> wrote:
> 
> Dear Preety, 
> 
> You need to write a Matlab script to import your mesh. This task is quite 
> simple, for instance:
> 
> % Formats
> fstring  = '%s';
> finteger = '%d';
> fnodes   = '%d %f %f %f';
> felems   = '%f %f %f %f %f %f %f %f';
> % Open file
> Idfile = fopen(mesh_file,'r');
> % Read 4 lines (Header)
> n = 4; textscan(Idfile,fstring,n,'Delimiter','\n');
> % Read number of subdomains
> n = 1; input = textscan(Idfile,finteger,n,'Delimiter','\n');
> nsubdomains = input{1}(1);
> % Read 2 + nsubdomains lines
> n = 2 + nsubdomains; textscan(Idfile,fstring,n,'Delimiter','\n');
> % Read number of nodes
> n = 1; input = textscan(Idfile,finteger,n,'Delimiter','\n');
> nNodes = input{1}(1);
> % Read spatial positions of the nodes
> n = nNodes; input = textscan(Idfile,fnodes,n,'Delimiter','\n');
> nodes = transpose(horzcat(input{2},input{3},input{4}));
> % Read 2 lines
> n = 2; input = textscan(Idfile,fstring,n,'Delimiter', '\n');
> % Read number of elements
> n = 1; input = textscan(Idfile,finteger,n,'Delimiter','\n');
> nElems = input{1}(1);
> % Read nodal/elements connectivity
> n = nElems; input = textscan(Idfile,felems,n,'Delimiter','\n');
> elemsN = transpose(horzcat(input{6},input{7},input{8}));
> % Read physical groups
> phy_groups = input{4};
> fclose(Idfile);
> 
> 
> Otherwise, you can use the python parser by José A. Abell 
> (https://github.com/jaabell/gmshtranslator 
> <https://github.com/jaabell/gmshtranslator>)
> 
> Best regards
> 
> O.
> 
> 
> 
> On Wed, Feb 21, 2018 at 5:41 PM, preety...@gmail.com 
> <mailto:preety...@gmail.com> <preety...@gmail.com 
> <mailto:preety...@gmail.com>> wrote:
> Hi,
> I have created a 2D mesh in gmsh but able to understand how it is providing 
> the elements connectivity also if possible provide me help regarding how to 
> read this file in mathlab.
> 
> Thank you
> Preety
> 
> Send from my vivo smart phone
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> http://onelab.info/mailman/listinfo/gmsh 
> <http://onelab.info/mailman/listinfo/gmsh>
> 
> ___
> 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

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


Re: [Gmsh] refine existing mesh

2018-02-22 Thread Christophe Geuzaine


> On 19 Feb 2018, at 08:38, Johannes Töger <johannes.to...@med.lu.se> wrote:
> 
> Dear Christophe,
> 
> The new version of your reparametrization algorithm sounds very interesting 
> for our application. Is it possible for you to tell us a bit more about it?

It's a new implementation of the kinds of methods described in the "Cross-patch 
and STL meshing (Compounds)" reference section on gmsh website (see the bottom 
of the page).

> What will it be capable of, and what is the approximate timeline for it?
> 

It will be in Gmsh 4.0 - hopefully within the next couple of months. Gmsh 4.0 
will bring many new features : a stable C++/C/Python API, a new efficient mesh 
file format (MSH4), a  much faster mesh partitioning interface, improved 
OpenCASCADE integration, ...

Christophe

> 
> — 
> Johannes Töger
> 
> Postdoctoral Research Scholar
> National 7T Facility, Lund Biomedical Imaging Center
> Department of Clinical Sciences Lund, Diagnostic Radiology
> Lund University, Sweden
> 
> On Mon, Feb 12, 2018 at 9:41 PM, Christophe Geuzaine <cgeuza...@uliege.be 
> <mailto:cgeuza...@uliege.be>> wrote:
> 
> 
>> On 12 Feb 2018, at 15:42, Juan E. Sanchez <juan.e.sanc...@gmail.com 
>> <mailto:juan.e.sanc...@gmail.com>> wrote:
>> 
>> Hello,
>> 
>> Unfortunately, I do not have the geometrical description.  Is there a way to 
>> convert the mesh to a geometrical description?
>> 
> 
> No ; we are working on a new implementation of our “reparametrization” 
> algorithm, which will allow you to do some of this, but it’s not ready yet...
> 
> 
>> Regards,
>> 
>> Juan
>> 
>> On 2/12/18 1:21 AM, Christophe Geuzaine wrote:
>>>> On 10 Feb 2018, at 22:06, Juan E. Sanchez <juan.e.sanc...@gmail.com 
>>>> <mailto:juan.e.sanc...@gmail.com> <mailto:juan.e.sanc...@gmail.com 
>>>> <mailto:juan.e.sanc...@gmail.com>>> wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> I have an existing msh file, and a pos file containing a background mesh.  
>>>> Is there a script example showing how to use these files to create a 
>>>> refined mesh using the background field?
>>>> 
>>> Start from the geometrical description (not the mesh): this way Gmsh will 
>>> be able to place the new vertices correctly, i.e. on the CAD
>>> gmsh -3 test.geo -bgm test.pos
>>> CG
>>>> Using
>>>> 
>>>> gmsh -3 test.msh -bgm test.pos
>>>> 
>>>> results in a mesh where there is the same number of nodes and elements, 
>>>> but it appears that the physical entity number is lost:
>>>> 
>>>> last element in original file:
>>>> 
>>>> 36210 4 3 15 15 0 5786 5791 5792 5800
>>>> 
>>>> last element in new file:
>>>> 
>>>> 36210 4 2 0 15 2603 5822 2604 2605
>>>> 
>>>> Now all of the mesh elements belong to the same physical entity, 0.
>>>> 
>>>> If I perform a "refine by splitting" in the gui, the physical entity 
>>>> information is maintained:
>>>> 
>>>> 266256 4 2 15 15 42825 10009 41452 9710
>>>> 
>>>> The file is a 3d tetrahedral mesh, and it also contains triangular 
>>>> surfaces to impose boundary conditions.
>>>> 
>>>> Regards,
>>>> 
>>>> Juan
>>>> 
>>>> 
>>>> ___
>>>> gmsh mailing list
>>>> gmsh@onelab.info <mailto:gmsh@onelab.info> <mailto:gmsh@onelab.info 
>>>> <mailto:gmsh@onelab.info>>
>>>> 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/>
>> 
>> 
>> ___
>> gmsh mailing list
>> gmsh@onelab.info <mailto:gmsh@onelab.info>
>> 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/>
> 
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] "CMAKE" SUCCEEDS but "MAKE" FAILS for GMSH 3.0.7 (and earlier versions) with MinGW compiler toolchain (gcc 6.4.0) using CYGWIN

2018-02-22 Thread Christophe Geuzaine
dll.a (found version "1.6.34")
> -- Found Png
> -- Found Mpeg
> -- Found OpenGL: /usr/lib/libGL.dll.a
> -- Found OpenGL
> -- System ANN not found: using contrib/ANN instead
> -- Found Ann
> -- Found Bfgs
> -- Found DIntegration
> -- Found OptHom
> -- Found Kbipack
> -- Found GMP
> -- Found MathEx
> -- System METIS not found: using contrib/metis instead
> -- Found Metis
> -- Found TetGen/BR
> -- System voro++ not found: using contrib/voro++ instead
> -- Found Voro++
> -- Found Blossom
> -- Found Netgen
> -- Found Bamg
> -- System MMG3D not found: using contrib/mmg3d instead
> -- Found Mmg3d
> -- HDF5: Using hdf5 compiler wrapper to determine C configuration
> -- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
> -- Found HDF5: 
> hdf5_cpp;hdf5;z;dl;m;/usr/lib/libhdf5_cpp.dll.a;HDF5_hdf5_fortran_LIBRARY-NOTFOUND;/usr/lib/libhdf5.dll.a
>  (found version "1.8.20")
> -- System GMM not found: using contrib/gmm instead
> -- Found Gmm
> -- Looking for vsnprintf
> -- Looking for vsnprintf - found
> -- Looking for sys/socket.h
> -- Looking for sys/socket.h - found
> -- Check size of socklen_t
> -- Check size of socklen_t - done
> -- Check size of intptr_t
> -- Check size of intptr_t - done
> -- Looking for dlfcn.h
> -- Looking for dlfcn.h - found
> -- Found Dlopen
> -- Looking for linux/joystick.h
> -- Looking for linux/joystick.h - not found
> -- Performing Test WALL
> -- Performing Test WALL - Success
> -- Performing Test WCAST
> -- Performing Test WCAST - Failed
> -- Performing Test WDEPREC
> -- Performing Test WDEPREC - Success
> -- Performing Test WIND
> -- Performing Test WIND - Success
> -- Performing Test NOWARN
> -- Performing Test NOWARN - Success
> -- Performing Test NOOPT
> -- Performing Test NOOPT - Success
> --
> -- Gmsh 3.0.7 has been configured for Windows64
> --
> --  * Build options: 64Bit Ann Bamg Bfgs Blas Blossom DIntegration Dlopen 
> Fltk GMP Gmm Jpeg Kbipack Lapack MathEx Mesh Metis Mmg3d Mpeg 
> NativeFileChooser Netgen ONELAB ONELABMetamodel OpenGL OptHom Parser Plugins 
> Png Post Solver TetGen/BR Voro++ Zlib
> --  * Build type: RelWithDebInfo
> --  * C compiler: /usr/bin/cc
> --  * C++ compiler: /usr/bin/c++.exe
> --  * Install prefix: /usr/local
> --
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /cygdrive/c/gmsh/build
> 
> Any help would be much appreciated.
> 
> Thanks,
> Joh
> 
> ___
> 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

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


Re: [Gmsh] Line loop and Open cascade

2018-02-22 Thread Christophe Geuzaine


> On 22 Feb 2018, at 12:56, Sathyanarayan Rao <sathyanarayan@uclouvain.be> 
> wrote:
> 
> Dear gmsh team,
> 
> Is it not possible to use both line loop type surface definition and open 
> cascade rectangle. I always have problem with using both.

Sure you can: but you need to put SetFactory("OpenCASCADE") at the begining of 
your file: otherwise you create the first entities with the built-in CAD kernel 
; and the rest (after SetFactory) with open cascade.


>  
> For example in the below code, surface 105 is unrecognized ! 
> 
> // mesh size description
> 
> cl_1   =  0.3;
> cl_2   =  0.02;
> cl3=  0.02;
> Mesh.CharacteristicLengthMax = 40;
> extend = 15;
> 
> // define inversion region
> 
> Point(1) = {-0.05, 0.005, 0, cl_2};
> Point(2) = {7.25, 0.005, 0, cl_2};
> Point(3) = {7.25, -1.45, 0, cl_2};
> Point(4) = {-0.05, -1.45, 0, cl_2};
> 
> // define bounding box
> 
> Point(5) = {-0.05-extend, 0.005, 0, cl_1};
> Point(6) = {7.25+extend, 0.005, 0, cl_1};
> Point(7) = {7.25+extend, -1.45-extend, 0, cl_1};
> Point(8) = {-0.05-extend, -1.45-extend, 0, cl_1};
> 
> Line(1) = {1, 2};
> Line(2) = {2, 6};
> Line(3) = {6, 7};
> Line(4) = {7, 8};
> Line(5) = {8, 5};
> Line(6) = {5, 1};
> Line(7) = {1, 4};
> Line(8) = {4, 3};
> Line(9) = {3, 2};
> 
> // Definition of regions
> Line Loop(101) = {2, 3, 4, 5, 6, 7, 8, 9};
> Plane Surface(102) = {101}; // Outer box
> Line Loop(105) = {1, -9, -8, -7};
> 
> 
> // geological body
> 
> SetFactory("OpenCASCADE");
> Rectangle(1) = {0.1, -0.2, 0, 0.5, 0.1, 0};
> Rectangle(2) = {0.1, -1.0, 0, 0.3, 0.7, 0};
> Rectangle(3) = {3.1, -0.6, 0, 1, 0.5, 0};
> Rectangle(4) = {4.2, -1.2, 0, 1, 0.5, 0};
> Rectangle(5) = {5.6, -0.9, 0, 1, 0.5, 0};
> Plane Surface(110) = {105,1,2,3,4,5}; // Inner box without geological body
> 
> 
> // Definition of boundaries
> Physical Line(1) = {6, 2, 1}; // Free surface
> Physical Line(2) = {3,4, 5}; // Mixed boundary conditions
> 
> // Definition of physical regions
> Physical Surface(1)  = {102}; // No-inversion region
> Physical Surface(2)  = {110}; // Inversion region
> Physical Surface(3)  = {1}; // Geological body 1
> Physical Surface(4)  = {2}; // Geological body 2
> Physical Surface(5)  = {3}; // Geological body 3
> Physical Surface(6)  = {4}; // Geological body 4
> Physical Surface(7)  = {5}; // Geological body 5
> 
> 
> 
> Best Regards,
> 
> Sathyanarayan Rao, PhD student
> Earth and Life Institute/Environmental Sciences (ELI-e)
> Université catholique de Louvain
> c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
> Phone: 010473827 ( intercom 73827)
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] Line loop and Open cascade

2018-02-22 Thread Christophe Geuzaine


> On 22 Feb 2018, at 16:47, Sathyanarayan Rao <sathyanarayan@uclouvain.be> 
> wrote:
> 
> If I put 
> SetFactory("OpenCASCADE");
> 
> in the first line, then it gives me different error saying "unknown line loop 
> with tag1"

Yes, there is no line loop 1 in your geometry... Only a surface 1 ("Rectangle" 
creates a surface...)

> 
> // mesh size description
> SetFactory("OpenCASCADE");
> 
> cl_1   =  0.3;
> cl_2   =  0.02;
> cl3=  0.02;
> Mesh.CharacteristicLengthMax = 40;
> extend = 15;
> 
> // define inversion region
> 
> Point(1) = {-0.05, 0.005, 0, cl_2};
> Point(2) = {7.25, 0.005, 0, cl_2};
> Point(3) = {7.25, -1.45, 0, cl_2};
> Point(4) = {-0.05, -1.45, 0, cl_2};
> 
> // define bounding box
> 
> Point(5) = {-0.05-extend, 0.005, 0, cl_1};
> Point(6) = {7.25+extend, 0.005, 0, cl_1};
> Point(7) = {7.25+extend, -1.45-extend, 0, cl_1};
> Point(8) = {-0.05-extend, -1.45-extend, 0, cl_1};
> 
> Line(1) = {1, 2};
> Line(2) = {2, 6};
> Line(3) = {6, 7};
> Line(4) = {7, 8};
> Line(5) = {8, 5};
> Line(6) = {5, 1};
> Line(7) = {1, 4};
> Line(8) = {4, 3};
> Line(9) = {3, 2};
> 
> // Definition of regions
> Line Loop(101) = {2, 3, 4, 5, 6, 7, 8, 9};
> Plane Surface(102) = {101}; // Outer box
> Line Loop(105) = {1, -9, -8, -7};
> 
> 
> // geological body
> 
> Rectangle(1) = {0.1, -0.2, 0, 0.5, 0.1, 0};
> Rectangle(2) = {0.1, -1.0, 0, 0.3, 0.7, 0};
> Rectangle(3) = {3.1, -0.6, 0, 1, 0.5, 0};
> Rectangle(4) = {4.2, -1.2, 0, 1, 0.5, 0};
> Rectangle(5) = {5.6, -0.9, 0, 1, 0.5, 0};
> Plane Surface(110) = {105,1,2,3,4,5}; // Inner box without geological body
> 
> 
> // Definition of boundaries
> Physical Line(1) = {6, 2, 1}; // Free surface
> Physical Line(2) = {3,4, 5}; // Mixed boundary conditions
> 
> // Definition of physical regions
> Physical Surface(1)  = {102}; // No-inversion region
> Physical Surface(2)  = {110}; // Inversion region
> Physical Surface(3)  = {1}; // Geological body 1
> Physical Surface(4)  = {2}; // Geological body 2
> Physical Surface(5)  = {3}; // Geological body 3
> Physical Surface(6)  = {4}; // Geological body 4
> Physical Surface(7)  = {5}; // Geological body 5
> 
> 
> Best Regards,
> 
> Sathyanarayan Rao, PhD student
> Earth and Life Institute/Environmental Sciences (ELI-e)
> Université catholique de Louvain
> c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
> Phone: 010473827 ( intercom 73827)
> From: Christophe Geuzaine <cgeuza...@uliege.be>
> Sent: 22 February 2018 16:36:35
> To: Sathyanarayan Rao
> Cc: gmsh@onelab.info
> Subject: Re: [Gmsh] Line loop and Open cascade
>  
> 
> 
>> On 22 Feb 2018, at 12:56, Sathyanarayan Rao <sathyanarayan@uclouvain.be 
>> <mailto:sathyanarayan@uclouvain.be>> wrote:
>> 
>> Dear gmsh team,
>> 
>> Is it not possible to use both line loop type surface definition and open 
>> cascade rectangle. I always have problem with using both.
> 
> Sure you can: but you need to put SetFactory("OpenCASCADE") at the begining 
> of your file: otherwise you create the first entities with the built-in CAD 
> kernel ; and the rest (after SetFactory) with open cascade.
> 
> 
>>  
>> For example in the below code, surface 105 is unrecognized ! 
>> 
>> // mesh size description
>> 
>> cl_1   =  0.3;
>> cl_2   =  0.02;
>> cl3=  0.02;
>> Mesh.CharacteristicLengthMax = 40;
>> extend = 15;
>> 
>> // define inversion region
>> 
>> Point(1) = {-0.05, 0.005, 0, cl_2};
>> Point(2) = {7.25, 0.005, 0, cl_2};
>> Point(3) = {7.25, -1.45, 0, cl_2};
>> Point(4) = {-0.05, -1.45, 0, cl_2};
>> 
>> // define bounding box
>> 
>> Point(5) = {-0.05-extend, 0.005, 0, cl_1};
>> Point(6) = {7.25+extend, 0.005, 0, cl_1};
>> Point(7) = {7.25+extend, -1.45-extend, 0, cl_1};
>> Point(8) = {-0.05-extend, -1.45-extend, 0, cl_1};
>> 
>> Line(1) = {1, 2};
>> Line(2) = {2, 6};
>> Line(3) = {6, 7};
>> Line(4) = {7, 8};
>> Line(5) = {8, 5};
>> Line(6) = {5, 1};
>> Line(7) = {1, 4};
>> Line(8) = {4, 3};
>> Line(9) = {3, 2};
>> 
>> // Definition of regions
>> Line Loop(101) = {2, 3, 4, 5, 6, 7, 8, 9};
>> Plane Surface(102) = {101}; // Outer box
>> Line Loop(105) = {1, -9, -8, -7};
>> 
>> 
>> // geological body
>> 
>> SetFactory("OpenCASCADE");
>> Rectangle(1) = {0.1, -0.2, 0, 0.5, 0.1, 0};
>> Rectangle(2) = {0.1, -1.0, 0, 0.3, 0.7, 0};
>> Rectangle(3) = {3.1, -0.6, 0, 1, 0.5, 0};
>> Rectangle(4) = {4.2, -1.2, 0, 

Re: [Gmsh] Line loop and Open cascade

2018-02-22 Thread Christophe Geuzaine


> On 22 Feb 2018, at 17:32, Sathyanarayan Rao <sathyanarayan@uclouvain.be> 
> wrote:
> 
> Is it possible to extract associated line loop with each rectangle command so 
> that I can define a plane surface with line loops that forms holes of first 
> ones ?
> 

The Boundary operator will give you the bounding curves ; I guess you could 
reconstruct the loop from that.

But why not just use BooleanFragment of the 2 surfaces? This will automatically 
define the exterior and the interior.


> 
> Best Regards,
> 
> Sathyanarayan Rao, PhD student
> Earth and Life Institute/Environmental Sciences (ELI-e)
> Université catholique de Louvain
> c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
> Phone: 010473827 ( intercom 73827)
> From: Christophe Geuzaine <cgeuza...@uliege.be>
> Sent: 22 February 2018 17:25:27
> To: Sathyanarayan Rao
> Cc: gmsh@onelab.info
> Subject: Re: [Gmsh] Line loop and Open cascade
>  
> 
> 
>> On 22 Feb 2018, at 16:47, Sathyanarayan Rao <sathyanarayan@uclouvain.be 
>> <mailto:sathyanarayan@uclouvain.be>> wrote:
>> 
>> If I put 
>> SetFactory("OpenCASCADE");
>> 
>> in the first line, then it gives me different error saying "unknown line 
>> loop with tag1"
> 
> Yes, there is no line loop 1 in your geometry... Only a surface 1 
> ("Rectangle" creates a surface...)
> 
>> 
>> // mesh size description
>> SetFactory("OpenCASCADE");
>> 
>> cl_1   =  0.3;
>> cl_2   =  0.02;
>> cl3=  0.02;
>> Mesh.CharacteristicLengthMax = 40;
>> extend = 15;
>> 
>> // define inversion region
>> 
>> Point(1) = {-0.05, 0.005, 0, cl_2};
>> Point(2) = {7.25, 0.005, 0, cl_2};
>> Point(3) = {7.25, -1.45, 0, cl_2};
>> Point(4) = {-0.05, -1.45, 0, cl_2};
>> 
>> // define bounding box
>> 
>> Point(5) = {-0.05-extend, 0.005, 0, cl_1};
>> Point(6) = {7.25+extend, 0.005, 0, cl_1};
>> Point(7) = {7.25+extend, -1.45-extend, 0, cl_1};
>> Point(8) = {-0.05-extend, -1.45-extend, 0, cl_1};
>> 
>> Line(1) = {1, 2};
>> Line(2) = {2, 6};
>> Line(3) = {6, 7};
>> Line(4) = {7, 8};
>> Line(5) = {8, 5};
>> Line(6) = {5, 1};
>> Line(7) = {1, 4};
>> Line(8) = {4, 3};
>> Line(9) = {3, 2};
>> 
>> // Definition of regions
>> Line Loop(101) = {2, 3, 4, 5, 6, 7, 8, 9};
>> Plane Surface(102) = {101}; // Outer box
>> Line Loop(105) = {1, -9, -8, -7};
>> 
>> 
>> // geological body
>> 
>> Rectangle(1) = {0.1, -0.2, 0, 0.5, 0.1, 0};
>> Rectangle(2) = {0.1, -1.0, 0, 0.3, 0.7, 0};
>> Rectangle(3) = {3.1, -0.6, 0, 1, 0.5, 0};
>> Rectangle(4) = {4.2, -1.2, 0, 1, 0.5, 0};
>> Rectangle(5) = {5.6, -0.9, 0, 1, 0.5, 0};
>> Plane Surface(110) = {105,1,2,3,4,5}; // Inner box without geological body
>> 
>> 
>> // Definition of boundaries
>> Physical Line(1) = {6, 2, 1}; // Free surface
>> Physical Line(2) = {3,4, 5}; // Mixed boundary conditions
>> 
>> // Definition of physical regions
>> Physical Surface(1)  = {102}; // No-inversion region
>> Physical Surface(2)  = {110}; // Inversion region
>> Physical Surface(3)  = {1}; // Geological body 1
>> Physical Surface(4)  = {2}; // Geological body 2
>> Physical Surface(5)  = {3}; // Geological body 3
>> Physical Surface(6)  = {4}; // Geological body 4
>> Physical Surface(7)  = {5}; // Geological body 5
>> 
>> 
>> Best Regards,
>> 
>> Sathyanarayan Rao, PhD student
>> Earth and Life Institute/Environmental Sciences (ELI-e)
>> Université catholique de Louvain
>> c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
>> Phone: 010473827 ( intercom 73827)
>> From: Christophe Geuzaine <cgeuza...@uliege.be <mailto:cgeuza...@uliege.be>>
>> Sent: 22 February 2018 16:36:35
>> To: Sathyanarayan Rao
>> Cc: gmsh@onelab.info <mailto:gmsh@onelab.info>
>> Subject: Re: [Gmsh] Line loop and Open cascade
>>  
>> 
>> 
>>> On 22 Feb 2018, at 12:56, Sathyanarayan Rao <sathyanarayan@uclouvain.be 
>>> <mailto:sathyanarayan@uclouvain.be>> wrote:
>>> 
>>> Dear gmsh team,
>>> 
>>> Is it not possible to use both line loop type surface definition and open 
>>> cascade rectangle. I always have problem with using both.
>> 
>> Sure you can: but you need to put SetFactory("OpenCASCADE") at the begining 
>> of your file: otherwise you create the first entities with the built-in CAD 
>> kernel ; and the rest (after SetFactory) with open cascade.
>>

Re: [Gmsh] surface-by-surface 2d algorithm

2018-02-24 Thread Christophe Geuzaine


> On 24 Feb 2018, at 11:12, Jeremy Theler <jer...@seamplex.com> wrote:
> 
> Hi all!
> 
> Is it possible to choose mesh.algorithm in a surface-by-surface case?

-> MeshAlgorithm Surface {2, 5} = 1;


> I would like to have most of them to be meshed with frontal but one 
> particular feature is complex and needs the meshadapt algo.
> 
> Thanks
> --
> jeremy
> www.seamplex.com <http://www.seamplex.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

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


Re: [Gmsh] "CMAKE" SUCCEEDS but "MAKE" FAILS for GMSH 3.0.7 (and earlier versions) with MinGW compiler toolchain (gcc 6.4.0) using CYGWIN

2018-02-24 Thread Christophe Geuzaine


> On 24 Feb 2018, at 17:09, John Staples <john.f.stap...@gmail.com> wrote:
> 
> Thank you for the advice to use  the 
> -DCMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++.exe option on the cmake 
> command line.  Your help is very much appreciated.
> 
> I am now stumbling on something that may be simple:  how to specify the path 
> to the linker libraries? I am guessing -Dlink_directories(directory1 
> directory2 ...)  but can't find the paths for 'ldl' and 'lcgywin'

-ldl and -lcygwin should not be used when you compile with the mingw toolchain: 
these would lead to a executable that is not pure Windows. These might be 
pulled in by some dependencies compiled with the cygwin compile - you should 
remove these dependencies (or compile them with the mingw toolchain).
 

> as identified in the following:
> 
> johnf@INSPI13 /cygdrive/c/gmsh/build
> 
> $ make
> Scanning dependencies of target gmsh
> [  0%] Building CXX object CMakeFiles/gmsh.dir/Fltk/Main.cpp.o
> [  0%] Building CXX object CMakeFiles/gmsh.dir/Common/GmshGlobal.cpp.o
> ---
> 
> [ 99%] Building C object 
> CMakeFiles/gmsh.dir/contrib/mmg3d/build/sources/analarcutting.c.o
> [ 99%] Building C object 
> CMakeFiles/gmsh.dir/contrib/mmg3d/build/sources/analar.c.o
> [100%] Linking CXX executable gmsh.exe
> /usr/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/bin/ld: 
> cannot find -ldl
> /usr/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/bin/ld: 
> cannot find -ldl
> /usr/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/bin/ld: 
> cannot find -lcygwin
> collect2: error: ld returned 1 exit status
> make[2]: *** [CMakeFiles/gmsh.dir/build.make:18362: gmsh.exe] Error 1
> make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/gmsh.dir/all] Error 2
> make: *** [Makefile:161: all] Error 2
> 
> Thank you again for any hints/assistance.
> 
> John
> 
> On Thu, Feb 22, 2018 at 3:29 AM, Christophe Geuzaine <cgeuza...@uliege.be 
> <mailto:cgeuza...@uliege.be>> wrote:
> 
> 
>> On 19 Feb 2018, at 04:20, John Staples <john.f.stap...@gmail.com 
>> <mailto:john.f.stap...@gmail.com>> wrote:
>> 
>> Greetings All,
>> 
>> Thank you for any help with the following:
>> 
>> On Windows10, I've successfully installed CYGWIN 64bit shell 
>> (https://cygwin.com/install.html <https://cygwin.com/install.html>) with 
>> FLTK, OPENGL, BLAS, LAPACK, etc..  (everything but OCC for now)
>> 
>> Make doesn't build - aborts with errors,  ‘usleep’ was not declared in this 
>> scope, etc.
>> 
>> $ make
>> Scanning dependencies of target gmsh
>> [  0%] Building CXX object CMakeFiles/gmsh.dir/Fltk/Main.cpp.o
>> [  0%] Building CXX object CMakeFiles/gmsh.dir/Common/GmshGlobal.cpp.o
>> In file included from /cygdrive/c/gmsh/Common/onelab.h:40:0,
>>  from /cygdrive/c/gmsh/Common/onelabUtils.h:9,
>>  from /cygdrive/c/gmsh/Common/GmshGlobal.cpp:36:
>> /cygdrive/c/gmsh/Common/GmshSocket.h: In member function ‘void 
>> GmshSocket::_Sleep(int)’:
>> /cygdrive/c/gmsh/Common/GmshSocket.h:150:21: error: ‘usleep’ was not 
>> declared in this scope
>>  usleep(1000 * ms);
>>  ^
>> /cygdrive/c/gmsh/Common/GmshSocket.h: In member function ‘int 
>> GmshSocket::Select(int, int, int)’:
>> /cygdrive/c/gmsh/Common/GmshSocket.h:179:5: error: ‘fd_set’ was not declared 
>> in this scope
>>  fd_set rfds;
>>  ^~
>> /cygdrive/c/gmsh/Common/GmshSocket.h:180:14: error: ‘rfds’ was not declared 
>> in this scope
>>  FD_ZERO();
>>   ^~~~
>> /cygdrive/c/gmsh/Common/GmshSocket.h:180:18: error: ‘FD_ZERO’ was not 
>> declared in this scope
>>  FD_ZERO();
>>   ^
>> /cygdrive/c/gmsh/Common/GmshSocket.h:181:20: error: ‘FD_SET’ was not 
>> declared in this scope
>>  FD_SET(s, );
>> ^
>> /cygdrive/c/gmsh/Common/GmshSocket.h:184:48: error: ‘select’ was not 
>> declared in this scope
>>  return select(s + 1, , NULL, NULL, );
>> ^
>> make[2]: *** [CMakeFiles/gmsh.dir/build.make:87: 
>> CMakeFiles/gmsh.dir/Common/GmshGlobal.cpp.o] Error 1
>> make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/gmsh.dir/all] Error 2
>> make: *** [Makefile:161: all] Error 2
>> 
>> 
>> 
>> 
>> Results from  "cmake .." command are good:
>> 
>> $ cmake ..
>> -- The CXX compiler identification is GNU 6.4.0
>> -- The C compiler identification is GNU 6.4.0
>> -- Check for working CXX compile

Re: [Gmsh] Export .geo as .step - "No OpenCASCADE model found"

2018-06-19 Thread Christophe Geuzaine


> On 19 Jun 2018, at 11:47, Zenker, Dr. Matthias  
> wrote:
> 
> Hi,
>  
> I have a geometry built as .geo quite some time ago (with gmsh 2.x). Now I 
> want to export it as .step for a colleague to view it in his CAD software. 
> But gmsh complains “No OpenCASCADE model found” and refuses to write the step 
> file. What can I do to fix that?
>  

Gmsh never translates between CAD kernels: so if you build your model with the 
built-in kernel, you won't be able to "export" it as as an OpenCASCADE model.

What you could do is to add "SetFactory("OpenCASCADE")" at the beginning of 
your old script, and see if your geometry can get generated directly as an 
OpenCASCADE model. (You might have to change a few things.) Then you could 
export as .brep or .step.


> Thanks,
>  
> Matthias
>  
>  
> 
> Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen Geschaeftsfuehrer: 
> Christian O. Erbe, Reiner Thede Registergericht: Stuttgart HRB 380137
> 
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] Option file options for batch

2018-06-19 Thread Christophe Geuzaine


> On 19 Jun 2018, at 11:15, Zuheyr Alsalihi  wrote:
> 
> Hello,
> 
> I would like to use the option file to generate meshes in batch mode. 
> 
> a) How do I find out the complete list of configuration options?
> For instance I came across with this from the gmsh list, an email from 
> Fabrice Pepin, dated : Tue, Jan 24, 2017 at 8:22 AM
> > Hello,
> >
> > meshing and exporting the mesh can also be requested in the geo file.
> > Look at meshing command and meshing options. I use some the command below :
> > Mesh.ElementOrder = 2;
> > Mesh.SecondOrderIncomplete = 1;
> > Mesh.Format = 39; // Abaqus format
> > Mesh 2; // for 2D
> > Save "file_name.inp"; // export in the same directory as geo file
> > Fabrice.
> >
> Where do I find this info!? I am c++ literate and downloaded the code but 
> fail to find it.

Help->Current options and workspace

or File->Export and choose a file with the ".opt" extension.


> b) Can I give options to get output in several different formats, such as 
> abaqus and gmesh formats, in the same opt file?

Sure:

// construct your geometry
// ...
Mesh 3; // mesh it
Save "file.inp"; // save in abaqus format
Save "file.msh"; // save in gmsh format



> Thank you very much for reading.
> 
> Best,
> Zuheyr Alsalihi
> ___
> 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

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


Re: [Gmsh] Export .geo as .step - "No OpenCASCADE model found"

2018-06-19 Thread Christophe Geuzaine
On 19 Jun 2018, at 13:36, Zenker, Dr. Matthias <matthias.zen...@erbe-med.com> wrote:Thank you for the quick answer!Unfortunately, it seems not to be that easy. It exports a step file now, but the geometry is not complete. I try it on a very simple geometry consisting of a three stacked boxes (see attachment). The upper one is missing in the step file.With the latest snapshot the exported brep seems correct:

test.brep
Description: Binary data
In my “real” geometry (which I cannot share), there were many Ruled Surfaces, causing gmsh to issue warnings since Ruled Surfaces seem to be deprecated. If I replace them by just Surfaces, gmsh crashes immediately when I open the geometry with the OpenCASCADE statement at the beginning. Can you try this more complex example with the latest snapshot?Matthias  Von: Christophe Geuzaine [mailto:cgeuza...@uliege.be] Gesendet: Dienstag, 19. Juni 2018 12:12An: Zenker, Dr. MatthiasCc: gmsh@onelab.infoBetreff: Re: [Gmsh] Export .geo as .step - "No OpenCASCADE model found"  On 19 Jun 2018, at 11:47, Zenker, Dr. Matthias <matthias.zen...@erbe-med.com> wrote: Hi, I have a geometry built as .geo quite some time ago (with gmsh 2.x). Now I want to export it as .step for a colleague to view it in his CAD software. But gmsh complains “No OpenCASCADE model found” and refuses to write the step file. What can I do to fix that?  Gmsh never translates between CAD kernels: so if you build your model with the built-in kernel, you won't be able to "export" it as as an OpenCASCADE model. What you could do is to add "SetFactory("OpenCASCADE")" at the beginning of your old script, and see if your geometry can get generated directly as an OpenCASCADE model. (You might have to change a few things.) Then you could export as .brep or .step. Thanks, Matthias  Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede Registergericht: Stuttgart HRB 380137___gmsh mailing listgmsh@onelab.infohttp://onelab.info/mailman/listinfo/gmsh — Prof. Christophe GeuzaineUniversity of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaineFree software: http://gmsh.info | http://getdp.info | http://onelab.info Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede Registergericht: Stuttgart HRB 380137___gmsh mailing listgmsh@onelab.infohttp://onelab.info/mailman/listinfo/gmsh
— Prof. Christophe GeuzaineUniversity of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaineFree software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] MathEval field in a circle with Open Cascade

2018-06-22 Thread Christophe Geuzaine


> On 22 Jun 2018, at 00:55, Hector Gabriel Espinoza Román 
>  wrote:
> 
> Hello:
> 
> This simple script should draw a circle (2D surface) and when meshed it 
> should be refined on the boundary, but I am not getting that. I have done the 
> same without Open Cascade and it works.
> 
> cx = 0.0 ;
> cy = 0.0 ;
> cz = 0.0 ;
> D = 1.0 ;
> R = D/2;
> SetFactory("OpenCASCADE");
> Disk(1) = {cx,cy,cz,R} ; // creates a circle surface
> Field[1] = MathEval ;
> //Field[1].F = "0.15 - 0.13*((x^2)/(0.5^2))" ; // works 2D, 617 elements: 
> 0.02 to 0.15
> Field[1].F = "0.15 - 0.13*(x^2 + y^2)/(0.5^2)" ; // doesnt work 2D
> Background Field = 1 ;
> 
> What I am doing wrong?
> 

Add

Mesh.CharacteristicLengthExtendFromBoundary = 0;

Christophe


> Sincerely,
> 
> Héctor
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] python-api: Problem with signed line-tags with the OCC

2018-07-26 Thread Christophe Geuzaine


> On 17 Jul 2018, at 16:36, Martin Baun  wrote:
> 
> Hallo,
> 
> with the following example I got an OCC error "Error   : Unknown OpenCASCADE 
> curve with tag -4". It seems the is a problem with the sign. The example 
> works if I use the 'geo' kernel. It also works if I use the occ kernel and 
> rewrite this example as a *.geo file. 
> Is this a problem with the python-api?

This is now fixed (code and documentation) - the OCC kernel does not actually 
treat negative tags; the code now simply ignores the sign.

> 
> Best regards
> Martin
> 
> 
> 
> 
> import sys
> sys.path.append('/home/Werkzeuge/gmsh/20180705/build')
> import gmsh
> 
> model = gmsh.model
> factory = model.occ # do not works
> # factory = model.geo   # works
> 
> gmsh.initialize(sys.argv)
> gmsh.option.setNumber("General.Terminal", 1)
> model.add("LineLoop")
> 
> 
> lcar = 0.3
> p1 = factory.addPoint(0, 0, 0, lcar)
> p2 = factory.addPoint(1, 0, 0, lcar)
> p3 = factory.addPoint(1, 1, 0, lcar)
> p4 = factory.addPoint(0, 1, 0, lcar)
> l1 = factory.addLine(p1, p2)
> l2 = factory.addLine(p2, p3)
> l3 = factory.addLine(p3, p4)
> l4 = factory.addLine(p1, p4)  # reverse
> ll = factory.addCurveLoop([l1, l2, l3, -l4])
> s = factory.addPlaneSurface([ll])
> 
> 
> factory.synchronize()
> model.mesh.generate(2)
> gmsh.write("LineLoop.msh")
> gmsh.write("LineLoop.geo_unrolled")
> gmsh.finalize()
> ___
> 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

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


Re: [Gmsh] periodic pairs of internal nodes of each edge

2018-07-26 Thread Christophe Geuzaine


> On 26 Jul 2018, at 08:24, Nan Li  wrote:
> 
> Hello everyone,
> 
> I am trying to mesh a cross-cavity with high order tetrahedron element 
> (tetrahedron 10) and apply periodic boundary condition in x direction and y 
> direction. As the periodic boundary condition has nothing to do with the 
> cavity,  you can consider the cross-cavity as a cube. 
> 
> I have used 'periodic surfaces' and find the mesh of the two opposite surface 
> is identical. So far so good. Then when I look into the .msh file and try to 
> extract the point pairs in $Periodic $EndPeriodic, I find that only the nodes 
> on the vertex of triangle are listed there. The internal nodes for each edge 
> are not listed. 
> 
> Does anyone have successfully extract the periodic pairs of internal nodes of 
> each edge ?
> 

Indeed we only keep track of the main vertices in the Periodic section. Once 
you have those you can get the element correspondance and match the high-order 
ones.

@Koen, Amaury - should we also add the high-order vertices in the 
correspondance tables ?

Christophe


> Thanks. 
> 
> Nan LI
> ___
> 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

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


Re: [Gmsh] Get spline/bspline/bezier intermediate points

2018-07-26 Thread Christophe Geuzaine


> On 24 Jul 2018, at 17:12, Роман Бутов  wrote:
> 
> How could I get all points from the spline/bspline/bezier?
> 
> gmsh.model.getBoundary() at python API returns only start and end point...

Indeed - there's nothing in the code to handle this. You might want to create a 
issue with a feature request on our gitlab system for this.

> 
> Best regards,
> Roman
> ___
> 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

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


Re: [Gmsh] Duplicate Nodes at a Physical Interface

2018-07-26 Thread Christophe Geuzaine


> On 16 Jul 2018, at 13:19, Sanghavi, Chaitanya 
>  wrote:
> 
> Hi, 
>  
> Firstly, I really appreciate the work done in Gmsh and it’s really a 
> wonderful tool for researchers. Thanks for this.
>  
> I have a question about Node duplication at a physical interface of a 
> computational domain. Imagine I have a computational domain in 2D with two 
> rectangles sharing a physical interface.
> I want to duplicate nodes at this physical interface in both the rectangles.  

By default Gmsh never duplicates nodes.

You can use the Plugin(Crack) to explicitly generate duplicate nodes/elements 
on certain physical curves/surfaces.

Christophe


> See the Fig.
>  
> So basically, I can create a tag for the entities on this physical interface.
> Physical Line (1) = Line {A,B} where A,B are the points on the physical 
> interface.
> I need the same entities i.e. 
> Physical Line (2) = Line{B,A} in the neighboring rectangle. 
>  
> Since I use the same line, I cannot create this tag. 
>  
> If its possible to create additional line elements on this physical interface 
> from both sides, this would be the ideal scenario.
>  
> Important point is that the mesh should be conformal at this physical 
> interface.
>  
>  
>  
> Chaitanya Sanghavi
>  
> ___
> gmsh mailing list
> gmsh@onelab.info <mailto:gmsh@onelab.info>
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

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


Re: [Gmsh] Parameters for mesh refinement in 3D

2018-07-27 Thread Christophe Geuzaine


> On 13 Jul 2018, at 16:46, Octavio Castillo Reyes  
> wrote:
> 
> Dear all, 
> 
> I'm writing to you because I need some tips/advices for mesh refinement. 
> Given a simple model like the one attached to this mail, If the spacing for 
> material 1 is d1 = 300 m, and for material 2 it is d2 = 220 m. How to define 
> the spacing for points p1, p2, p3, p4, p5, p6? How to refine near points p7, 
> p8, , p14? For these points, I want a refinement equal to d1/20 and that 
> extends up to 80 m from each point.
> 
> I have already done experiments but it is not clear to me how to handle the 
> attractor option, namely I don't know if following lines are correct:
> 
> d1 = 300;
> d2 = 220;
> 
> Field[1] = Attractor;
> Field[1].NodesList = {7:14};
> Field[2] = Threshold;
> Field[2].IField = 1;
> Field[2].LcMin = d1/20;
> Field[2].LcMax = ds;
> Field[2].DistMin = d1/20;
> Field[2].DistMax = 80;
> Field[3] = Min;
> Field[3].FieldsList = {2};
> Background Field = 3;

Looks ok (the Min field is not necessary) ; it will work both in 2D and 3D.

Also make sure to add Mesh.CharacteristicLengthExtendFromBoundary = 0 so that 
this automatic interpolation is not applied.

CG

> 
> Characteristic Length {1, 2, 3, 6} = d1;
> Characteristic Length {4, 5} = d2;
> 
> Finally, I don't know if this options are valid for a 3D case.
> 
> Thank you for your time and support.
> 
> Best regards
> 
> ___
> 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

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


Re: [Gmsh] OpenCASCADE wire or line loop with tag ** already exists

2018-07-26 Thread Christophe Geuzaine
 {52, 53, -42, -51};
> Plane Surface(51) = {51};
> Line Loop(62) = {22, 61, -55, -60};
> Plane Surface(62) = {62};
> Line Loop(66) = {23, 65, -56, -61};
> Plane Surface(66) = {66};
> Line Loop(70) = {-12, 69, -57, -65};
> Plane Surface(70) = {70};
> Line Loop(74) = {-21, 60, -58, -69};
> Plane Surface(74) = {74};
> Point {1001} In Surface {74};
> Line Loop(75) = {55, 56, 57, 58};
> Plane Surface(75) = {75};
> 
> 
> -- 
> 
> 
> Jean de Sauvage
> Ingénieur des Ponts, des Eaux et des Forêts
> PhD IFSTTAR - ENTPE - ENPC
> 25 avenue de la Gare, 58250 Fours, FRANCE
> 06 51 25 16 94
> ___
> 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

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


<    1   2   3   4   5   6   7   8   >