Skip to content
Snippets Groups Projects
Select Git revision
  • 494b4d348eff5be2227ab3beaeb55e84e2133207
  • master default protected
  • hierarchical-basis
  • alphashapes
  • bl
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • convert_fdivs
  • tmp_jcjc24
  • fixedMeshIF
  • save_edges
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • 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
41 results

PViewDataIO.cpp

Blame
  • 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()