Skip to content
Snippets Groups Projects
Select Git revision
  • 7f8d900ce60840b4420d3c2a57d98ed6ecc66530
  • master default protected
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 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

Numeric.h

Blame
  • GmshMessage.h 7.12 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 _GMSH_MESSAGE_H_
    #define _GMSH_MESSAGE_H_
    
    #include <map>
    #include <vector>
    #include <string>
    #include <stdarg.h>
    
    #include "GmshConfig.h"
    
    class GmshClient;
    namespace onelab {
      class client;
    }
    
    // the external message handler
    class GmshMessage {
    public:
      GmshMessage() {}
      virtual ~GmshMessage() {}
      virtual void operator()(std::string level, std::string message) {}
    };
    
    // a class to manage messages
    class Msg {
    private:
      // current cpu number and total number of cpus
      static int _commRank, _commSize;
      // verbosity level (0: silent except fatal errors, 1: +errors, 2: +warnings,
      // 3: +direct, 4: +info, 5 (=normal): +statusbar, 99: debug)
      static int _verbosity;
      // step (in %) of the progress meter and current progress %
      static int _progressMeterStep, _progressMeterCurrent;
      // timers
      static std::map<std::string, double> _timers;
      // report cpu time for each info message?
      static bool _infoCpu;
      // starting time (gettimeofday at startup)
      static double _startTime;
      // counters
      static int _warningCount, _errorCount, _atLeastOneErrorInRun;
      static std::string _firstWarning, _firstError;
      // callback
      static GmshMessage *_callback;
      // command-line and startup time
      static std::string _commandLine, _launchDate;
      // command-line-specified numbers and strings
      static std::map<std::string, std::vector<double> > _commandLineNumbers;
      static std::map<std::string, std::string> _commandLineStrings;
      // communication with Gmsh when run remotely
      static GmshClient *_client;
    #if defined(HAVE_ONELAB)
      // communication with onelab server
      static onelab::client *_onelabClient;
    #endif
      // executable name
      static std::string _execName;
      // log file
      static std::string _logFileName;
      static FILE *_logFile;
    
    public:
      Msg() {}
      static void Init(int argc, char **argv);
      static void Exit(int level);