gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
9 #include "GmshConfig.h"
79 #if defined(HAVE_DLOPEN)
83 #if defined(HAVE_FLTK)
85 #include <FL/filename.H>
110 for(; it != ite; ++it) {
120 const std::string &action,
void *data)
123 if(!plugin)
throw std::runtime_error(
"Unknown plugin name");
126 Msg::Info(
"Running Plugin(%s)...", pluginName.c_str());
127 int tag = plugin->
run();
128 Msg::Info(
"Done running Plugin(%s)", pluginName.c_str());
132 throw std::runtime_error(
"Unknown plugin action");
136 const std::string &option,
137 const std::string &value)
140 if(!plugin)
throw std::runtime_error(
"Unknown plugin name");
144 if(option == std::string(sxs->
str)) {
149 throw std::runtime_error(
"Unknown plugin option name");
153 const std::string &option,
157 if(!plugin)
throw std::runtime_error(
"Unknown plugin name");
161 if(option == std::string(sxn->
str)) {
166 throw std::runtime_error(
"Unknown plugin option name");
199 allPlugins.insert(std::make_pair(
"ModifyComponents",
210 allPlugins.insert(std::make_pair(
"LongitudeLatitude",
245 allPlugins.insert(std::make_pair(
"DiscretizationError",
269 #if defined(HAVE_MESH)
270 allPlugins.insert(std::make_pair(
"AnalyseMeshQuality",
276 allPlugins.insert(std::make_pair(
"MeshSizeFieldView",
279 #if defined(HAVE_REVOROPT)
283 #if defined(HAVE_KBIPACK)
284 allPlugins.insert(std::make_pair(
"HomologyComputation",
285 GMSH_RegisterHomologyComputationPlugin()));
287 "HomologyPostProcessing", GMSH_RegisterHomologyPostProcessingPlugin()));
289 #if defined(HAVE_SOLVER)
293 #if defined(HAVE_ANN)
297 #if defined(HAVE_DINTEGRATION)
304 #if defined(HAVE_FLTK)
305 char *pluginsHome = getenv(
"GMSHPLUGINSHOME");
306 if(!pluginsHome)
return;
307 struct dirent **list;
308 int nbFiles = fl_filename_list(pluginsHome, &list);
309 if(nbFiles <= 0)
return;
310 for(
int i = 0; i < nbFiles; i++) {
312 if(ext ==
".so" || ext ==
".dll")
addPlugin(list[i]->d_name);
314 for(
int i = 0; i < nbFiles; i++) free(list[i]);
321 #if !defined(HAVE_DLOPEN) || !defined(HAVE_FLTK)
322 Msg::Warning(
"No dynamic plugin loading on this platform");
324 Msg::Info(
"Opening Plugin '%s'", fileName.c_str());
325 void *hlib = dlopen(fileName.c_str(), RTLD_NOW);
326 const char *err = dlerror();
328 Msg::Warning(
"Could not open '%s' (dlerror = %s)", fileName.c_str(), err);
338 fileName.c_str(), err);
345 Msg::Warning(
"Plugin '%s' multiply defined", fileName.c_str());
GMSH_Plugin * GMSH_RegisterFieldFromAmplitudePhasePlugin()
void setPluginOption(const std::string &pluginName, const std::string &option, double value)
GMSH_Plugin * GMSH_RegisterCutParametricPlugin()
GMSH_Plugin * GMSH_RegisterIntegratePlugin()
std::vector< std::string > SplitFileName(const std::string &fileName)
GMSH_Plugin * GMSH_RegisterParticlesPlugin()
int action(const std::string &pluginName, const std::string &action, void *data)
static PluginManager * _instance
GMSH_Plugin * GMSH_RegisterBubblesPlugin()
GMSH_Plugin * GMSH_RegisterLambda2Plugin()
GMSH_Plugin * GMSH_RegisterMeshVolumePlugin()
GMSH_Plugin * GMSH_RegisterSkinPlugin()
GMSH_Plugin * GMSH_RegisterBoundaryAnglesPlugin()
GMSH_Plugin * GMSH_RegisterDistancePlugin()
static void Info(const char *fmt,...)
GMSH_Plugin * GMSH_RegisterSmoothPlugin()
GMSH_Plugin * GMSH_RegisterCutMeshPlugin()
static void Warning(const char *fmt,...)
GMSH_Plugin * GMSH_RegisterNearToFarFieldPlugin()
GMSH_Plugin * GMSH_RegisterModulusPhasePlugin()
GMSH_Plugin * GMSH_RegisterMathEvalPlugin()
GMSH_Plugin * GMSH_RegisterModifyComponentsPlugin()
GMSH_Plugin * GMSH_RegisterProbePlugin()
GMSH_Plugin * GMSH_RegisterWarpPlugin()
GMSH_Plugin * GMSH_RegisterDivergencePlugin()
GMSH_Plugin * GMSH_RegisterTetrahedralizePlugin()
GMSH_Plugin * GMSH_RegisterAnalyseMeshQualityPlugin()
virtual GMSH_PLUGIN_TYPE getType() const =0
GMSH_Plugin * GMSH_RegisterCurvedBndDistPlugin()
const char * GMSH_PluginEntry
static PluginManager * instance()
GMSH_Plugin * GMSH_RegisterSpanningTreePlugin()
GMSH_Plugin * GMSH_RegisterMeshSizeFieldViewPlugin()
GMSH_Plugin * GMSH_RegisterStreamLinesPlugin()
virtual int getNbOptions() const
GMSH_Plugin * GMSH_RegisterSummationPlugin()
GMSH_Plugin * GMSH_RegisterMeshSubEntitiesPlugin()
GMSH_Plugin * GMSH_RegisterInvisiblePlugin()
virtual std::string getName() const =0
GMSH_Plugin * GMSH_RegisterSimplePartitionPlugin()
GMSH_Plugin * GMSH_RegisterCVTRemeshPlugin()
GMSH_Plugin * GMSH_RegisterGradientPlugin()
GMSH_Plugin * GMSH_RegisterRemovePlugin()
GMSH_Plugin * GMSH_RegisterCutGridPlugin()
GMSH_Plugin * GMSH_RegisterGaussPointsPlugin()
GMSH_Plugin * GMSH_RegisterCurlPlugin()
GMSH_Plugin * GMSH_RegisterIsosurfacePlugin()
GMSH_Plugin * GMSH_RegisterMakeSimplexPlugin()
GMSH_Plugin * GMSH_RegisterSphericalRaisePlugin()
virtual int getNbOptionsStr() const
GMSH_Plugin * GMSH_RegisterNewViewPlugin()
GMSH_Plugin * GMSH_RegisterLongituteLatitudePlugin()
std::map< std::string, GMSH_Plugin * > allPlugins
void addPlugin(const std::string &fileName)
GMSH_Plugin * GMSH_RegisterTriangulatePlugin()
GMSH_Plugin * GMSH_RegisterNearestNeighborPlugin()
GMSH_Plugin * GMSH_RegisterDiscretizationErrorPlugin()
GMSH_Plugin * GMSH_RegisterScal2VecPlugin()
GMSH_Plugin * GMSH_RegisterEigenvaluesPlugin()
virtual std::string getAuthor() const
GMSH_Plugin * find(const std::string &pluginName)
GMSH_Plugin * GMSH_RegisterCutBoxPlugin()
GMSH_Plugin * GMSH_RegisterScal2TensPlugin()
GMSH_Plugin * GMSH_RegisterHarmonicToTimePlugin()
GMSH_Plugin * GMSH_RegisterMinMaxPlugin()
GMSH_SolverPlugin * findSolverPlugin()
virtual StringXString * getOptionStr(int iopt)
void registerDefaultPlugins()
GMSH_Plugin * GMSH_RegisterCutSpherePlugin()
GMSH_Plugin * GMSH_RegisterCrackPlugin()
GMSH_Plugin * GMSH_RegisterCutPlanePlugin()
GMSH_Plugin * GMSH_RegisterEigenvectorsPlugin()
GMSH_Plugin * GMSH_RegisterShowNeighborElementsPlugin()
virtual StringXNumber * getOption(int iopt)
GMSH_Plugin * GMSH_RegisterAnnotatePlugin()