File: README.txt

package info (click to toggle)
gmsh 4.8.4%2Bds2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 87,812 kB
  • sloc: cpp: 378,014; ansic: 99,669; yacc: 7,216; python: 6,680; java: 3,486; lisp: 659; lex: 621; perl: 571; makefile: 470; sh: 440; xml: 415; javascript: 113; pascal: 35; modula3: 32
file content (34 lines) | stat: -rw-r--r-- 1,132 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This directory contains the Gmsh Python tutorials, written using the Gmsh Python
API.

To run the Python tutorials, you need the Gmsh dynamic library and the Python
module (`gmsh.py'). These can be either obtained

- using `pip install --upgrade gmsh', which will download the binary Software
  Development Kit (SDK) from the Gmsh website and install the necessary files
  automatically.

- by downloading the SDK for your operating system from the Gmsh website,
  uncompressing the gmsh*-sdk.* archive and adding the "lib" directory to
  PYTHONPATH. For example, if you are currently in the root directory of the
  uncompressed SDK:

    export PYTHONPATH=${PYTHONPATH}:${PWD}/lib

- by compiling the Gmsh source code. Follow these steps in the top-level
  directory of the Gmsh source code:

    mkdir build
    cd build
    cmake -DENABLE_BUILD_DYNAMIC=1 ..
    make
    make install
    cd ..

  Add the installation directory (by default /usr/local/lib) to PYTHONPATH, e.g.

    export PYTHONPATH=${PYTHONPATH}:/usr/local/lib

You can then run e.g. "python t1.py"

For other Python API examples, see the `demos/api' directory.