diff --git a/Common/Options.cpp b/Common/Options.cpp index aac281d825c627ff7c2b640c6727573086f62c5b..43b54c81157beadae50b4e6c2058dbc2dcee637c 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.378 2008-01-25 21:37:08 geuzaine Exp $ +// $Id: Options.cpp,v 1.379 2008-01-28 09:59:52 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -4212,7 +4212,7 @@ double opt_geometry_snap2(OPT_ARGS_NUM) double opt_mesh_optimize(OPT_ARGS_NUM) { if(action & GMSH_SET) - CTX.mesh.optimize =(int) val; + CTX.mesh.optimize = (int)val; #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)) WID->mesh_butt[2]->value(CTX.mesh.optimize); @@ -4223,7 +4223,7 @@ double opt_mesh_optimize(OPT_ARGS_NUM) double opt_mesh_optimize_netgen(OPT_ARGS_NUM) { if(action & GMSH_SET) - CTX.mesh.optimize_netgen =(int) val; + CTX.mesh.optimize_netgen = (int)val; #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)) WID->mesh_butt[24]->value(CTX.mesh.optimize_netgen); diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index 232629caf0c323bc8a488a3dd15539089d33ee93..34afdd51268693b3e06009c72117e7835883da48 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_Mesh.cpp,v 1.29 2008-01-22 16:57:36 geuzaine Exp $ +// $Id: GModelIO_Mesh.cpp,v 1.30 2008-01-28 09:59:52 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -469,6 +469,7 @@ int GModel::readMSH(const std::string &name) if(progress) Msg(PROGRESS, ""); } + /* else if(!strncmp(&str[1], "NodeData", 8)) { if(!fgets(str, sizeof(str), fp)) return 0; // name = str[1] + remove final " @@ -483,7 +484,6 @@ int GModel::readMSH(const std::string &name) return 0; Msg(INFO, "%d node data", numData); - /* //std::map<int, int> nodeNumber, nodeIndex PViewDataGModel *p = getPViewDataGModel(name) if(p){ // add data to existing view @@ -495,8 +495,8 @@ int GModel::readMSH(const std::string &name) if(num data.scalar.indices.append(); data.scalar.values.append(); - */ } + */ do { if(!fgets(str, sizeof(str), fp) || feof(fp)) diff --git a/Geo/discreteVertex.h b/Geo/discreteVertex.h index 4eed5cba627506e5f4a287630883d2ec345e5180..3e35f02dc9f3ee48628007515275b96522a01951 100644 --- a/Geo/discreteVertex.h +++ b/Geo/discreteVertex.h @@ -6,20 +6,22 @@ #include "MVertex.h" class discreteVertex : public GVertex { - private: - double _x, _y, _z; public: - discreteVertex(GModel *m, int num, double x, double y, double z) - : GVertex(m, num), _x(x), _y(y), _z(z) - { - mesh_vertices.push_back(new MVertex(x, y, z, this)); - } discreteVertex(GModel *m, int num) : GVertex(m, num) {} virtual ~discreteVertex() {} - virtual GPoint point() const { return GPoint(_x, _y, _z); } - virtual double x() const { return _x; } - virtual double y() const { return _y; } - virtual double z() const { return _z; } + virtual GPoint point() const { return GPoint(x(), y(), z()); } + virtual double x() const + { + return mesh_vertices.size() ? mesh_vertices[0]->x() : 0.; + } + virtual double y() const + { + return mesh_vertices.size() ? mesh_vertices[0]->y() : 0.; + } + virtual double z() const + { + return mesh_vertices.size() ? mesh_vertices[0]->z() : 0.; + } }; #endif diff --git a/Mesh/Makefile b/Mesh/Makefile index 3581807b9ef2af52dd98175b17e9a6ab9c4fa31b..33c9b8dbd8b616adf827e42dda8e722738880845 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.199 2008-01-24 09:35:41 remacle Exp $ +# $Id: Makefile,v 1.200 2008-01-28 09:59:52 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -136,26 +136,26 @@ meshGEdgeExtruded.o: meshGEdgeExtruded.cpp ../Geo/GModel.h \ ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Common/Message.h -meshGFace.o: meshGFace.cpp meshGFace.h meshGFaceDelaunayInsertion.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ - meshGFaceOptimize.h DivideAndConquer.h BackgroundMesh.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.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 ../Common/Context.h \ - ../DataStr/List.h ../Common/Message.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h BDS.h ../Post/PView.h ../Post/PViewData.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h qualityMeasures.h Field.h \ - ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ - ../Geo/SBoundingBox3d.h ../DataStr/Tree.h ../DataStr/avl.h \ - ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - ../Common/OS.h +meshGFace.o: meshGFace.cpp meshGFace.h meshGFaceBDS.h \ + meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \ + ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \ + ../Geo/SVector3.h meshGFaceOptimize.h DivideAndConquer.h \ + BackgroundMesh.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ + ../Geo/GVertex.h ../Geo/SVector3.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 \ + ../Common/Context.h ../DataStr/List.h ../Common/Message.h \ + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h BDS.h ../Post/PView.h \ + ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \ + qualityMeasures.h Field.h ../Geo/Geo.h ../Geo/gmshSurface.h \ + ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h \ + ../Geo/SVector3.h ../Geo/SBoundingBox3d.h ../DataStr/Tree.h \ + ../DataStr/avl.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \ + ../Common/SmoothData.h ../Post/OctreePost.h ../Common/Octree.h \ + ../Common/OctreeInternals.h ../Common/OS.h meshGFaceTransfinite.o: meshGFaceTransfinite.cpp meshGFace.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -181,6 +181,26 @@ meshGFaceExtruded.o: meshGFaceExtruded.cpp ../Geo/GModel.h \ ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Common/Context.h \ ../DataStr/List.h ../Common/Message.h +meshGFaceBDS.o: meshGFaceBDS.cpp meshGFace.h meshGFaceOptimize.h \ + ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ + ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + meshGFaceDelaunayInsertion.h BackgroundMesh.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ + ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ + ../Geo/SVector3.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 ../Common/Context.h \ + ../DataStr/List.h ../Common/Message.h ../Numeric/Numeric.h \ + ../Numeric/NumericEmbedded.h BDS.h ../Post/PView.h ../Post/PViewData.h \ + ../Post/PViewOptions.h ../Post/ColorTable.h qualityMeasures.h Field.h \ + ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h \ + ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ + ../Geo/SBoundingBox3d.h ../DataStr/Tree.h ../DataStr/avl.h \ + ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ + ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ + ../Common/OS.h meshGFaceDelaunayInsertion.o: meshGFaceDelaunayInsertion.cpp BDS.h \ ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp index e7a397270951104db375a5841d9b280c85a58ed4..07810566a7592d81c0fc00b7d1cab997f71175a4 100644 --- a/Post/PViewDataGModel.cpp +++ b/Post/PViewDataGModel.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataGModel.cpp,v 1.6 2008-01-18 20:13:13 geuzaine Exp $ +// $Id: PViewDataGModel.cpp,v 1.7 2008-01-28 09:59:52 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -74,6 +74,21 @@ from the model; it's good for handling errors too: when we loop over nodes/elements to generate vertex arrays, we just query the maps: if no answer, that's it). + +5) store 2 hash_maps in PViewDataGModel: one for vertices, one for +elements. Each entry in the hash_map is an array of size + +[num_time_steps_stored * max_num_values] + +where + +* num_time_steps_stored is either num_time_steps (by default) or some +user-set default (so that we do not have to load all the time steps at +once) + +* max_num_values?? + + */ bool PViewDataGModel::writePOS(std::string name, bool binary, bool parsed,