diff --git a/tutorial/c++/README.txt b/tutorial/c++/README.txt index 6289d492fb36d1eb97e7c91d16676f937a8b6e62..d0a158c6900be0d3cbb3798f3c234125bdcd7b5f 100644 --- a/tutorial/c++/README.txt +++ b/tutorial/c++/README.txt @@ -1,5 +1,5 @@ -This directory contains C++ versions of some of the tutorials, written using -the Gmsh API. +This directory contains C++ versions of the tutorials, written using the Gmsh +API. To compile and run the C++ tutorials, you need the Gmsh dynamic library and the associated header file (`gmsh.h'). These can be either obtained diff --git a/tutorial/c++/t1.cpp b/tutorial/c++/t1.cpp index ec868d5bbd2b2ddbd7f5db5936a8d6eb23366c47..987cf2a10544e2a25a3a2741c9a44f686b4c439f 100644 --- a/tutorial/c++/t1.cpp +++ b/tutorial/c++/t1.cpp @@ -85,6 +85,9 @@ int main(int argc, char **argv) // // gmsh::option::setNumber("Mesh.SaveAll", 1); + // We could run the graphical user interface with + // gmsh::fltk::run(); + // This should be called at the end: gmsh::finalize(); return 0; diff --git a/tutorial/c++/t14.cpp b/tutorial/c++/t14.cpp index 97fab96bcc0d584c425d0116422ca75665ab4dbb..b4d676b30bcc5faa2d8b482a5db1bd0fba2b4204 100644 --- a/tutorial/c++/t14.cpp +++ b/tutorial/c++/t14.cpp @@ -128,7 +128,6 @@ int main(int argc, char **argv) // Generate the mesh and perform the requested homology computations gmsh::model::mesh::generate(3); - gmsh::fltk::run(); gmsh::finalize(); return 0; } diff --git a/tutorial/c++/t7.cpp b/tutorial/c++/t7.cpp index cb3c747fdcf71a3f9e797b3a749e4dc3f6fa0023..e337db595bc80d2dba79f300db3f12c4c55434e4 100644 --- a/tutorial/c++/t7.cpp +++ b/tutorial/c++/t7.cpp @@ -45,9 +45,6 @@ int main(int argc, char **argv) model::mesh::generate(2); gmsh::write("t7.msh"); - // show the mesh file - gmsh::fltk::run(); - gmsh::finalize(); return 0; } diff --git a/tutorial/c++/t9.cpp b/tutorial/c++/t9.cpp index 076cabe5523f4308f0990828ae76dc343a712619..00ed8f88c8499b186a5cad6776bb4a192f771a3b 100644 --- a/tutorial/c++/t9.cpp +++ b/tutorial/c++/t9.cpp @@ -57,9 +57,6 @@ int main(int argc, char **argv) gmsh::option::setNumber("View[1].IntervalsType", 2); gmsh::option::setNumber("View[2].IntervalsType", 2); - // show the GUI at the end - gmsh::fltk::run(); - gmsh::finalize(); return 0; } diff --git a/tutorial/python/t1.py b/tutorial/python/t1.py index 6db096540b63579be70dab8556fc2470cb48b5a1..619478b58a6e2fd91ca08e83c92d87cbabacf009 100644 --- a/tutorial/python/t1.py +++ b/tutorial/python/t1.py @@ -81,5 +81,8 @@ gmsh.write("t1.msh") # # gmsh.option.setNumber("Mesh.SaveAll", 1) +# We could run the graphical user interface with +# gmsh.fltk.run() + # This should be called at the end: gmsh.finalize() diff --git a/tutorial/python/t17.py b/tutorial/python/t17.py index 4c9de8d9c4286481c409da77695f3e5a1db7af89..9a5ba009b1c51fac01a30497edc3757150053cff 100644 --- a/tutorial/python/t17.py +++ b/tutorial/python/t17.py @@ -16,8 +16,8 @@ gmsh.model.occ.synchronize() path = os.path.dirname(os.path.abspath(__file__)) gmsh.merge(os.path.join(path, '..', 't17_bgmesh.pos')) -bg_field = model.mesh.field.add("PostView") -model.mesh.field.setAsBackgroundMesh(bg_field) +bg_field = gmsh.model.mesh.field.add("PostView") +gmsh.model.mesh.field.setAsBackgroundMesh(bg_field) # use bamg gmsh.option.setNumber("Mesh.SmoothRatio", 3)