Skip to content
Snippets Groups Projects
Commit 6cec5fcb authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

NewModel

parent 35830a84
No related branches found
No related tags found
No related merge requests found
...@@ -204,6 +204,7 @@ MPI_Rank return tMPI_Rank; ...@@ -204,6 +204,7 @@ MPI_Rank return tMPI_Rank;
MPI_Size return tMPI_Size; MPI_Size return tMPI_Size;
Memory return tMemory; Memory return tMemory;
NewModel return tNewModel;
Nurbs return tNurbs; Nurbs return tNurbs;
OnelabAction return tOnelabAction; OnelabAction return tOnelabAction;
......
This diff is collapsed.
...@@ -99,121 +99,122 @@ extern int gmsh_yydebug; ...@@ -99,121 +99,122 @@ extern int gmsh_yydebug;
tToday = 308, tToday = 308,
tFixRelativePath = 309, tFixRelativePath = 309,
tSyncModel = 310, tSyncModel = 310,
tOnelabAction = 311, tNewModel = 311,
tOnelabRun = 312, tOnelabAction = 312,
tCpu = 313, tOnelabRun = 313,
tMemory = 314, tCpu = 314,
tTotalMemory = 315, tMemory = 315,
tCreateTopology = 316, tTotalMemory = 316,
tCreateTopologyNoHoles = 317, tCreateTopology = 317,
tDistanceFunction = 318, tCreateTopologyNoHoles = 318,
tDefineConstant = 319, tDistanceFunction = 319,
tUndefineConstant = 320, tDefineConstant = 320,
tDefineNumber = 321, tUndefineConstant = 321,
tDefineString = 322, tDefineNumber = 322,
tPoint = 323, tDefineString = 323,
tCircle = 324, tPoint = 324,
tEllipse = 325, tCircle = 325,
tLine = 326, tEllipse = 326,
tSphere = 327, tLine = 327,
tPolarSphere = 328, tSphere = 328,
tSurface = 329, tPolarSphere = 329,
tSpline = 330, tSurface = 330,
tVolume = 331, tSpline = 331,
tCharacteristic = 332, tVolume = 332,
tLength = 333, tCharacteristic = 333,
tParametric = 334, tLength = 334,
tElliptic = 335, tParametric = 335,
tRefineMesh = 336, tElliptic = 336,
tAdaptMesh = 337, tRefineMesh = 337,
tRelocateMesh = 338, tAdaptMesh = 338,
tPlane = 339, tRelocateMesh = 339,
tRuled = 340, tPlane = 340,
tTransfinite = 341, tRuled = 341,
tComplex = 342, tTransfinite = 342,
tPhysical = 343, tComplex = 343,
tCompound = 344, tPhysical = 344,
tPeriodic = 345, tCompound = 345,
tUsing = 346, tPeriodic = 346,
tPlugin = 347, tUsing = 347,
tDegenerated = 348, tPlugin = 348,
tRecursive = 349, tDegenerated = 349,
tRotate = 350, tRecursive = 350,
tTranslate = 351, tRotate = 351,
tSymmetry = 352, tTranslate = 352,
tDilate = 353, tSymmetry = 353,
tExtrude = 354, tDilate = 354,
tLevelset = 355, tExtrude = 355,
tRecombine = 356, tLevelset = 356,
tSmoother = 357, tRecombine = 357,
tSplit = 358, tSmoother = 358,
tDelete = 359, tSplit = 359,
tCoherence = 360, tDelete = 360,
tIntersect = 361, tCoherence = 361,
tMeshAlgorithm = 362, tIntersect = 362,
tReverse = 363, tMeshAlgorithm = 363,
tLayers = 364, tReverse = 364,
tScaleLast = 365, tLayers = 365,
tHole = 366, tScaleLast = 366,
tAlias = 367, tHole = 367,
tAliasWithOptions = 368, tAlias = 368,
tCopyOptions = 369, tAliasWithOptions = 369,
tQuadTriAddVerts = 370, tCopyOptions = 370,
tQuadTriNoNewVerts = 371, tQuadTriAddVerts = 371,
tQuadTriSngl = 372, tQuadTriNoNewVerts = 372,
tQuadTriDbl = 373, tQuadTriSngl = 373,
tRecombLaterals = 374, tQuadTriDbl = 374,
tTransfQuadTri = 375, tRecombLaterals = 375,
tText2D = 376, tTransfQuadTri = 376,
tText3D = 377, tText2D = 377,
tInterpolationScheme = 378, tText3D = 378,
tTime = 379, tInterpolationScheme = 379,
tCombine = 380, tTime = 380,
tBSpline = 381, tCombine = 381,
tBezier = 382, tBSpline = 382,
tNurbs = 383, tBezier = 383,
tNurbsOrder = 384, tNurbs = 384,
tNurbsKnots = 385, tNurbsOrder = 385,
tColor = 386, tNurbsKnots = 386,
tColorTable = 387, tColor = 387,
tFor = 388, tColorTable = 388,
tIn = 389, tFor = 389,
tEndFor = 390, tIn = 390,
tIf = 391, tEndFor = 391,
tEndIf = 392, tIf = 392,
tExit = 393, tEndIf = 393,
tAbort = 394, tExit = 394,
tField = 395, tAbort = 395,
tReturn = 396, tField = 396,
tCall = 397, tReturn = 397,
tFunction = 398, tCall = 398,
tShow = 399, tFunction = 399,
tHide = 400, tShow = 400,
tGetValue = 401, tHide = 401,
tGetEnv = 402, tGetValue = 402,
tGetString = 403, tGetEnv = 403,
tHomology = 404, tGetString = 404,
tCohomology = 405, tHomology = 405,
tBetti = 406, tCohomology = 406,
tSetOrder = 407, tBetti = 407,
tExists = 408, tSetOrder = 408,
tFileExists = 409, tExists = 409,
tGMSH_MAJOR_VERSION = 410, tFileExists = 410,
tGMSH_MINOR_VERSION = 411, tGMSH_MAJOR_VERSION = 411,
tGMSH_PATCH_VERSION = 412, tGMSH_MINOR_VERSION = 412,
tAFFECTDIVIDE = 413, tGMSH_PATCH_VERSION = 413,
tAFFECTTIMES = 414, tAFFECTDIVIDE = 414,
tAFFECTMINUS = 415, tAFFECTTIMES = 415,
tAFFECTPLUS = 416, tAFFECTMINUS = 416,
tOR = 417, tAFFECTPLUS = 417,
tAND = 418, tOR = 418,
tNOTEQUAL = 419, tAND = 419,
tEQUAL = 420, tNOTEQUAL = 420,
tGREATEROREQUAL = 421, tEQUAL = 421,
tLESSOREQUAL = 422, tGREATEROREQUAL = 422,
UNARYPREC = 423, tLESSOREQUAL = 423,
tMINUSMINUS = 424, UNARYPREC = 424,
tPLUSPLUS = 425 tMINUSMINUS = 425,
tPLUSPLUS = 426
}; };
#endif #endif
...@@ -234,7 +235,7 @@ typedef union YYSTYPE ...@@ -234,7 +235,7 @@ typedef union YYSTYPE
/* Line 2053 of yacc.c */ /* Line 2053 of yacc.c */
#line 238 "Gmsh.tab.hpp" #line 239 "Gmsh.tab.hpp"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
...@@ -116,7 +116,8 @@ struct doubleXstring{ ...@@ -116,7 +116,8 @@ struct doubleXstring{
%token tPrintf tError tStr tSprintf tStrCat tStrPrefix tStrRelative tStrReplace %token tPrintf tError tStr tSprintf tStrCat tStrPrefix tStrRelative tStrReplace
%token tFind tStrFind tStrCmp tStrChoice %token tFind tStrFind tStrCmp tStrChoice
%token tTextAttributes %token tTextAttributes
%token tBoundingBox tDraw tSetChanged tToday tFixRelativePath tSyncModel %token tBoundingBox tDraw tSetChanged tToday tFixRelativePath
%token tSyncModel tNewModel
%token tOnelabAction tOnelabRun %token tOnelabAction tOnelabRun
%token tCpu tMemory tTotalMemory %token tCpu tMemory tTotalMemory
%token tCreateTopology tCreateTopologyNoHoles %token tCreateTopology tCreateTopologyNoHoles
...@@ -2885,6 +2886,11 @@ Command : ...@@ -2885,6 +2886,11 @@ Command :
// GModel directly during parsing. // GModel directly during parsing.
GModel::current()->importGEOInternals(); GModel::current()->importGEOInternals();
} }
| tNewModel tEND
{
new GModel();
GModel::current(GModel::list.size() - 1);
}
| tBoundingBox tEND | tBoundingBox tEND
{ {
CTX::instance()->forcedBBox = 0; CTX::instance()->forcedBBox = 0;
......
This diff is collapsed.
...@@ -1798,6 +1798,9 @@ Changes the name of the current model. ...@@ -1798,6 +1798,9 @@ Changes the name of the current model.
Forces an immediate transfer from the old geometrical database into the Forces an immediate transfer from the old geometrical database into the
new one (this transfer normally occurs right after a file is read). new one (this transfer normally occurs right after a file is read).
@item NewModel;
Creates a new current model.
@item Include @var{char-expression}; @item Include @var{char-expression};
Includes the file named @var{char-expression} at the current position in the Includes the file named @var{char-expression} at the current position in the
input file. The include command should be given on a line of its own. If input file. The include command should be given on a line of its own. If
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment