Skip to content
Snippets Groups Projects
Select Git revision
  • 0df4a83277dc986e95962426fdf93e49d1f21b42
  • 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.
    title.script 1.70 KiB
    // This scripts adds a title using Plugin(Annotate)
    
    // create an empty view
    View "Title" {};
    
    num = PostProcessing.NbViews-1;
    
    // add the main project name
    x = -25;
    y = 40;
    Plugin(Annotate).View = num; 
    Plugin(Annotate).Text = StrCat("Project: ", StrPrefix(StrRelative(Sprintf(General.FileName))));
    Plugin(Annotate).Font = "Helvetica-Bold"; 
    Plugin(Annotate).FontSize = 20; 
    Plugin(Annotate).Align = "Right";
    Plugin(Annotate).X = x;
    Plugin(Annotate).Y = y; 
    Plugin(Annotate).Run; 
    
    // add data and gmsh version info
    y += 25;
    Plugin(Annotate).Text = StrCat(Today, Sprintf(" (Gmsh %g.%g.%g)", GMSH_MAJOR_VERSION,
                                                                      GMSH_MINOR_VERSION,
                                                                      GMSH_PATCH_VERSION));
    Plugin(Annotate).Font = "Helvetica" ; 
    Plugin(Annotate).FontSize = 14 ; 
    Plugin(Annotate).Y = y ; 
    Plugin(Annotate).Run ; 
    
    // if we have a mesh, print some statistics
    nbelm = Mesh.NbTriangles + Mesh.NbQuadrangles + Mesh.NbTetrahedra + 
            Mesh.NbHexahedra + Mesh.NbPrisms + Mesh.NbPyramids  + Mesh.NbTrihedra;
    nbnod = Mesh.NbNodes;
    If(nbelm && nbnod)
      y += 20;
      Plugin(Annotate).Text = Sprintf("Mesh: %g nodes/%g elements", nbelm, nbnod);
      Plugin(Annotate).Font = "Helvetica-Oblique" ; 
      Plugin(Annotate).FontSize = 12 ; 
      Plugin(Annotate).Y = y;
      Plugin(Annotate).Run ; 
    EndIf
    
    // if we have some post-processing views, add the variable names
    If(num > 0)
      y += 20;
      For i In {0:num-1}
        Plugin(Annotate).Text = StrCat(Sprintf("Variable %g: ", i), Sprintf(View[i].Name));
        Plugin(Annotate).Font = "Helvetica-Oblique";
        Plugin(Annotate).FontSize = 12; 
        Plugin(Annotate).Y = y; 
        Plugin(Annotate).Run;
        y += 16;
      EndFor
    EndIf