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

new SetOrder command in parser

parent 64d2af40
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,11 @@ typedef std::map<std::pair<MVertex*, MVertex*>, std::vector<MVertex*> > edgeCont
typedef std::map<MFace, std::vector<MVertex*>, Less_Face> faceContainer;
void SetOrder1(GModel *m, bool onlyVisible = false);
void SetOrderN(GModel *m, int order, bool linear=true, bool incomplete=false, bool onlyVisible = false);
void SetOrderN(GModel *m, int order, bool linear=true, bool incomplete=false,
bool onlyVisible=false);
void ElasticAnalogy(GModel *m, double threshold, bool onlyVisible);
void SetHighOrderComplete (GModel *m, bool onlyVisible); // generate complete elements
void SetHighOrderInComplete (GModel *m, bool onlyVisible); // generate in-complete elements
void SetHighOrderComplete (GModel *m, bool onlyVisible);
void SetHighOrderInComplete (GModel *m, bool onlyVisible);
MTriangle* setHighOrder(MTriangle *t, GFace *gf,
edgeContainer &edgeVertices,
faceContainer &faceVertices,
......@@ -37,4 +38,5 @@ struct distanceFromMeshToGeometry_t {
void computeDistanceFromMeshToGeometry (GModel *m, distanceFromMeshToGeometry_t &dist);
void getMeshInfoForHighOrder(GModel *gm, int &meshOrder, bool &complete, bool &CAD);
#endif
......@@ -196,6 +196,7 @@ RefineMesh return tRefineMesh;
Return return tReturn;
Smoother return tSmoother;
SetOrder return tSetOrder;
Sqrt return tSqrt;
Sin return tSin;
Sinh return tSinh;
......
This diff is collapsed.
......@@ -163,22 +163,23 @@
tHomology = 380,
tCohomology = 381,
tBetti = 382,
tGMSH_MAJOR_VERSION = 383,
tGMSH_MINOR_VERSION = 384,
tGMSH_PATCH_VERSION = 385,
tAFFECTDIVIDE = 386,
tAFFECTTIMES = 387,
tAFFECTMINUS = 388,
tAFFECTPLUS = 389,
tOR = 390,
tAND = 391,
tNOTEQUAL = 392,
tEQUAL = 393,
tGREATEROREQUAL = 394,
tLESSOREQUAL = 395,
UNARYPREC = 396,
tMINUSMINUS = 397,
tPLUSPLUS = 398
tSetOrder = 383,
tGMSH_MAJOR_VERSION = 384,
tGMSH_MINOR_VERSION = 385,
tGMSH_PATCH_VERSION = 386,
tAFFECTDIVIDE = 387,
tAFFECTTIMES = 388,
tAFFECTMINUS = 389,
tAFFECTPLUS = 390,
tOR = 391,
tAND = 392,
tNOTEQUAL = 393,
tEQUAL = 394,
tGREATEROREQUAL = 395,
tLESSOREQUAL = 396,
UNARYPREC = 397,
tMINUSMINUS = 398,
tPLUSPLUS = 399
};
#endif
......@@ -189,7 +190,7 @@ typedef union YYSTYPE
{
/* Line 1685 of yacc.c */
#line 92 "Gmsh.y"
#line 93 "Gmsh.y"
char *c;
int i;
......@@ -202,7 +203,7 @@ typedef union YYSTYPE
/* Line 1685 of yacc.c */
#line 206 "Gmsh.tab.hpp"
#line 207 "Gmsh.tab.hpp"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
......@@ -35,6 +35,7 @@
#include "Generator.h"
#include "Field.h"
#include "BackgroundMesh.h"
#include "HighOrder.h"
#endif
#if defined(HAVE_POST)
......@@ -122,7 +123,7 @@ struct doubleXstring{
%token tBSpline tBezier tNurbs tNurbsOrder tNurbsKnots
%token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit tAbort
%token tField tReturn tCall tFunction tShow tHide tGetValue tGetEnv tGetString
%token tHomology tCohomology tBetti
%token tHomology tCohomology tBetti tSetOrder
%token tGMSH_MAJOR_VERSION tGMSH_MINOR_VERSION tGMSH_PATCH_VERSION
%type <d> FExpr FExpr_Single
......@@ -2834,6 +2835,11 @@ Command :
GModel::current()->importGEOInternals();
GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
}
| tSetOrder FExpr tEND
{
SetOrderN(GModel::current(), $2, CTX::instance()->mesh.secondOrderLinear,
CTX::instance()->mesh.secondOrderIncomplete);
}
;
// L O O P
......
This diff is collapsed.
......@@ -1673,6 +1673,9 @@ Refines the current mesh by splitting all elements. If
linear interpolatinon. Otherwise they are snapped on the actual
geometry.
@item SetOrder @var{expression};
Changes the order of the elements in the current mesh.
@item Print @var{char-expression};
Prints the graphic window in a file named @var{char-expression}, using
the current @code{Print.Format} (@pxref{General options list}). If the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment