diff --git a/Common/Options.cpp b/Common/Options.cpp index 4ce1574df6f810077feac3d4543099cd077a253a..7bedf43a56f03915b762ce969d0efbdaed7b975d 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.10 2001-04-08 20:36:49 geuzaine Exp $ +// $Id: Options.cpp,v 1.11 2001-04-14 06:55:15 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -69,12 +69,12 @@ void Init_Options(int num){ CTX.mesh.vis_type = 0 ; CTX.mesh.draw = 1 ; CTX.post.draw = 1 ; + CTX.threads_lock = 0 ; //very primitive locking during mesh generation // For motif versions only: CTX.overlay = 1 ; CTX.command_win = 0 ; CTX.threads = 1 ; - CTX.threads_lock = 0 ; CTX.font = "-*-helvetica-medium-r-*-*-*-*-*-*-*-*-*-*" ; CTX.fixed_font = "fixed" ; } diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index 340782d82a75883282b390cbc8e4718750244fc1..1c68682b42da8790fa76c5cfbf232d3e15b16dca 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -1,4 +1,4 @@ -// $Id: Generator.cpp,v 1.12 2001-04-08 20:36:50 geuzaine Exp $ +// $Id: Generator.cpp,v 1.13 2001-04-14 06:55:15 geuzaine Exp $ #include "Gmsh.h" #include "Const.h" @@ -25,7 +25,7 @@ void GetStatistics (double s[50]){ void ApplyLcFactor_Point(void *a, void *b){ Vertex *v = *(Vertex**)a; if(v->lc <= 0.0){ - Msg(GERROR, "Wrong characteristic length (%g <= 0) for Point %d (defaulting to 1.0)", + Msg(GERROR, "Wrong characteristic length (%g <= 0) for Point %d, defaulting to 1.0", v->lc, v->Num); v->lc = 1.0 ; } @@ -187,6 +187,13 @@ void mai3d (Mesh * M, int Asked){ double t1, t2; int oldstatus; + if(CTX.threads_lock){ + Msg(INFO, "I'm busy! Ask me that later..."); + return; + } + + CTX.threads_lock = 1 ; + M->MeshParams.DelaunayAlgorithm = CTX.mesh.algo ; M->MeshParams.NbSmoothing = CTX.mesh.nb_smoothing ; M->MeshParams.InteractiveDelaunay = CTX.mesh.interactive ; @@ -237,4 +244,6 @@ void mai3d (Mesh * M, int Asked){ M->status = 3; } + CTX.threads_lock = 0 ; + } diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index 4d6fb893de33434d97a537adf86309398f2d3f67..767af420d8bf5c79cde975d077bb0fc3a0d2ab76 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.9 2001-03-18 13:57:12 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.10 2001-04-14 06:55:15 geuzaine Exp $ #include "Gmsh.h" #include "Const.h" #include "Context.h" @@ -81,6 +81,11 @@ void MergeProblem(char *name){ void OpenProblem(char *name){ char ext[6]; + + if(CTX.threads_lock){ + Msg(INFO, "I'm busy! Ask me that later..."); + return; + } InitSymbols(); Init_Mesh(&M, 1); @@ -92,7 +97,8 @@ void OpenProblem(char *name){ if(!strcmp(ext,".GEO") || !strcmp(ext,".geo") || //!strcmp(ext,".msh") || - !strcmp(ext,".pos")){ + !strcmp(ext,".pos") + ){ CTX.basefilename[strlen(name)-4] = '\0'; } else{ diff --git a/demos/filter.geo b/demos/filter.geo index bc86a40536e862dce2f416863602960ace461ac7..3854840329a31c13978ebd939f506f12e3c67156 100644 --- a/demos/filter.geo +++ b/demos/filter.geo @@ -453,12 +453,12 @@ Line Loop(6023) = {-58,-6014,6007,6015}; Ruled Surface(6024) = {6023}; Line Loop(6025) = {6011,-59,-6015,6008}; Ruled Surface(6026) = {6025}; -Line Loop(6027) = {-57,-6013,6009,6016}; -Ruled Surface(6028) = {6027}; +//Line Loop(6027) = {-57,-6013,6009,6016}; +//Ruled Surface(6028) = {6027}; Line Loop(6029) = {-56,-6016,6010,6012}; Ruled Surface(6030) = {6029}; Surface Loop(6031) = {184,6020,6030,6028,6018,-6024,-6022,-6026}; -Complex Volume(6032) = {6031}; +//Complex Volume(6032) = {6031}; AIR = 10000 ; @@ -476,11 +476,10 @@ Physical Volume (T1) = 606; Physical Volume (T2) = 608; Physical Volume (R1) = 602; Physical Volume (R2) = 604; -Physical Volume (SOU) = 6032; +//Physical Volume (SOU) = 6032; Physical Surface (CLD0) = {231,229,223,237,227, 199,201,219,209,207,203,205, 180,182,188,176,178,174,172, 6026,6024,6028,6030}; Physical Surface (CLTEM) = {211,6022}; -