diff --git a/Common/Message.h b/Common/Message.h index 7083b7056aadd534ce30e46ba5fcc9edd1d00978..7539e141cc948683adcba456877376df00424604 100644 --- a/Common/Message.h +++ b/Common/Message.h @@ -1,11 +1,11 @@ -/* $Id: Message.h,v 1.4 2000-11-24 00:11:25 geuzaine Exp $ */ +/* $Id: Message.h,v 1.5 2000-11-24 08:04:14 geuzaine Exp $ */ #ifndef _MESSAGE_H_ #define _MESSAGE_H_ #include <stdarg.h> #define FATAL 0 // Fatal error (causes Gmsh to exit) -#define ERROR 1 // Error +#define ERROR 1 // Error (but Gmsh can live with it) #define WARNING 2 // Warning #define INFOS 3 // Long informations #define INFO 4 // Small information in status bar @@ -16,17 +16,25 @@ #define DEBUG 9 // Long debug information #define FATAL_STR "Fatal Error : " -#define ERROR_STR "Error : " -#define WARNING_STR "Warning : " -#define INFOS_STR "Info : " -#define INFO_STR "Info : " -#define SELECT_STR "Info : " -#define STATUS_STR "Status : " +#define FATAL_NIL " : " +#define ERROR_STR "Error : " +#define ERROR_NIL " : " +#define WARNING_STR "Warning : " +#define WARNING_NIL " : " +#define INFOS_STR "Info : " +#define INFOS_NIL " : " +#define INFO_STR "Info : " +#define INFO_NIL " : " +#define SELECT_STR "Info : " +#define SELECT_NIL " : " +#define STATUS_STR "Info : " +#define STATUS_NIL " : " #define PARSER_ERROR_STR "Parse Error : " -#define PARSER_INFO_STR "Parse Info : " -#define DEBUG_STR "Debug : " - -#define WHITE_STR " : " +#define PARSER_ERROR_NIL " : " +#define PARSER_INFO_STR "Parse Info : " +#define PARSER_INFO_NIL " : " +#define DEBUG_STR "Debug : " +#define DEBUG_NIL " : " void Signal (int signum); void Msg (int level, char *fmt, ...); diff --git a/Common/Views.h b/Common/Views.h index d0a417a2b50d334ce518e9bb370451261f7e3b8d..9e2f66c9f5036622bfdcd54ce767e21a6b5ddfc8 100644 --- a/Common/Views.h +++ b/Common/Views.h @@ -1,4 +1,4 @@ -/* $Id: Views.h,v 1.2 2000-11-23 14:11:28 geuzaine Exp $ */ +/* $Id: Views.h,v 1.3 2000-11-24 08:04:14 geuzaine Exp $ */ #ifndef _VIEWS_H_ #define _VIEWS_H_ @@ -28,10 +28,29 @@ typedef struct{ double *V; }Post_Point; -/* Post_XXX.Type. The keys are important ! */ -#define DRAW_POST_SCALAR 1 -#define DRAW_POST_VECTOR 3 -#define DRAW_POST_TENSOR 9 +#include "ColorTable.h" + +typedef struct{ + int Num, Changed, Allocated; + char Name[NAME_STR_L], Format[NAME_STR_L]; + double Min, Max, CustomMin, CustomMax; + double Offset[3], Raise[3], ArrowScale; + int Visible, ScalarOnly; + int IntervalsType, NbIso, Light, ShowElement; + int ShowScale, TransparentScale, ScaleType, RangeType; + int ArrowType, ArrowLocation; + int TimeStep, NbTimeStep; + ColorTable CT; + List_T *Simplices, *Triangles, *Lines, *Points; + + double (*GVFI) (double min, double max, int nb, int index); + int (*GIFV) (double min, double max, int nb, double value); +}Post_View; + +/* Type (The keys are important!) */ +#define DRAW_POST_SCALAR 1 +#define DRAW_POST_VECTOR 3 +#define DRAW_POST_TENSOR 9 /* IntervalsType */ #define DRAW_POST_ISO 1 @@ -47,7 +66,7 @@ typedef struct{ #define DRAW_POST_DISPLACEMENT 5 #define DRAW_POST_ARROW_HEAD 6 -/* ArrowLovation */ +/* ArrowLocation */ #define DRAW_POST_LOCATE_COG 1 #define DRAW_POST_LOCATE_VERTEX 2 @@ -59,26 +78,7 @@ typedef struct{ #define DRAW_POST_LINEAR 1 #define DRAW_POST_LOGARITHMIC 2 -#include "ColorTable.h" - -typedef struct{ - int Num, Changed, Allocated; - char Name[NAME_STR_L], Format[NAME_STR_L]; - double Min, Max, CustomMin, CustomMax; - double Offset[3], Raise[3], ArrowScale; - int Visible, ScalarOnly; - int IntervalsType, NbIso, Light, ShowElement; - int ShowScale, TransparentScale, ScaleType, RangeType; - int ArrowType, ArrowLocation; - int TimeStep, NbTimeStep; - ColorTable CT; - List_T *Simplices, *Triangles, *Lines, *Points; - - double (*GVFI) (double min, double max, int nb, int index); - int (*GIFV) (double min, double max, int nb, double value); -}Post_View; - - +/* Public functions */ void BeginView (int alloc); void EndView (char *Name, double XOffset, double YOffset, double ZOffset); @@ -138,8 +138,8 @@ void AddView_TensorPoint(double x0,double y0,double z0, List_T *v); int BGMWithView (Post_View *ErrView); -int CreateBGM(Post_View *ErrView, int OptiMethod, double Degree, - double OptiValue, double *ObjFunct, char *OutFile); +int CreateBGM(Post_View *ErrView, int OptiMethod, double Degree, + double OptiValue, double *ObjFunct, char *OutFile); double ErrorInView(Post_View * ErrView, int *n); #endif diff --git a/Geo/CAD.cpp b/Geo/CAD.cpp index 041a2d16e66222c756f46fad146aa4bc3ff542ae..309ad951d6cb013a8f3c9d87966c0f4544c5b0bc 100644 --- a/Geo/CAD.cpp +++ b/Geo/CAD.cpp @@ -1,4 +1,4 @@ -/* $Id: CAD.cpp,v 1.4 2000-11-23 23:20:34 geuzaine Exp $ */ +/* $Id: CAD.cpp,v 1.5 2000-11-24 08:04:14 geuzaine Exp $ */ #include "Gmsh.h" #include "Geo.h" @@ -1378,7 +1378,8 @@ void ApplicationOnShapes(double matrix[4][4], List_T *ListShapes){ ApplicationOnSurface(O.Num,matrix); break; default: - printf("Impossible de translater le truc %d de type %d\n",O.Num,O.Type); + Msg(ERROR, "Impossible to Translate Entity %d (of Type %d)", + O.Num, O.Type); break; } } @@ -1462,7 +1463,7 @@ void CopyShape(int Type, int Num, int *New){ *New = news->Num; break; default: - printf("Impossible de copier le truc %d de type %d\n",Num,Type); + Msg(ERROR, "Impossible to Copy the Entity %d (of Type %d)", Num, Type); break; } } @@ -1538,7 +1539,7 @@ void DeleteShape(int Type, int Num){ DeleteSurf(Num); break; default: - printf("Impossible de copier le truc %d de type %d\n",Num,Type); + Msg(ERROR, "Impossible to Delete the Entity %d (of Type %d)", Num, Type); break; } } diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp index 3f7f384e8c009f43251238f76818a83e67822f2a..8a9ee3332281a8edd1f4df7ec883962e69b6e7e0 100644 --- a/Mesh/2D_Mesh.cpp +++ b/Mesh/2D_Mesh.cpp @@ -1,4 +1,4 @@ -/* $Id: 2D_Mesh.cpp,v 1.4 2000-11-23 23:20:35 geuzaine Exp $ */ +/* $Id: 2D_Mesh.cpp,v 1.5 2000-11-24 08:04:14 geuzaine Exp $ */ /* Maillage Delaunay d'une surface (Point insertion Technique) @@ -257,9 +257,9 @@ void Plan_Moyen (void *data, void *dum){ s->plan[2][i] = res[i]; Msg(DEBUG, "Plan : (%g x + %g y + %g z = %g)\n" - WHITE_STR "Normal : (%g , %g , %g )\n" - WHITE_STR "t1 : (%g , %g , %g )\n" - WHITE_STR "t2 : (%g , %g , %g )", + DEBUG_NIL "Normal : (%g , %g , %g )\n" + DEBUG_NIL "t1 : (%g , %g , %g )\n" + DEBUG_NIL "t2 : (%g , %g , %g )", s->a, s->b, s->c, s->d, res[0], res[1], res[2], t1[0], t1[1], t1[2], diff --git a/Mesh/3D_Coherence.cpp b/Mesh/3D_Coherence.cpp index c96b7930026d6bb890de4cfd05a36047d71ae947..bf833d28204015071aff2e366ce301e843fec4f9 100644 --- a/Mesh/3D_Coherence.cpp +++ b/Mesh/3D_Coherence.cpp @@ -1,4 +1,4 @@ -/* $Id: 3D_Coherence.cpp,v 1.5 2000-11-23 23:20:35 geuzaine Exp $ */ +/* $Id: 3D_Coherence.cpp,v 1.6 2000-11-24 08:04:14 geuzaine Exp $ */ #include "Gmsh.h" #include "Const.h" @@ -573,11 +573,11 @@ Vertex *Edge_Face (Edge * e, Face * f){ if (res[0] == 1.0 || res[2] == 0.0 || res[0] == 0.0 || res[1] == 1. - res[0] || res[1] == 0.0 || res[0] == 1.0) Msg(DEBUG, "Face p1 %g %g %g\n" - WHITE_STR "facette p2 %g %g %g\n" - WHITE_STR "facette p3 %g %g %g\n" - WHITE_STR "edge e2 %g %g %g\n" - WHITE_STR "edge e3 %g %g %g\n" - WHITE_STR "%g %g %g", + DEBUG_NIL "facette p2 %g %g %g\n" + DEBUG_NIL "facette p3 %g %g %g\n" + DEBUG_NIL "edge e2 %g %g %g\n" + DEBUG_NIL "edge e3 %g %g %g\n" + DEBUG_NIL "%g %g %g", f->V[0]->Pos.X, f->V[0]->Pos.Y, f->V[0]->Pos.Z, f->V[1]->Pos.X, f->V[1]->Pos.Y, f->V[1]->Pos.Z, f->V[2]->Pos.X, f->V[2]->Pos.Y, f->V[2]->Pos.Z, @@ -1173,8 +1173,8 @@ int Coherence (Volume * v, Mesh * m){ Msg(INFOS, "Volume = %g", volume); Msg(INFOS, "===================================================\n" - WHITE_STR "(1) Number of Missing Edges = %d\n" - WHITE_STR "===================================================", + INFOS_NIL "(1) Number of Missing Edges = %d\n" + INFOS_NIL "===================================================", List_Nbr (Missing)); for (i = 0; i < List_Nbr (Missing); i++){ @@ -1223,8 +1223,8 @@ int Coherence (Volume * v, Mesh * m){ /* Missing Faces */ Msg(INFOS, "===================================================\n" - WHITE_STR "(1) Number of Missing Faces = %d\n" - WHITE_STR "===================================================", + INFOS_NIL "(1) Number of Missing Faces = %d\n" + INFOS_NIL "===================================================", List_Nbr (MissingFaces)); for (i = 0; i < List_Nbr (MissingS); i++){ diff --git a/Mesh/3D_Divide.cpp b/Mesh/3D_Divide.cpp index ca610a8ecf1eff17f24feb8c58a4eff53e4f09f4..4f153e72979d388b0e0e5d8535d3e0a89dc29ede 100644 --- a/Mesh/3D_Divide.cpp +++ b/Mesh/3D_Divide.cpp @@ -1,4 +1,4 @@ -/* $Id: 3D_Divide.cpp,v 1.3 2000-11-23 23:20:35 geuzaine Exp $ */ +/* $Id: 3D_Divide.cpp,v 1.4 2000-11-24 08:04:14 geuzaine Exp $ */ /* Routine de division des elements tetraedriques ou triangulaires @@ -56,9 +56,9 @@ void Remise_A_Zero (void){ void Impression_Resultats (void){ Msg(INFOS, "===================================================\n" - WHITE_STR "Surface Coherence Results (Number of Intersections)\n" - WHITE_STR "%d EV, %d EE, %d FV, %d FF, %d FE, %d EEE, %d EEEE\n" - WHITE_STR "===================================================", + INFOS_NIL "Surface Coherence Results (Number of Intersections)\n" + INFOS_NIL "%d EV, %d EE, %d FV, %d FF, %d FE, %d EEE, %d EEEE\n" + INFOS_NIL "===================================================", EV, EE, FV, FF, FE, EEE, EEEE); } diff --git a/Mesh/3D_SMesh.cpp b/Mesh/3D_SMesh.cpp index 26e8fc6ecc4be1b67bbf50e4151ef800d583b25e..aa84b62b5050481c9cc2038ce2e70612b476a8d6 100644 --- a/Mesh/3D_SMesh.cpp +++ b/Mesh/3D_SMesh.cpp @@ -1,4 +1,4 @@ -/* $Id: 3D_SMesh.cpp,v 1.3 2000-11-23 23:20:35 geuzaine Exp $ */ +/* $Id: 3D_SMesh.cpp,v 1.4 2000-11-24 08:04:14 geuzaine Exp $ */ /* Maillage transfini volumique @@ -217,8 +217,8 @@ int MeshTransfiniteVolume (Volume *vol) { if(nbs == 5 && NbFacesFound != 5) { Msg(WARNING, "Wrong Definition of Prismatic Transfinite Volume %d\n" - WHITE_STR "Possibly because the first and fourth points are not the\n" - WHITE_STR "degenerated ones", vol->Num); + WARNING_NIL "Possibly because the first and fourth points are not the\n" + WARNING_NIL "degenerated ones", vol->Num); return(0); } @@ -236,8 +236,8 @@ int MeshTransfiniteVolume (Volume *vol) { if(i != 3) { if(G[i] == NULL) { Msg(WARNING, "Wrong Definition of Prismatic Transfinite Volume %d\n" - WHITE_STR "Possibly because the first and fourth points are not the\n" - WHITE_STR "degenerated ones", vol->Num); + WARNING_NIL "Possibly because the first and fourth points are not the\n" + WARNING_NIL "degenerated ones", vol->Num); return(0); } } diff --git a/Unix/Main.cpp b/Unix/Main.cpp index 790d58ddbdd8d3e4db373c4298457356c740bec5..51ad55f630fa67256a2487d150e289938deea246 100644 --- a/Unix/Main.cpp +++ b/Unix/Main.cpp @@ -1,4 +1,4 @@ -/* $Id: Main.cpp,v 1.8 2000-11-24 00:50:53 geuzaine Exp $ */ +/* $Id: Main.cpp,v 1.9 2000-11-24 08:04:14 geuzaine Exp $ */ #include <signal.h> @@ -58,7 +58,6 @@ char gmsh_help[] = " -nodb no double buffer\n" " -noov no overlay visual\n" " -alpha enable alpha blending\n" - " -visinfo show visual information at startup\n" " -geometry geom specify main window geometry\n" " -viewport 9*float specify rotation, translation and scale\n" " -display disp specify display\n" @@ -252,7 +251,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { if(argv[i]!=NULL){ CTX.mesh.degree = atoi(argv[i]); i++; if(CTX.mesh.degree != 1 || CTX.mesh.degree != 2){ - fprintf(stderr, ERROR_STR "Wrong degree\n"); + fprintf(stderr, ERROR_STR "Wrong Degree\n"); exit(1); } } @@ -281,13 +280,13 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { CTX.mesh.format = FORMAT_GREF ; } else{ - fprintf(stderr, ERROR_STR "Unknown mesh format\n"); + fprintf(stderr, ERROR_STR "Unknown Mesh Format\n"); exit(1); } i++; } else { - fprintf(stderr, ERROR_STR "Missing format\n"); + fprintf(stderr, ERROR_STR "Missing Format\n"); exit(1); } } @@ -299,13 +298,13 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { else if(!strcmp(argv[i],"aniso")) CTX.mesh.algo = DELAUNAY_NEWALGO ; else{ - fprintf(stderr, ERROR_STR "Unknown mesh algorithm\n"); + fprintf(stderr, ERROR_STR "Unknown Mesh Algorithm\n"); exit(1); } i++; } else { - fprintf(stderr, ERROR_STR "Missing algorithm\n"); + fprintf(stderr, ERROR_STR "Missing Algorithm\n"); exit(1); } } @@ -414,7 +413,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { exit(1); } else{ - fprintf(stderr, "Unknown option '%s'\n", argv[i]); + fprintf(stderr, "Unknown Option '%s'\n", argv[i]); fprintf(stderr, gmsh_help, argv[0]); exit(1); } @@ -424,7 +423,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { if(*nbfiles < MAX_OPEN_FILES) TheFileNameTab[(*nbfiles)++] = argv[i++]; else{ - fprintf(stderr, ERROR_STR "Too many input files\n"); + fprintf(stderr, ERROR_STR "Too Many Input Files\n"); exit(1); } } @@ -566,14 +565,14 @@ int main(int argc, char *argv[]){ if(!XCTX.display) Msg(FATAL, "Unable to open the specified display. Set the `DISPLAY'\n" - WHITE_STR "environment variable properly or use the `xhost' command\n" - WHITE_STR "to authorize access to the display"); + FATAL_NIL "environment variable properly or use the `xhost' command\n" + FATAL_NIL "to authorize access to the display"); /* Check for GLX extension; for Mesa, this is always OK */ if(!glXQueryExtension(XCTX.display,NULL,NULL)) Msg(FATAL, "The specified display does not support the OpenGL extension (GLX).\n" - WHITE_STR "You may consider using Mesa instead"); + FATAL_NIL "You may consider using Mesa instead"); /* Init with default screen num and default depth */ @@ -667,7 +666,7 @@ int main(int argc, char *argv[]){ XCTX.glo.visinfo->visual, AllocNone); if(!XCTX.glo.colormap) Msg(FATAL, "Unable to Create Private Colormap for Overlay Window\n" - WHITE_STR "(Try '-noov' and/or '-flash' Options)"); + FATAL_NIL "(Try '-noov' and/or '-flash' Options)"); } } diff --git a/benchmarks/3d/Revolve2-Attr.geo b/benchmarks/3d/Revolve2-Attr.geo index 4ab2f181bb7256aa6655983deaf3832a02c5766c..feb160129b27c390dde4300175cebb07910cbc9a 100644 --- a/benchmarks/3d/Revolve2-Attr.geo +++ b/benchmarks/3d/Revolve2-Attr.geo @@ -15,3 +15,5 @@ Extrude Surface(6, {0.0,1,0}, {0,0.0,0.0}, 3.14159/2); Coherence; Attractor Line (.1,.1,1.0) = {14}; +Surface Loop(29) = {15,6,19,23,27,28}; +Complex Volume(30) = {29};