diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index c98bb9d3d7b8be29ddf43ad67e79d402b2719ae8..e2b9b5418388303f9ababbcf9e22388b00716f77 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -1,4 +1,4 @@ -// $Id: CommandLine.cpp,v 1.116 2008-02-17 08:47:56 geuzaine Exp $ +// $Id: CommandLine.cpp,v 1.117 2008-02-18 18:46:49 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -92,7 +92,8 @@ void Print_Usage(char *name){ Msg(DIRECT, " -clmax float Set maximum characteristic length"); Msg(DIRECT, " -clcurv Compute characteristic lengths from curvatures"); Msg(DIRECT, " -epslc1d Set the accuracy of the evaluation of the LCFIELD for 1D mesh"); - Msg(DIRECT, " -swapangle Set the treshold angle (in degree) between two adjacent faces below which a swap is allowed"); + Msg(DIRECT, " -swapangle Set the treshold angle (in degree) between two adjacent faces"); + Msg(DIRECT, " below which a swap is allowed"); Msg(DIRECT, " -rand float Set random perturbation factor"); Msg(DIRECT, " -bgm file Load background mesh from file"); Msg(DIRECT, " -constrain Constrain background mesh with characteristic lengths"); @@ -392,8 +393,8 @@ void Get_Options(int argc, char *argv[]) if(argv[i] != NULL) { CTX.mesh.lc_integration_precision = atof(argv[i++]); if(CTX.mesh.lc_integration_precision <= 0.0) { - fprintf(stderr, ERROR_STR - "Integration Accuraci for evaluation of 1D LC FIELD must be > 0\n"); + fprintf(stderr, ERROR_STR + "Integration Accuraci for evaluation of 1D LC FIELD must be > 0\n"); exit(1); } } @@ -407,8 +408,7 @@ void Get_Options(int argc, char *argv[]) if(argv[i] != NULL) { CTX.mesh.allow_swap_edge_angle = atof(argv[i++]); if(CTX.mesh.allow_swap_edge_angle <= 0.0) { - fprintf(stderr, ERROR_STR - "Treshold angle for edge swap must be > 0\n"); + fprintf(stderr, ERROR_STR "Treshold angle for edge swap must be > 0\n"); exit(1); } } diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp index be692b1748d83c664176aca906521f2634ff4c5f..90e30d5200a3336c0c807722e2a922f89f9b6b58 100644 --- a/Geo/MVertex.cpp +++ b/Geo/MVertex.cpp @@ -1,4 +1,4 @@ -// $Id: MVertex.cpp,v 1.20 2008-02-17 08:47:58 geuzaine Exp $ +// $Id: MVertex.cpp,v 1.21 2008-02-18 18:46:49 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -112,7 +112,8 @@ void MVertex::writeMESH(FILE *fp, double scalingFactor) x() * scalingFactor, y() * scalingFactor, z() * scalingFactor, 0); } -static void double_to_char8(double val, char *str){ +static void double_to_char8(double val, char *str) +{ if(val >= 1.e6) sprintf(str, "%.2E", val); else if(val >= 1.e-3) diff --git a/Geo/MVertex.h b/Geo/MVertex.h index 092998579752b23eb28460b89978b1572f1c4b49..c7a20cfc3bfc60f7f9b56a3806eeb6e01d2a52ce 100644 --- a/Geo/MVertex.h +++ b/Geo/MVertex.h @@ -117,13 +117,23 @@ class MEdgeVertex : public MVertex{ double _u, _lc; public : MEdgeVertex(double x, double y, double z, GEntity *ge, double u, double lc = -1.0) - : MVertex(x, y, z, ge), _u(u),_lc(lc) + : MVertex(x, y, z, ge), _u(u), _lc(lc) { } virtual ~MEdgeVertex(){} - virtual bool getParameter(int i, double &par) const{ if(i)throw; par = _u; return true; } - virtual bool setParameter(int i, double par){ if(i)throw; _u = par; return true; } - double getLc () const {return _lc;} + virtual bool getParameter(int i, double &par) const + { + if(i) throw; + par = _u; + return true; + } + virtual bool setParameter(int i, double par) + { + if(i) throw; + _u = par; + return true; + } + double getLc() const { return _lc; } }; class MFaceVertex : public MVertex{ @@ -135,8 +145,19 @@ class MFaceVertex : public MVertex{ { } virtual ~MFaceVertex(){} - virtual bool getParameter(int i, double &par)const { par = (i ? _v : _u); return true; } - virtual bool setParameter(int i, double par){ if(!i) _u = par; else _v = par; return true; } + virtual bool getParameter(int i, double &par) const + { + par = (i ? _v : _u); + return true; + } + virtual bool setParameter(int i, double par) + { + if(!i) + _u = par; + else + _v = par; + return true; + } }; void parametricCoordinates(const MVertex *ver, const GFace *gf, double &u, double &v); diff --git a/Post/Makefile b/Post/Makefile index 8bf6e1663035138e5be6b1e0abc7f5ab455d6435..4eda6ce9d5e69f58d05c9552247bd8e875c879bd 100644 --- a/Post/Makefile +++ b/Post/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.28 2008-02-17 08:48:08 geuzaine Exp $ +# $Id: Makefile,v 1.29 2008-02-18 18:49:18 geuzaine Exp $ # # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # @@ -65,8 +65,15 @@ depend: PView.o: PView.cpp PView.h PViewData.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h PViewOptions.h ColorTable.h PViewDataList.h \ AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \ - ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Common/Context.h ../Common/SmoothData.h ../Common/Message.h + PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ + ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ + ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ + ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ + ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \ + ../Common/VertexArray.h ../Common/Context.h ../Common/SmoothData.h \ + ../Common/Message.h PViewData.o: PViewData.cpp PViewData.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h PViewDataList.o: PViewDataList.cpp PViewDataList.h PViewData.h \ @@ -87,7 +94,8 @@ PViewDataGModel.o: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \ ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h + ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \ + ../Common/Message.h PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Message.h AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \ diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp index b26b69fef6452cfc054aebc99954c7c58f11a0bd..baf79b42d703eaa868065496ca13d13759c6a477 100644 --- a/Post/PViewDataGModel.cpp +++ b/Post/PViewDataGModel.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataGModel.cpp,v 1.10 2008-02-18 18:32:54 geuzaine Exp $ +// $Id: PViewDataGModel.cpp,v 1.11 2008-02-18 18:49:18 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -23,6 +23,7 @@ // #include "PViewDataGModel.h" +#include "Message.h" bool PViewDataGModel::readMSH(FILE *fp) {