[Gmsh] Problem with 3-D meshing cube with holes
Laurent Mahéo
laurent.maheo at lamef.bordeaux.ensam.fr
Wed Sep 22 19:39:05 CEST 2010
Hello Gmsh users,
I am trying to mesh a cube with holes (spheres) and I have some problems.
- When the sphere is completely inside the cube, there is no problem.
- When a part of the sphere is located in a face of the cube, I build the new
outside geometry and it works.
- But when a part of the sphere is located in a edge of the cube, I build the
new outside geometry and it does not work.
The Gmsh software gives me :
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Abandon
I do not manage to see where the problem is. If you have some suggestions ...
--
Laurent MAHEO
----------------------------------------------------------------------
mailto: laurent.maheo at lamef.bordeaux.ensam.fr
----------------------------------------------------------------------
ENSAM - LAMEFIP
Esplanade des Arts et Métiers
33405 Talence cedex
Tél. 05.56.84.53.68 - Fax. ~.66
----------------------------------------------------------------------
-------------- next part --------------
// Traitement de la sphère numéro 0
// Sphère émergente sur deux faces du cube
lsphere0 = 3;
Point(101) = {15.000000,13.000000,50.000000,lsphere0};
Point(104) = {-5.000000,13.000000,50.000000,lsphere0};
Point(103) = {15.000000,-7.000000,50.000000,lsphere0};
Point(102) = {35.000000,13.000000,50.000000,lsphere0};
Point(105) = {15.000000,33.000000,50.000000,lsphere0};
Point(106) = {15.000000,13.000000,30.000000,lsphere0};
Point(107) = {15.000000,13.000000,70.000000,lsphere0};
Point(110) = {0.000000,13.000000,50.000000,lsphere0};
Point(111) = {0.000000,13.000000,63.228757,lsphere0};
Point(112) = {0.000000,26.228757,50.000000,lsphere0};
Point(113) = {0.000000,13.000000,36.771243,lsphere0};
Point(114) = {0.000000,-0.228757,50.000000,lsphere0};
Point(115) = {0.000000,0.000000,52.449490,lsphere0};
Point(116) = {0.000000,0.000000,47.550510,lsphere0};
Point(120) = {15.000000,0.000000,50.000000,lsphere0};
Point(121) = {15.000000,0.000000,65.198684,lsphere0};
Point(122) = {30.198684,0.000000,50.000000,lsphere0};
Point(123) = {15.000000,0.000000,34.801316,lsphere0};
Point(124) = {-0.198684,0.000000,50.000000,lsphere0};
Circle(132) = {102,101,106} Plane{0, 0, 1};
Circle(133) = {107,101,102} Plane{0, 0, 1};
Circle(134) = {107,101,105} Plane{0, 0, 1};
Circle(135) = {105,101,106} Plane{0, 0, 1};
Circle(136) = {105,101,102} Plane{0, 0, 1};
Circle(137) = {105,101,112} Plane{0, 0, 1};
Circle(138) = {107,101,111} Plane{0, 0, 1};
Circle(139) = {106,101,113} Plane{0, 0, 1};
Circle(140) = {111,110,112} Plane{0, 0, 1};
Circle(141) = {112,110,113} Plane{0, 0, 1};
Circle(142) = {115,110,111} Plane{0, 0, 1};
Circle(143) = {113,110,116} Plane{0, 0, 1};
Circle(144) = {102,101,122} Plane{0, 0, 1};
Circle(145) = {107,101,121} Plane{0, 0, 1};
Circle(146) = {106,101,123} Plane{0, 0, 1};
Circle(147) = {115,120,121} Plane{0, 0, 1};
Circle(148) = {121,120,122} Plane{0, 0, 1};
Circle(149) = {122,120,123} Plane{0, 0, 1};
Circle(150) = {123,120,116} Plane{0, 0, 1};
Line Loop(151) = {147,-145,138,-142};
Line Loop(152) = {-138,134,137,-140};
Line Loop(153) = {-137,135,139,-141};
Line Loop(154) = {-139,146,150,-143};
Line Loop(155) = {-148,-145,133,144};
Line Loop(156) = {-149,-144,132,146};
Line Loop(157) = {133,-136,-134};
Line Loop(158) = {132,-135,136};
Line Loop(159) = {131,-143,-141,-140,-142};
Line Loop(160) = {131,-150,-149,-148,-147};
Ruled Surface(161) = {151};
Ruled Surface(162) = {152};
Ruled Surface(163) = {153};
Ruled Surface(164) = {154};
Ruled Surface(165) = {155};
Ruled Surface(166) = {156};
Ruled Surface(167) = {157};
Ruled Surface(168) = {158};
Surface Loop(180) = {161,162,163,164,165,166,167,168};
// Traitement du cube
lcube = 3;
Point(1) = {0.000000,0.000000,0.000000,lcube};
Point(2) = {100.000000,0.000000,0.000000,lcube};
Point(3) = {100.000000,100.000000,0.000000,lcube};
Point(4) = {0.000000,100.000000,0.000000,lcube};
Point(5) = {0.000000,0.000000,100.000000,lcube};
Point(6) = {100.000000,0.000000,100.000000,lcube};
Point(7) = {100.000000,100.000000,100.000000,lcube};
Point(8) = {0.000000,100.000000,100.000000,lcube};
Line(1000) = {1,116};
Line(1001) = {115,5};
Line(12) = {5,8};
Line(13) = {8,4};
Line(14) = {4,1};
Line(15) = {2,6};
Line(16) = {6,7};
Line(17) = {7,3};
Line(18) = {3,2};
Line(19) = {1,2};
Line(20) = {2,6};
Line(21) = {6,5};
Line(1002) = {5,115};
Line(1003) = {116,1};
Line(23) = {4,3};
Line(24) = {3,7};
Line(25) = {7,8};
Line(26) = {8,4};
Line(27) = {1,2};
Line(28) = {2,3};
Line(29) = {3,4};
Line(30) = {4,1};
Line(31) = {5,6};
Line(32) = {6,7};
Line(33) = {7,8};
Line(34) = {8,5};
Line Loop(41) = {1000,-143,-141,-140,-142,1001,12,13,14};
Line Loop(42) = {15,16,17,18};
Line Loop(43) = {19,20,21,1002,147,148,149,150,1003};
Line Loop(44) = {23,24,25,26};
Line Loop(45) = {27,28,29,30};
Line Loop(46) = {31,32,33,34};
Plane Surface(51) = {41};
Plane Surface(52) = {42};
Plane Surface(53) = {43};
Plane Surface(54) = {44};
Plane Surface(55) = {45};
Plane Surface(56) = {46};
Surface Loop(51) = {51,52,53,54,55,56};
Volume(61) = {51,180};