Re: [Gmsh] Merging multiple step files in .geo script

2020-05-24 Thread G. D. McBain
> How can I merge large number of step files (132 in my case) in a .geo script?
I tried * but it is not parsed.

Two general approaches:
1. Generate the GEO code; e.g. with Bash, Python, 
2. Instead of GEO code, try the Gmsh API.___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Does gmsh script support custom functions?

2019-06-27 Thread G. D. McBain
> Does gmsh script support custom functions? I cannot find any guides to 
> writing custom functions in gmsh manual

Not really, no.  There is 'Macro' (which I think used to be called 'Function'), 
but no.

http://gmsh.info/dev/doc/texinfo/gmsh.html#User_002ddefined-macros

But there is the Gmsh API which can be used instead of writing a GEO file

http://gmsh.info/dev/doc/texinfo/gmsh.html#Gmsh-API

Before that came along, the best approach was generating the GEO file in an 
external script, e.g. Python.  A formalization of this which I still use myself 
is pygmsh.

https://github.com/nschloe/pygmsh/___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] nonmonotonic tags for nodes

2019-05-21 Thread G. D. McBain
In https://github.com/nschloe/meshio/issues/388 ‘[MSH 4.1: nodes have wrong 
tags in some cases](https://github.com/nschloe/meshio/issues/388#)’, it was 
reported that sometimes the nodes weren't tagged monotonically.
My reading of the specification was that this shouldn't happen:

By default, for non-partitioned, single file meshes, Gmsh will create files 
with a
continuous ordering of node and element tags, starting at 1.

Is that right?

A simple two-dimensional GEO file, ordering.geo, attached and listed

SetFactory("OpenCASCADE");
Rectangle(1) = {0, 0, 0, 1, 0.5, 0};
Transfinite Curve {1, 2, 3, 4} = 3 Using Progression 1;

was provided that when run to produce 6-node triangles in the GUI didn't tag 
the nodes sequentially in the output MSH 4.1 file whereas it does when run from 
the command line with

   gmsh -2 -order 2 ordering.geo

The 'Transfinite Curve' doesn't affect the phenomenon, but omitting it here 
does increase the number of nodes and elements, so it's handy for keeping the 
output easier to inspect at a glance.

Specifically, in the $Nodes block, the one-dimensional entity blocks have 
deranged tags for the nodes; e.g., lines 30–33 of ordering-gui.msh, generated 
in the GUI, are

1 1 0 3
5
11
12

whereas in ordering-cl.msh, generated from the command line, they are

1 1 0 3
5
6
7

I guess meshio should be rewritten to cope with this, but I thought I'd report 
it here in case it was anomalous and unexpected.

It was originally reported for Gmsh 4.2 and I've reproduced it with the latest 
git master, 4.4.0-git-bea1e5dde.

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

ordering-cl.msh
Description: Mesh model


ordering-gui.msh
Description: Mesh model


ordering.geo
Description: application/vnd.dynageo
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Problem with Reading the mesh generated into freefem.

2019-05-19 Thread G. D. McBain
> I checked also that when the program generates the mesh it displays a warning 
> error due to It can’t orient the normal of the Surface.

Yes, on running 'gmsh -2 Dominio.geo', I see this too:

Warning : Could not orient normal of surface 1

I'm not immediately sure why though...  I continue to suspect that this warning 
is associated with the error from FreeFEM about triangular elements having 
negative areas, but I haven't been able to work out what the problem with 
Dominio.brep is, i.e. why Gmsh can't orient the Plane Surface.

I even get the same warning from Gmsh when trying to make a simple Plane 
Surface from either of the two Curve Loops separately.  That does seem odd to 
me since the second, which looks like an island (or is it a lake) is simple 
enough to be inspected manually in the Gmsh GUI and it looks fine.

Sorry, I'm not sure what to suggest from here...___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Problem with Reading the mesh generated into freefem.

2019-05-19 Thread G. D. McBain
Hi there. I'll look into this in more detail back in the office tomorrow, but 
just quickly, I'm very familiar with this error message. It means that the 
surface is not oriented consistently. Gmsh is always three-dimensional so it 
doesn't have an idea of clockwise, e.g.

The usual remedy is to change the sign on some of the curves defining the 
surfaces in Gmsh. Does that make sense in your application?

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


Re: [Gmsh] Volume calculation for elementary elements

2019-04-23 Thread G. D. McBain
Yes. Possibly even more encyclopedic in this case, and handy if you're using 
Python, is quadpy.

https://github.com/nschloe/quadpy/blob/master/README.md#tetrahedron

Envoyé depuis ProtonMail mobile

 Message d'origine 
On 24 avr. 2019 à 00:31, Juan Sanchez a écrit :

> Wikipedia is good for this as well.
>
> https://en.wikipedia.org/wiki/Tetrahedron#Volume
>
> On Tue, Apr 23, 2019 at 9:14 AM Jeremy Theler  wrote:
>
>> Browse
>>
>> https://bitbucket.org/seamplex/wasora/src/9edef2db1f04bdb49e604722dce8df18879709b1/src/mesh/?at=master
>>
>> and look for the routines that compute the volumes, like line 405 of the 
>> following file
>>
>> https://bitbucket.org/seamplex/wasora/src/9edef2db1f04bdb49e604722dce8df18879709b1/src/mesh/tet4.c?at=master=file-view-default
>>
>> On Tue, 2019-04-23 at 12:23 +0200, paul francedixhuit wrote:
>>
>>> Dear all
>>>
>>> It's not directly related to gmsh (sorry) but I'm trying to find the 
>>> formulas to calculate the volume or elementary 3d elements from their 
>>> vertices?
>>>
>>> Does somebody have it?
>>>
>>> Thanks for the help
>>>
>>> Paul
>>>
>>> ___
>>>
>>> gmsh mailing list
>>>
>>> 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] Problem with VTK output

