Skip to content
Snippets Groups Projects
Select Git revision
  • 2a76c27d74e6a3beb5a936cae24e3bdbb02f3abd
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

fullMatrix.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    get_data_perf.py 843 B
    import gmsh
    import sys
    
    gmsh.initialize(sys.argv)
    
    # create a simple cartesian grid (you can make it finer e.g. by passing
    # "-clscale 0.01" on the command line)
    gmsh.model.add("square")
    gmsh.model.occ.addRectangle(0, 0, 0, 1, 1, 100)
    gmsh.model.occ.synchronize()
    gmsh.model.mesh.setTransfiniteSurface(100)
    gmsh.model.mesh.generate(2)
    
    # create a post-processing dataset
    gmsh.plugin.setNumber("NewView", "Value", 1.234)
    gmsh.plugin.run("NewView")
    
    # retrieve the dataset as a vector of vectors (one for each tag)
    print("before get")
    type, tags, data, time, numComp = gmsh.view.getModelData(0, 0)
    print("after get")
    
    # retrieve the dataset as a single vector (muuuuch faster for Python)
    print("before getHomogeneous")
    type2, tags2, data2, time2, numComp2 = gmsh.view.getHomogeneousModelData(0, 0)
    print("after getHomogeneous")
    
    gmsh.finalize()