Error in reading file into 'structured' field with python gmsh script but not from gmsh itself.
A text file works when imported directly into gmsh, but on trying to read the same file into a 'Structured' field in python the following error is produced:
terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >'
The field is set as follows:
structure = gmsh.model.mesh.field.add("Structured")
gmsh.model.mesh.field.setString(structure, "FileName", r"/home/../../dungeness_structured_bath.txt")
gmsh.model.mesh.field.setNumber(structure, "TextFormat", 0)
This field is fed into another two fields and the final one set as a background mesh before mesh.generate(dim=2) is called.
The input file looks like this and is a text file that is output from a different script that reads ascii input data and sorts it into the structure required by gmsh:
0.429167 50.558333 0.000000
0.004167 0.004167 0.000000
264 156 0
-12
-12
-13
-13
-14
-14
-16
-16
...
...
There's a problem with links between C++ libraries that is explained in the solution found here. In that answer, there is a workaround to compile the code with the ABI turned off using this C command:
-D_GLIBCXX_USE_CXX11_ABI=0
Can that be triggered using the Python script or in the Visual Studio Code compiler?
Is this a problem that has appeared in Python and gmsh on a Linux system before?
Thanks