2019-04-17 Thread G. D. McBain
‐‐‐ Original Message ‐‐‐
Le mercredi 17 avril 2019 04:13, David Fernández  a écrit :

> I'm using the python interface to run the example "t1.py". I tell it to 
> generate a vtk file. The problem is that when I try to open it with Paraview 
> I get the following error:

Curious.  I'm not able to reproduce this error here.  I changed line 76 of 
t1.py to

gmsh.write("t1.vtk")

and obtained a t1.vtk, attached, which opens fine in ParaView or meshio.

My versions:
* Ubuntu 18.10, 64-bit
* gmsh 4.2.3, compiled from git
* gmsh-sdk 4.2.3.post1, from pip
* paraview 5.4.1, from Ubuntu APT repository

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


Re: [Gmsh] how do we do to export a mesh in med 3.3 from Gmsh 4.2.3

2019-04-11 Thread G. D. McBain

> So it seems like you cannot create a MED3 file when using the MED4 library.
>
> Maybe you could escalade this to the MED developers?

There was some discussion of this over at

   https://github.com/nschloe/meshio/issues/347#issuecomment-474367765

and it had been raised before that at

   https://www.salome-platform.org/forum/forum_10/835834708

The makeshift proposed in the meshio thread was:

…MED file, where the version is changed from 4.0.0 to 3.0.0, by modifying 
manually INFOS_GENERALES.  …This file can be loaded by gmsh


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


Re: [Gmsh] saving .geo file

2019-03-21 Thread G. D. McBain
Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

‐‐‐ Original Message ‐‐‐
Le vendredi, mars 22, 2019 1:57 PM, Peter Johnston  
a écrit :

> Hello,
>
> I know this is a dumb question and I know I have seen the answer before, but, 
> at the moment, I just can’t find it.
>
> If I use the gmsh gui to perform a series of steps, how can I save these 
> steps in a .geo file?

Doesn't this happen automatically?

If not, try launching Gmsh for the command line with the name of a GEO file, 
even if no such file exists; i.e.

$ gmsh tobecreated.geo

or

C:\Users\gdmcbain> gmsh tobecreated.geo

