Skip to content
Snippets Groups Projects
Select Git revision
  • 75775fc569f7789caed04ec753ff30a42b6e13ad
  • 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

GModel.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    OS.h 1.20 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #ifndef OS_H
    #define OS_H
    
    #include <string>
    #include <stdio.h>
    
    FILE *Fopen(const char *f, const char *mode);
    const char *GetEnvironmentVar(const char *var);
    void SetEnvironmentVar(const char *var, const char *val);
    void SleepInSeconds(double s);
    void CheckResources();
    double Cpu();
    double TotalRam();
    double TimeOfDay();
    long GetMemoryUsage();
    int GetProcessId();
    std::string GetExecutableFileName();
    std::string GetAbsolutePath(const std::string &fileName);
    std::string GetHostName();
    int UnlinkFile(const std::string &fileName);
    int StatFile(const std::string &fileName);
    int KillProcess(int pid);
    int CreateSingleDir(const std::string &dirName);
    void CreatePath(const std::string &fullPath);
    int SystemCall(const std::string &command, bool blocking = false);
    int SystemCallExe(const std::string &exe, const std::string &argsOrCommand,
                      bool blocking = false);
    std::string GetCurrentWorkdir();
    void RedirectIOToConsole();
    void UnzipFile(const std::string &fileName, const std::string &prependDir = "");
    
    #endif