The geometry of model entities can be provided by different CADkernels. The two default kernels interfaced by Gmsh are thebuilt-in kernel and the OpenCASCADE kernel. Gmsh does nottranslate the geometrical representation from one kernel to another, orfrom these kernels to some neutral representation. Instead, Gmshdirectly queries the native data for each CAD kernel, which avoids dataloss and is crucial for complex models where translations invariablyintroduce issues linked to slightly different representations. Selectingthe CAD kernel in .geo scripts is done with the SetFactorycommand (see Geometry scripting commands), while in the Gmsh API thekernel appears explicitly in all the relevant functions from thegmsh/model namespace, with geo or occ prefixes forthe built-in and OpenCASCADE kernel, respectively (see Namespace gmsh/model).
To determine the actual mesh size at any given point in the model, Gmshevaluates all the above mesh size constraints and selects the smallestvalue. Using the Gmsh API, this value can then be further modified usinga C++, C, Python, Julia or Fortran mesh size callback function providedvia gmsh/model/mesh/setSizeCallback (see Namespace gmsh/model/mesh).
The additionalgmsh.h_cwrapheader redefines the C++ API in terms of the C API. This is provided asa convenience for users of the binary GmshSoftware Development Kit (SDK) whose C++ compiler Application BinaryInterface (ABI) is not compatible with the ABI of the C++ compiler usedto create the SDK. To use these C++ bindings of the C API instead of thenative C++ API, simply rename gmsh.h_cwrap as gmsh.h. Notethat this will lead to (slightly) reduced performance compared to usingthe native Gmsh C++ API, as it entails additional data copies betweenthe C++ wrapper, the C API and the native C++ code.
Initialize the Gmsh API. This must be called before any call to the other functions in the API. If argc and argv (or just argv in Python or Julia) are provided, they will be handled in the same way as the command line arguments in the Gmsh app. If readConfigFiles is set, read system Gmsh configuration files (gmshrc and gmsh-options). If run is set, run in the same way as the Gmsh app, either interactively or in batch mode depending on the command line arguments. If run is not set, initializing the API sets the options "General.AbortOnError" to 2 and "General.Terminal" to 1.
This chapter lists all the Gmsh options. Options can be specified inscript files (see General scripting commands) or using the API(see Namespace gmsh/option): see t3 for an example. They canalso be specified on the command line using the -setnumber and-setstring switches: see Gmsh command-line interface. Manyoptions can also be changed interactively in the GUI (see Gmsh graphical user interface): to see which option corresponds to whichwidget in the GUI, leave your mouse on the widget and a tooltip with theoption name will appear. Note that some options can affect the GUI inreal time: loading a script file that sets General.GraphicsWidthfor example (see General options) will change the width of thegraphic window at runtime.
I am new to fipy, so excuse my ignorance if I ask something that should be obvious. But I fail to run an already existing (and working - on other machines) script, getting the EnvironmentError: Gmsh version must be >= 2.0. I may have missed something during the installation? Fipy manual is a bit vague about implementation of gmsh. It only provides the link to download file and that meshes can be generated by it, but it doesn't say WHERE gmsh should be installed (so I have my gmsh-3.0.3-Windows in the default, i.e. in Program Files (x86). Should it be installed in some particular directory, perhaps the same as fipy?(I really apologise for a stupid question, but this is the case when if you know what question to ask, you already know the answer and don't need to ask at all.)
I think the fipy documentation should mention this. The chapter on mesh generation only says that you need gmsh, but does not specify that the application (.exe) has to be in the directory with python modules. But this is not quite intuitive (it is not a python file, not installed by pip, just a downloaded application from the web) and yet it is essential for running it.
I want to have two versions of Gmsh: 2.10.1 ( -2.10.1-Linux64.tgz) and 3.0.6 (the latest) on my Ubuntu 16.04 LTS machine. Both of which I seem to have installed successfully. However, I observed something weird:apt-cache policy gmsh gives this:
What does it mean? Is this also related to another observation that the Ubuntu Software listed only 2.10.1 version before I installed 3.0.6 and after installation of 3.0.6 it doesn't list anything for gmsh.
We fixed this last summer, but haven't pushed a new release since then (sorry about that).If you check out the `develop` branch from our repository, I think that will correct this problem.If not, tell us what you get if you type `gmsh --version` at the command line.
I'm just trying to help you... no particular location.You simply download the .zip file and unzip it in "gmsh" folder in
"C:\Program Files" folder.I'm running Fipy on Windows XP, 32-bit CPU, using Spyder and
WinPython-32bit-2.7.5.3.But installation of Fipy was not straigtforward...Best regards,AlexLe 05/02/2016 14:59, Daniel DeSantis a ?crit :
-to-add-to-the-pythonpath-in-windows-7When I type gmsh --version into the command window, I get 2.11.0Of course, now I'm getting a ValueError saying that 2.11.0 is an invalid
version number.Maybe I should download and try an older gmsh version? I will probably play
with this some more unless you have any ideas?I'll post updates just in case anyone else ever runs into these problems.On Mon, Feb 8, 2016 at 3:51 PM, Guyer, Jonathan E. Dr.
Consider a unit square (2D) domain and a triangular mesh on this geometry. I would like to perform a loop over all the elements in the mesh, compute the area of each triangle and verify that the sum of all areas equals one. I I am not sure that I am using connectivity between the elements and the nodes correctly. That is, I have doubt on the functions getNodes() and getElements() in Julia interface to gmsh correctly. I am obtaining elements with zero area.
As said earlier, the results of plot and labels vary based on which version of gmsh you use and which option you select. As a cheatsheet:
2.7.1 => correct mesh, incorrect labels
4.7.1, all elements => correct mesh, incorrect labels
4.7.1, unselect all elements => incorrect mesh, presumably correct labels.
Then when I export the mesh in gmsh-format version 2 ascii without the include all elements option and import it in Freefem++ then I get the three labels 2, 3, 4. Label 1 is assigned to channel in the msh-file.
In order to use Gmsh within a Linux environment, you will need to make sure you have all of the necessary graphics libraries. Most of these should be installed by default when using a current Linux distribution like Ubuntu, Fedora, etc. However, it looks like they are not on your system. You can run ldd /home/lhe/Pylith/pylith-3.0.0-linux-x86_64/lib/libgmsh.so.4.1 to see which ones are missing.
The easiest way to install GMSH is to simply download the binary files for Linux/Windows/Mac, either Stable or Latest automatic Gmsh snapshot (recommended (by me)). The binary file gmsh is located in bin/gmsh in the compressed downloaded file. You can launch it directly
Sorry, continuing to experiment (unwisely) on the command terminal in bulk, I discovered that I was struggling to install gmsh the wrong way.
Freecad and kicad are compatible if gmsh is installed with:
sudo pip3 install --upgrade gmsh
sorry for the inconvenience, good evening
Hi Andras,
Slicer exit abnormally
when I try to initialize gmsh in an extension but it did work with the built version of slicer but not with the executable version of slicer. could you please help to resolve?