then that should be created and GUI commands appended.___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Exporting Mesh to other software

2019-03-08 Thread G. D. McBain
> I wanted to know if it is possible to export an unstructured grid created 
> from the software to another software that does not have the ability to 
> create an unstructured grid.

Yes indeed, there are many examples: FreeFem++, PETSc (and hence libMesh and 
Firedrake), meshio (and hence scikit-fem), OpenFOAM, and FEniCS, can all read 
the MSH format (at least version 2). Other packages can read in other formats 
that Gmsh exports; I've found the MEDIT .mesh format useful for its simplicity, 
where applicable, for example.

You may need to be more specific about the other software though. It doesn't 
have the ability to create an unstructured grid, but what is it expecting?___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] listing elements according to which physical volume they belong to

2018-11-25 Thread G. D. McBain
‐‐‐ Original Message ‐‐‐
Le lundi, novembre 26, 2018 12:43 PM, Abiti Adili  a écrit :

> Hello,
>
> I have a geometry.geo file that creates a box with two small balls in it. I 
> used omnibus.geo file that utilize the geometry.geo. Using this file, I 
> created a 3D mesh over the box(as well as the two balls in it). I need to be 
> able to have a mesh( created over the box) so that the gmsh file lists the 
> tetrahedral elements according which physical volume( ball1, ball2, or the 
> complement of them in the box) they belong to.
>
> The files I currently have are not quite generating what I wanted, it is only 
> listing the elements belong to the complement. I would greatly appreciate if 
> someone can take a look at them and point out the mistakes I made.

The last lines of geometry.geo have:

Volume(1) = {2};
Volume(2) = {3};
Volume(3) = {1, 2};

The last should read

Volume(3) = {1, 2, 3};

if the second sphere is also to internally bound it.


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


Re: [Gmsh] Using load_gmsh4.m to read cube.msh into Matlab

2018-10-14 Thread G. D. McBain

‐‐‐ Original Message ‐‐‐
Le vendredi, octobre 12, 2018 5:15 PM, Abiti Adili  a écrit :

> I am a beginner in using GMSH.

Welcome.

> In order to learn how I can export msh file generated in Gmsh 4.0, I opened 
> the cube.geo from the simple-geo under demos and used the 3D option in Mesh 
> to generate tetrahedral mesh. Then , I tried to use load_gmsh4.m in Matlab to 
> read the msh file. But I noticed that the matlab function is written for msh 
> format version 1 or 2.
>
> I am writing to ask if you kindly give me some directions on how I can export 
> msh format from Gmsh 4.0 into Matlab.

I'm not sure what load_gmsh4.m is or where it's from, but you can generated the 
legacy format version 2 easily enough; see 
http://onelab.info/pipermail/gmsh/2018/012511.html .


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


Re: [Gmsh] Msh version 2.0 or 2.2

2018-10-07 Thread G. D. McBain
> How to save mesh using gmsh.h(c++ api) in msh file format version 2(or 2.2)?

For four ways, see http://onelab.info/pipermail/gmsh/2018/012422.html .   All 
easy (once one knows how).___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] MSH file format

2018-09-12 Thread G. D. McBain
> Our question is : how can we "force" GMSH to create .msh file in format 
> version 2 ?

On the command line, try '-fornat msh2'

http://gmsh.info/doc/texinfo/gmsh.html#index-_002dformat-string___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Automatic building of geo scripts

2018-03-07 Thread G. D. McBain
> I'm working on meshing for geophysical applications using gmsh. I have 
> special interest in tetrahedral meshes. Since last November I'm trying to 
> build "scripts.geo" in an automatic way, namely, given basic information like 
> coordinates of the origin, model dimensions, material interfaces, write the 
> resulting "script.geo".

These days, I generate most of my .geo scripts with pygmsh, a "Python interface 
for
Gmsh".

. https://pypi.python.org/pypi/pygmsh___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] ellipsoid

2018-02-26 Thread G. D. McBain
 Original Message 
 On 27 February 2018 3:45 AM, Stephan Köhler  
