gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GmshGlobal.cpp
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 #include <string>
7 #include <time.h>
8 #include "GmshConfig.h"
9 #if !defined(HAVE_NO_STDINT_H)
10 #include <stdint.h>
11 #elif defined(HAVE_NO_INTPTR_T)
12 typedef unsigned long intptr_t;
13 #endif
14 #include "GmshVersion.h"
15 #include "GmshMessage.h"
16 #include "GmshDefines.h"
17 #include "GmshGlobal.h"
18 #include "GmshRemote.h"
19 #include "GModel.h"
20 #include "OpenFile.h"
21 #include "CreateFile.h"
22 #include "Options.h"
23 #include "CommandLine.h"
24 #include "OS.h"
25 #include "Context.h"
26 #include "robustPredicates.h"
27 #include "BasisFactory.h"
28 
29 #if defined(HAVE_PARSER)
30 #include "Parser.h"
31 #endif
32 
33 #if defined(HAVE_POST)
34 #include "PView.h"
35 #include "PViewData.h"
36 #include "PViewOptions.h"
37 #endif
38 
39 #if defined(HAVE_ONELAB)
40 #include "onelabUtils.h"
41 #include "gmshLocalNetworkClient.h"
42 #endif
43 
44 #if defined(HAVE_MESH)
45 #include "Field.h"
46 #include "meshPartition.h"
47 #include "gmshCrossFields.h"
48 #include "automaticMeshSizeField.h"
49 #endif
50 
51 #if defined(HAVE_PLUGINS)
52 #include "PluginManager.h"
53 #endif
54 
55 #if defined(HAVE_FLTK)
56 #include "FlGui.h"
57 #include "graphicWindow.h"
58 #include "drawContext.h"
59 #include "onelabGroup.h"
60 
61 #endif
62 
63 static bool isInitialized = false;
64 
65 int GmshInitialize(int argc, char **argv, bool readConfigFiles,
66  bool exitOnCommandLineError)
67 {
68  if(isInitialized) return 1;
69  isInitialized = true;
70 
71 #if defined(HAVE_FLTK)
73 #endif
74 
75  // we need at least one model during option parsing
76  GModel *dummy = nullptr;
77  if(GModel::list.empty()) dummy = new GModel();
78 
79  // Initialize messages (parallel stuff, etc.)
80  Msg::Initialize(argc, argv);
81 
82  // Load default options
83  InitOptions(0);
84 
85  // Read configuration files and command line options
86  GetOptions(readConfigFiles, exitOnCommandLineError);
87 
88  // Make sure we have enough resources (stack)
90 
91 #if defined(HAVE_PLUGINS)
92  // Initialize the default plugins
94 #endif
95 
96  // Initialize robust predicates (no static filter for now, we do not know the
97  // size of the domain)
98  robustPredicates::exactinit(0, 1.0, 1.0, 1.0);
99 
100  if(dummy) delete dummy;
101  return 1;
102 }
103 
105 {
106  Msg::SetCallback(callback);
107  return 1;
108 }
109 
111 
112 int GmshSetBoundingBox(double xmin, double xmax, double ymin, double ymax,
113  double zmin, double zmax)
114 {
115  SetBoundingBox(xmin, xmax, ymin, ymax, zmin, zmax);
116  return 1;
117 }
118 
119 int GmshSetOption(const std::string &category, const std::string &name,
120  std::string value, int index)
121 {
122  return StringOption(GMSH_SET | GMSH_GUI, category.c_str(), index,
123  name.c_str(), value, false);
124 }
125 
126 int GmshSetOption(const std::string &category, const std::string &name,
127  double value, int index)
128 {
129  return NumberOption(GMSH_SET | GMSH_GUI, category.c_str(), index,
130  name.c_str(), value, false);
131 }
132 
133 int GmshSetOption(const std::string &category, const std::string &name,
134  unsigned int value, int index)
135 {
136  return ColorOption(GMSH_SET | GMSH_GUI, category.c_str(), index, name.c_str(),
137  value, false);
138 }
139 
140 void GmshSetStringOption(const std::string &category, const std::string &name,
141  std::string value, int index)
142 {
143  StringOption(GMSH_SET | GMSH_GUI, category.c_str(), index, name.c_str(),
144  value, false);
145 }
146 
147 void GmshSetNumberOption(const std::string &category, const std::string &name,
148  double value, int index)
149 {
150  NumberOption(GMSH_SET | GMSH_GUI, category.c_str(), index, name.c_str(),
151  value, false);
152 }
153 
154 void GmshSetColorOption(const std::string &category, const std::string &name,
155  unsigned int value, int index)
156 {
157  ColorOption(GMSH_SET | GMSH_GUI, category.c_str(), index, name.c_str(), value,
158  false);
159 }
160 
161 int GmshGetOption(const std::string &category, const std::string &name,
162  std::string &value, int index)
163 {
164  return StringOption(GMSH_GET, category.c_str(), index, name.c_str(), value,
165  false);
166 }
167 
168 int GmshGetOption(const std::string &category, const std::string &name,
169  double &value, int index)
170 {
171  return NumberOption(GMSH_GET, category.c_str(), index, name.c_str(), value,
172  false);
173 }
174 
175 int GmshGetOption(const std::string &category, const std::string &name,
176  unsigned int &value, int index)
177 {
178  return ColorOption(GMSH_GET, category.c_str(), index, name.c_str(), value,
179  false);
180 }
181 
182 std::string GmshGetStringOption(const std::string &category,
183  const std::string &name, int index)
184 {
185  std::string value;
186  StringOption(GMSH_GET, category.c_str(), index, name.c_str(), value, false);
187  return value;
188 }
189 
190 double GmshGetNumberOption(const std::string &category, const std::string &name,
191  int index)
192 {
193  double value;
194  NumberOption(GMSH_GET, category.c_str(), index, name.c_str(), value, false);
195  return value;
196 }
197 
198 unsigned int GmshGetColorOption(const std::string &category,
199  const std::string &name, int index)
200 {
201  unsigned int value;
202  ColorOption(GMSH_GET, category.c_str(), index, name.c_str(), value, false);
203  return value;
204 }
205 
207 {
208  ReInitOptions(0);
209  InitOptionsGUI(0);
210  return 1;
211 }
212 
213 int GmshOpenProject(const std::string &fileName)
214 {
215  OpenProject(fileName);
216  return 1;
217 }
218 
220 {
221  ClearProject();
222  return 1;
223 }
224 
225 int GmshMergeFile(const std::string &fileName)
226 {
227  return MergeFile(fileName, true);
228 }
229 
230 int GmshMergePostProcessingFile(const std::string &fileName)
231 {
233  fileName, CTX::instance()->solver.autoShowViews,
235 }
236 
237 int GmshWriteFile(const std::string &fileName)
238 {
239  CreateOutputFile(fileName, FORMAT_AUTO);
240  return 1;
241 }
242 
244 {
245  // delete all models and views
247 
248  // clear remaining static data
249 #if defined(HAVE_PLUGINS)
250  delete PluginManager::instance();
251 #endif
253  Msg::Finalize();
254  isInitialized = false;
255  return 1;
256 }
257 
258 static void StartupMessage()
259 {
260  int nt = CTX::instance()->numThreads;
261  if(!nt) nt = Msg::GetMaxThreads();
262  Msg::Info("Running '%s' [Gmsh %s, %d node%s, max. %d thread%s]",
263  Msg::GetCommandLineFull().c_str(), GMSH_VERSION, Msg::GetCommSize(),
264  Msg::GetCommSize() > 1 ? "s" : "", nt, nt > 1 ? "s" : "");
265  Msg::Info("Started on %s", Msg::GetLaunchDate().c_str());
266 }
267 
268 static void GoodbyeMessage()
269 {
270  time_t now;
271  time(&now);
272  std::string currtime = ctime(&now);
273  currtime.resize(currtime.size() - 1);
274  Msg::SetInfoCpu(true); // always print cpu info at the end
275  Msg::Info("Stopped on %s", currtime.c_str());
276 }
277 
279 {
280  StartupMessage();
281 
282  OpenProject(GModel::current()->getFileName(), true); // warn if file missing
283  bool open = false;
284  for(std::size_t i = 0; i < CTX::instance()->files.size(); i++) {
285  if(i == 0 && CTX::instance()->files[0][0] != '-') continue;
286  if(CTX::instance()->files[i] == "-new")
287  new GModel();
288  else if(CTX::instance()->files[i] == "-merge")
289  open = false;
290  else if(CTX::instance()->files[i] == "-open")
291  open = true;
292  else if(open)
293  OpenProject(CTX::instance()->files[i], true); // warn if file missing
294  else
295  MergeFile(CTX::instance()->files[i]);
296  }
297 
298 #if defined(HAVE_POST) && defined(HAVE_MESH)
299  if(!CTX::instance()->bgmFileName.empty()) {
300  if(CTX::instance()->bgmFileName.substr(
301  CTX::instance()->bgmFileName.find_last_of(".") + 1) == "p4est") {
303  new automaticMeshSizeField(CTX::instance()->bgmFileName);
305  }
306  else {
307  MergePostProcessingFile(CTX::instance()->bgmFileName);
308  if(PView::list.size())
310  1);
311  else
312  Msg::Error("Invalid background mesh (no view)");
313  }
314  }
315 #endif
316 
317  if(CTX::instance()->batch == -3) { GmshRemote(); }
318  else if(CTX::instance()->batch == -2) {
319  GModel::current()->checkMeshCoherence(CTX::instance()->geom.tolerance);
320 #if defined(HAVE_PARSER)
321  std::vector<std::string> s;
322  PrintParserSymbols(0, s);
323  for(std::size_t i = 0; i < s.size(); i++) Msg::Direct("%s", s[i].c_str());
324 #endif
325  }
326  else if(CTX::instance()->batch == -1) {
327  CreateOutputFile(CTX::instance()->outputFileName,
328  CTX::instance()->outputFileName.empty() ? FORMAT_GEO :
329  FORMAT_AUTO);
330  }
331  else if(CTX::instance()->batch > 0) {
332 #if defined(HAVE_MESH)
333  if(CTX::instance()->batch < 4)
334  GModel::current()->mesh(CTX::instance()->batch);
335  else if(CTX::instance()->batch == 4)
337  else if(CTX::instance()->batch == 5)
338  GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
339  else if(CTX::instance()->batch == 6)
340  GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear,
341  false, false, true);
342  else if(CTX::instance()->batch == 7)
344  CTX::instance()->batchSomeValue * M_PI / 180., true, false, M_PI);
345  else if(CTX::instance()->batch == 8) {
347  CTX::instance()->batchSomeValue * M_PI / 180., true, true, M_PI);
349  }
350  else if(CTX::instance()->batch == 9) {
352  }
353  else if(CTX::instance()->batch == 69) {
354  std::vector<int> tags;
356  GoodbyeMessage();
357  CTX::instance()->batch = 0;
358  // still a bug in allocation somewhere
359  exit(0);
360  }
361 #endif
362  }
363 
364  if(CTX::instance()->batchAfterMesh == 1 &&
365  CTX::instance()->mesh.numPartitions > 1)
366  GModel::current()->partitionMesh(CTX::instance()->mesh.numPartitions);
367 
368  if(CTX::instance()->batch > 0 || CTX::instance()->batchAfterMesh) {
369  std::string name = CTX::instance()->outputFileName;
370  if(name.empty()) {
371  if(CTX::instance()->mesh.fileFormat == FORMAT_AUTO)
373  else
375  }
377  }
378 
379  // launch solver (if requested)
380 #if defined(HAVE_ONELAB)
382 #endif
383 
384  GoodbyeMessage();
385  return 1;
386 }
387 
388 int GmshFLTK(int argc, char **argv)
389 {
390 #if defined(HAVE_FLTK) && defined(HAVE_POST)
391  // create the GUI
392  FlGui::instance(argc, argv);
393 
394  StartupMessage();
395 
396  // display GUI immediately for quick launch time
397  FlGui::check();
398 
399  if(FlGui::getOpenedThroughMacFinder().size() &&
400  CTX::instance()->files.empty()) {
401  OpenProject(FlGui::getOpenedThroughMacFinder());
402  }
403  else {
404  OpenProject(GModel::current()->getFileName());
405  bool open = false;
406  for(std::size_t i = 0; i < CTX::instance()->files.size(); i++) {
407  if(i == 0 && CTX::instance()->files[0][0] != '-') continue;
408  if(CTX::instance()->files[i] == "-new") {
410  new GModel();
411  }
412  else if(CTX::instance()->files[i] == "-merge")
413  open = false;
414  else if(CTX::instance()->files[i] == "-open")
415  open = true;
416  else if(open)
417  OpenProject(CTX::instance()->files[i]);
418  else
419  MergeFile(CTX::instance()->files[i]);
420  }
421  }
422 
423  FlGui::instance()->setFinishedProcessingCommandLine();
424 
425  if(CTX::instance()->post.combineTime) {
428  FlGui::instance()->updateViews(true, true);
429  }
430 
431  // init first context
432  switch(CTX::instance()->initialContext) {
433  case 1: FlGui::instance()->openModule("Geometry"); break;
434  case 2: FlGui::instance()->openModule("Mesh"); break;
435  case 3: FlGui::instance()->openModule("Solver"); break;
436  case 4: FlGui::instance()->openModule("Post-processing"); break;
437  default: // automatic
438  if(PView::list.size()) FlGui::instance()->openModule("Post-processing");
439  break;
440  }
441 
442 #if defined(HAVE_POST) && defined(HAVE_MESH)
443  // read background mesh if any
444  if(!CTX::instance()->bgmFileName.empty()) {
445  // If the background mesh is an octree (we us p4est), then we load the
446  // background mesh as an automaticMeshSizeField
447  if(CTX::instance()->bgmFileName.substr(
448  CTX::instance()->bgmFileName.find_last_of(".") + 1) == "p4est") {
450  new automaticMeshSizeField(CTX::instance()->bgmFileName);
451  // int newId = GModel::current()->getFields()->newId();
452  // (*GModel::current()->getFields())[newId] = a;
453  // printf("loading %s\n",CTX::instance()->bgmFileName.c_str());
455  }
456  else {
457  MergePostProcessingFile(CTX::instance()->bgmFileName);
458  if(PView::list.size())
460  1);
461  else
462  Msg::Error("Invalid background mesh (no view)");
463  }
464  }
465 #endif
466 
467  // listen to external solvers
468  if(CTX::instance()->solver.listen) {
469  gmshLocalNetworkClient *c = new gmshLocalNetworkClient("Listen", "");
470  c->run();
471  }
472 
473  // launch solver (if requested) and fill onelab tree
474  solver_cb(nullptr, (void *)(intptr_t)CTX::instance()->launchSolverAtStartup);
475 
476  // loop
477  return FlGui::instance()->run();
478 
479 #else
480  Msg::Error("GmshFLTK unavailable: please recompile with FLTK support");
481  return 0;
482 #endif
483 }
484 
485 GMSH_API int GmshMainBatch(int argc, char **argv)
486 {
487  if(argc < 2) {
488  CTX::instance()->terminal = 1;
489  PrintUsage(argv[0]);
490  exit(0);
491  }
492 
493  new GModel();
494  GmshInitialize(argc, argv, true);
495 
497  CTX::instance()->noPopup = 1;
498 
499  GmshBatch();
500  GmshFinalize();
501  Msg::Exit(0);
502  return 1;
503 }
504 
505 GMSH_API int GmshMainFLTK(int argc, char **argv)
506 {
507  // Create a new model
508  new GModel();
509 
510  // Hack to generate automatic documentation (before getting
511  // user-defined options)
512  if(argc == 2 && std::string(argv[1]) == "-doc") {
513  InitOptions(0);
514 #if defined(HAVE_PLUGINS)
516 #endif
517  PrintOptionsDoc();
518  exit(0);
519  }
520 
521  // Initialize static stuff (parser symbols, options)
522  GmshInitialize(argc, argv, true);
523 
524  // Non-interactive Gmsh
525  if(CTX::instance()->batch) {
527  GmshBatch();
528  GmshFinalize();
529  Msg::Exit(0);
530  }
531 
532  // Interactive Gmsh with FLTK GUI
533  return GmshFLTK(argc, argv);
534 }
RedirectIOToConsole
void RedirectIOToConsole()
Definition: OS.cpp:642
NumberOption
bool NumberOption(int action, const char *category, int num, const char *name, double &val, bool warnIfUnknown)
Definition: Options.cpp:185
Msg::GetCallback
static GmshMessage * GetCallback()
Definition: GmshMessage.cpp:244
InitOptionsGUI
void InitOptionsGUI(int num)
Definition: Options.cpp:521
GModel::setVisibility
void setVisibility(char val)
Definition: GModel.h:341
CreateFile.h
tags
static std::map< SPoint2, unsigned int > tags
Definition: drawGraph2d.cpp:400
GMSH_API
#define GMSH_API
Definition: GmshGlobal.h:65
GmshRestoreDefaultOptions
int GmshRestoreDefaultOptions()
Definition: GmshGlobal.cpp:206
Field.h
GmshGetNumberOption
double GmshGetNumberOption(const std::string &category, const std::string &name, int index)
Definition: GmshGlobal.cpp:190
computeCrossField
int computeCrossField(GModel *gm, std::vector< int > &tags)
Definition: gmshCrossFields.cpp:3895
GmshFLTK
int GmshFLTK(int argc, char **argv)
Definition: GmshGlobal.cpp:388
GMSH_GET
#define GMSH_GET
Definition: Options.h:13
GMSH_SET
#define GMSH_SET
Definition: Options.h:12
CTX::bgmFileName
std::string bgmFileName
Definition: Context.h:141
gmshLocalNetworkClient.h
MergeFile
int MergeFile(const std::string &fileName, bool errorIfMissing, bool setBoundingBox, bool importPhysicalsInOnelab, int partitionToRead)
Definition: OpenFile.cpp:298
ColorOption
bool ColorOption(int action, const char *category, int num, const char *name, unsigned int &val, bool warnIfUnknown)
Definition: Options.cpp:287
GmshRemote
int GmshRemote()
Definition: GmshRemote.cpp:296
GmshGetStringOption
std::string GmshGetStringOption(const std::string &category, const std::string &name, int index)
Definition: GmshGlobal.cpp:182
isInitialized
static bool isInitialized
Definition: GmshGlobal.cpp:63
StringOption
bool StringOption(int action, const char *category, int num, const char *name, std::string &val, bool warnIfUnknown)
Definition: Options.cpp:63
GmshFinalize
int GmshFinalize()
Definition: GmshGlobal.cpp:243
Msg::Info
static void Info(const char *fmt,...)
Definition: GmshMessage.cpp:587
CTX::fileFormat
int fileFormat
Definition: Context.h:319
gmshCrossFields.h
OS.h
CTX::combineCopyOptions
int combineCopyOptions
Definition: Context.h:318
robustPredicates.h
c
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
Definition: discreteFrechetDistance.cpp:15
DeleteAllModelsAndViews
void DeleteAllModelsAndViews()
Definition: OpenFile.cpp:664
GmshSetMessageHandler
int GmshSetMessageHandler(GmshMessage *callback)
Definition: GmshGlobal.cpp:104
CTX::numThreads
int numThreads
Definition: Context.h:169
CreateOutputFile
void CreateOutputFile(const std::string &fileName, int format, bool status)
Definition: CreateFile.cpp:290
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
CTX::post
struct CTX::@0 post
Msg::GetCommandLineFull
static std::string GetCommandLineFull()
Definition: GmshMessage.cpp:282
GmshInitialize
int GmshInitialize(int argc, char **argv, bool readConfigFiles, bool exitOnCommandLineError)
Definition: GmshGlobal.cpp:65
CTX::noPopup
int noPopup
Definition: Context.h:213
CTX::solver
struct CTX::@1 solver
GmshGetColorOption
unsigned int GmshGetColorOption(const std::string &category, const std::string &name, int index)
Definition: GmshGlobal.cpp:198
ReInitOptions
void ReInitOptions(int num)
Definition: Options.cpp:504
PView.h
Msg::GetGmshClient
static GmshClient * GetGmshClient()
Definition: GmshMessage.cpp:1272
Msg::Initialize
static void Initialize(int argc, char **argv)
Definition: GmshMessage.cpp:125
CTX::files
std::vector< std::string > files
Definition: Context.h:140
GmshBatch
int GmshBatch()
Definition: GmshGlobal.cpp:278
GmshMessage.h
CTX::batch
int batch
Definition: Context.h:203
PViewData.h
PrintParserSymbols
void PrintParserSymbols(bool help, std::vector< std::string > &vec)
Definition: Gmsh.tab.cpp:15027
SetBoundingBox
void SetBoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Definition: OpenFile.cpp:115
StartupMessage
static void StartupMessage()
Definition: GmshGlobal.cpp:258
GmshMainFLTK
GMSH_API int GmshMainFLTK(int argc, char **argv)
Definition: GmshGlobal.cpp:505
GModel::createGeometryOfDiscreteEntities
void createGeometryOfDiscreteEntities(const std::vector< std::pair< int, int > > &dimTags=std::vector< std::pair< int, int > >())
Definition: GModel.cpp:2370
GetDefaultFileName
std::string GetDefaultFileName(int format)
Definition: CreateFile.cpp:165
PluginManager::instance
static PluginManager * instance()
Definition: PluginManager.cpp:169
GmshSetOption
int GmshSetOption(const std::string &category, const std::string &name, std::string value, int index)
Definition: GmshGlobal.cpp:119
CTX::instance
static CTX * instance()
Definition: Context.cpp:122
MergePostProcessingFile
int MergePostProcessingFile(const std::string &fileName, int showViews, bool showLastStep, bool errorIfMissing)
Definition: OpenFile.cpp:574
CheckResources
void CheckResources()
Definition: OS.cpp:347
Msg::Finalize
static void Finalize()
Definition: GmshMessage.cpp:195
automaticMeshSizeField
Definition: automaticMeshSizeField.h:124
CTX::autoShowLastStep
int autoShowLastStep
Definition: Context.h:335
GmshMergePostProcessingFile
int GmshMergePostProcessingFile(const std::string &fileName)
Definition: GmshGlobal.cpp:230
FORMAT_MSH
#define FORMAT_MSH
Definition: GmshDefines.h:10
OpenProject
void OpenProject(const std::string &fileName, bool errorIfMissing)
Definition: OpenFile.cpp:718
GmshRemote.h
PluginManager.h
GModel::refineMesh
int refineMesh(int linear, bool splitIntoQuads=false, bool splitIntoHexas=false, bool barycentric=false)
Definition: GModel.cpp:1401
PView::combine
static void combine(bool time, int how, bool remove, bool copyOptions)
Definition: PView.cpp:249
meshPartition.h
GmshSetBoundingBox
int GmshSetBoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Definition: GmshGlobal.cpp:112
GmshSetStringOption
void GmshSetStringOption(const std::string &category, const std::string &name, std::string value, int index)
Definition: GmshGlobal.cpp:140
GModel
Definition: GModel.h:44
GModel::computeSizeField
void computeSizeField()
Definition: GModel.cpp:3590
GModel::classifySurfaces
void classifySurfaces(double angleThreshold, bool includeBoundary, bool forReparametrization, double curveAngleThreshold)
Definition: GModel.cpp:3472
Msg::GetMaxThreads
static int GetMaxThreads()
Definition: GmshMessage.cpp:1637
automaticMeshSizeField.h
Msg::SetCallback
static void SetCallback(GmshMessage *callback)
Definition: GmshMessage.cpp:239
PViewOptions.h
GMSH_GUI
#define GMSH_GUI
Definition: Options.h:14
CTX::outputFileName
std::string outputFileName
Definition: Context.h:141
GmshClearProject
int GmshClearProject()
Definition: GmshGlobal.cpp:219
GmshMergeFile
int GmshMergeFile(const std::string &fileName)
Definition: GmshGlobal.cpp:225
GmshDefines.h
GmshMessage
Definition: GmshMessage.h:23
onelabUtils.h
Msg::Exit
static void Exit(int level)
Definition: GmshMessage.cpp:384
Parser.h
GModel::getFields
FieldManager * getFields()
Definition: GModel.h:325
GModel::list
static std::vector< GModel * > list
Definition: GModel.h:202
Msg::GetCommSize
static int GetCommSize()
Definition: GmshMessage.cpp:224
FieldManager::setBackgroundMesh
void setBackgroundMesh(int iView)
Definition: Field.cpp:3280
CTX::autoShowViews
int autoShowViews
Definition: Context.h:335
robustPredicates::exactinit
REAL exactinit(int filter, REAL maxx, REAL maxy, REAL maxz)
Definition: robustPredicates.cpp:676
GmshGlobal.h
GmshGetOption
int GmshGetOption(const std::string &category, const std::string &name, std::string &value, int index)
Definition: GmshGlobal.cpp:161
CTX::combineRemoveOrig
int combineRemoveOrig
Definition: Context.h:318
PrintUsage
void PrintUsage(const std::string &name)
Definition: CommandLine.cpp:350
Msg::GetLaunchDate
static std::string GetLaunchDate()
Definition: GmshMessage.cpp:272
GModel::adaptMesh
int adaptMesh()
Definition: GModel.cpp:1215
GmshMainBatch
GMSH_API int GmshMainBatch(int argc, char **argv)
Definition: GmshGlobal.cpp:485
Msg::Direct
static void Direct(const char *fmt,...)
Definition: GmshMessage.cpp:634
Context.h
ClearProject
void ClearProject()
Definition: OpenFile.cpp:697
CTX::combineTime
int combineTime
Definition: Context.h:318
GmshWriteFile
int GmshWriteFile(const std::string &fileName)
Definition: GmshGlobal.cpp:237
FORMAT_AUTO
#define FORMAT_AUTO
Definition: GmshDefines.h:18
GoodbyeMessage
static void GoodbyeMessage()
Definition: GmshGlobal.cpp:268
GModel::mesh
int mesh(int dimension)
Definition: GModel.cpp:1066
Options.h
GmshGetMessageHandler
GmshMessage * GmshGetMessageHandler()
Definition: GmshGlobal.cpp:110
onelabUtils::runClient
void runClient(const std::string &name="", const std::string &command="")
GModel.h
CommandLine.h
GetOptions
void GetOptions(bool readConfigFiles, bool exitOnError)
Definition: CommandLine.cpp:1478
GModel::checkMeshCoherence
void checkMeshCoherence(double tolerance)
Definition: GModel.cpp:2595
InitOptions
void InitOptions(int num)
Definition: Options.cpp:472
FORMAT_GEO
#define FORMAT_GEO
Definition: GmshDefines.h:16
BasisFactory::clearAll
static void clearAll()
Definition: BasisFactory.cpp:150
PluginManager::registerDefaultPlugins
void registerDefaultPlugins()
Definition: PluginManager.cpp:175
PView::list
static std::vector< PView * > list
Definition: PView.h:112
CTX::terminal
int terminal
Definition: Context.h:167
PrintOptionsDoc
void PrintOptionsDoc()
Definition: Options.cpp:793
CTX::listen
int listen
Definition: Context.h:328
GmshSetNumberOption
void GmshSetNumberOption(const std::string &category, const std::string &name, double value, int index)
Definition: GmshGlobal.cpp:147
OpenFile.h
GModel::current
static GModel * current(int index=-1)
Definition: GModel.cpp:136
GmshSetColorOption
void GmshSetColorOption(const std::string &category, const std::string &name, unsigned int value, int index)
Definition: GmshGlobal.cpp:154
FieldManager::setBackgroundField
void setBackgroundField(Field *BGF)
Definition: Field.cpp:3224
BasisFactory.h
GModel::partitionMesh
int partitionMesh(int num, std::vector< std::pair< MElement *, int > > elementPartition=std::vector< std::pair< MElement *, int > >())
Definition: GModel.cpp:2208
GmshOpenProject
int GmshOpenProject(const std::string &fileName)
Definition: GmshGlobal.cpp:213
Msg::SetInfoCpu
static void SetInfoCpu(bool val)
Definition: GmshMessage.cpp:330
drawContext.h