Commit b777704d authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'IssueMeshingTrimmedPeriodicSurface' into 'master'

Issue meshing trimmed periodic surface

See merge request !200
parents 5c28a4c9 e61643d0
Pipeline #2603 passed with stage
in 94 minutes and 16 seconds
......@@ -1076,6 +1076,10 @@ bool BDS_Mesh::swap_edge(BDS_Edge *e, const BDS_SwapEdgeTest &theTest,
if(!theTest(p1, p2, op[0], op[1])) return false;
// Check if new edge op[0] - op[1] is not on a seam or degenerated
if (op[0]->degenerated && op[1]->degenerated) return false;
if (op[0]->_periodicCounterpart && op[1]->_periodicCounterpart) return false;
if(p1->iD == CHECK1 && p2->iD == CHECK2) printf("TEST2 OK\n");
BDS_Edge *p1_op1 = find_edge(p1, op[0], e->faces(0));
......
......@@ -2490,6 +2490,13 @@ static bool meshGeneratorPeriodic(GFace *gf, bool repairSelfIntersecting1dMesh,
sprintf(name, "surface%d-recovered-param.pos", gf->tag());
outputScalarField(m->triangles, name, 1, gf);
}
{
// Call this function to untangle elements in Cartesian space
int nb_swap;
Msg::Debug("Delaunizing the initial mesh");
delaunayizeBDS(gf, *m, nb_swap);
}
// start mesh generation for periodic face
......
DBRep_DrawableShape
CASCADE Topology V1, (c) Matra-Datavision
Locations 2
1
1 0 0 0
0 1 0 0
0 0 1 0
1
1 0 0 0
0 1 0 0
0 0 1 0
Curve2ds 10
8 0 1.12224670903234
1 0 3.0000206377977183 1 0
8 0 1.1222467090323445
1 0 0 1 0
1 9.3299793630539245 7.4999285164273246 1.7453292517899418e-006 -0.999999999998477
8 0 1.9999999999999978
1 0 0 0 1
1 -0.99999999999999545 -7.500000000000056 1 0
1 9.3299793630539245 7.4999285164273246 1.7453292517899418e-006 -0.999999999998477
1 -3.0408840575736096 -8.6244492084071567 -0.90107702132234568 0.43365908458701657
1 1.1222467090323445 0 0 1
8 0 1.12224670903234
1 0 1.9999999999999978 1 0
8 0 1.1222467090323445
1 0 0 1 0
Curves 4
2 15.000000000000156 122.72 -13.57997936220228 -0 0 1 0 -1 0 1 0 0 72.719999979356288
1 15.000000000000156 50.000071483572675 -13.579979363053925 0 0.999999999998477 -1.7453292517899418e-006
1 80.526256578337609 91.184342368293855 -13.579979363053925 -0.90107702132071521 0.43365908458689234 -1.745329251789942e-006
2 15.000000000000156 122.72 -13.579982853712428 -0 0 1 0 -1 0 1 0 0 70.719928516430372
Polygon3D 0
PolygonOnTriangulations 8
11 1 3 4 5 6 7 8 9 10 11 2
p 0.26210510631335 1 0 0.112224670903234 0.224449341806468 0.336674012709702 0.448898683612936 0.56112335451617 0.673348025419404 0.785572696322638 0.897797367225872 1.01002203812911 1.12224670903234
11 1 3 4 5 6 7 8 9 10 11 2
p 0.26210510631335 1 0 0.112224670903234 0.224449341806468 0.336674012709702 0.448898683612936 0.56112335451617 0.673348025419404 0.785572696322638 0.897797367225872 1.01002203812911 1.12224670903234
2 1 12
p 0.26210510631335 1 0 0.999928516428848
2 2 13
p 0.26210510631335 1 0 2
2 2 13
p 0.26210510631335 1 0 2
2 12 14
p 0.26210510631335 1 0.999928516428848 2
11 12 14 15 16 17 18 19 20 21 22 13
p 0.26210510631335 1 0 0.112224670903234 0.224449341806468 0.336674012709702 0.448898683612936 0.56112335451617 0.673348025419404 0.785572696322638 0.897797367225872 1.01002203812911 1.12224670903234
11 14 15 16 17 18 19 20 21 22 23 13
p 0.26210510631335 1 0 0.112224670903234 0.224449341806468 0.336674012709702 0.448898683612936 0.56112335451617 0.673348025419404 0.785572696322638 0.897797367225872 1.01002203812911 1.12224670903234
Surfaces 7
10 0 1.1222467090323445 0 1.9999999999999978
7 15.000000000000156 122.72 -16.579999999999998 -0 0 1
8 0 1.9999999999999978
1 15.000000000000156 50.000071483572675 -13.579979363053925 0 0.999999999998477 -1.7453292517899418e-006
10 0 1.1222467090323445 0 3.0000206377977183
2 15.000000000000156 122.72 -16.579999999999998 -0 0 1 0 -1 0 1 0 0 72.719999979356288
1 15 57.5 -4.25 -1 -0 -0 0 0 -1 0 -1 0
1 7.5000000000001004 51.000071483571148 -13.579981108383151 0 1.7453292500136282e-006 0.999999999998477 0 0.999999999998477 -1.7453292500136282e-006 -1 0 0
1 15 57.5 -4.25 -1 -0 -0 0 0 -1 0 -1 0
1 83.567140635917724 99.808791576698539 -13.57998110838318 -1.5726760834291801e-006 7.5687788563509317e-007 0.999999999998477 0.99999999999876332 2.0194839173657898e-028 1.5726760834296305e-006 1.190323748815098e-012 0.99999999999971367 -7.568778856341572e-007
10 0 1.1222467090323445 0 2.828400000000002
3 15.000000000000156 122.72 -13.579982853712428 -0 0 1 0 -1 0 1 0 0 70.719928516430372
-0.78539990872670151
Triangulations 2
23 21 1 0.123065325764207
15.0000000000002 50.0000714835727 -13.5799793630539 80.5262565783376 91.1843423682939 -13.5799793630539 23.1438584444572 50.457451147678 -13.5799793622023 31.1852576693081 51.8240492610778 -13.5799793622023 39.0230275112033 54.0826009657012 -13.5799793622023 46.5585597014788 57.2046910518939 -13.5799793622023 53.6970484729666 61.1510399919045 -13.5799793622023 60.3486833269108 65.8719981220698 -13.5799793622023 66.4297789535914 71.3081702933817 -13.5799793622023 71.8638280909397 77.391163131604 -13.5799793622023 76.5824640749583 84.0444455055383 -13.5799793622023 15 51 -13.5799811083832 78.7241025356962 92.0516605374676 -13.5799828537124 15.0000000000002 52.0000714835696 -13.5799828537124 22.9198719362409 52.4449409969471 -13.5799828537124 30.7401026638945 53.7739525607226 -13.5799828537124 38.3623045767715 55.9703856623037 -13.5799828537124 45.6905815017003 59.0066066163752 -13.5799828537124 52.6327351840197 62.8444162288293 -13.5799828537124 59.101425248952 67.4355303870957 -13.5799828537124 65.0152680451911 72.7221875304857 -13.5799828537124 70.2998605459768 78.6378753578669 -13.5799828537124 74.888716425784 85.1081676298393 -13.5799828537124 0 0 1.12224670903234 0 0.112224670903234 0 0.224449341806468 0 0.336674012709702 0 0.448898683612936 0 0.56112335451617 0 0.673348025419404 0 0.785572696322638 0 0.897797367225872 0 1.01002203812911 0 0 0.999928516428848 1.12224670903234 2 0 2 0.112224670903234 2 0.224449341806468 2 0.336674012709702 2 0.448898683612936 2 0.56112335451617 2 0.673348025419404 2 0.785572696322638 2 0.897797367225872 2 1.01002203812911 2 3 12 1 15 14 12 15 12 3 16 3 4 16 15 3 17 4 5 17 16 4 6 17 5 18 17 6 19 6 7 19 18 6 8 19 7 20 19 8 21 8 9 21 20 8 10 21 9 22 21 10 11 22 10 23 22 11 2 23 11 13 23 2
22 20 1 0.123065325764207
15.0000000000002 50.0000714835727 -13.5799793630539 80.5262565783376 91.1843423682939 -13.5799793630539 23.1438584444572 50.457451147678 -13.5799793622023 31.1852576693081 51.8240492610778 -13.5799793622023 39.0230275112033 54.0826009657012 -13.5799793622023 46.5585597014788 57.2046910518939 -13.5799793622023 53.6970484729666 61.1510399919045 -13.5799793622023 60.3486833269108 65.8719981220698 -13.5799793622023 66.4297789535914 71.3081702933817 -13.5799793622023 71.8638280909397 77.391163131604 -13.5799793622023 76.5824640749583 84.0444455055383 -13.5799793622023 15.0000000000002 52.0000714835696 -13.5799828537124 78.7241025356962 92.0516605374676 -13.5799828537124 22.9198719362409 52.4449409969471 -13.5799828537124 30.7401026638945 53.7739525607226 -13.5799828537124 38.3623045767715 55.9703856623037 -13.5799828537124 45.6905815017003 59.0066066163752 -13.5799828537124 52.6327351840197 62.8444162288293 -13.5799828537124 59.101425248952 67.4355303870957 -13.5799828537124 65.0152680451911 72.7221875304857 -13.5799828537124 70.2998605459768 78.6378753578669 -13.5799828537124 74.888716425784 85.1081676298393 -13.5799828537124 0 0 1.12224670903234 0 0.112224670903234 0 0.224449341806468 0 0.336674012709702 0 0.448898683612936 0 0.56112335451617 0 0.673348025419404 0 0.785572696322638 0 0.897797367225872 0 1.01002203812911 0 0 2 1.12224670903234 2 0.112224670903234 2 0.224449341806468 2 0.336674012709702 2 0.448898683612936 2 0.56112335451617 2 0.673348025419404 2 0.785572696322638 2 0.897797367225872 2 1.01002203812911 2 14 1 3 14 12 1 15 3 4 15 14 3 16 4 5 16 15 4 6 16 5 17 16 6 18 6 7 18 17 6 8 18 7 19 18 8 20 8 9 20 19 8 10 20 9 21 20 10 11 21 10 22 21 11 2 22 11 13 22 2
TShapes 12
Ve
0.000144355116520619
15.0000000000002 50.0000714835727 -13.5799793630539
0 0
0101101
*
Ve
0.00014435511650511
80.5262565783376 91.1843423682939 -13.5799793630539
0 0
0101101
*
Ed
0.000142925857987308 1 1 0
1 1 0 0 1.12224670903234
2 1 2 0 0 1.12224670903234
2 2 1 0 0 1.12224670903234
6 1 2 0
6 2 1 0
0
0101000
+12 0 -11 0 *
Ve
1.00001248921946e-005
15 51 -13.5799811083832
0 0
0101101
*
Ed
1.00000001563194e-005 1 1 0
1 2 0 0 0.999928516428848
2 3 3 0 0 0.999928516428848
2 4 1 0 0 0.999928516428848
2 5 4 1 0 0.999928516428848
2 6 5 0 0 0.999928516428848
6 3 1 0
0
0101000
+12 0 -9 0 *
Ve
1.00000000635529e-005
78.7241025356962 92.0516605374676 -13.5799828537124
0 0
0101101
*
Ed
1.00000000142109e-005 1 1 0
1 3 0 0 2
2 7 6 2 0 2
2 8 1 0 0 2
6 4 2 0
6 5 1 0
0
0101000
+11 0 -7 0 *
Ve
1.42128473018496e-005
15.0000000000002 52.0000714835696 -13.5799828537124
0 0
0101101
*
Ed
1.00000001563194e-005 1 1 0
1 2 0 0.999928516428848 2
2 3 3 0 0.999928516428848 2
2 4 1 0 0.999928516428848 2
2 5 4 1 0.999928516428848 2
2 6 5 0 0.999928516428848 2
6 6 1 0
0
0101000
+9 0 -5 0 *
Ed
1.00000000142109e-005 1 1 0
1 4 0 0 1.12224670903234
2 9 1 0 0 1.12224670903234
2 10 7 0 0 1.12224670903234
6 7 2 0
6 8 1 0
0
0101000
+5 0 -7 0 *
Wi
0101100
+10 0 -8 0 +6 0 -4 0 -3 0 *
Fa
0 1e-005 1 0
2 1
0101000
+2 0 *
-1 0
0
SetFactory("OpenCASCADE");
a() = ShapeFromFile("TrimmedSurface.brep");
lc = 2.2626725788082012;
Mesh.Algorithm = 6;
Mesh.CharacteristicLengthExtendFromBoundary = 1;
Mesh.CharacteristicLengthFactor = 1.0;
Mesh.CharacteristicLengthMin = lc;
Mesh.CharacteristicLengthMax = lc;
Mesh.QualityType = 0;
Mesh 2;
// Check out the quality of the mesh
Plugin(AnalyseCurvedMesh).ICNMeasure = 1;
Plugin(AnalyseCurvedMesh).JacobianDeterminant = 0;
Plugin(AnalyseCurvedMesh).IGEMeasure = 0;
Plugin(AnalyseCurvedMesh).DrawPView = 1;
Plugin(AnalyseCurvedMesh).DimensionOfElements = 2;
Plugin(AnalyseCurvedMesh).Run;
minquality = View[PostProcessing.NbViews-1].Min;
If (minquality < 0.4)
Error("Quality is far too low. It should be 0.4, but is %22.15f instead", minquality);
EndIf
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment