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

add RefineMesh in parser

parent e3124b7b
No related branches found
No related tags found
No related merge requests found
......@@ -500,6 +500,16 @@ int GModel::mesh(int dimension)
#endif
}
int GModel::refineMesh(int linear)
{
#if defined(HAVE_MESH)
RefineMesh(this, linear);
return true;
#else
Msg::Error("Mesh module not compiled");
return false;
#endif
}
int GModel::setOrderN(int order, int linear, int incomplete)
{
......
......@@ -366,6 +366,9 @@ class GModel
// incomplete is 1 if incomplete basis are used
int setOrderN(int order, int linear, int incomplete);
// refine the mesh by splitting all elements
int refineMesh(int linear);
// create partition boundaries
void createPartitionBoundaries(int createGhostCells);
......
......@@ -184,6 +184,7 @@ Recombine return tRecombine;
Rotate return tRotate;
Ruled return tRuled;
Rand return tRand;
RefineMesh return tRefineMesh;
Return return tReturn;
Smoother return tSmoother;
......
This diff is collapsed.
......@@ -94,80 +94,81 @@
tLength = 311,
tParametric = 312,
tElliptic = 313,
tPlane = 314,
tRuled = 315,
tTransfinite = 316,
tComplex = 317,
tPhysical = 318,
tCompound = 319,
tPeriodic = 320,
tUsing = 321,
tPlugin = 322,
tDegenerated = 323,
tRotate = 324,
tTranslate = 325,
tSymmetry = 326,
tDilate = 327,
tExtrude = 328,
tLevelset = 329,
tLoop = 330,
tRecombine = 331,
tSmoother = 332,
tSplit = 333,
tDelete = 334,
tCoherence = 335,
tIntersect = 336,
tLayers = 337,
tHole = 338,
tAlias = 339,
tAliasWithOptions = 340,
tText2D = 341,
tText3D = 342,
tInterpolationScheme = 343,
tTime = 344,
tCombine = 345,
tBSpline = 346,
tBezier = 347,
tNurbs = 348,
tNurbsOrder = 349,
tNurbsKnots = 350,
tColor = 351,
tColorTable = 352,
tFor = 353,
tIn = 354,
tEndFor = 355,
tIf = 356,
tEndIf = 357,
tExit = 358,
tField = 359,
tReturn = 360,
tCall = 361,
tFunction = 362,
tShow = 363,
tHide = 364,
tGetValue = 365,
tGetEnv = 366,
tGetString = 367,
tGMSH_MAJOR_VERSION = 368,
tGMSH_MINOR_VERSION = 369,
tGMSH_PATCH_VERSION = 370,
tHomRank = 371,
tHomGen = 372,
tHomCut = 373,
tHomSeq = 374,
tAFFECTDIVIDE = 375,
tAFFECTTIMES = 376,
tAFFECTMINUS = 377,
tAFFECTPLUS = 378,
tOR = 379,
tAND = 380,
tNOTEQUAL = 381,
tEQUAL = 382,
tGREATEROREQUAL = 383,
tLESSOREQUAL = 384,
UNARYPREC = 385,
tMINUSMINUS = 386,
tPLUSPLUS = 387
tRefineMesh = 314,
tPlane = 315,
tRuled = 316,
tTransfinite = 317,
tComplex = 318,
tPhysical = 319,
tCompound = 320,
tPeriodic = 321,
tUsing = 322,
tPlugin = 323,
tDegenerated = 324,
tRotate = 325,
tTranslate = 326,
tSymmetry = 327,
tDilate = 328,
tExtrude = 329,
tLevelset = 330,
tLoop = 331,
tRecombine = 332,
tSmoother = 333,
tSplit = 334,
tDelete = 335,
tCoherence = 336,
tIntersect = 337,
tLayers = 338,
tHole = 339,
tAlias = 340,
tAliasWithOptions = 341,
tText2D = 342,
tText3D = 343,
tInterpolationScheme = 344,
tTime = 345,
tCombine = 346,
tBSpline = 347,
tBezier = 348,
tNurbs = 349,
tNurbsOrder = 350,
tNurbsKnots = 351,
tColor = 352,
tColorTable = 353,
tFor = 354,
tIn = 355,
tEndFor = 356,
tIf = 357,
tEndIf = 358,
tExit = 359,
tField = 360,
tReturn = 361,
tCall = 362,
tFunction = 363,
tShow = 364,
tHide = 365,
tGetValue = 366,
tGetEnv = 367,
tGetString = 368,
tGMSH_MAJOR_VERSION = 369,
tGMSH_MINOR_VERSION = 370,
tGMSH_PATCH_VERSION = 371,
tHomRank = 372,
tHomGen = 373,
tHomCut = 374,
tHomSeq = 375,
tAFFECTDIVIDE = 376,
tAFFECTTIMES = 377,
tAFFECTMINUS = 378,
tAFFECTPLUS = 379,
tOR = 380,
tAND = 381,
tNOTEQUAL = 382,
tEQUAL = 383,
tGREATEROREQUAL = 384,
tLESSOREQUAL = 385,
UNARYPREC = 386,
tMINUSMINUS = 387,
tPLUSPLUS = 388
};
#endif
......@@ -191,7 +192,7 @@ typedef union YYSTYPE
/* Line 1685 of yacc.c */
#line 195 "Gmsh.tab.hpp"
#line 196 "Gmsh.tab.hpp"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
......@@ -105,7 +105,7 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list);
%token tPrintf tSprintf tStrCat tStrPrefix tStrRelative
%token tBoundingBox tDraw tToday tSyncModel tCreateTopology tDistanceFunction
%token tPoint tCircle tEllipse tLine tSphere tPolarSphere tSurface tSpline tVolume
%token tCharacteristic tLength tParametric tElliptic
%token tCharacteristic tLength tParametric tElliptic tRefineMesh
%token tPlane tRuled tTransfinite tComplex tPhysical tCompound tPeriodic
%token tUsing tPlugin tDegenerated
%token tRotate tTranslate tSymmetry tDilate tExtrude tLevelset
......@@ -2413,7 +2413,11 @@ Command :
{
GModel::current()->createTopologyFromMesh();
}
| tRefineMesh tEND
{
GModel::current()->importGEOInternals();
GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
}
;
// L O O P
......
This diff is collapsed.
This diff is collapsed.
Mesh.Algorithm = 6; //(1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, 7=bamg)
Mesh.CharacteristicLengthMin=1.5;
Mesh.CharacteristicLengthMax=2.5;
Mesh.CharacteristicLengthMin=1.5/2;
Mesh.CharacteristicLengthMax=2.5/2;
Mesh.RemeshAlgorithm=1;
Mesh.RemeshParametrization=1;//(0) harmonic (1) conformal
// merge reclassified STL
Merge "mobilette-class.msh";
// oringinal STL is a bit coarse: refine it once!
RefineMesh;
//Merge "mobilette-class.msh"; // oringinal STL is a bit coarse
Merge "mobilette-class-fine.msh"; // this was produced by refining once
CreateTopology;
ll[] = Line "*";
......@@ -22,3 +25,5 @@ EndFor
Surface Loop(1) = {s : s + #ss[]-1};
Volume(1) = {1};
//Physical Surface(1) = {s : s + #ss[]-1};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment