gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
8 #include "GmshConfig.h"
9 #if !defined(HAVE_NO_STDINT_H)
11 #elif defined(HAVE_NO_INTPTR_T)
12 typedef unsigned long intptr_t;
14 #include "GmshVersion.h"
29 #if defined(HAVE_PARSER)
33 #if defined(HAVE_POST)
39 #if defined(HAVE_ONELAB)
44 #if defined(HAVE_MESH)
51 #if defined(HAVE_PLUGINS)
55 #if defined(HAVE_FLTK)
57 #include "graphicWindow.h"
59 #include "onelabGroup.h"
66 bool exitOnCommandLineError)
71 #if defined(HAVE_FLTK)
86 GetOptions(readConfigFiles, exitOnCommandLineError);
91 #if defined(HAVE_PLUGINS)
100 if(dummy)
delete dummy;
113 double zmin,
double zmax)
120 std::string value,
int index)
123 name.c_str(), value,
false);
127 double value,
int index)
130 name.c_str(), value,
false);
134 unsigned int value,
int index)
141 std::string value,
int index)
148 double value,
int index)
155 unsigned int value,
int index)
162 std::string &value,
int index)
169 double &value,
int index)
176 unsigned int &value,
int index)
183 const std::string &name,
int index)
199 const std::string &name,
int index)
249 #if defined(HAVE_PLUGINS)
262 Msg::Info(
"Running '%s' [Gmsh %s, %d node%s, max. %d thread%s]",
272 std::string currtime = ctime(&now);
273 currtime.resize(currtime.size() - 1);
275 Msg::Info(
"Stopped on %s", currtime.c_str());
298 #if defined(HAVE_POST) && defined(HAVE_MESH)
312 Msg::Error(
"Invalid background mesh (no view)");
320 #if defined(HAVE_PARSER)
321 std::vector<std::string> s;
323 for(std::size_t i = 0; i < s.size(); i++)
Msg::Direct(
"%s", s[i].c_str());
332 #if defined(HAVE_MESH)
344 CTX::instance()->batchSomeValue * M_PI / 180.,
true,
false, M_PI);
347 CTX::instance()->batchSomeValue * M_PI / 180.,
true,
true, M_PI);
354 std::vector<int>
tags;
380 #if defined(HAVE_ONELAB)
390 #if defined(HAVE_FLTK) && defined(HAVE_POST)
392 FlGui::instance(argc, argv);
399 if(FlGui::getOpenedThroughMacFinder().size() &&
423 FlGui::instance()->setFinishedProcessingCommandLine();
428 FlGui::instance()->updateViews(
true,
true);
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;
438 if(
PView::list.size()) FlGui::instance()->openModule(
"Post-processing");
442 #if defined(HAVE_POST) && defined(HAVE_MESH)
462 Msg::Error(
"Invalid background mesh (no view)");
469 gmshLocalNetworkClient *
c =
new gmshLocalNetworkClient(
"Listen",
"");
474 solver_cb(
nullptr, (
void *)(intptr_t)
CTX::instance()->launchSolverAtStartup);
477 return FlGui::instance()->run();
480 Msg::Error(
"GmshFLTK unavailable: please recompile with FLTK support");
512 if(argc == 2 && std::string(argv[1]) ==
"-doc") {
514 #if defined(HAVE_PLUGINS)
void RedirectIOToConsole()
bool NumberOption(int action, const char *category, int num, const char *name, double &val, bool warnIfUnknown)
static GmshMessage * GetCallback()
void InitOptionsGUI(int num)
void setVisibility(char val)
static std::map< SPoint2, unsigned int > tags
int GmshRestoreDefaultOptions()
double GmshGetNumberOption(const std::string &category, const std::string &name, int index)
int computeCrossField(GModel *gm, std::vector< int > &tags)
int GmshFLTK(int argc, char **argv)
int MergeFile(const std::string &fileName, bool errorIfMissing, bool setBoundingBox, bool importPhysicalsInOnelab, int partitionToRead)
bool ColorOption(int action, const char *category, int num, const char *name, unsigned int &val, bool warnIfUnknown)
std::string GmshGetStringOption(const std::string &category, const std::string &name, int index)
static bool isInitialized
bool StringOption(int action, const char *category, int num, const char *name, std::string &val, bool warnIfUnknown)
static void Info(const char *fmt,...)
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
void DeleteAllModelsAndViews()
int GmshSetMessageHandler(GmshMessage *callback)
void CreateOutputFile(const std::string &fileName, int format, bool status)
static void Error(const char *fmt,...)
static std::string GetCommandLineFull()
int GmshInitialize(int argc, char **argv, bool readConfigFiles, bool exitOnCommandLineError)
unsigned int GmshGetColorOption(const std::string &category, const std::string &name, int index)
void ReInitOptions(int num)
static GmshClient * GetGmshClient()
static void Initialize(int argc, char **argv)
std::vector< std::string > files
void PrintParserSymbols(bool help, std::vector< std::string > &vec)
void SetBoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
static void StartupMessage()
GMSH_API int GmshMainFLTK(int argc, char **argv)
void createGeometryOfDiscreteEntities(const std::vector< std::pair< int, int > > &dimTags=std::vector< std::pair< int, int > >())
std::string GetDefaultFileName(int format)
static PluginManager * instance()
int GmshSetOption(const std::string &category, const std::string &name, std::string value, int index)
int MergePostProcessingFile(const std::string &fileName, int showViews, bool showLastStep, bool errorIfMissing)
int GmshMergePostProcessingFile(const std::string &fileName)
void OpenProject(const std::string &fileName, bool errorIfMissing)
int refineMesh(int linear, bool splitIntoQuads=false, bool splitIntoHexas=false, bool barycentric=false)
static void combine(bool time, int how, bool remove, bool copyOptions)
int GmshSetBoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
void GmshSetStringOption(const std::string &category, const std::string &name, std::string value, int index)
void classifySurfaces(double angleThreshold, bool includeBoundary, bool forReparametrization, double curveAngleThreshold)
static int GetMaxThreads()
static void SetCallback(GmshMessage *callback)
std::string outputFileName
int GmshMergeFile(const std::string &fileName)
static void Exit(int level)
FieldManager * getFields()
static std::vector< GModel * > list
void setBackgroundMesh(int iView)
REAL exactinit(int filter, REAL maxx, REAL maxy, REAL maxz)
int GmshGetOption(const std::string &category, const std::string &name, std::string &value, int index)
void PrintUsage(const std::string &name)
static std::string GetLaunchDate()
GMSH_API int GmshMainBatch(int argc, char **argv)
static void Direct(const char *fmt,...)
int GmshWriteFile(const std::string &fileName)
static void GoodbyeMessage()
GmshMessage * GmshGetMessageHandler()
void runClient(const std::string &name="", const std::string &command="")
void GetOptions(bool readConfigFiles, bool exitOnError)
void checkMeshCoherence(double tolerance)
void InitOptions(int num)
void registerDefaultPlugins()
static std::vector< PView * > list
void GmshSetNumberOption(const std::string &category, const std::string &name, double value, int index)
static GModel * current(int index=-1)
void GmshSetColorOption(const std::string &category, const std::string &name, unsigned int value, int index)
void setBackgroundField(Field *BGF)
int partitionMesh(int num, std::vector< std::pair< MElement *, int > > elementPartition=std::vector< std::pair< MElement *, int > >())
int GmshOpenProject(const std::string &fileName)
static void SetInfoCpu(bool val)