gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GmshGlobal.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef GMSH_GLOBAL_H
7 #define GMSH_GLOBAL_H
8 
9 #include <string>
10 #include "GmshMessage.h"
11 
12 int GmshInitialize(int argc = 0, char **argv = nullptr, bool readConfigFiles = false,
13  bool exitOnCommandLineError = true);
14 int GmshSetMessageHandler(GmshMessage *callback);
16 int GmshSetBoundingBox(double xmin, double xmax, double ymin, double ymax,
17  double zmin, double zmax);
18 int GmshSetOption(const std::string &category, const std::string &name,
19  std::string value, int index = 0);
20 int GmshSetOption(const std::string &category, const std::string &name,
21  double value, int index = 0);
22 int GmshSetOption(const std::string &category, const std::string &name,
23  unsigned int value, int index = 0);
24 void GmshSetStringOption(const std::string &category, const std::string &name,
25  std::string value, int index = 0);
26 void GmshSetNumberOption(const std::string &category, const std::string &name,
27  double value, int index = 0);
28 void GmshSetColorOption(const std::string &category, const std::string &name,
29  unsigned int value, int index = 0);
30 int GmshGetOption(const std::string &category, const std::string &name,
31  std::string &value, int index = 0);
32 int GmshGetOption(const std::string &category, const std::string &name,
33  double &value, int index = 0);
34 int GmshGetOption(const std::string &category, const std::string &name,
35  unsigned int &value, int index = 0);
36 std::string GmshGetStringOption(const std::string &category,
37  const std::string &name, int index = 0);
38 double GmshGetNumberOption(const std::string &category, const std::string &name,
39  int index = 0);
40 unsigned int GmshGetColorOption(const std::string &category,
41  const std::string &name, int index = 0);
43 int GmshOpenProject(const std::string &fileName);
44 int GmshClearProject();
45 int GmshMergeFile(const std::string &fileName);
46 int GmshMergePostProcessingFile(const std::string &fileName);
47 int GmshWriteFile(const std::string &fileName);
48 int GmshFinalize();
49 int GmshBatch();
50 int GmshFLTK(int argc = 0, char **argv = nullptr);
51 
52 // these two functions are the only functions exported in addition to the
53 // functions of the official stable API, so that we can also build the main Gmsh
54 // binary directly from the DLL
55 
56 #if defined(GMSH_DLL)
57 #if defined(GMSH_DLL_EXPORT)
58 #define GMSH_API __declspec(dllexport)
59 #else
60 #define GMSH_API __declspec(dllimport)
61 #endif
62 #elif defined(__GNUC__)
63 #define GMSH_API __attribute__ ((visibility("default")))
64 #else
65 #define GMSH_API
66 #endif
67 
68 GMSH_API int GmshMainBatch(int argc, char **argv);
69 GMSH_API int GmshMainFLTK(int argc, char **argv);
70 
71 #endif
GMSH_API
#define GMSH_API
Definition: GmshGlobal.h:65
GmshInitialize
int GmshInitialize(int argc=0, char **argv=nullptr, bool readConfigFiles=false, bool exitOnCommandLineError=true)
Definition: GmshGlobal.cpp:65
GmshMergeFile
int GmshMergeFile(const std::string &fileName)
Definition: GmshGlobal.cpp:225
GmshMergePostProcessingFile
int GmshMergePostProcessingFile(const std::string &fileName)
Definition: GmshGlobal.cpp:230
GmshSetColorOption
void GmshSetColorOption(const std::string &category, const std::string &name, unsigned int value, int index=0)
Definition: GmshGlobal.cpp:154
GmshMainBatch
GMSH_API int GmshMainBatch(int argc, char **argv)
Definition: GmshGlobal.cpp:485
GmshSetOption
int GmshSetOption(const std::string &category, const std::string &name, std::string value, int index=0)
Definition: GmshGlobal.cpp:119
GmshMessage.h
GmshGetNumberOption
double GmshGetNumberOption(const std::string &category, const std::string &name, int index=0)
Definition: GmshGlobal.cpp:190
GmshSetMessageHandler
int GmshSetMessageHandler(GmshMessage *callback)
Definition: GmshGlobal.cpp:104
GmshWriteFile
int GmshWriteFile(const std::string &fileName)
Definition: GmshGlobal.cpp:237
GmshClearProject
int GmshClearProject()
Definition: GmshGlobal.cpp:219
GmshGetMessageHandler
GmshMessage * GmshGetMessageHandler()
Definition: GmshGlobal.cpp:110
GmshRestoreDefaultOptions
int GmshRestoreDefaultOptions()
Definition: GmshGlobal.cpp:206
GmshMainFLTK
GMSH_API int GmshMainFLTK(int argc, char **argv)
Definition: GmshGlobal.cpp:505
GmshMessage
Definition: GmshMessage.h:23
GmshSetBoundingBox
int GmshSetBoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Definition: GmshGlobal.cpp:112
GmshGetColorOption
unsigned int GmshGetColorOption(const std::string &category, const std::string &name, int index=0)
Definition: GmshGlobal.cpp:198
GmshSetNumberOption
void GmshSetNumberOption(const std::string &category, const std::string &name, double value, int index=0)
Definition: GmshGlobal.cpp:147
GmshSetStringOption
void GmshSetStringOption(const std::string &category, const std::string &name, std::string value, int index=0)
Definition: GmshGlobal.cpp:140
GmshOpenProject
int GmshOpenProject(const std::string &fileName)
Definition: GmshGlobal.cpp:213
GmshFLTK
int GmshFLTK(int argc=0, char **argv=nullptr)
Definition: GmshGlobal.cpp:388
GmshBatch
int GmshBatch()
Definition: GmshGlobal.cpp:278
GmshGetOption
int GmshGetOption(const std::string &category, const std::string &name, std::string &value, int index=0)
Definition: GmshGlobal.cpp:161
GmshFinalize
int GmshFinalize()
Definition: GmshGlobal.cpp:243
GmshGetStringOption
std::string GmshGetStringOption(const std::string &category, const std::string &name, int index=0)
Definition: GmshGlobal.cpp:182