wrote:


> I try to build a mesh of an ellipsoid with gmsh 3.0.6, but the surface
> mesh is not so pretty. I've done some research, but i couldn't find a
> solution. So I hope you can help me. Some part of the code is blow (is
> worked with gmsh 2.13.2).

> // line loops
> Line Loop(1) = {16,17,-20};

I found (gmsh --version == 3.0.7) that this script worked O. K. if the senses 
of the elliptic arcs here were changed:

Line Loop(1) = {16, -17, 20};

Other options: (1) When I was working with ellipsoids recently, I built them in 
OpenSCAD using solidpython, exported as STL, and merged that in Gmsh. (2) 
pygmsh has a add_ellipsoid function that more or less wraps up what's in your 
snippet.

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


[Gmsh] Recombine Surface, -optimize_lloyd, & quadrilateral meshes

2017-12-12 Thread G. D. McBain
I find that passing -optimize_lloyd on the command-line stops a 'Recombine 
Surface' command in the .geo file from producing quadrilateral elements.  Is 
that expected?

A minimal example to quad-mesh a rectangle:

%<-- quad.geo
Include "t1.geo";
Recombine Surface{1};
-->%

Called with "gmsh -2", this produces quadrilaterals, but appending 
"-optimize_lloyd 1" gives triangles.___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Understanding of variables

2017-11-26 Thread G. D. McBain
> I don't understand how to deal with the value of variables : I have 3 
> variables defining mesh size (a= 1, b=2, c=10). Mesh is OK and I want to 
> export this mesh with the values of variables in the file name. I tried :
> Save StrCat("model", a, "_", b, "_", c, ".inp"); returns a syntax error.
> How can I extract the value of each variable to create a string ?

Try Sprintf rather than StrCat.

a = 1; b = 2; c = 10;
Printf(Sprintf("model%g_%g_%g.inp", a, b, c));

See:

   http://gmsh.info/doc/texinfo/gmsh.html#Character-expressions

Note the use of %g despite the variables appearing to have integral values.___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] two different zones in same bidy

2017-07-17 Thread G. D. McBain
Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

>  Original Message 
> Subject: [Gmsh] two different zones in same bidy
> Local Time: July 17, 2017 3:50 PM
> UTC Time: July 17, 2017 5:50 AM
> From: julia.ute.fisc...@gmail.com
> To: gmsh 
> Hi list members,
> I am new to gmsh and I have a body define by 2 surfaces , I could mesh it , 
> but in my msh output I would like to separate this meshes somehow.
> is that possible

One approach is to have three files. The first defines the body by two 
surfaces. The second and third begin by including the first
Include "first.geo";
and then each defines one of the desired subsets as Physical entities. Then 
calling Gmsh on the second or third file should generate the separate meshes.

> cheers
> Julia___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] simple question

2017-06-29 Thread G. D. McBain
Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

>  Original Message 
> Subject: [Gmsh] simple question
> Local Time: June 30, 2017 11:06 AM
> UTC Time: June 30, 2017 1:06 AM
> From: luis.satur...@gmail.com
> To: gmsh@onelab.info
>
> Hi Gmsh team:
>
> I just strated using Gmsh for my work. I have a very simple question. I am 
> trying to mesh a 2D square with the following input:
> lc = 5e-2;
> Point(1) = {0, 0, 0, lc};
> Point(2) = {.1, 0, 0, lc};
> Point(3) = {.1, .1, 0, lc};
> Point(4) = {0, .1, 0, lc};
> 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(2) = {1};
> Physical Surface(2001) = {1} ;

Change the RHS here to {2}. The idea is that 'the expression-list on the right 
hand side should contain the identification numbers of all the elementary 
surfaces that need to be grouped inside the physical surface', i.e. list the 
Plane Surface rather than the Line Loop.
http://gmsh.info/doc/texinfo/gmsh.html#index-Physical-surfaces___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] A problem in using gmsh

2017-05-01 Thread G. D. McBain
I am using your program in masters research and i need to assign loads and area 
properties to an example. After many trials to found the answer at google i 
failed to have the answer so i need your help to continueting my thises 
research.

