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