Skip to content
Snippets Groups Projects
Select Git revision
  • 279affc44c72fe1572bb5d3c52eac673c759a839
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

GModelIO_Mesh.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    Context.cpp 4.40 KiB
    // Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@onelab.info>.
    
    #include <stdlib.h>
    #include <string.h>
    #include "GmshConfig.h"
    #include "Context.h"
    #include "OS.h"
    #include "GamePad.h"
    
    #if defined(HAVE_FLTK)
    #include <FL/Fl.H>
    #endif
    
    CTX::CTX() : gamepad(0)
    {
      // initialize everything that has no default value in DefaultOptions.h
      short int word = 0x0001;
      char *byte = (char*)&word;
      bigEndian = (byte[0] ? 0 : 1);
      const char *tmp;
      if((tmp = GetEnvironmentVar("GMSH_HOME")))
        homeDir = tmp;
    #if defined(WIN32)
      else if((tmp = GetEnvironmentVar("APPDATA")))
        homeDir = tmp;
    #else
      else if((tmp = GetEnvironmentVar("HOME")))
        homeDir = tmp;
    #endif
      else if((tmp = GetEnvironmentVar("TMP")))
        homeDir = tmp;
      else if((tmp = GetEnvironmentVar("TEMP")))
        homeDir = tmp;
      else
        homeDir = "";
      int len = homeDir.size();
      if(len && homeDir[len - 1] != '/')
        homeDir += "/";
    
      batch = batchAfterMesh = 0;
      meshDiscrete = 0;
      outputFileName = "";
      bgmFileName = "";
      createAppendMeshStatReport = 0;
      launchSolverAtStartup = -1;
      lc = 1.;
      min[0] = min[1] = min[2] = max[2] = 0.;
      max[0] = max[1] = 1.; // for nice view when adding point in new model
      cg[0] = cg[1] = cg[2] = 0.;
      polygonOffset = 0;
      printing = 0;
      meshTimer[0] = meshTimer[1] = meshTimer[2] = 0.;
      drawRotationCenter = 0;
      pickElements = 0;
      geom.draw = 1;
      mesh.draw = 1;
      post.draw = 1;
      post.combineTime = 0; // try to combineTime views at startup
      lock = 0; // very primitive locking
      fileread = false;
    
    #if defined(HAVE_FLTK)
      glFontEnum = FL_HELVETICA;
    #else
      glFontEnum = -1;
    #endif
      forcedBBox = 0;