Exactly how you assign loads and properties depends on your finite element 
solver, but in general from the Gmsh side it involves defining the appropriate 
Physical Surfaces. These will be preserved in the output mesh, with details 
depending on the output format you choose.

See: http://gmsh.info/doc/texinfo/gmsh.html#Elementary-vs-physical-entities___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Printf append regression

2017-03-23 Thread G. D. McBain
The appending version of Printf seems to have been broken recently. I updated 
the Gmsh sources from svn on Tue. 21 and recompiled and now a pair of commands 
of the form

Printf("Hello") > "hello.txt";
Printf(", World!") >> "hello.txt";

raises (e.g., run with "gmsh - hello.geo")

Error : 'hello.geo', line 2 : syntax error (>>)

This worked on Tue. 14, though I don't remember with which Gmsh version 
(2.16.0, but also compiled from svn).

This is on 64-bit Debian GNU/Linux 9.0 (stretch).

P. S. I was going to log this at 
[http://gitlab.onelab.info](http://gitlab.onelab.info/users) but couldn't 
register: "Email domain is not authorized for sign-up".

hello.geo
Description: application/vnd.dynageo
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] (no subject)

2017-02-12 Thread G. D. McBain
Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.



 Original Message 
Subject: [Gmsh] (no subject)
Local Time: February 13, 2017 4:23 AM
UTC Time: February 12, 2017 5:23 PM
From: toddcpie...@gmail.com
To: gmsh@onelab.info








Hi All,
I am in the process of learning how to use OneLab. I have a slight grip on 
creating geometry and meshing and am now looking for examples of actually using 
GetDP. The reason I am posting this message is that I am already realizing the 
examples I am looking for are pretty sparse on the Internet.

There are a couple reasons they are sparse:

= What's out there is complex!! Seriously, I am a beginner here. I cannot 
handle something like magnetic fields. I think starting with something like the 
thermal conduction simulations is probably the simplest but I'm not even sure 
what simplicity means in this world of multi-physics simulation.

= As others may know, the whole point of my pursuing this software is for 
another piece of software to use it. I am therefore constrained by commands 
that can be piped (or typed) through the interface.cpp command line interface. 
So, any example that involves "clicking" here or "selecting" there is less 
likely to help me out in this endeavor.

Is there something like a metal bar that is hot on one end? A bar being bent? 
These other phenomena like magnetism and antennas look fun, but are there 
perhaps examples a cave person could comprehend?

Hi Todd,
A fairly simple example of solving a steady boundary value problem may be found 
at
https://geuz.org/trac/getdp/wiki/Capacitor2D (username: gmsh, password: gmsh)
It's expressed in terms of electrical capacitance, but if it helps it can be 
thought of in terms of a thermal analogy: two plates at ceiling and floor with 
different fixed temperatures, the space between filled with a material of one 
thermal conductivity except for a circular inclusion of a higher thermal 
conductivity. I think the left and right boundary conditions are insulated (in 
either the electrical or thermal interpretation).
The partial differential equation in question is Laplace's equation, which is 
pretty much the simplest starting place for finite element work.
I don't think I've actually run this one myself. It was back in 2010 that I was 
looking at it, so I'd have to dig out old notes to check. I solved the same 
problem in FreeFem++ using the Gmsh geometry and mesh and compared my answer 
with that from GetDP.

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


Re: [Gmsh] BRL-CAD for Geometry?

2017-02-05 Thread G. D. McBain
> Gorgeous Stuff Christophe,

Indeed, yes. Plus one from me too. I'll definitely be using this extended Open 
CASCADE facility when it's released.


> I may be a bit confused here, but it may not address the (live) command-line 
> generation of geometry. I was looking into what McBain was doing with 
> FreeCAD, but it looks like even what you're doing McBain, is scripting.

