diff --git a/Fltk/pluginWindow.cpp b/Fltk/pluginWindow.cpp index 9041e638e534fd90caa1dbde40e54af9328cb982..77a87681618e468e6e48df37babf3a305b4e60c9 100644 --- a/Fltk/pluginWindow.cpp +++ b/Fltk/pluginWindow.cpp @@ -112,7 +112,7 @@ static void add_scripting(GMSH_PostPlugin *p, PView *view) int oldIndex = -1; if(view){ for(int i = 0; i < p->getNbOptions(); i++){ - if(p->getOption(i)->str == "iView") { + if(p->getOption(i)->str == "View") { oldIndex = (int)(p->getOption(i)->def); p->getOption(i)->def = view->getIndex(); } @@ -134,7 +134,7 @@ static void add_scripting(GMSH_PostPlugin *p, PView *view) if(view && oldIndex != -1){ for(int i = 0; i < p->getNbOptions(); i++){ - if(p->getOption(i)->str == "iView"){ + if(p->getOption(i)->str == "View"){ p->getOption(i)->def = oldIndex; } } diff --git a/Plugin/Annotate.cpp b/Plugin/Annotate.cpp index 2441d2017b53f8084ec514521e901fecaad48d5b..7f9a7f09f59e9261d97b61d720e2aa872569b4d2 100644 --- a/Plugin/Annotate.cpp +++ b/Plugin/Annotate.cpp @@ -18,7 +18,7 @@ StringXNumber AnnotateOptions_Number[] = { {GMSH_FULLRC, "Z", GMSH_AnnotatePlugin::callbackZ, 0.}, {GMSH_FULLRC, "ThreeD", GMSH_AnnotatePlugin::callback3D, 0.}, {GMSH_FULLRC, "FontSize", GMSH_AnnotatePlugin::callbackFontSize, 14.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; StringXString AnnotateOptions_String[] = { @@ -179,12 +179,12 @@ std::string GMSH_AnnotatePlugin::getHelp() const { return "Plugin(Annotate) adds the text string `Text',\n" "in font `Font' and size `FontSize', in the view\n" - "`iView'. If `ThreeD' is equal to 1, the plugin inserts\n" + "`View'. If `ThreeD' is equal to 1, the plugin inserts\n" "the string in model coordinates at the position\n" "(`X',`Y',`Z'). If `ThreeD' is equal to 0, the plugin\n" "inserts the string in screen coordinates at\n" "the position (`X',`Y'). The string is aligned\n" - "according to `Align'. If `iView' < 0, the plugin\n" + "according to `Align'. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(Annotate) is executed in-place for list-based\n" diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt index 34f32a792fdec46adf67e214b8b4e4bdc0214235..abecb98ce27db775d13d0bf795895bd63c018d27 100644 --- a/Plugin/CMakeLists.txt +++ b/Plugin/CMakeLists.txt @@ -18,7 +18,6 @@ set(SRC Skin.cpp GSHHS.cpp MathEval.cpp ModifyComponent.cpp ExtractElements.cpp MakeSimplex.cpp - FieldView.cpp Integrate.cpp Gradient.cpp Curl.cpp Divergence.cpp Annotate.cpp Remove.cpp Probe.cpp diff --git a/Plugin/Curl.cpp b/Plugin/Curl.cpp index 3e23e45ed5c9e941ac783f8caeebac7e4e38a031..9769bf9636a3d577b1684033f6f989a6f734f63d 100644 --- a/Plugin/Curl.cpp +++ b/Plugin/Curl.cpp @@ -8,7 +8,7 @@ #include "GmshDefines.h" StringXNumber CurlOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -22,7 +22,7 @@ extern "C" std::string GMSH_CurlPlugin::getHelp() const { return "Plugin(Curl) computes the curl of the field\n" - "in the view `iView'. If `iView' < 0, the plugin\n" + "in the view `View'. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(Curl) creates one new view.\n"; diff --git a/Plugin/CutGrid.cpp b/Plugin/CutGrid.cpp index 4f6661cd1da3b63e4cc4097906d7515b55f29568..3cbdcc28c435b126165397a0ab169436505d9048 100644 --- a/Plugin/CutGrid.cpp +++ b/Plugin/CutGrid.cpp @@ -22,10 +22,10 @@ StringXNumber CutGridOptions_Number[] = { {GMSH_FULLRC, "X2", GMSH_CutGridPlugin::callbackX2, 0.}, {GMSH_FULLRC, "Y2", GMSH_CutGridPlugin::callbackY2, 1.}, {GMSH_FULLRC, "Z2", GMSH_CutGridPlugin::callbackZ2, 0.}, - {GMSH_FULLRC, "nPointsU", GMSH_CutGridPlugin::callbackU, 20}, - {GMSH_FULLRC, "nPointsV", GMSH_CutGridPlugin::callbackV, 20}, + {GMSH_FULLRC, "NumPointsU", GMSH_CutGridPlugin::callbackU, 20}, + {GMSH_FULLRC, "NumPointsV", GMSH_CutGridPlugin::callbackV, 20}, {GMSH_FULLRC, "ConnectPoints", GMSH_CutGridPlugin::callbackConnect, 1}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -167,16 +167,16 @@ double GMSH_CutGridPlugin::callbackConnect(int num, int action, double value) std::string GMSH_CutGridPlugin::getHelp() const { - return "Plugin(CutGrid) cuts the view `iView' with a\n" + return "Plugin(CutGrid) cuts the view `View' with a\n" "rectangular grid defined by the 3 points\n" "(`X0',`Y0',`Z0') (origin), (`X1',`Y1',`Z1') (axis of\n" "U) and (`X2',`Y2',`Z2') (axis of V). The number of\n" "points along U and V is set with the options\n" - "`nPointsU' and `nPointsV'. If `ConnectPoints' is\n" + "`NumPointsU' and `NumPointsV'. If `ConnectPoints' is\n" "zero, the plugin creates points; otherwise, the\n" "plugin generates quadrangles, lines or points\n" - " depending on the values of `nPointsU' and\n" - "`nPointsV'. If `iView' < 0, the plugin is run on\n" + " depending on the values of `NumPointsU' and\n" + "`NumPointsV'. If `View' < 0, the plugin is run on\n" "the current view.\n" "\n" "Plugin(CutGrid) creates one new view.\n"; diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp index b7ab88b5bbfa16d10e0139601982916092363806..ed694f558d888aa9f7723f7016d015e51d0125b0 100644 --- a/Plugin/CutParametric.cpp +++ b/Plugin/CutParametric.cpp @@ -17,14 +17,14 @@ StringXNumber CutParametricOptions_Number[] = { {GMSH_FULLRC, "MinU", GMSH_CutParametricPlugin::callbackMinU, 0.}, {GMSH_FULLRC, "MaxU", GMSH_CutParametricPlugin::callbackMaxU, 2 * 3.1416}, - {GMSH_FULLRC, "nPointsU", GMSH_CutParametricPlugin::callbackN, 360.}, + {GMSH_FULLRC, "NumPointsU", GMSH_CutParametricPlugin::callbackN, 360.}, {GMSH_FULLRC, "ConnectPoints", GMSH_CutParametricPlugin::callbackConnect, 0.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; StringXString CutParametricOptions_String[] = { - {GMSH_FULLRC, "X", GMSH_CutParametricPlugin::callbackX, "0 + 1 * Cos(u)"}, - {GMSH_FULLRC, "Y", GMSH_CutParametricPlugin::callbackY, "0 + 1 * Sin(u)"}, + {GMSH_FULLRC, "X", GMSH_CutParametricPlugin::callbackX, "0.1 + 0.5 * Cos(u)"}, + {GMSH_FULLRC, "Y", GMSH_CutParametricPlugin::callbackY, "0.1 + 0.5 * Sin(u)"}, {GMSH_FULLRC, "Z", GMSH_CutParametricPlugin::callbackZ, "0"}, }; @@ -167,12 +167,12 @@ std::string GMSH_CutParametricPlugin::callbackZ(int num, int action, std::string std::string GMSH_CutParametricPlugin::getHelp() const { - return "Plugin(CutParametric) cuts the view `iView' with\n" + return "Plugin(CutParametric) cuts the view `View' with\n" "the parametric function (`X'(u), `Y'(u), `Z'(u)),\n" - "using `nPointsU' values of the parameter u in\n" + "using `NumPointsU' values of the parameter u in\n" "[`MinU', `MaxU']. If `ConnectPoints' is set, the\n" "plugin creates line elements; otherwise, the\n" - "plugin generates points. If `iView' < 0, the plugin\n" + "plugin generates points. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(CutParametric) creates one new view.\n"; diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp index 542f888b7bd29219e18b7561dc3f48ce8b937143..babca5c29968d3f7741d7b4950a925f8bc215e53 100644 --- a/Plugin/CutPlane.cpp +++ b/Plugin/CutPlane.cpp @@ -21,7 +21,7 @@ StringXNumber CutPlaneOptions_Number[] = { {GMSH_FULLRC, "ExtractVolume", GMSH_CutPlanePlugin::callbackVol, 0}, {GMSH_FULLRC, "RecurLevel", GMSH_CutPlanePlugin::callbackRecur, 4}, {GMSH_FULLRC, "TargetError", GMSH_CutPlanePlugin::callbackTarget, 0.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -112,11 +112,11 @@ double GMSH_CutPlanePlugin::callbackTarget(int num, int action, double value) std::string GMSH_CutPlanePlugin::getHelp() const { - return "Plugin(CutPlane) cuts the view `iView' with\n" + return "Plugin(CutPlane) cuts the view `View' with\n" "the plane `A'*X + `B'*Y + `C'*Z + `D' = 0. If\n" "`ExtractVolume' is nonzero, the plugin extracts\n" "the elements on one side of the plane (depending\n" - "on the sign of `ExtractVolume'). If `iView' < 0,\n" + "on the sign of `ExtractVolume'). If `View' < 0,\n" "the plugin is run on the current view.\n" "\n" "Plugin(CutPlane) creates one new view.\n"; diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp index 1e25b17a26ae214fcd3b0079c7a8c027c153cab2..26fddbc230bdcb3361109df6f6316d95a6674b90 100644 --- a/Plugin/CutSphere.cpp +++ b/Plugin/CutSphere.cpp @@ -19,7 +19,8 @@ StringXNumber CutSphereOptions_Number[] = { {GMSH_FULLRC, "R", GMSH_CutSpherePlugin::callbackR, 0.25}, {GMSH_FULLRC, "ExtractVolume", GMSH_CutSpherePlugin::callbackVol, 0.}, {GMSH_FULLRC, "RecurLevel", GMSH_CutSpherePlugin::callbackRecur, 4}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "TargetError", GMSH_CutSpherePlugin::callbackTarget, 0.}, + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -100,14 +101,20 @@ double GMSH_CutSpherePlugin::callbackRecur(int num, int action, double value) 1, 0, 10); } +double GMSH_CutSpherePlugin::callbackTarget(int num, int action, double value) +{ + return callback(num, action, value, &CutSphereOptions_Number[6].def, + 0.01, 0., 1.); +} + std::string GMSH_CutSpherePlugin::getHelp() const { - return "Plugin(CutSphere) cuts the view `iView' with the\n" + return "Plugin(CutSphere) cuts the view `View' with the\n" "sphere (X-`Xc')^2 + (Y-`Yc')^2 + (Z-`Zc')^2 = `R'^2.\n" "If `ExtractVolume' is nonzero, the plugin extracts\n" "the elements inside (if `ExtractVolume' < 0) or\n" "outside (if `ExtractVolume' > 0) the sphere. If\n" - "`iView' < 0, the plugin is run on the current view.\n" + "`View' < 0, the plugin is run on the current view.\n" "\n" "Plugin(CutSphere) creates one new view.\n"; } @@ -134,12 +141,13 @@ double GMSH_CutSpherePlugin::levelset(double x, double y, double z, PView *GMSH_CutSpherePlugin::execute(PView *v) { - int iView = (int)CutSphereOptions_Number[6].def; + int iView = (int)CutSphereOptions_Number[7].def; _ref[0] = CutSphereOptions_Number[0].def; _ref[1] = CutSphereOptions_Number[1].def; _ref[2] = CutSphereOptions_Number[2].def; _extractVolume = (int)CutSphereOptions_Number[4].def; _recurLevel = (int)CutSphereOptions_Number[5].def; + _targetError = CutSphereOptions_Number[6].def; _valueIndependent = 1; _valueView = -1; diff --git a/Plugin/CutSphere.h b/Plugin/CutSphere.h index f5746bf54c0a26d73d3ff31b6ac4619c490b5fad..458c4646244ac31612968c35523d5748092ffccf 100644 --- a/Plugin/CutSphere.h +++ b/Plugin/CutSphere.h @@ -23,7 +23,7 @@ class GMSH_CutSpherePlugin : public GMSH_LevelsetPlugin std::string getName() const { return "CutSphere"; } std::string getShortHelp() const { - return "Cut with a sphere"; + return "Cut with a sphere centered at (Xc, Yc, Zc)"; } std::string getHelp() const; int getNbOptions() const; @@ -36,6 +36,7 @@ class GMSH_CutSpherePlugin : public GMSH_LevelsetPlugin static double callbackR(int, int, double); static double callbackVol(int, int, double); static double callbackRecur(int, int, double); + static double callbackTarget(int, int, double); static void draw(void *context); }; diff --git a/Plugin/Divergence.cpp b/Plugin/Divergence.cpp index 171bb74fcc7f0a6cdbe7971c3c861d51092a6966..a66b297fae1d3ba607016d4c1d8c3c0c7021d0c0 100644 --- a/Plugin/Divergence.cpp +++ b/Plugin/Divergence.cpp @@ -8,7 +8,7 @@ #include "GmshDefines.h" StringXNumber DivergenceOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -22,7 +22,7 @@ extern "C" std::string GMSH_DivergencePlugin::getHelp() const { return "Plugin(Divergence) computes the divergence of the\n" - "field in the view `iView'. If `iView' < 0, the plugin\n" + "field in the view `View'. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(Divergence) creates one new view.\n"; diff --git a/Plugin/Eigenvalues.cpp b/Plugin/Eigenvalues.cpp index eba0160e7cc78ea96d259df85f0b5e7b1a4807a3..cbda98ec737dd4cc11a08c1aedd7eb9a008400cf 100644 --- a/Plugin/Eigenvalues.cpp +++ b/Plugin/Eigenvalues.cpp @@ -8,7 +8,7 @@ #include "GmshDefines.h" StringXNumber EigenvaluesOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -22,8 +22,8 @@ extern "C" std::string GMSH_EigenvaluesPlugin::getHelp() const { return "Plugin(Eigenvalues) computes the three real\n" - "eigenvalues of each tensor in the view `iView'.\n" - "If `iView' < 0, the plugin is run on the current view.\n" + "eigenvalues of each tensor in the view `View'.\n" + "If `View' < 0, the plugin is run on the current view.\n" "\n" "Plugin(Eigenvalues) creates three new scalar views.\n"; } diff --git a/Plugin/Eigenvectors.cpp b/Plugin/Eigenvectors.cpp index 338aac561249237c92b0d4978318c18cc3d43e37..73c923301ac06d707a74216fc7341242b71cef23 100644 --- a/Plugin/Eigenvectors.cpp +++ b/Plugin/Eigenvectors.cpp @@ -10,7 +10,7 @@ StringXNumber EigenvectorsOptions_Number[] = { {GMSH_FULLRC, "ScaleByEigenvalues", NULL, 1.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -24,12 +24,12 @@ extern "C" std::string GMSH_EigenvectorsPlugin::getHelp() const { return "Plugin(Eigenvectors) computes the three (right)\n" - "eigenvectors of each tensor in the view `iView'\n" + "eigenvectors of each tensor in the view `View'\n" "and sorts them according to the value of the\n" "associated eigenvalues. If `ScaleByEigenvalues'\n" "is set, each eigenvector is scaled by its\n" "associated eigenvalue. The plugin gives an error\n" - "if the eigenvectors are complex. If `iView' < 0,\n" + "if the eigenvectors are complex. If `View' < 0,\n" "the plugin is run on the current view.\n" "\n" "Plugin(Eigenvectors) creates three new\n" diff --git a/Plugin/ExtractElements.cpp b/Plugin/ExtractElements.cpp index 6171bb1f6e40db82b42ba0a0a6dae23a4cca6b41..667c079310d25d49bf8ee0c2f1a2214355229320 100644 --- a/Plugin/ExtractElements.cpp +++ b/Plugin/ExtractElements.cpp @@ -12,7 +12,7 @@ StringXNumber ExtractElementsOptions_Number[] = { {GMSH_FULLRC, "MinVal", NULL, 0.}, {GMSH_FULLRC, "MaxVal", NULL, 1.}, {GMSH_FULLRC, "TimeStep", NULL, 0.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -26,9 +26,9 @@ extern "C" std::string GMSH_ExtractElementsPlugin::getHelp() const { return "Plugin(ExtractElements) extracts the elements\n" - "from the view `iView' whose `TimeStep'-th values\n" + "from the view `View' whose `TimeStep'-th values\n" "(averaged by element) are comprised between\n" - "`MinVal' and `MaxVal'. If `iView' < 0, the plugin\n" + "`MinVal' and `MaxVal'. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(ExtractElements) creates one new view.\n"; diff --git a/Plugin/FieldView.cpp b/Plugin/FieldView.cpp deleted file mode 100644 index 1cc73b31a6f92618aad63e9971c4dc850d24556c..0000000000000000000000000000000000000000 --- a/Plugin/FieldView.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to <gmsh@geuz.org>. - -#include "FieldView.h" -#include "GModel.h" - -#if defined(HAVE_MESH) -#include "Field.h" -#endif - -StringXNumber FieldViewOptions_Number[] = { - {GMSH_FULLRC, "Component", NULL, -1.}, - {GMSH_FULLRC, "iView", NULL, -1.}, - {GMSH_FULLRC, "iField", NULL, -1.} -}; - -extern "C" -{ - GMSH_Plugin *GMSH_RegisterFieldViewPlugin() - { - return new GMSH_FieldViewPlugin(); - } -} - -std::string GMSH_FieldViewPlugin::getHelp() const -{ - return "Plugin(FieldView) evaluates a field on the choosen view.\n"; -} - -int GMSH_FieldViewPlugin::getNbOptions() const -{ - return sizeof(FieldViewOptions_Number) / sizeof(StringXNumber); -} - -StringXNumber *GMSH_FieldViewPlugin::getOption(int iopt) -{ - return &FieldViewOptions_Number[iopt]; -} - -PView *GMSH_FieldViewPlugin::execute(PView *v) -{ -#if defined(HAVE_MESH) - //int comp = (int)FieldViewOptions_Number[0].def; - int iView = (int)FieldViewOptions_Number[1].def; - int iField = (int)FieldViewOptions_Number[2].def; - Field *field = GModel::current()->getFields()->get(iField); - if(!field){ - Msg::Error("Field[%d] does not exist", iField); - return v; - } - PView *v1 = getView(iView, v); - if(!v1) return v; - field->putOnView(v1); - return v1; -#else - Msg::Error("FieldView plugin requires the mesh module"); - return v; -#endif -} diff --git a/Plugin/FieldView.h b/Plugin/FieldView.h deleted file mode 100644 index 3d60a0bb5cd19f5a38d2dc381303ca6f2dd2e4d9..0000000000000000000000000000000000000000 --- a/Plugin/FieldView.h +++ /dev/null @@ -1,31 +0,0 @@ -// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to <gmsh@geuz.org>. - -#ifndef _FIELD_VIEW_H_ -#define _FIELD_VIEW_H_ - -#include "Plugin.h" - -extern "C" -{ - GMSH_Plugin *GMSH_RegisterFieldViewPlugin(); -} - -class GMSH_FieldViewPlugin : public GMSH_PostPlugin -{ - public: - std::string getName() const { return "FieldView"; } - std::string getShortHelp() const - { - return "Visualize background mesh field"; - } - std::string getHelp() const; - std::string getAuthor() const { return "J. Lambrechts"; } - int getNbOptions() const; - StringXNumber* getOption(int iopt); - PView *execute(PView *); -}; - -#endif diff --git a/Plugin/Gradient.cpp b/Plugin/Gradient.cpp index 5c6c1cc1a83e7f4bae5e057641e7c775570eba3b..b8ebe08380dd4bc674cd058aa500693d587eab72 100644 --- a/Plugin/Gradient.cpp +++ b/Plugin/Gradient.cpp @@ -8,7 +8,7 @@ #include "GmshDefines.h" StringXNumber GradientOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -22,7 +22,7 @@ extern "C" std::string GMSH_GradientPlugin::getHelp() const { return "Plugin(Gradient) computes the gradient of the\n" - "field in the view `iView'. If `iView' < 0, the\n" + "field in the view `View'. If `View' < 0, the\n" "plugin is run on the current view.\n" "\n" "Plugin(Gradient) creates one new view.\n"; diff --git a/Plugin/HarmonicToTime.cpp b/Plugin/HarmonicToTime.cpp index 97288ab714367221a5d535755e2f805691a04f66..59cb1245414bb5e94a0fe08c75edbbd3f689244b 100644 --- a/Plugin/HarmonicToTime.cpp +++ b/Plugin/HarmonicToTime.cpp @@ -9,8 +9,8 @@ StringXNumber HarmonicToTimeOptions_Number[] = { {GMSH_FULLRC, "RealPart", NULL, 0.}, {GMSH_FULLRC, "ImaginaryPart", NULL, 1.}, - {GMSH_FULLRC, "nSteps", NULL, 20.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "NumSteps", NULL, 20.}, + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -25,11 +25,11 @@ std::string GMSH_HarmonicToTimePlugin::getHelp() const { return "Plugin(HarmonicToTime) takes the values in the\n" "time steps `RealPart' and `ImaginaryPart' of\n" - "the view `iView', and creates a new view\n" - "containing (`iView'[`RealPart'] * cos(p) -\n" - "`iView'[`ImaginaryPart'] * sin(p)), with\n" - "p = 2*Pi*k/`nSteps', k = 0, ..., `nSteps'-1.\n" - "If `iView' < 0, the plugin is run on the\n" + "the view `View', and creates a new view\n" + "containing (`View'[`RealPart'] * cos(p) -\n" + "`View'[`ImaginaryPart'] * sin(p)), with\n" + "p = 2*Pi*k/`NumSteps', k = 0, ..., `NumSteps'-1.\n" + "If `View' < 0, the plugin is run on the\n" "current view.\n" "\n" "Plugin(HarmonicToTime) creates one new view.\n"; diff --git a/Plugin/Integrate.cpp b/Plugin/Integrate.cpp index db91fa15c999f9e948a578fe7327a4738efef1d7..d76c0ab1ea2f414159b5f70738228bb26df2afa1 100644 --- a/Plugin/Integrate.cpp +++ b/Plugin/Integrate.cpp @@ -8,7 +8,7 @@ #include "PViewOptions.h" StringXNumber IntegrateOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -22,9 +22,9 @@ extern "C" std::string GMSH_IntegratePlugin::getHelp() const { return "Plugin(Integrate) integrates scalar fields over\n" - "all the elements in the view `iView', as well\n" + "all the elements in the view `View', as well\n" "as the circulation/flux of vector fields over\n" - "line/surface elements. If `iView' < 0, the\n" + "line/surface elements. If `View' < 0, the\n" "plugin is run on the current view.\n" "\n" "Plugin(Integrate) creates one new view.\n"; diff --git a/Plugin/Isosurface.cpp b/Plugin/Isosurface.cpp index 364df957070f652f03450babc9bc7cb5e1ae1064..d658b42f5054265da3d47a29172f8eede093e8f1 100644 --- a/Plugin/Isosurface.cpp +++ b/Plugin/Isosurface.cpp @@ -8,12 +8,12 @@ StringXNumber IsosurfaceOptions_Number[] = { {GMSH_FULLRC, "Value", GMSH_IsosurfacePlugin::callbackValue, 0.}, - {GMSH_FULLRC, "dTimeStep", NULL, -1.}, - {GMSH_FULLRC, "dView", NULL, -1.}, {GMSH_FULLRC, "ExtractVolume", GMSH_IsosurfacePlugin::callbackVol, 0.}, {GMSH_FULLRC, "RecurLevel", GMSH_IsosurfacePlugin::callbackRecur, 4}, {GMSH_FULLRC, "TargetError", GMSH_IsosurfacePlugin::callbackTarget, 0}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.}, + {GMSH_FULLRC, "OtherTimeStep", NULL, -1.}, + {GMSH_FULLRC, "OtherView", NULL, -1.} }; extern "C" @@ -28,7 +28,7 @@ double GMSH_IsosurfacePlugin::callbackValue(int num, int action, double value) { double min = 0., max = 1.; if(action > 0){ - int iview = (int)IsosurfaceOptions_Number[6].def; + int iview = (int)IsosurfaceOptions_Number[4].def; if(iview < 0) iview = num; if(iview >= 0 && iview < (int)PView::list.size()){ min = PView::list[iview]->getData()->getMin(); @@ -80,20 +80,20 @@ double GMSH_IsosurfacePlugin::callbackTarget(int num, int action, double value) std::string GMSH_IsosurfacePlugin::getHelp() const { return "Plugin(Isosurface) extracts the isosurface of value\n" - "`Value' from the view `iView' and draws the\n" - "`dTimeStep'-th value of the view `dView' on the\n" - "isosurface. If `iView' < 0, the plugin is run\n" - "on the current view. If `dTimeStep' < 0, the\n" - "plugin uses, for each time step in `iView', the\n" - "corresponding time step in `dView'. If `dView'\n" - "< 0, the plugin uses `iView' as the value source.\n" + "`Value' from the view `View', and draws the\n" + "`OtherTimeStep'-th step of the view `OtherView' on\n" + "this isosurface. If `View' < 0, the plugin is run\n" + "on the current view. If `OtherTimeStep' < 0, the\n" + "plugin uses, for each time step in `View', the\n" + "corresponding time step in `OtherView'. If `OtherView'\n" + "< 0, the plugin uses `View' as the value source.\n" "If `ExtractVolume' is nonzero, the plugin\n" "extracts the isovolume with values greater (if\n" "`ExtractVolume' > 0) or smaller (if `ExtractVolume'\n" "< 0) than the isosurface `Value'.\n" "\n" "Plugin(Isosurface) creates as many views as there\n" - "are time steps in `iView'.\n"; + "are time steps in `View'.\n"; } int GMSH_IsosurfacePlugin::getNbOptions() const @@ -116,13 +116,13 @@ double GMSH_IsosurfacePlugin::levelset(double x, double y, double z, double val) PView *GMSH_IsosurfacePlugin::execute(PView *v) { - int iView = (int)IsosurfaceOptions_Number[6].def; + int iView = (int)IsosurfaceOptions_Number[4].def; _valueIndependent = 0; - _valueView = (int)IsosurfaceOptions_Number[2].def; - _valueTimeStep = (int)IsosurfaceOptions_Number[1].def; - _extractVolume = (int)IsosurfaceOptions_Number[3].def; - _recurLevel = (int)IsosurfaceOptions_Number[4].def; - _targetError = IsosurfaceOptions_Number[5].def; + _extractVolume = (int)IsosurfaceOptions_Number[1].def; + _recurLevel = (int)IsosurfaceOptions_Number[2].def; + _targetError = IsosurfaceOptions_Number[3].def; + _valueTimeStep = (int)IsosurfaceOptions_Number[5].def; + _valueView = (int)IsosurfaceOptions_Number[6].def; _orientation = GMSH_LevelsetPlugin::MAP; PView *v1 = getView(iView, v); diff --git a/Plugin/Lambda2.cpp b/Plugin/Lambda2.cpp index 66bfddb644be15904da51ccc9f97bf15a7687146..36c238b4461757537c6e7cfef1f0394a66961932 100644 --- a/Plugin/Lambda2.cpp +++ b/Plugin/Lambda2.cpp @@ -8,7 +8,7 @@ StringXNumber Lambda2Options_Number[] = { {GMSH_FULLRC, "Eigenvalue", NULL, 2.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -28,12 +28,12 @@ std::string GMSH_Lambda2Plugin::getHelp() const "the symmetric and antisymmetric parts of the\n" "velocity gradient tensor. Vortices are well\n" "represented by regions where Lambda(2) is\n" - "negative. If `iView' contains tensor elements,\n" + "negative. If `View' contains tensor elements,\n" "the plugin directly uses the tensors as the\n" "values of the velocity gradient tensor; if\n" - "`iView' contains vector elements, the plugin\n" + "`View' contains vector elements, the plugin\n" "uses them as the velocities from which to derive\n" - "the velocity gradient tensor. If `iView' < 0,\n" + "the velocity gradient tensor. If `View' < 0,\n" "the plugin is run on the current view.\n" "\n" "Plugin(Lambda2) creates one new view.\n"; diff --git a/Plugin/LongitudeLatitude.cpp b/Plugin/LongitudeLatitude.cpp index 4b48d90816a15846c2f8e3b5cec2648e55c899fd..da383f49e10013070e5158a2875e9990141a156e 100644 --- a/Plugin/LongitudeLatitude.cpp +++ b/Plugin/LongitudeLatitude.cpp @@ -7,7 +7,7 @@ #include "OpenFile.h" StringXNumber LongituteLatitudeOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -20,8 +20,8 @@ extern "C" std::string GMSH_LongituteLatitudePlugin::getHelp() const { - return "Plugin(LongituteLatitude) projects the view `iView'\n" - "in longitude-latitude. If `iView' < 0, the plugin\n" + return "Plugin(LongituteLatitude) projects the view `View'\n" + "in longitude-latitude. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(LongituteLatitude) is executed in place.\n"; diff --git a/Plugin/MakeSimplex.cpp b/Plugin/MakeSimplex.cpp index c4409248ed09589288b7400f942a551adb241c13..d64a521a2936b7f6b072f59a6dec814ecec85716 100644 --- a/Plugin/MakeSimplex.cpp +++ b/Plugin/MakeSimplex.cpp @@ -6,7 +6,7 @@ #include "MakeSimplex.h" StringXNumber MakeSimplexOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -21,8 +21,8 @@ std::string GMSH_MakeSimplexPlugin::getHelp() const { return "Plugin(MakeSimplex) decomposes all non-\n" "simplectic elements (quadrangles, prisms,\n" - "hexahedra, pyramids) in the view `iView' into\n" - "simplices (triangles, tetrahedra). If `iView' < 0,\n" + "hexahedra, pyramids) in the view `View' into\n" + "simplices (triangles, tetrahedra). If `View' < 0,\n" "the plugin is run on the current view.\n" "\n" "Plugin(MakeSimplex) is executed\n" diff --git a/Plugin/MathEval.cpp b/Plugin/MathEval.cpp index 9b4dde93e08aa95340fcaa3d08b668ea1cb6e914..c99cf0a25d36fd1a5a4fc2987e6a46e90960d1c5 100644 --- a/Plugin/MathEval.cpp +++ b/Plugin/MathEval.cpp @@ -11,9 +11,9 @@ StringXNumber MathEvalOptions_Number[] = { {GMSH_FULLRC, "TimeStep", NULL, -1.}, - {GMSH_FULLRC, "iView", NULL, -1.}, - {GMSH_FULLRC, "ExternalView", NULL, -1.}, - {GMSH_FULLRC, "ExternalTimeStep", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.}, + {GMSH_FULLRC, "OtherTimeStep", NULL, -1.}, + {GMSH_FULLRC, "OtherView", NULL, -1.} }; StringXString MathEvalOptions_String[] = { @@ -39,9 +39,10 @@ extern "C" std::string GMSH_MathEvalPlugin::getHelp() const { return "Plugin(MathEval) creates a new view using\n" - "data from `iView'. If only `Expression0' is\n" - "given (and `Expression1', ..., `Expression8' are\n" - "all empty), the plugin creates a scalar view.\n" + "data from the time step `TimeStep' in the view\n" + "`View'. If only `Expression0' is given\n" + "(and `Expression1', ..., `Expression8' are all\n" + "empty), the plugin creates a scalar view.\n" "If `Expression0', `Expression1' and/or\n" "`Expression2' are given (and `Expression3',\n" "..., `Expression8' are all empty) the plugin\n" @@ -50,13 +51,14 @@ std::string GMSH_MathEvalPlugin::getHelp() const "mathematical functions (Exp, Log, Sqrt, Sin, Cos,\n" "Fabs, etc.) and operators (+, -, *, /, ^), all\n" "expressions can contain the symbols v0, v1, v2,\n" - " ..., vn, which represent the n components in\n" - "`iView', w0, w1, w2,..., wn which represent the n\n" - "components of `ExternalView' and the symbols x,\n" - "y and z, which represent the three spatial coordinates.\n" - "If `TimeStep' < 0, the plugin extracts data from \n" - "all the time steps in the view.\n" - "If `iView' < 0, the plugin is run on the current view.\n" + "..., vn, which represent the n components in\n" + "`View'; w0, w1, w2,..., wn, which represent the n\n" + "components of `OtherView' (at time step `OtherTimeStep');\n" + "and the symbols x, y and z, which represent the three\n" + "spatial coordinates. If `TimeStep' < 0, the plugin\n" + "extracts data from all the time steps in the view.\n" + "If `View' < 0, the plugin is run on the current\n" + "view.\n" "\n" "Plugin(MathEval) creates one new view.\n"; } @@ -133,8 +135,8 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) { int timeStep = (int)MathEvalOptions_Number[0].def; int iView = (int)MathEvalOptions_Number[1].def; - int iExternalView = (int)MathEvalOptions_Number[2].def; - int stepExternal = (int)MathEvalOptions_Number[3].def; + int otherTimeStep = (int)MathEvalOptions_Number[2].def; + int iOtherView = (int)MathEvalOptions_Number[3].def; std::vector<std::string> expr(9); for(int i = 0; i < 9; i++) expr[i] = MathEvalOptions_String[i].def; @@ -146,25 +148,25 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) Msg::Error("MathEval plugin cannot be applied to multi-mesh views"); return view; } - PView *externalView = NULL; - PViewData *dataExternal = NULL; + PView *otherView = NULL; + PViewData *dataOther = NULL; OctreePost *octree = 0; - if(iExternalView>=0){ - externalView = getView(iExternalView, view); - if(!externalView){ - Msg::Error("MathEval plugin cannot found external view %i",iExternalView); + if(iOtherView >= 0){ + otherView = getView(iOtherView, view); + if(!otherView){ + Msg::Error("MathEval plugin cannot found other view %i", iOtherView); return view; } - dataExternal = externalView->getData(); - if(dataExternal->hasMultipleMeshes()){ + dataOther = otherView->getData(); + if(dataOther->hasMultipleMeshes()){ Msg::Error("MathEval plugin cannot be applied to multi-mesh views"); return view; } - if((data1->getNumEntities() != dataExternal->getNumEntities()) || - (data1->getNumElements() != dataExternal->getNumElements())){ - Msg::Info("External view based on different grid: interpolating..."); - octree = new OctreePost(externalView); + if((data1->getNumEntities() != dataOther->getNumEntities()) || + (data1->getNumElements() != dataOther->getNumElements())){ + Msg::Info("Other view based on different grid: interpolating..."); + octree = new OctreePost(otherView); } } @@ -186,7 +188,8 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) expr.resize(numComp2); const char *names[] = - { "x", "y", "z", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "w0","w1","w2","w3","w4","w5","w6","w7","w8","w9" }; + { "x", "y", "z", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", + "w0", "w1", "w2", "w3", "w4", "w5", "w6", "w7", "w8", "w9" }; unsigned int numVariables = sizeof(names) / sizeof(names[0]); std::vector<std::string> variables(numVariables); for(unsigned int i = 0; i < numVariables; i++) variables[i] = names[i]; @@ -212,9 +215,10 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) int numNodes = data1->getNumNodes(0, ent, ele); int type = data1->getType(0, ent, ele); int numComp = data1->getNumComponents(0, ent, ele); - int numCompExternal = !dataExternal ? 9 : octree ? 9 : dataExternal->getNumComponents(stepExternal, ent, ele); + int numCompOther = !dataOther ? 9 : octree ? 9 : + dataOther->getNumComponents(otherTimeStep, ent, ele); std::vector<double> *out = incrementList(data2, numComp2, type); - std::vector<double> w(std::max(9, numCompExternal), 0.); + std::vector<double> w(std::max(9, numCompOther), 0.); std::vector<double> x(numNodes), y(numNodes), z(numNodes); for(int nod = 0; nod < numNodes; nod++) data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); @@ -229,15 +233,15 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) for(int comp = 0; comp < numComp; comp++) data1->getValue(step, ent, ele, nod, comp, v[comp]); values[0] = x[nod]; values[1] = y[nod]; values[2] = z[nod]; - if(dataExternal){ + if(dataOther){ if(octree){ - if(!octree->searchScalar(x[nod], y[nod], z[nod], &w[0], stepExternal)) - if(!octree->searchVector(x[nod], y[nod], z[nod], &w[0], stepExternal)) - octree->searchTensor(x[nod], y[nod], z[nod], &w[0], stepExternal); + if(!octree->searchScalar(x[nod], y[nod], z[nod], &w[0], otherTimeStep)) + if(!octree->searchVector(x[nod], y[nod], z[nod], &w[0], otherTimeStep)) + octree->searchTensor(x[nod], y[nod], z[nod], &w[0], otherTimeStep); } else - for(int comp = 0; comp < numCompExternal; comp++) - dataExternal->getValue(stepExternal, ent, ele, nod, comp, w[comp]); + for(int comp = 0; comp < numCompOther; comp++) + dataOther->getValue(otherTimeStep, ent, ele, nod, comp, w[comp]); } for(int i = 0; i < 9; i++) values[3 + i] = v[i]; for(int i = 0; i < 9; i++) values[12 + i] = w[i]; diff --git a/Plugin/ModifyComponent.cpp b/Plugin/ModifyComponent.cpp index 4a92d717deec1238bca1fa1b154b5e7b49ac888b..110ec99f1f5b9a096be1baa1fb0020de24d003e1 100644 --- a/Plugin/ModifyComponent.cpp +++ b/Plugin/ModifyComponent.cpp @@ -12,13 +12,13 @@ StringXNumber ModifyComponentOptions_Number[] = { {GMSH_FULLRC, "Component", NULL, -1.}, {GMSH_FULLRC, "TimeStep", NULL, -1.}, - {GMSH_FULLRC, "ExternalView", NULL, -1.}, - {GMSH_FULLRC, "ExternalTimeStep", NULL, -1.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.}, + {GMSH_FULLRC, "OtherTimeStep", NULL, -1.}, + {GMSH_FULLRC, "OtherView", NULL, -1.} }; StringXString ModifyComponentOptions_String[] = { - {GMSH_FULLRC, "Expression", NULL, "v0*Sin(x)"} + {GMSH_FULLRC, "Expression", NULL, "v0 * Sin(x)"} }; extern "C" @@ -33,7 +33,7 @@ std::string GMSH_ModifyComponentPlugin::getHelp() const { return "Plugin(ModifyComponent) sets the `Component'-th\n" "component of the `TimeStep'-th time step in the\n" - "view `iView' to the expression `Expression'.\n" + "view `View' to the expression `Expression'.\n" "`Expression' can contain:\n" "\n" "- the usual mathematical functions (Log, Sqrt,\n" @@ -46,33 +46,33 @@ std::string GMSH_ModifyComponentPlugin::getHelp() const "current time and time step values;\n" "\n" "- the symbol v, to retrieve the `Component'-th\n" - "component of the field in `iView' at the\n" + "component of the field in `View' at the\n" "`TimeStep'-th time step;\n" "\n" "- the symbols v0, v1, v2, ..., v8, to retrieve each\n" - "component of the field in `iView' at the\n" + "component of the field in `View' at the\n" "`TimeStep'-th time step;\n" "\n" "- the symbol w, to retrieve the `Component'-th\n" - "component of the field in `ExternalView' at the\n" - "`ExternalTimeStep'-th time step. If `ExternalView'\n" - "and `iView' are based on different spatial grids,\n" - "or if their data types are different, `ExternalView'\n" - "is interpolated onto `iView';\n" + "component of the field in `OtherView' at the\n" + "`OtherTimeStep'-th time step. If `OtherView'\n" + "and `View' are based on different spatial grids,\n" + "or if their data types are different, `OtherView'\n" + "is interpolated onto `View';\n" "\n" "- the symbols w0, w1, w2, ..., w8, to retrieve each\n" - "component of the field in `ExternalView' at the\n" - "`ExternalTimeStep'-th time step.\n" + "component of the field in `OtherView' at the\n" + "`OtherTimeStep'-th time step.\n" "\n" "If `TimeStep' < 0, the plugin automatically loops\n" - "over all the time steps in `iView' and evaluates\n" - "`Expression' for each one. If `ExternalTimeStep'\n" + "over all the time steps in `View' and evaluates\n" + "`Expression' for each one. If `OtherTimeStep'\n" "< 0, the plugin uses `TimeStep' instead. If\n" "`Component' < 0, the plugin automatically loops\n" "over all the components in the view and\n" - "evaluates `Expression' for each one. If `iView'\n" + "evaluates `Expression' for each one. If `View'\n" "< 0, the plugin is run on the current view. If\n" - "`ExternalView' < 0, the plugin uses `iView'\n" + "`OtherView' < 0, the plugin uses `View'\n" "instead.\n" "\n" "Plugin(ModifyComponent) is executed in-place.\n"; @@ -102,9 +102,9 @@ PView *GMSH_ModifyComponentPlugin::execute(PView *view) { int component = (int)ModifyComponentOptions_Number[0].def; int timeStep = (int)ModifyComponentOptions_Number[1].def; - int externalView = (int)ModifyComponentOptions_Number[2].def; - int externalTimeStep = (int)ModifyComponentOptions_Number[3].def; - int iView = (int)ModifyComponentOptions_Number[4].def; + int iView = (int)ModifyComponentOptions_Number[2].def; + int otherTimeStep = (int)ModifyComponentOptions_Number[3].def; + int otherView = (int)ModifyComponentOptions_Number[4].def; PView *v1 = getView(iView, view); if(!v1) return view; @@ -119,23 +119,23 @@ PView *GMSH_ModifyComponentPlugin::execute(PView *view) PView *v2 = v1; - if(externalView >= 0){ - if(externalView < (int)PView::list.size()) - v2 = PView::list[externalView]; + if(otherView >= 0){ + if(otherView < (int)PView::list.size()) + v2 = PView::list[otherView]; else - Msg::Error("View[%d] does not exist: using self", externalView); + Msg::Error("View[%d] does not exist: using self", otherView); } PViewData *data2 = v2->getData(); - if(externalTimeStep < 0 && data2->getNumTimeSteps() != data1->getNumTimeSteps()){ + if(otherTimeStep < 0 && data2->getNumTimeSteps() != data1->getNumTimeSteps()){ Msg::Error("Number of time steps don't match: using step 0"); - externalTimeStep = 0; + otherTimeStep = 0; } - else if(externalTimeStep > data2->getNumTimeSteps() - 1){ + else if(otherTimeStep > data2->getNumTimeSteps() - 1){ Msg::Error("Invalid time step (%d) in View[%d]: using step 0 instead", - externalTimeStep, v2->getIndex()); - externalTimeStep = 0; + otherTimeStep, v2->getIndex()); + otherTimeStep = 0; } const char *names[] = @@ -153,7 +153,7 @@ PView *GMSH_ModifyComponentPlugin::execute(PView *view) OctreePost *octree = 0; if((data1->getNumEntities() != data2->getNumEntities()) || (data1->getNumElements() != data2->getNumElements())){ - Msg::Info("External view based on different grid: interpolating..."); + Msg::Info("Other view based on different grid: interpolating..."); octree = new OctreePost(v2); } @@ -163,7 +163,7 @@ PView *GMSH_ModifyComponentPlugin::execute(PView *view) if(timeStep >= 0 && timeStep != step) continue; double time = data1->getTime(step); - int step2 = (externalTimeStep < 0) ? step : externalTimeStep; + int step2 = (otherTimeStep < 0) ? step : otherTimeStep; // tag all the nodes with "0" (the default tag) for(int ent = 0; ent < data1->getNumEntities(step); ent++){ diff --git a/Plugin/ModulusPhase.cpp b/Plugin/ModulusPhase.cpp index 5a9df02caf16ea47a8c7e1bd2a35632e445543e4..08d3dd53f813ba71440465afd79cbdf5d02c3934 100644 --- a/Plugin/ModulusPhase.cpp +++ b/Plugin/ModulusPhase.cpp @@ -8,7 +8,7 @@ StringXNumber ModulusPhaseOptions_Number[] = { {GMSH_FULLRC, "RealPart", NULL, 0.}, {GMSH_FULLRC, "ImaginaryPart", NULL, 1.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -22,10 +22,10 @@ extern "C" std::string GMSH_ModulusPhasePlugin::getHelp() const { return "Plugin(ModulusPhase) interprets the time steps\n" - "`realPart' and `imaginaryPart' in the view `iView'\n" + "`realPart' and `imaginaryPart' in the view `View'\n" "as the real and imaginary parts of a complex field\n" "and replaces them with their corresponding\n" - "modulus and phase. If `iView' < 0, the plugin is\n" + "modulus and phase. If `View' < 0, the plugin is\n" "run on the current view.\n" "\n" "Plugin(ModulusPhase) is executed in-place.\n"; diff --git a/Plugin/Particles.cpp b/Plugin/Particles.cpp index 963056e14ed1b495486ab4b7773246db0ca8aa71..5b6616168ada2f195c23e42746a29815965cb8a8 100644 --- a/Plugin/Particles.cpp +++ b/Plugin/Particles.cpp @@ -24,15 +24,15 @@ StringXNumber ParticlesOptions_Number[] = { {GMSH_FULLRC, "X2", GMSH_ParticlesPlugin::callbackX2, 0.}, {GMSH_FULLRC, "Y2", GMSH_ParticlesPlugin::callbackY2, 1.}, {GMSH_FULLRC, "Z2", GMSH_ParticlesPlugin::callbackZ2, 0.}, - {GMSH_FULLRC, "nPointsU", GMSH_ParticlesPlugin::callbackU, 10}, - {GMSH_FULLRC, "nPointsV", GMSH_ParticlesPlugin::callbackV, 1}, - {GMSH_FULLRC, "MaxIter", NULL, 100}, - {GMSH_FULLRC, "DT", NULL, .1}, - {GMSH_FULLRC, "TimeStep", NULL, 0}, + {GMSH_FULLRC, "NumPointsU", GMSH_ParticlesPlugin::callbackU, 10}, + {GMSH_FULLRC, "NumPointsV", GMSH_ParticlesPlugin::callbackV, 1}, {GMSH_FULLRC, "A2", NULL, 1. }, {GMSH_FULLRC, "A1", NULL, 0. }, {GMSH_FULLRC, "A0", NULL, 0. }, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "DT", NULL, .1}, + {GMSH_FULLRC, "MaxIter", NULL, 100}, + {GMSH_FULLRC, "TimeStep", NULL, 0}, + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -151,19 +151,19 @@ std::string GMSH_ParticlesPlugin::getHelp() const "Plugin(Particles) computes the trajectory\n" "of particules in the force field given by the\n" "`TimeStep'-th time step of a vector view\n" - "`iView'. The plugin takes as input a grid defined\n" + "`View'. The plugin takes as input a grid defined\n" "by the 3 points (`X0',`Y0',`Z0') (origin),\n" "(`X1',`Y1',`Z1') (axis of U) and (`X2',`Y2',`Z2')\n" "(axis of V). The number of particles along U and V\n" "that are to be transported is set with the\n" - "options `nPointsU' and `nPointsV'. The equation\n" + "options `NumPointsU' and `NumPointsV'. The equation\n" "A2*d^2X(t)/dt^2+A1*dX(t)/dt+A0*X(t)=F is then\n" "solved with the initial conditions X(t=0) chosen\n" "as the grid, dX/dt(t=0)=0, and with F\n" "interpolated from the vector view. Time stepping\n" "is done using a Newmark scheme with step size `DT'\n" "and `MaxIter' maximum number of iterations. If\n" - "`iView' < 0 the plugin is run on the current view.\n" + "`View' < 0 the plugin is run on the current view.\n" "\n" "Plugin(Particles) creates one new view containing\n" "multi-step vector points.\n"; @@ -206,12 +206,12 @@ void GMSH_ParticlesPlugin::getPoint(int iU, int iV, double *X) PView *GMSH_ParticlesPlugin::execute(PView *v) { - int maxIter = (int)ParticlesOptions_Number[11].def; - double DT = ParticlesOptions_Number[12].def; - int timeStep = (int)ParticlesOptions_Number[13].def; - double A2 = ParticlesOptions_Number[14].def; - double A1 = ParticlesOptions_Number[15].def; - double A0 = ParticlesOptions_Number[16].def; + double A2 = ParticlesOptions_Number[11].def; + double A1 = ParticlesOptions_Number[12].def; + double A0 = ParticlesOptions_Number[13].def; + double DT = ParticlesOptions_Number[14].def; + int maxIter = (int)ParticlesOptions_Number[15].def; + int timeStep = (int)ParticlesOptions_Number[16].def; int iView = (int)ParticlesOptions_Number[17].def; PView *v1 = getView(iView, v); diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp index e39aa4f8b792850814f0febf336f82af69cbf532..273761625a53fee50c70284b918ed4bc7bdd1be7 100644 --- a/Plugin/Plugin.cpp +++ b/Plugin/Plugin.cpp @@ -68,7 +68,7 @@ PView *GMSH_PostPlugin::executeRemote(PView *view) } for(int i = 0; i < getNbOptions(); i++) - if(getOption(i)->str == "iView") getOption(i)->def = remoteIndex; + if(getOption(i)->str == "View") getOption(i)->def = remoteIndex; std::string options = serialize(); view->getData()->fillRemoteVertexArrays(options); diff --git a/Plugin/PluginManager.cpp b/Plugin/PluginManager.cpp index e521cb0b7fd635b91689d4576c962f3c190170c0..d985e428fd54267219150a8d6d694ce6bd100cd8 100644 --- a/Plugin/PluginManager.cpp +++ b/Plugin/PluginManager.cpp @@ -41,7 +41,6 @@ #include "Lambda2.h" #include "ModifyComponent.h" #include "Probe.h" -#include "FieldView.h" #include "GSHHS.h" #include "HomologyComputation.h" @@ -203,8 +202,6 @@ void PluginManager::registerDefaultPlugins() ("Lambda2", GMSH_RegisterLambda2Plugin())); allPlugins.insert(std::pair<std::string, GMSH_Plugin*> ("Probe", GMSH_RegisterProbePlugin())); - allPlugins.insert(std::pair<std::string, GMSH_Plugin*> - ("FieldView", GMSH_RegisterFieldViewPlugin())); allPlugins.insert(std::pair<std::string, GMSH_Plugin*> ("Triangulate", GMSH_RegisterTriangulatePlugin())); allPlugins.insert(std::pair<std::string, GMSH_Plugin*> diff --git a/Plugin/Probe.cpp b/Plugin/Probe.cpp index 0a6749ecbeecdd31a1fe4bbe903d6cca5ff7d564..8c879a2e1a691a1bc502c45590a8b652b7f93b53 100644 --- a/Plugin/Probe.cpp +++ b/Plugin/Probe.cpp @@ -18,7 +18,7 @@ StringXNumber ProbeOptions_Number[] = { {GMSH_FULLRC, "X", GMSH_ProbePlugin::callbackX, 0.}, {GMSH_FULLRC, "Y", GMSH_ProbePlugin::callbackY, 0.}, {GMSH_FULLRC, "Z", GMSH_ProbePlugin::callbackZ, 0.}, - {GMSH_FULLRC, "iView", NULL, -1.}, + {GMSH_FULLRC, "View", NULL, -1.}, }; extern "C" @@ -97,8 +97,8 @@ double GMSH_ProbePlugin::callbackZ(int num, int action, double value) std::string GMSH_ProbePlugin::getHelp() const { - return "Plugin(Probe) gets the value of the view `iView' at\n" - "the point (`X',`Y',`Z'). If `iView' < 0, the plugin is\n" + return "Plugin(Probe) gets the value of the view `View' at\n" + "the point (`X',`Y',`Z'). If `View' < 0, the plugin is\n" "run on the current view.\n" "\n" "Plugin(Probe) creates one new view.\n"; diff --git a/Plugin/Remove.cpp b/Plugin/Remove.cpp index 2c7c56e0fcaae16957e09be07d9ae896bb2d472e..24be57a9a7e60d2eb89d476f212e9db57056b15b 100644 --- a/Plugin/Remove.cpp +++ b/Plugin/Remove.cpp @@ -19,7 +19,7 @@ StringXNumber RemoveOptions_Number[] = { {GMSH_FULLRC, "Scalar", NULL, 1.}, {GMSH_FULLRC, "Vector", NULL, 1.}, {GMSH_FULLRC, "Tensor", NULL, 1.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -33,7 +33,7 @@ extern "C" std::string GMSH_RemovePlugin::getHelp() const { return "Plugin(Remove) removes the marked items\n" - "from the view `iView'. If `iView' < 0, the plugin\n" + "from the view `View'. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(Remove) is executed in-place.\n"; diff --git a/Plugin/Skin.cpp b/Plugin/Skin.cpp index efe2b033321942db7ef63f490852d9724e743edf..4d4e7b4b0971815e4e9eedca15f82b29fd5cad35 100644 --- a/Plugin/Skin.cpp +++ b/Plugin/Skin.cpp @@ -9,7 +9,7 @@ #include "GmshDefines.h" StringXNumber SkinOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -23,7 +23,7 @@ extern "C" std::string GMSH_SkinPlugin::getHelp() const { return "Plugin(Skin) extracts the skin (the boundary) of\n" - "the view `iView'. If `iView' < 0, the plugin is run\n" + "the view `View'. If `View' < 0, the plugin is run\n" "on the current view.\n" "\n" "Plugin(Skin) creates one new view.\n"; diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp index 1aea6a82c76150670f8973254e074175b29f79b6..d15b5354ee6a8357496b32ac56877645d733fc42 100644 --- a/Plugin/Smooth.cpp +++ b/Plugin/Smooth.cpp @@ -6,7 +6,7 @@ #include "Smooth.h" StringXNumber SmoothOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -20,7 +20,7 @@ extern "C" std::string GMSH_SmoothPlugin::getHelp() const { return "Plugin(Smooth) averages the values at the nodes\n" - "of the scalar view `iView'. If `iView' < 0, the\n" + "of the scalar view `View'. If `View' < 0, the\n" "plugin is run on the current view.\n" "\n" "Plugin(Smooth) is executed in-place.\n"; diff --git a/Plugin/SphericalRaise.cpp b/Plugin/SphericalRaise.cpp index 53de2a702352d4b909e22598258d90f71a8641f2..38313d7baa5ed213321e227cb5ecc25ae7a51f8f 100644 --- a/Plugin/SphericalRaise.cpp +++ b/Plugin/SphericalRaise.cpp @@ -13,7 +13,7 @@ StringXNumber SphericalRaiseOptions_Number[] = { {GMSH_FULLRC, "Raise", NULL, 1.}, {GMSH_FULLRC, "Offset", NULL, 0.}, {GMSH_FULLRC, "TimeStep", NULL, 0.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -28,16 +28,16 @@ std::string GMSH_SphericalRaisePlugin::getHelp() const { return "Plugin(SphericalRaise) transforms the\n" "coordinates of the elements in the view\n" - "`iView' using the values associated with the\n" + "`View' using the values associated with the\n" "`TimeStep'-th time step. Instead of elevating\n" "the nodes along the X, Y and Z axes as in\n" - "View[`iView'].RaiseX, View[`iView'].RaiseY\n" - "and View[`iView'].RaiseZ, the raise is applied\n" + "View[`View'].RaiseX, View[`View'].RaiseY\n" + "and View[`View'].RaiseZ, the raise is applied\n" " along the radius of a sphere centered at\n" "(`Xc', `Yc', `Zc'). To produce a standard\n" "radiation pattern, set `Offset' to minus the\n" "radius of the sphere the original data lives on.\n" - "If `iView' < 0, the plugin is run on the current\n" + "If `View' < 0, the plugin is run on the current\n" "view.\n" "\n" "Plugin(SphericalRaise) is executed in-place.\n"; diff --git a/Plugin/StreamLines.cpp b/Plugin/StreamLines.cpp index 9f556d9da231b5005f2f057c11a66d268caaa54f..5f4825fd119603cd66ba6921a4937231bcdf697c 100644 --- a/Plugin/StreamLines.cpp +++ b/Plugin/StreamLines.cpp @@ -24,13 +24,13 @@ StringXNumber StreamLinesOptions_Number[] = { {GMSH_FULLRC, "X2", GMSH_StreamLinesPlugin::callbackX2, 0.}, {GMSH_FULLRC, "Y2", GMSH_StreamLinesPlugin::callbackY2, 1.}, {GMSH_FULLRC, "Z2", GMSH_StreamLinesPlugin::callbackZ2, 0.}, - {GMSH_FULLRC, "nPointsU", GMSH_StreamLinesPlugin::callbackU, 10}, - {GMSH_FULLRC, "nPointsV", GMSH_StreamLinesPlugin::callbackV, 1}, - {GMSH_FULLRC, "MaxIter", NULL, 100}, + {GMSH_FULLRC, "NumPointsU", GMSH_StreamLinesPlugin::callbackU, 10}, + {GMSH_FULLRC, "NumPointsV", GMSH_StreamLinesPlugin::callbackV, 1}, {GMSH_FULLRC, "DT", NULL, .1}, + {GMSH_FULLRC, "MaxIter", NULL, 100}, {GMSH_FULLRC, "TimeStep", NULL, 0}, - {GMSH_FULLRC, "dView", NULL, -1.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.}, + {GMSH_FULLRC, "OtherView", NULL, -1.} }; extern "C" @@ -140,26 +140,26 @@ std::string GMSH_StreamLinesPlugin::getHelp() const { return "Plugin(StreamLines) computes stream lines\n" "from the `TimeStep'-th time step of a vector\n" - "view `iView' and optionally interpolates the\n" - "scalar view `dView' on the resulting stream\n" + "view `View' and optionally interpolates the\n" + "scalar view `OtherView' on the resulting stream\n" "lines. The plugin takes as input a grid defined\n" "by the 3 points (`X0',`Y0',`Z0') (origin),\n" "(`X1',`Y1',`Z1') (axis of U) and (`X2',`Y2',`Z2')\n" "(axis of V). The number of points along U and V\n" "that are to be transported is set with the\n" - "options `nPointsU' and `nPointsV'. The equation\n" + "options `NumPointsU' and `NumPointsV'. The equation\n" "dX(t)/dt=V(x,y,z) is then solved with the initial\n" "condition X(t=0) chosen as the grid and with V(x,y,z)\n" "interpolated on the vector view. The time stepping\n" "scheme is a RK44 with step size `DT' and `MaxIter'\n" - "maximum number of iterations. If `iView' < 0, the\n" + "maximum number of iterations. If `View' < 0, the\n" "plugin is run on the current view. If `TimeStep' < 0,\n" "the plugin tries to compute streamlines of the unsteady\n" "flow.\n" "\n" "Plugin(StreamLines) creates one new view. This\n" - "view contains multi-step vector points if `dView'\n" - "< 0, or single-step scalar lines if `dView' >= 0.\n"; + "view contains multi-step vector points if `OtherView'\n" + "< 0, or single-step scalar lines if `OtherView' >= 0.\n"; } int GMSH_StreamLinesPlugin::getNbOptions() const @@ -199,17 +199,17 @@ void GMSH_StreamLinesPlugin::getPoint(int iU, int iV, double *X) PView *GMSH_StreamLinesPlugin::execute(PView *v) { - int maxIter = (int)StreamLinesOptions_Number[11].def; - double DT = StreamLinesOptions_Number[12].def; + double DT = StreamLinesOptions_Number[11].def; + int maxIter = (int)StreamLinesOptions_Number[12].def; int timeStep = (int)StreamLinesOptions_Number[13].def; - int dView = (int)StreamLinesOptions_Number[14].def; - int iView = (int)StreamLinesOptions_Number[15].def; + int iView = (int)StreamLinesOptions_Number[14].def; + int otherView = (int)StreamLinesOptions_Number[15].def; PView *v1 = getView(iView, v); if(!v1) return v; PViewData *data1 = v1->getData(); - PView *v2 = (dView < 0) ? 0 : getView(dView, v); + PView *v2 = (otherView < 0) ? 0 : getView(otherView, v); PViewData *data2 = v2 ? v2->getData() : 0; // sanity checks diff --git a/Plugin/Tetrahedralize.cpp b/Plugin/Tetrahedralize.cpp index ab7e6f44823cc5d16553c9ab6015ece7dedf99b9..3599fab72677167e2cc67c84c4c6169abb0b0899 100644 --- a/Plugin/Tetrahedralize.cpp +++ b/Plugin/Tetrahedralize.cpp @@ -13,7 +13,7 @@ #endif StringXNumber TetrahedralizeOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -27,7 +27,7 @@ extern "C" std::string GMSH_TetrahedralizePlugin::getHelp() const { return "Plugin(Tetrahedralize) tetrahedralizes the points in the\n" - "view `iView'. If `iView' < 0, the plugin is run on\n" + "view `View'. If `View' < 0, the plugin is run on\n" "the current view.\n" "\n" "Plugin(Tetrahedralize) creates one new view.\n"; diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp index 74f385cba9de2d8b1811c831dcd4669376a48625..3e45ca79c57f0e960ec8a5060a7e1542aceb3077 100644 --- a/Plugin/Transform.cpp +++ b/Plugin/Transform.cpp @@ -19,7 +19,7 @@ StringXNumber TransformOptions_Number[] = { {GMSH_FULLRC, "Ty", NULL, 0.}, // cannot use T2 (reserved token in parser) {GMSH_FULLRC, "Tz", NULL, 0.}, // cannot use T3 (reserved token in parser) {GMSH_FULLRC, "SwapOrientation", NULL, 0.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -34,12 +34,12 @@ std::string GMSH_TransformPlugin::getHelp() const { return "Plugin(Transform) transforms the homogeneous\n" "node coordinates (x,y,z,1) of the elements in\n" - "the view `iView' by the matrix\n" + "the view `View' by the matrix\n" "[`A11' `A12' `A13' `Tx']\n" "[`A21' `A22' `A23' `Ty']\n" "[`A31' `A32' `A33' `Tz'].\n" "If `SwapOrientation' is set, the orientation of the\n" - "elements is reversed. If `iView' < 0, the plugin\n" + "elements is reversed. If `View' < 0, the plugin\n" "is run on the current view.\n" "\n" "Plugin(Transform) is executed in-place.\n"; diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp index 066e6a596eb5872afb4f17ad0d91d6c9b22bcdcb..a9db837dc12f1660c2d980362e14f30dbdc8f020 100644 --- a/Plugin/Triangulate.cpp +++ b/Plugin/Triangulate.cpp @@ -14,7 +14,7 @@ #include "Context.h" StringXNumber TriangulateOptions_Number[] = { - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.} }; extern "C" @@ -28,9 +28,9 @@ extern "C" std::string GMSH_TriangulatePlugin::getHelp() const { return "Plugin(Triangulate) triangulates the points in the\n" - "view `iView', assuming that all the points belong\n" + "view `View', assuming that all the points belong\n" "to a surface that can be projected one-to-one\n" - "onto a plane. If `iView' < 0, the plugin is run on\n" + "onto a plane. If `View' < 0, the plugin is run on\n" "the current view.\n" "\n" "Plugin(Triangulate) creates one new view.\n"; diff --git a/Plugin/Warp.cpp b/Plugin/Warp.cpp index dacea71d8425ef158fbbb6ad6d76cd6533906d8c..90bedb82834bec23fe7f75338eda39a463577b53 100644 --- a/Plugin/Warp.cpp +++ b/Plugin/Warp.cpp @@ -11,8 +11,8 @@ StringXNumber WarpOptions_Number[] = { {GMSH_FULLRC, "Factor", NULL, 1.}, {GMSH_FULLRC, "TimeStep", NULL, 0.}, {GMSH_FULLRC, "SmoothingAngle", NULL, 180.}, - {GMSH_FULLRC, "dView", NULL, -1.}, - {GMSH_FULLRC, "iView", NULL, -1.} + {GMSH_FULLRC, "View", NULL, -1.}, + {GMSH_FULLRC, "OtherView", NULL, -1.} }; extern "C" @@ -26,14 +26,14 @@ extern "C" std::string GMSH_WarpPlugin::getHelp() const { return "Plugin(Warp) transforms the elements in the\n" - "view `iView' by adding to their node coordinates\n" + "view `View' by adding to their node coordinates\n" "the vector field stored in the `TimeStep'-th time\n" - "step of the view `dView', scaled by `Factor'. If\n" - "`dView' < 0, the vector field is taken as the field\n" + "step of the view `OtherView', scaled by `Factor'. If\n" + "`OtherView' < 0, the vector field is taken as the field\n" "of surface normals multiplied by the `TimeStep'\n" - "value in `iView'. (The smoothing of the surface\n" + "value in `View'. (The smoothing of the surface\n" "normals is controlled by the `SmoothingAngle'\n" - "parameter.) If `iView' < 0, the plugin is run on\n" + "parameter.) If `View' < 0, the plugin is run on\n" "the current view.\n" "\n" "Plugin(Warp) is executed in-place.\n"; @@ -54,13 +54,13 @@ PView *GMSH_WarpPlugin::execute(PView *v) double factor = WarpOptions_Number[0].def; int TimeStep = (int)WarpOptions_Number[1].def; double AngleTol = WarpOptions_Number[2].def; - int dView = (int)WarpOptions_Number[3].def; - int iView = (int)WarpOptions_Number[4].def; + int iView = (int)WarpOptions_Number[3].def; + int otherView = (int)WarpOptions_Number[4].def; PView *v1 = getView(iView, v); if(!v1) return v; - if(dView < 0) dView = iView; - PView *v2 = getView(dView, v); + if(otherView < 0) otherView = iView; + PView *v2 = getView(otherView, v); if(!v2) return v; PViewData *data1 = v1->getData(); @@ -79,7 +79,7 @@ PView *GMSH_WarpPlugin::execute(PView *v) // create smooth normal field if we don't have an explicit warp field smooth_normals *normals = 0; - if(dView < 0){ + if(otherView < 0){ normals = new smooth_normals(AngleTol); for(int ent = 0; ent < data1->getNumEntities(0); ent++){ for(int ele = 0; ele < data1->getNumElements(0, ent); ele++){ diff --git a/benchmarks/misc/deform.geo b/benchmarks/misc/deform.geo index cd010fc16428d017e17fde0bc8d604a948919fe1..ea9037d21c0f791cd549b718625bf67126874402 100644 --- a/benchmarks/misc/deform.geo +++ b/benchmarks/misc/deform.geo @@ -5,8 +5,8 @@ PostProcessing.Format = 3; // save view as STL For t In {0 : View[0].NbTimeStep - 1} - Plugin(Warp).iView = 0; - Plugin(Warp).dView = 0; + Plugin(Warp).View = 0; + Plugin(Warp).OtherView = 0; Plugin(Warp).TimeStep = t; Plugin(Warp).Factor = fact; Plugin(Warp).Run; diff --git a/benchmarks/misc/rotate_views.script b/benchmarks/misc/rotate_views.script index 6e20eb392bfa7d6f0bd70a5716773e6a557ab5f6..4ad632ac23784e53d1707db02b629bb7bdbe734a 100644 --- a/benchmarks/misc/rotate_views.script +++ b/benchmarks/misc/rotate_views.script @@ -21,7 +21,7 @@ For i In {1:N} theta = 2*Pi*(i-1)/N; Plugin(Transform).A11 = Cos(theta); Plugin(Transform).A12 = Sin(theta); Plugin(Transform).A21 = -Sin(theta); Plugin(Transform).A22 = Cos(theta); - Plugin(Transform).iView = i-1; + Plugin(Transform).View = i-1; Plugin(Transform).Run; If(i != 1) View[i-1].ShowScale = 0; diff --git a/benchmarks/misc/scalar2vector.script b/benchmarks/misc/scalar2vector.script index 31cbc98ada628a0460c50b8b720dbef64631bb73..ed24e750b18696c80aa6372557610049724fccd5 100644 --- a/benchmarks/misc/scalar2vector.script +++ b/benchmarks/misc/scalar2vector.script @@ -1,8 +1,8 @@ -// A little script to combine 3 scalar views into a single vector view -// (with no reinterpolation, hence the temporary creation of the 3 -// vector views, instead of just using Plugin(Evaluate) on a vector -// view, with external scalar views--we should probably make the -// plugin more intelligent instead...) +// A little script to combine 3 scalar views into a single vector view +// (with no reinterpolation, hence the temporary creation of the 3 +// vector views, instead of just using Plugin(ModifyComponent) on a +// vector view, with external scalar views--we should probably make +// the plugin more intelligent instead...) // merge the 3 scalar views Merge "view1.pos"; @@ -11,29 +11,29 @@ Merge "view3.pos"; // create three vector views with all components set to the values of the // scalar views -Plugin(Extract).Expression0 = "v0"; -Plugin(Extract).Expression1 = "v0"; -Plugin(Extract).Expression2 = "v0"; -Plugin(Extract).iView = 0; -Plugin(Extract).Run; -Plugin(Extract).iView = 1; -Plugin(Extract).Run; -Plugin(Extract).iView = 2; -Plugin(Extract).Run; +Plugin(MathEval).Expression0 = "v0"; +Plugin(MathEval).Expression1 = "v0"; +Plugin(MathEval).Expression2 = "v0"; +Plugin(MathEval).View = 0; +Plugin(MathEval).Run; +Plugin(MathEval).View = 1; +Plugin(MathEval).Run; +Plugin(MathEval).View = 2; +Plugin(MathEval).Run; // remove the scalar views Delete View[0]; Delete View[0]; Delete View[0]; // set the last two components of the first vector view to // the components of the other two -Plugin(Evaluate).Expression = "w0"; -Plugin(Evaluate).iView = 0; -Plugin(Evaluate).ExternalView = 1; -Plugin(Evaluate).Component = 1; -Plugin(Evaluate).Run; -Plugin(Evaluate).ExternalView = 2; -Plugin(Evaluate).Component = 2; -Plugin(Evaluate).Run; +Plugin(ModifyComponent).Expression = "w0"; +Plugin(ModifyComponent).View = 0; +Plugin(ModifyComponent).OtherView = 1; +Plugin(ModifyComponent).Component = 1; +Plugin(ModifyComponent).Run; +Plugin(ModifyComponent).OtherView = 2; +Plugin(ModifyComponent).Component = 2; +Plugin(ModifyComponent).Run; // remove the extra vector views Delete View[2]; Delete View[1]; diff --git a/benchmarks/misc/test_displ.geo b/benchmarks/misc/test_displ.geo index 1fcc185b01bec289b69cb5c7786f1265919ddec3..c31defbd07db4b28b8f5560166f72e26c5a380a0 100644 --- a/benchmarks/misc/test_displ.geo +++ b/benchmarks/misc/test_displ.geo @@ -1,14 +1,14 @@ Include "test_field.pos"; Include "test_displ.pos"; -Plugin(Warp).iView = 0; -Plugin(Warp).dView = 1; +Plugin(Warp).View = 0; +Plugin(Warp).OtherView = 1; Plugin(Warp).Factor = 1; Plugin(Warp).Run; View[0].ShowElement = 1; -Plugin(Skin).iView = 0; +Plugin(Skin).View = 0; Plugin(Skin).Run; View[0].Visible = 0; diff --git a/benchmarks/misc/testcut.geo b/benchmarks/misc/testcut.geo index cc811306884a08052cccb852089ab2628138fdae..3e2390a42c11745a980b61cb5af3e9890299614e 100644 --- a/benchmarks/misc/testcut.geo +++ b/benchmarks/misc/testcut.geo @@ -27,10 +27,10 @@ Plugin(CutGrid).Z0 = 0.5; Plugin(CutGrid).X1 = 2; Plugin(CutGrid).Y1 = 0.5; Plugin(CutGrid).Z1 = 0.5; -Plugin(CutGrid).nPointsU = 51; -Plugin(CutGrid).nPointsV = 1; +Plugin(CutGrid).NumPointsU = 51; +Plugin(CutGrid).NumPointsV = 1; Plugin(CutGrid).ConnectPoints = 0; -Plugin(CutGrid).iView = -1; +Plugin(CutGrid).View = -1; Plugin(CutGrid).Run; diff --git a/benchmarks/misc/volviz.script b/benchmarks/misc/volviz.script index a2abb5dba84e532ee78b70c674281eb677ffda2a..ac8914f0898ced099055bc96ce3a4302014e2c91 100644 --- a/benchmarks/misc/volviz.script +++ b/benchmarks/misc/volviz.script @@ -5,6 +5,8 @@ xmin = View[0].MinX; xmax = View[0].MaxX; ymin = View[0].MinY; ymax = View[0].MaxY; zmin = View[0].MinZ; zmax = View[0].MaxZ; +Plugin(CutGrid).View = 0 ; + // can be a bit ugly if using more than 1 series, since we don't sort // intersecting elements accuratly. diff --git a/demos/isosurf.script b/demos/isosurf.script index ebe229333bb9a57bcfcd751c4265b4d0a016a4f9..e98e9bca83fef84198585d8e321e58b586121148 100644 --- a/demos/isosurf.script +++ b/demos/isosurf.script @@ -3,11 +3,11 @@ minIso = View[0].Min; maxIso = View[0].Max; nbIso = GetValue("Number of isosurfaces?", 7); -Plugin(CutMap).iView = 0; +Plugin(Isosurface).View = 0; For i In {0:nbIso-1} - Plugin(CutMap).A = minIso + i * (maxIso-minIso)/(nbIso > 1 ? nbIso-1 : 1); - Plugin(CutMap).Run; + Plugin(Isosurface).Value = minIso + i * (maxIso-minIso)/(nbIso > 1 ? nbIso-1 : 1); + Plugin(Isosurface).Run; EndFor Delete View[0]; @@ -15,8 +15,7 @@ Delete Empty Views; Combine Views; - -Plugin(MakeSimplex).iView = 0; +Plugin(MakeSimplex).View = 0; Plugin(MakeSimplex).Run; View[0].ColormapAlpha = 0.6; diff --git a/demos/multislice.script b/demos/multislice.script index 4a59ff0b5a76f271701320e85b1437e1a067f202..51d2a8dec412e5213e3bb4dac7269f0c0df16a9b 100644 --- a/demos/multislice.script +++ b/demos/multislice.script @@ -1,11 +1,14 @@ +Plugin(CutGrid).View = 0; +Plugin(CutPlane).View = 0; + xslices = GetValue("Number of slices along X-axis?", 10); yslices = GetValue("Number of slices along Y-axis?", 0); zslices = GetValue("Number of slices along Z-axis?", 0); regular = GetValue("Use regular grid?", 0); If(regular) npts = GetValue("Number of points in regular grid?", 20); - Plugin(CutGrid).nPointsU = npts; - Plugin(CutGrid).nPointsV = npts; + Plugin(CutGrid).NumPointsU = npts; + Plugin(CutGrid).NumPointsV = npts; EndIf xmin = View[0].MinX; xmax = View[0].MaxX; diff --git a/demos/title.script b/demos/title.script index 9ec9ed72a6da463b2382e63cdc5f165359dbdfcd..7e49d3964ab60266cefbd6418a10125216a09a2f 100644 --- a/demos/title.script +++ b/demos/title.script @@ -8,7 +8,7 @@ num = PostProcessing.NbViews-1; // add the main project name x = -25; y = 40; -Plugin(Annotate).iView = num; +Plugin(Annotate).View = num; Plugin(Annotate).Text = StrCat("Project: ", StrPrefix(StrRelative(Sprintf(General.FileName)))); Plugin(Annotate).Font = "Helvetica-Bold"; Plugin(Annotate).FontSize = 20; diff --git a/tutorial/t9.geo b/tutorial/t9.geo index dcaeaa2f470ff4cd3a38401f1ab73149ccf3b5fc..46c045b8d7a29a7bf94a14c498a34488fed8794a 100644 --- a/tutorial/t9.geo +++ b/tutorial/t9.geo @@ -23,33 +23,33 @@ Include "view3.pos" ; // extracts an isosurface from a 3D scalar view), and run it: Plugin(Isosurface).Value = 0.67 ; // iso-value level -Plugin(Isosurface).iView = 0 ; // source view is View[0] +Plugin(Isosurface).View = 0 ; // source view is View[0] Plugin(Isosurface).Run ; // We also set some options for the `CutPlane' plugin (which computes -// a section of a 3D view), and then run it: +// a section of a 3D view using the plane A*x+B*y+C*z+D=0), and then +// run it: Plugin(CutPlane).A = 0 ; Plugin(CutPlane).B = 0.2 ; Plugin(CutPlane).C = 1 ; Plugin(CutPlane).D = 0 ; -Plugin(CutPlane).iView = 0 ; +Plugin(CutPlane).View = 0 ; Plugin(CutPlane).Run ; -// Add a title +// Add a title (By convention, for window coordinates a value greater +// than 99999 represents the center. We could also use +// `General.GraphicsWidth / 2', but that would only center the string +// for the current window size.): Plugin(Annotate).Text = "A nice title" ; -// By convention, a value greater than 99999 represents the center (we -// could also use `General.GraphicsWidth/2', but that would only center -// the string for the current window size): Plugin(Annotate).X = 1.e5; Plugin(Annotate).Y = 50 ; Plugin(Annotate).Font = "Times-BoldItalic" ; Plugin(Annotate).FontSize = 28 ; Plugin(Annotate).Align = "Center" ; -Plugin(Annotate).iView = 0 ; +Plugin(Annotate).View = 0 ; Plugin(Annotate).Run ; - Plugin(Annotate).Text = "(and a small subtitle)" ; Plugin(Annotate).Y = 70 ; Plugin(Annotate).Font = "Times-Roman" ;