Sorry, yes, you're right. My interest is primarily in scripting. I do recall 
now that BRL-CAD's mged has a 'REPL' (Read-Eval-Print Loop, like Lisp, Bash, 
Python, etc.), but don't use these so much as I prefer a clean input with a 
permanent record. Similarly with Gnuplot, I almost always put all the commands 
into a file first before sending them to the program.

REPLs are useful for preliminary explorations though, so your project, Todd, is 
interesting.


> So, McBain, did I miss your point or can FreeCAD be truly interactive from 
> the command line? (or in this case, its pipe)

It was me missing your point, but FreeCAD does have a Python console. It does 
not cover all the functionality. I think how it works is that the program is 
primarily written in C++ but exposes some things to Python. If the Python 
console is opened, most actions in the GUI are echoed as Python in the console 
and the same effect can be achieved by typing these Python commands in there 
instead.
I mostly use that to learn what the Python equivalent of an action is. Then I 
include that in a Python script for actual use. It does work as a REPL, but one 
has to issue a redraw command to get the 'P' part.___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Python parallel loading

2016-12-19 Thread G. D. McBain
This package clearly does not meet my needs. It's just a geometry creation tool 
which uses gmsh through a system call. It generates a mesh and open it using 
meshio (another package from the same dev) which does not keep physical nor 
partition tags. I need both.


I have a fork of MeshIO that keeps physical tags and partitions.

https://github.com/gdmcbain/meshio/tree/gmsh-element-tags

It doesn't use mpi4py though.








--


From: Brian Drawert 
Sent: Monday, December 19, 2016 4:29:45 PM
To: Guilherme Caminha
Cc: gmsh@onelab.info
Subject: Re: [Gmsh] Python parallel loading


http://pygmsh.readthedocs.io/en/latest/



[Welcome to PyGmsh’s documentation! — PyGmsh 2.4.2 
...](http://pygmsh.readthedocs.io/en/latest/)
pygmsh.readthedocs.io
pygmsh.geometry ¶ This class provides a Python interface for the Gmsh scripting 
language. It aims at working around some of Gmsh’s inconveniences (e.g., having 
to ...





On Dec 19, 2016, at 7:41 AM, Guilherme Caminha  
wrote:



Hi,
Does anyone know of a Python mesh interface with a built-in distributed data 
structure (using mpi4py preferably) that works with Gmsh?
Thanks.
___
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] gmsh 2.12.0 : gmshpy : installation directory

2016-04-27 Thread G. D. McBain
 Original Message 
Subject: [Gmsh] gmsh 2.12.0 : gmshpy : installation directory
Local Time: 27 avril 2016 7:02 PM
UTC Time: 27 avril 2016 09:02
From: fabien.ro...@umontpellier.fr
To: gmsh@onelab.info
CC: remy.mo...@umontpellier.fr


Hello,

I am a postdoc at LMGC in Montpellier with Frédéric Dubois as advisor. For
some user case of our software, LMGC90, we use the python module 'gmshpy'.

In order to use it on a new computer, I need to install it. I downloaded the
source of gmsh 2.12.0 from the web page :

http://gmsh.info/

Before the compilation, I configured the generation of 'gmshpy' with :

$ cd build
$ cmake -DENABLE_WRAP_PYTHON=ON .../gmsh-2.12.0-source
$ make

The module 'gmshpy' is well build under 'build/wrappers/gmshpy'.

The point is that, after the installation step :
$ sudo make install

the directory 'build/wrappers/gmshpy' is copied in '/usr/local' whereas
this directory is not part of python default search directories :

$ python -c "import sys; print '\n'.join(sys.path)"

/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/pymodules/python2.7


Question : Could you provide a release where the directory 
'build/wrappers/gmshpy' is installed (copied)
in one of the python default search directories?

(the directory '/usr/local/lib/python2.7/dist-packages' seems to be the more 
suitable)

Hello. That might be a good idea (I dont' know how "make install" works in 
Gmsh), but in the meantime a workaround is:

$ cd /usr/local/gmshpy
$ sudo python setup.py install
$ ldconfig

That puts gmshpy in /usr/local/lib/python2.7/dist-packages, as requested.___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh