diff --git a/Common/Makefile b/Common/Makefile index dc988bc4c12ca14e68fe6a0ace413ffa5ca88788..a62b654e4829c963c7078f3915cc6560ee902e17 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.135 2007-08-24 08:38:24 remacle Exp $ +# $Id: Makefile,v 1.136 2007-08-24 20:14:17 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -65,43 +65,9 @@ Context.o: Context.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../DataStr/List.h ../DataStr/Tree.h ../Numeric/Numeric.h Context.h \ DefaultOptions.h GmshDefines.h Options.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h Trackball.h + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Trackball.h Octree.o: Octree.cpp Octree.h OctreeInternals.h OctreeInternals.o: OctreeInternals.cpp Message.h OctreeInternals.h Options.o: Options.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ @@ -110,45 +76,12 @@ Options.o: Options.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ ../Graphics/Draw.h ../Mesh/Generator.h Context.h Options.h \ ../Mesh/BackgroundMesh.h ../Plugin/PluginManager.h ../Plugin/Plugin.h \ ../Common/Options.h ../Common/Message.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Fltk/Solvers.h ../Fltk/GUI.h \ - ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h ../Common/GmshUI.h \ - ../Fltk/Popup_Button.h ../Fltk/SpherePosition_Widget.h + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Fltk/Solvers.h \ + ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \ + ../Common/GmshUI.h ../Fltk/Popup_Button.h \ + ../Fltk/SpherePosition_Widget.h CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../DataStr/List.h ../DataStr/Tree.h GmshUI.h GmshDefines.h \ @@ -158,54 +91,19 @@ CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Parser/OpenFile.h ../Parser/CreateFile.h \ - ../Parser/Parser.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MVertex.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/MElement.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Context.h \ - ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \ - ../Geo/SBoundingBox3d.h OS.h + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Parser/OpenFile.h \ + ../Parser/CreateFile.h ../Parser/Parser.h ../Geo/GModel.h \ + ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Geo/MVertex.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/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Context.h ../Geo/ExtrudeParams.h \ + ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h OS.h OS.o: OS.cpp Message.h Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ @@ -225,8 +123,8 @@ Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \ ../Geo/SBoundingBox3d.h ../Parser/Parser.h ../DataStr/Tree.h \ ../DataStr/avl.h Trackball.o: Trackball.cpp Trackball.h -VertexArray.o: VertexArray.cpp VertexArray.h Context.h ../DataStr/List.h \ - ../Numeric/Numeric.h +VertexArray.o: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h Context.h ../DataStr/List.h ../Numeric/Numeric.h SmoothData.o: SmoothData.cpp Gmsh.h Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../DataStr/List.h ../DataStr/Tree.h ../Numeric/Numeric.h SmoothData.h diff --git a/Common/VertexArray.cpp b/Common/VertexArray.cpp index d2b019ccbcd806ba49be989f87d72ef9319aa497..d642a4108bda677b0b782c899ef3efdf01aecbd2 100644 --- a/Common/VertexArray.cpp +++ b/Common/VertexArray.cpp @@ -1,4 +1,4 @@ -// $Id: VertexArray.cpp,v 1.17 2006-11-27 22:22:08 geuzaine Exp $ +// $Id: VertexArray.cpp,v 1.18 2007-08-24 20:14:17 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -26,10 +26,10 @@ extern Context_T CTX; -VertexArray::VertexArray(int numNodesPerElement, int numElements) - : fill(0), _type(numNodesPerElement) +VertexArray::VertexArray(int numVerticesPerElement, int numElements) + : fill(0), _numVerticesPerElement(numVerticesPerElement) { - int nb = (numElements ? numElements : 1) * numNodesPerElement; + int nb = (numElements ? numElements : 1) * numVerticesPerElement; _vertices.reserve(nb * 3); _normals.reserve(nb * 3); _colors.reserve(nb *4); @@ -42,8 +42,8 @@ void VertexArray::add(float x, float y, float z, float n0, float n1, float n2, _vertices.push_back(y); _vertices.push_back(z); - // Warning: storing the normals as bytes WILL hurt rendering - // performance... but it reduces significantly the memory footprint. + // storing the normals as bytes hurts rendering performance, but it + // significantly reduces the memory footprint char c0 = float2char(n0); char c1 = float2char(n1); char c2 = float2char(n2); @@ -81,6 +81,26 @@ void VertexArray::add(float x, float y, float z, unsigned int col, MElement *ele if(ele && CTX.pick_elements) _elements.push_back(ele); } +double BarycenterLessThan::tolerance = 0.; + +void VertexArray::add(double *x, double *y, double *z, SVector3 *n, + unsigned int *col, MElement *ele, bool unique) +{ + int npe = _numVerticesPerElement; + if(unique){ + SPoint3 pc(0., 0., 0.); + for(int i = 0; i < npe; i++) + pc += SPoint3(x[i], y[i], z[i]); + pc /= (double)npe; + BarycenterLessThan::tolerance = 1.e-12 * CTX.lc; + if(_barycenters.find(pc) != _barycenters.end()) return; + _barycenters.insert(pc); + } + + for(int i = 0; i < npe; i++) + add(x[i], y[i], z[i], n[i].x(), n[i].y(), n[i].z(), col[i], ele); +} + class AlphaElement { public: AlphaElement(float *vp, char *np, unsigned char *cp) : v(vp), n(np), c(cp) {} @@ -122,25 +142,26 @@ void VertexArray::sort(double eye[3]) // twice. We should think about a more efficient way to sort the // three arrays in place. - AlphaElementLessThan::numVertices = getType(); + AlphaElementLessThan::numVertices = getNumVerticesPerElement(); AlphaElementLessThan::eye[0] = eye[0]; AlphaElementLessThan::eye[1] = eye[1]; AlphaElementLessThan::eye[2] = eye[2]; - int n = getNumVertices() / getType(); + int npe = getNumVerticesPerElement(); + int n = getNumVertices() / npe; std::vector<AlphaElement> elements; elements.reserve(n); if(_normals.size()) for(int i = 0; i < n; i++) - elements.push_back(AlphaElement(&_vertices[3 * getType() * i], - &_normals[3 * getType() * i], - &_colors[4 * getType() * i])); + elements.push_back(AlphaElement(&_vertices[3 * npe * i], + &_normals[3 * npe * i], + &_colors[4 * npe * i])); else for(int i = 0; i < n; i++) - elements.push_back(AlphaElement(&_vertices[3 * getType() * i], + elements.push_back(AlphaElement(&_vertices[3 * npe * i], 0, - &_colors[4 * getType() * i])); + &_colors[4 * npe * i])); std::sort(elements.begin(), elements.end(), AlphaElementLessThan()); @@ -152,7 +173,7 @@ void VertexArray::sort(double eye[3]) sortedColors.reserve(_colors.size()); for(int i = 0; i < n; i++){ - for(int j = 0; j < getType(); j++){ + for(int j = 0; j < getNumVerticesPerElement(); j++){ for(int k = 0; k < 3; k++){ sortedVertices.push_back(elements[i].v[3 * j + k]); if(elements[i].v) diff --git a/Common/VertexArray.h b/Common/VertexArray.h index b413a50cce11bd2896f5b5d559a6b0dc691caf38..914eeb29933498ca2b6d01e06ea266549da960dc 100644 --- a/Common/VertexArray.h +++ b/Common/VertexArray.h @@ -21,25 +21,42 @@ // Please report all bugs and problems to <gmsh@geuz.org>. #include <vector> +#include <set> +#include "SVector3.h" class MElement; +class BarycenterLessThan{ + public: + static double tolerance; + bool operator()(const SPoint3 &p1, const SPoint3 &p2) const + { + if(p1.x() - p2.x() > tolerance) return true; + if(p1.x() - p2.x() < -tolerance) return false; + if(p1.y() - p2.y() > tolerance) return true; + if(p1.y() - p2.y() < -tolerance) return false; + if(p1.z() - p2.z() > tolerance) return true; + return false; + } +}; + class VertexArray{ public: int fill; // this must/will be removed private: - int _type; + int _numVerticesPerElement; std::vector<float> _vertices; std::vector<char> _normals; std::vector<unsigned char> _colors; std::vector<MElement*> _elements; + std::set<SPoint3, BarycenterLessThan> _barycenters; public: - VertexArray(int numNodesPerElement, int numElements); + VertexArray(int numVerticesPerElement, int numElements); ~VertexArray(){} - // returns the number of nodes in the array + // returns the number of vertices in the array int getNumVertices() { return _vertices.size() / 3; } - // returns the type of the array - int getType() { return _type; } + // returns the number of vertices per element + int getNumVerticesPerElement() { return _numVerticesPerElement; } // returns the number of element pointers int getNumElementPointers() { return _elements.size(); } // returns a pointer to the raw vertex array @@ -54,6 +71,11 @@ class VertexArray{ void add(float x, float y, float z, float n0, float n1, float n2, unsigned int col, MElement *ele=0); void add(float x, float y, float z, unsigned int col, MElement *ele=0); + // add a complete element in the arrays (if unique is set, only add + // the element if another one with the same barycenter is not + // already present) + void add(double *x, double *y, double *z, SVector3 *n, unsigned int *col, + MElement *ele=0, bool unique=true); // sorts the elements back to front wrt the eye position void sort(double eye[3]); }; diff --git a/Fltk/Makefile b/Fltk/Makefile index e0f796b6970c81f3d8d426ef33b16409bf2f0570..2a67269b5935509a45aa48afe06345967792f66a 100644 --- a/Fltk/Makefile +++ b/Fltk/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.142 2007-08-24 08:38:24 remacle Exp $ +# $Id: Makefile,v 1.143 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -78,41 +78,7 @@ Main.o: Main.cpp GUI.h Opengl_Window.h Colorbar_Window.h \ ../Parser/OpenFile.h ../Common/CommandLine.h Solvers.h \ ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Post/Views.h \ ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h /sw/include/gsl/gsl_linalg.h \ - /sw/include/gsl/gsl_mode.h /sw/include/gsl/gsl_permutation.h \ - /sw/include/gsl/gsl_types.h /sw/include/gsl/gsl_errno.h \ - /sw/include/gsl/gsl_check_range.h /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Geo/GModel.h ../Geo/GVertex.h \ + ../Common/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \ ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ @@ -124,10 +90,9 @@ Main.o: Main.cpp GUI.h Opengl_Window.h Colorbar_Window.h \ ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \ ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h ../Mesh/Field.h \ - ../contrib/ANN/include/ANN/ANN.h ../Post/OctreePost.h \ - ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h \ - ../Post/PView.h ../Post/AdaptiveViews.h ../Post/PViewData.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h + ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ + ../Mesh/BackgroundMesh.h ../Post/PView.h ../Post/AdaptiveViews.h \ + ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h Message.o: Message.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ @@ -143,43 +108,9 @@ GUI.o: GUI.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ SpherePosition_Widget.h Callbacks.h Win32Icon.h ../Parser/OpenFile.h \ ../Common/CommandLine.h ../Mesh/Generator.h Solvers.h \ ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h Shortcut_Window.h + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Shortcut_Window.h GUI_Extras.o: GUI_Extras.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ @@ -233,47 +164,12 @@ Callbacks.o: Callbacks.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \ ../Graphics/Draw.h ../Graphics/SelectBuffer.h ../Post/Views.h \ ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h /sw/include/gsl/gsl_linalg.h \ - /sw/include/gsl/gsl_mode.h /sw/include/gsl/gsl_permutation.h \ - /sw/include/gsl/gsl_types.h /sw/include/gsl/gsl_errno.h \ - /sw/include/gsl/gsl_check_range.h /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Parser/CreateFile.h ../Parser/OpenFile.h \ + ../Common/GmshMatrix.h ../Parser/CreateFile.h ../Parser/OpenFile.h \ ../Common/CommandLine.h ../Common/Options.h GUI.h Opengl_Window.h \ Colorbar_Window.h Popup_Button.h SpherePosition_Widget.h GUI_Extras.h \ Callbacks.h ../Plugin/Plugin.h ../Plugin/PluginManager.h \ ../Plugin/Plugin.h ../Common/Visibility.h ../Common/GmshDefines.h \ - Solvers.h ../Common/OS.h ../Mesh/Field.h \ - ../contrib/ANN/include/ANN/ANN.h ../Post/OctreePost.h \ + Solvers.h ../Common/OS.h ../Mesh/Field.h ../Post/OctreePost.h \ ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h Opengl.o: Opengl.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ diff --git a/Geo/Makefile b/Geo/Makefile index e8c88f6b2373eacd7e0cf3c3e6acb5671a83b411..bba8169a4463e02eceadfde08bc8bc0f1886b7fa 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.157 2007-08-21 19:05:39 geuzaine Exp $ +# $Id: Makefile,v 1.158 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -75,7 +75,8 @@ GEntity.o: GEntity.cpp GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ SPoint2.h SVector3.h MElement.h MEdge.h ../Common/Hash.h MFace.h \ ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \ ExtrudeParams.h ../Common/SmoothData.h GFace.h GEdgeLoop.h Pair.h \ - GRegion.h ../Common/VertexArray.h ../Common/Message.h ../Common/OS.h + GRegion.h ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Message.h \ + ../Common/OS.h GVertex.o: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h SPoint2.h \ GFace.h GEdgeLoop.h GEdge.h SVector3.h MElement.h MEdge.h \ @@ -186,12 +187,12 @@ GModel.o: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \ ExtrudeParams.h ../Common/SmoothData.h GFace.h GEdgeLoop.h Pair.h \ GRegion.h gmshSurface.h ../Mesh/Field.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h ../Geo/Geo.h ../Geo/gmshSurface.h \ - ../DataStr/Tree.h ../DataStr/avl.h ../Geo/SPoint2.h \ - ../Geo/ExtrudeParams.h ../Geo/GEdge.h ../Post/OctreePost.h \ - ../Common/Octree.h ../Common/OctreeInternals.h MRep.h \ - ../Common/Message.h ../Common/OS.h ../Mesh/BackgroundMesh.h + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Geo/Geo.h \ + ../Geo/gmshSurface.h ../DataStr/Tree.h ../DataStr/avl.h \ + ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GEdge.h \ + ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ + MRep.h ../Common/Message.h ../Common/OS.h ../Mesh/BackgroundMesh.h GModelIO_Geo.o: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \ SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h \ SPoint2.h GEdge.h SVector3.h MElement.h MEdge.h ../Common/Hash.h \ diff --git a/Geo/SPoint3.h b/Geo/SPoint3.h index deaeb02437a26f173b2279cc5f929078db35507e..27865e97aa5c3959c206014bde6650c117b6d097 100644 --- a/Geo/SPoint3.h +++ b/Geo/SPoint3.h @@ -44,6 +44,7 @@ class SPoint3 { void operator+=(const SPoint3 &p); void operator-=(const SPoint3 &p); void operator*=(double mult); + void operator/=(double mult); SPoint3 operator*(double mult); operator double *() { return P; } }; @@ -84,6 +85,9 @@ inline void SPoint3::operator-=(const SPoint3 &p) inline void SPoint3::operator*=(double mult) { P[0] *= mult; P[1] *= mult; P[2] *= mult; } +inline void SPoint3::operator/=(double div) +{ P[0] /= div; P[1] /= div; P[2] /= div; } + inline SPoint3 SPoint3::operator*(double mult) { return SPoint3(P[0] * mult, P[1] * mult, P[2] * mult); } diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp index ebfa30950ce2eb348c4e0e4e026639955453d8a0..4ebb99bcbe3c713dff7e93d60e578b4f557cf938 100644 --- a/Graphics/Draw.cpp +++ b/Graphics/Draw.cpp @@ -1,4 +1,4 @@ -// $Id: Draw.cpp,v 1.110 2007-08-21 19:05:39 geuzaine Exp $ +// $Id: Draw.cpp,v 1.111 2007-08-24 20:14:18 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -77,8 +77,8 @@ void Draw3d(void) InitPosition(); Draw_Geom(); Draw_Mesh(); + Draw_Post_Old(); Draw_Post(); - Draw_Post_New(); } void Draw2d(void) diff --git a/Graphics/Draw.h b/Graphics/Draw.h index 8d4571af4e3c782fd86decaecb23992290af7f4a..380bdd5ab1897a251fdabbb66542f4ee99d39dde 100644 --- a/Graphics/Draw.h +++ b/Graphics/Draw.h @@ -55,8 +55,8 @@ void Draw_String_Center(char *s); void Draw_String_Right(char *s); void Draw_Geom(void); void Draw_Mesh(void); -void Draw_Post(void); -void Draw_Post_New(); +void Draw_Post_Old(void); +void Draw_Post(); void Draw_Graph2D(void); void Draw_Text2D(void); void Draw_Text2D3D(int dim, int timestep, int nb, List_T *td, List_T *tc); diff --git a/Graphics/Makefile b/Graphics/Makefile index 58d37d288a1faa608d060ecfd40a528873c38305..c6c42da2a3fc3ba58fdc880ded609ae200f1f2b3 100644 --- a/Graphics/Makefile +++ b/Graphics/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.120 2007-08-24 08:38:24 remacle Exp $ +# $Id: Makefile,v 1.121 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -29,7 +29,7 @@ CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} SRC = Draw.cpp \ Mesh.cpp \ Geom.cpp \ - Post.cpp Post_New.cpp \ + Post_Old.cpp Post.cpp \ PostElement.cpp \ SelectBuffer.cpp \ Iso.cpp \ @@ -70,62 +70,25 @@ depend: Draw.o: Draw.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ - /usr/X11R6/include/GL/glu.h ../Common/GmshDefines.h Draw.h \ - ../Common/Context.h ../Numeric/Numeric.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Common/GmshDefines.h Draw.h ../Common/Context.h ../Numeric/Numeric.h \ + ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \ + ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GFace.h \ ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \ ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ - /usr/X11R6/include/GL/glu.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h ../Geo/GModel.h \ + ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h \ ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ @@ -142,173 +105,56 @@ Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../Geo/MElement.h ../Common/VertexArray.h ../Common/OS.h gl2ps.h Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ - /usr/X11R6/include/GL/glu.h Draw.h ../Common/Context.h gl2ps.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Common/GmshDefines.h ../Geo/MVertex.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/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GFace.h \ - ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h -Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ - ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ - /usr/X11R6/include/GL/glu.h ../Numeric/Numeric.h Draw.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Common/Context.h gl2ps.h -Post_New.o: Post_New.cpp ../Common/Gmsh.h ../Common/Message.h \ - ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h ../Numeric/Numeric.h \ - Draw.h ../Post/PView.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Post/PViewData.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h Draw.h \ + ../Common/Context.h gl2ps.h ../Geo/GModel.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Common/Context.h ../Geo/ExtrudeParams.h ../Geo/GFace.h \ - ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h gl2ps.h + ../Numeric/Numeric.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ + ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h +Post_Old.o: Post_Old.cpp ../Common/Gmsh.h ../Common/Message.h \ + ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ + ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ + ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Post/Views.h \ + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h ../Common/Context.h gl2ps.h +Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ + ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ + ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ + ../Numeric/Numeric.h Draw.h ../Post/Views.h ../Post/ColorTable.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ + ../Common/Context.h gl2ps.h PostElement.o: PostElement.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h Draw.h Iso.h \ - ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ + ../Common/GmshUI.h Draw.h Iso.h ../Post/Views.h ../Post/ColorTable.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h /sw/include/gsl/gsl_linalg.h \ - /sw/include/gsl/gsl_mode.h /sw/include/gsl/gsl_permutation.h \ - /sw/include/gsl/gsl_types.h /sw/include/gsl/gsl_errno.h \ - /sw/include/gsl/gsl_check_range.h /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Common/Context.h + ../Common/GmshMatrix.h ../Common/Context.h SelectBuffer.o: SelectBuffer.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h ../Common/GmshDefines.h \ - Draw.h ../Common/Context.h SelectBuffer.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GFace.h \ - ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Common/GmshUI.h ../Common/GmshDefines.h Draw.h ../Common/Context.h \ + SelectBuffer.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \ + ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Numeric/Numeric.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ + ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/GModel.h \ ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \ ../Geo/SBoundingBox3d.h ../Geo/MRep.h ../Geo/GEdge.h ../Geo/GFace.h \ @@ -316,231 +162,67 @@ SelectBuffer.o: SelectBuffer.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Common/VertexArray.h ../Common/OS.h Iso.o: Iso.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ - /usr/X11R6/include/GL/glu.h Draw.h ../Common/Context.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h + ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h Draw.h \ + ../Common/Context.h ../Post/Views.h ../Post/ColorTable.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Entity.o: Entity.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h ../Numeric/Numeric.h \ - Draw.h ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h ../Common/Context.h gl2ps.h + ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Post/Views.h \ + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h ../Common/Context.h gl2ps.h ReadImg.o: ReadImg.cpp ReadImg.h ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw/include/gsl/gsl_linalg.h /sw/include/gsl/gsl_mode.h \ - /sw/include/gsl/gsl_permutation.h /sw/include/gsl/gsl_types.h \ - /sw/include/gsl/gsl_errno.h /sw/include/gsl/gsl_check_range.h \ - /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h + ../Common/GmshUI.h ../Post/Views.h ../Post/ColorTable.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Scale.o: Scale.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h ../Numeric/Numeric.h \ - Draw.h ../Common/Context.h ../Post/Views.h ../Post/ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h /sw/include/gsl/gsl_linalg.h \ - /sw/include/gsl/gsl_mode.h /sw/include/gsl/gsl_permutation.h \ - /sw/include/gsl/gsl_types.h /sw/include/gsl/gsl_errno.h \ - /sw/include/gsl/gsl_check_range.h /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h gl2ps.h + ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Common/Context.h \ + ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h gl2ps.h Graph2D.o: Graph2D.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h ../Common/Context.h \ - ../Numeric/Numeric.h Draw.h ../Post/Views.h ../Post/ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h /sw/include/gsl/gsl_linalg.h \ - /sw/include/gsl/gsl_mode.h /sw/include/gsl/gsl_permutation.h \ - /sw/include/gsl/gsl_types.h /sw/include/gsl/gsl_errno.h \ - /sw/include/gsl/gsl_check_range.h /sw/include/gsl/gsl_vector.h \ - /sw/include/gsl/gsl_vector_complex_long_double.h \ - /sw/include/gsl/gsl_complex.h /sw/include/gsl/gsl_vector_long_double.h \ - /sw/include/gsl/gsl_block_long_double.h \ - /sw/include/gsl/gsl_vector_complex.h \ - /sw/include/gsl/gsl_block_complex_long_double.h \ - /sw/include/gsl/gsl_vector_complex_double.h \ - /sw/include/gsl/gsl_vector_double.h /sw/include/gsl/gsl_block_double.h \ - /sw/include/gsl/gsl_block_complex_double.h \ - /sw/include/gsl/gsl_vector_complex_float.h \ - /sw/include/gsl/gsl_vector_float.h /sw/include/gsl/gsl_block_float.h \ - /sw/include/gsl/gsl_block_complex_float.h \ - /sw/include/gsl/gsl_vector_ulong.h /sw/include/gsl/gsl_block_ulong.h \ - /sw/include/gsl/gsl_vector_long.h /sw/include/gsl/gsl_block_long.h \ - /sw/include/gsl/gsl_vector_uint.h /sw/include/gsl/gsl_block_uint.h \ - /sw/include/gsl/gsl_vector_int.h /sw/include/gsl/gsl_block_int.h \ - /sw/include/gsl/gsl_vector_ushort.h /sw/include/gsl/gsl_block_ushort.h \ - /sw/include/gsl/gsl_vector_short.h /sw/include/gsl/gsl_block_short.h \ - /sw/include/gsl/gsl_vector_uchar.h /sw/include/gsl/gsl_block_uchar.h \ - /sw/include/gsl/gsl_vector_char.h /sw/include/gsl/gsl_block_char.h \ - /sw/include/gsl/gsl_matrix.h \ - /sw/include/gsl/gsl_matrix_complex_long_double.h \ - /sw/include/gsl/gsl_matrix_complex_double.h \ - /sw/include/gsl/gsl_matrix_complex_float.h \ - /sw/include/gsl/gsl_matrix_long_double.h \ - /sw/include/gsl/gsl_matrix_double.h /sw/include/gsl/gsl_matrix_float.h \ - /sw/include/gsl/gsl_matrix_ulong.h /sw/include/gsl/gsl_matrix_long.h \ - /sw/include/gsl/gsl_matrix_uint.h /sw/include/gsl/gsl_matrix_int.h \ - /sw/include/gsl/gsl_matrix_ushort.h /sw/include/gsl/gsl_matrix_short.h \ - /sw/include/gsl/gsl_matrix_uchar.h /sw/include/gsl/gsl_matrix_char.h \ - /sw/include/gsl/gsl_blas.h /sw/include/gsl/gsl_blas_types.h \ - /sw/include/gsl/gsl_cblas.h gl2ps.h -gl2ps.o: gl2ps.cpp gl2ps.h /usr/X11R6/include/GL/gl.h \ - /usr/X11R6/include/GL/glext.h /sw/include/png.h /sw/include/pngconf.h + ../Common/GmshUI.h ../Common/Context.h ../Numeric/Numeric.h Draw.h \ + ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h gl2ps.h +gl2ps.o: gl2ps.cpp gl2ps.h /usr/local/include/FL/images/zlib.h \ + /usr/local/include/FL/images/zconf.h /usr/local/include/FL/images/png.h \ + /usr/local/include/FL/images/zlib.h \ + /usr/local/include/FL/images/pngconf.h gl2gif.o: gl2gif.cpp gl2gif.h PixelBuffer.h ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h Draw.h + ../DataStr/Tree.h ../Common/GmshUI.h Draw.h gl2jpeg.o: gl2jpeg.cpp gl2jpeg.h PixelBuffer.h ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h Draw.h \ - /sw/include/jpeglib.h /sw/include/jconfig.h /sw/include/jmorecfg.h \ - /sw/include/jerror.h + ../DataStr/Tree.h ../Common/GmshUI.h Draw.h \ + /usr/local/include/FL/images/jpeglib.h \ + /usr/local/include/FL/images/jconfig.h \ + /usr/local/include/FL/images/jmorecfg.h \ + /usr/local/include/FL/images/jerror.h gl2png.o: gl2png.cpp gl2png.h PixelBuffer.h ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h Draw.h \ - /sw/include/png.h /sw/include/pngconf.h + ../DataStr/Tree.h ../Common/GmshUI.h Draw.h \ + /usr/local/include/FL/images/png.h /usr/local/include/FL/images/zlib.h \ + /usr/local/include/FL/images/zconf.h \ + /usr/local/include/FL/images/pngconf.h gl2ppm.o: gl2ppm.cpp gl2ppm.h PixelBuffer.h ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h Draw.h + ../DataStr/Tree.h ../Common/GmshUI.h Draw.h gl2yuv.o: gl2yuv.cpp gl2yuv.h PixelBuffer.h ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../Common/GmshUI.h /usr/X11R6/include/GL/glu.h Draw.h + ../DataStr/Tree.h ../Common/GmshUI.h Draw.h diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index ca7dddd0b3527f850a0741585d1e6eb0fbe87d4e..1feca83c27ec6854e0c3a81cce2f4dd245663592 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.200 2007-08-21 19:05:39 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.201 2007-08-24 20:14:18 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -474,11 +474,11 @@ static void drawArrays(GEntity *e, VertexArray *va, GLint type, bool useNormalAr // draw each one separately if(CTX.render_mode == GMSH_SELECT && CTX.pick_elements) { if(va->getNumElementPointers() == va->getNumVertices()){ - for(int i = 0; i < va->getNumVertices(); i += va->getType()){ - glPushName(va->getType()); + for(int i = 0; i < va->getNumVertices(); i += va->getNumVerticesPerElement()){ + glPushName(va->getNumVerticesPerElement()); glPushName(i); glBegin(type); - for(int j = 0; j < va->getType(); j++) + for(int j = 0; j < va->getNumVerticesPerElement(); j++) glVertex3fv(va->getVertexArray(3 * (i + j))); glEnd(); glPopName(); @@ -518,7 +518,7 @@ static void drawArrays(GEntity *e, VertexArray *va, GLint type, bool useNormalAr glColor4ubv((GLubyte *) & color); } - if(va->getType() > 2 && !drawOutline && CTX.polygon_offset) + if(va->getNumVerticesPerElement() > 2 && !drawOutline && CTX.polygon_offset) glEnable(GL_POLYGON_OFFSET_FILL); if(drawOutline) diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp index df850a32a87ac461ee635ca8ec4513cad93d9d5d..113473897881b7155435407dd69a33439a493875 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -1,4 +1,4 @@ -// $Id: Post.cpp,v 1.113 2006-11-27 22:22:16 geuzaine Exp $ +// $Id: Post.cpp,v 1.114 2007-08-24 20:14:18 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -23,409 +23,273 @@ #include "GmshUI.h" #include "Numeric.h" #include "Draw.h" -#include "Views.h" +#include "Iso.h" +#include "PView.h" #include "Context.h" #include "gl2ps.h" -extern Context_T CTX; +#define NMAX 20 -// Give Value from Index - -double GiveValueFromIndex_Lin(double ValMin, double ValMax, int NbIso, int Iso) -{ - if(NbIso == 1) - return (ValMax + ValMin) / 2.; - return ValMin + Iso * (ValMax - ValMin) / (NbIso - 1.); -} - -double GiveValueFromIndex_Log(double ValMin, double ValMax, int NbIso, int Iso) +void saturate(int nb, double val[NMAX][9], double vmin, double vmax, + int i0=0, int i1=1, int i2=2, int i3=3, + int i4=4, int i5=5, int i6=6, int i7=7) { - if(NbIso == 1) - return (ValMax + ValMin) / 2.; - if(ValMin <= 0.) - return 0.; - return pow(10., log10(ValMin) - + Iso * (log10(ValMax) - log10(ValMin)) / (NbIso - 1.)); + int id[8] = {i0, i1, i2, i3, i4, i5, i6, i7}; + for(int i = 0; i < nb; i++){ + if(val[id[i]][0] > vmax) val[id[i]][0] = vmax; + else if(val[id[i]][0] < vmin) val[id[i]][0] = vmin; + } } -double GiveValueFromIndex_DoubleLog(double ValMin, double ValMax, int NbIso, - int Iso) +int cutTriangle(double xyz[NMAX][3], double val[NMAX][9], double vmin, double vmax, + int i0=0, int i1=1, int i2=2) { - if(NbIso == 1) - return (ValMax + ValMin) / 2.; - if(ValMin <= 0.) - return 0.; - - double Iso2 = Iso / 2.; - double NbIso2 = NbIso / 2.; - - return pow(10., log10(ValMin) - + Iso2 * (log10(ValMax) - log10(ValMin)) / (NbIso2 - 1.)); + int id[3] = {i0, i1, i2}, np; + double x[NMAX], y[NMAX], z[NMAX], xp[NMAX], yp[NMAX], zp[NMAX], v[NMAX], vp[NMAX]; + for(int i = 0; i < 3; i++){ + x[i] = xyz[id[i]][0]; + y[i] = xyz[id[i]][1]; + z[i] = xyz[id[i]][2]; + v[i] = val[id[i]][0]; + } + CutTriangle(x, y, z, v, vmin, vmax, xp, yp, zp, &np, vp); + for(int i = 0; i < np; i++){ + xyz[i][0] = xp[i]; + xyz[i][1] = yp[i]; + xyz[i][2] = zp[i]; + val[i][0] = vp[i]; + } + return np; } -// Give Index From Value - -int GiveIndexFromValue_Lin(double ValMin, double ValMax, int NbIso, - double Val) +SVector3 normal3(double xyz[NMAX][3], int i0=0, int i1=1, int i2=2) { - if(ValMin == ValMax) - return NbIso / 2; - return (int)((Val - ValMin) * (NbIso - 1) / (ValMax - ValMin)); + SVector3 t1(xyz[i1][0] - xyz[i0][0], + xyz[i1][1] - xyz[i0][1], + xyz[i1][2] - xyz[i0][2]); + SVector3 t2(xyz[i2][0] - xyz[i0][0], + xyz[i2][1] - xyz[i0][1], + xyz[i2][2] - xyz[i0][2]); + SVector3 n = crossprod(t1, t2); + n.normalize(); + return n; } -int GiveIndexFromValue_Log(double ValMin, double ValMax, int NbIso, - double Val) +void addScalarPoint(PView *p, double xyz[NMAX][3], double val[NMAX][9]) { - if(ValMin == ValMax) - return NbIso / 2; - if(ValMin <= 0.) - return 0; - return (int)((log10(Val) - log10(ValMin)) * (NbIso - 1) / - (log10(ValMax) - log10(ValMin))); } -int GiveIndexFromValue_DoubleLog(double ValMin, double ValMax, int NbIso, - double Val) +void addScalarLine(PView *p, double xyz[NMAX][3], double val[NMAX][9], + int i0=0, int i1=1) { - // JF: this is obviously wrong... - if(ValMin == ValMax) - return NbIso / 2; - if(ValMin <= 0.) - return 0; - return (int)((log10(Val) - log10(ValMin)) * (NbIso - 1) / - (log10(ValMax) - log10(ValMin))); -} - - -// Color Palette - -unsigned int PaletteContinuous(Post_View * v, double min, double max, double val) -{ /* val in [min,max] */ - int index = v->GIFV(min, max, v->CT.size, val); - glColor4ubv((GLubyte *) & v->CT.table[index]); - return v->CT.table[index]; + // line is from xyz[i0][] to xyz[i1][] } -unsigned int PaletteContinuousLinear(Post_View * v, double min, double max, double val) -{ /* val in [min,max] */ - int index = GiveIndexFromValue_Lin(min, max, v->CT.size, val); - glColor4ubv((GLubyte *) & v->CT.table[index]); - return v->CT.table[index]; -} - -unsigned int PaletteDiscrete(Post_View * v, int nbi, int i) -{ /* i in [0,nbi-1] */ - int index; - - index = (nbi == 1) ? - v->CT.size / 2 : (int)(i / (double)(nbi - 1) * (v->CT.size - 1) + 0.5); - - glColor4ubv((GLubyte *) & v->CT.table[index]); - return v->CT.table[index]; -} - -// Get values from a compatible external view (i.e., a view that has -// the same number of elements as the {type,refcomp} list in the -// reference view, and the same number of time steps) - -int GetValuesFromExternalView(Post_View *v, int type, int refcomp, - int *nbcomp, double **vals, int viewIndex) +void addScalarTriangle(PView *p, double xyz[NMAX][3], double val[NMAX][9], + bool pre=false, int i0=0, int i1=1, int i2=2, bool unique=false) { - Post_View **vv = (Post_View **) List_Pointer_Test(CTX.post.list, viewIndex); - - if(!vv){ - if(!v->ExternalElementIndex) - Msg(GERROR, "Nonexistent external view: drawing self instead"); - return 0; - } - - Post_View *v2 = *vv; - int nbelm = 0, comp = 0, nbnod = 0, ref; - List_T *l = NULL; - - switch(type){ - case POST_POINT: - nbnod = 1; - ref = (refcomp == 1) ? v->NbSP : ((refcomp == 3) ? v->NbVP : v->NbTP); - if(ref == v2->NbSP){ nbelm = v2->NbSP; l = v2->SP; comp = 1; } - else if(ref == v2->NbVP){ nbelm = v2->NbVP; l = v2->VP; comp = 3; } - else if(ref == v2->NbTP){ nbelm = v2->NbTP; l = v2->TP; comp = 9; } - break; - case POST_LINE: - nbnod = 2; - ref = (refcomp == 1) ? v->NbSL : ((refcomp == 3) ? v->NbVL : v->NbTL); - if(ref == v2->NbSL){ nbelm = v2->NbSL; l = v2->SL; comp = 1; } - else if(ref == v2->NbVL){ nbelm = v2->NbVL; l = v2->VL; comp = 3; } - else if(ref == v2->NbTL){ nbelm = v2->NbTL; l = v2->TL; comp = 9; } - break; - case POST_TRIANGLE: - nbnod = 3; - ref = (refcomp == 1) ? v->NbST : ((refcomp == 3) ? v->NbVT : v->NbTT); - if(ref == v2->NbST){ nbelm = v2->NbST; l = v2->ST; comp = 1; } - else if(ref == v2->NbVT){ nbelm = v2->NbVT; l = v2->VT; comp = 3; } - else if(ref == v2->NbTT){ nbelm = v2->NbTT; l = v2->TT; comp = 9; } - break; - case POST_QUADRANGLE: - nbnod = 4; - ref = (refcomp == 1) ? v->NbSQ : ((refcomp == 3) ? v->NbVQ : v->NbTQ); - if(ref == v2->NbSQ){ nbelm = v2->NbSQ; l = v2->SQ; comp = 1; } - else if(ref == v2->NbVQ){ nbelm = v2->NbVQ; l = v2->VQ; comp = 3; } - else if(ref == v2->NbTQ){ nbelm = v2->NbTQ; l = v2->TQ; comp = 9; } - break; - case POST_TETRAHEDRON: - nbnod = 4; - ref = (refcomp == 1) ? v->NbSS : ((refcomp == 3) ? v->NbVS : v->NbTS); - if(ref == v2->NbSS){ nbelm = v2->NbSS; l = v2->SS; comp = 1; } - else if(ref == v2->NbVS){ nbelm = v2->NbVS; l = v2->VS; comp = 3; } - else if(ref == v2->NbTS){ nbelm = v2->NbTS; l = v2->TS; comp = 9; } - break; - case POST_HEXAHEDRON: - nbnod = 8; - ref = (refcomp == 1) ? v->NbSH : ((refcomp == 3) ? v->NbVH : v->NbTH); - if(ref == v2->NbSH){ nbelm = v2->NbSH; l = v2->SH; comp = 1; } - else if(ref == v2->NbVH){ nbelm = v2->NbVH; l = v2->VH; comp = 3; } - else if(ref == v2->NbTH){ nbelm = v2->NbTH; l = v2->TH; comp = 9; } - break; - case POST_PRISM: - nbnod = 6; - ref = (refcomp == 1) ? v->NbSI : ((refcomp == 3) ? v->NbVI : v->NbTI); - if(ref == v2->NbSI){ nbelm = v2->NbSI; l = v2->SI; comp = 1; } - else if(ref == v2->NbVI){ nbelm = v2->NbVI; l = v2->VI; comp = 3; } - else if(ref == v2->NbTI){ nbelm = v2->NbTI; l = v2->TI; comp = 9; } - break; - case POST_PYRAMID: - nbnod = 5; - ref = (refcomp == 1) ? v->NbSY : ((refcomp == 3) ? v->NbVY : v->NbTY); - if(ref == v2->NbSY){ nbelm = v2->NbSY; l = v2->SY; comp = 1; } - else if(ref == v2->NbVY){ nbelm = v2->NbVY; l = v2->VY; comp = 3; } - else if(ref == v2->NbTY){ nbelm = v2->NbTY; l = v2->TY; comp = 9; } - break; - } - - if(!l || !nbelm || v2->NbTimeStep != v->NbTimeStep || - v->ExternalElementIndex < 0 || v->ExternalElementIndex >= nbelm){ - if(!v->ExternalElementIndex) - Msg(GERROR, "Incompatible external view: drawing self instead"); - return 0; + PViewOptions *opt = p->getOptions(); + + if(!pre && opt->Boundary > 0){ + opt->Boundary--; + addScalarLine(p, xyz, val, 0, 1); + addScalarLine(p, xyz, val, 1, 2); + addScalarLine(p, xyz, val, 2, 0); + opt->Boundary++; + return; } - int nb = List_Nbr(l) / nbelm; - *nbcomp = comp; - *vals = (double *)List_Pointer(l, v->ExternalElementIndex * nb + - 3 * nbnod + comp * nbnod * v->TimeStep); - return 1; -} - -// Compute node coordinates taking Offset, Raise and Explode into account - -void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, - double *x1, double *y1, double *z1, double *vals, - double *x2, double *y2, double *z2, - int offset, int raise, int transform) -{ - if(v->Explode == 1.) { - for(int i = 0; i < nbnod; i++) { - x2[i] = x1[i]; - y2[i] = y1[i]; - z2[i] = z1[i]; - } - } - else { - double xc = 0., yc = 0., zc = 0.; - for(int i = 0; i < nbnod; i++) { - xc += x1[i]; - yc += y1[i]; - zc += z1[i]; + int id[3] = {i0, i1, i2}; + unsigned int col[3]; + SVector3 ntri = normal3(xyz), n[3]; + double vmin = opt->TmpMin, vmax = opt->TmpMax, x[3], y[3], z[3]; + + if(opt->SaturateValues) saturate(3, val, vmin, vmax, i0, i1, i2); + + if(opt->IntervalsType == PViewOptions::Continuous){ + if(val[i0][0] >= vmin && val[i0][0] <= vmax && + val[i1][0] >= vmin && val[i1][0] <= vmax && + val[i2][0] >= vmin && val[i2][0] <= vmax){ + // full triangle + for(int i = 0; i < 3; i++){ + x[i] = xyz[id[i]][0]; y[i] = xyz[id[i]][1]; z[i] = xyz[id[i]][2]; + n[i] = ntri; + if(opt->SmoothNormals){ + if(pre) p->normals->add(x[i], y[i], z[i], n[i][0], n[i][1], n[i][2]); + else p->normals->get(x[i], y[i], z[i], n[i][0], n[i][1], n[i][2]); + } + col[i] = opt->getColor(val[id[i]][0], vmin, vmax); + } + if(!pre) p->va_triangles->add(x, y, z, n, col, 0, unique); } - xc /= (double)nbnod; - yc /= (double)nbnod; - zc /= (double)nbnod; - for(int i = 0; i < nbnod; i++) { - x2[i] = xc + v->Explode * (x1[i] - xc); - y2[i] = yc + v->Explode * (y1[i] - yc); - z2[i] = zc + v->Explode * (z1[i] - zc); + else{ + // draw part of the triangle between vmin and vmax + int nb = cutTriangle(xyz, val, vmin, vmax, i0, i1, i2); + if(nb >= 3){ + for(int j = 2; j < nb; j++){ + int id2[3] = {0, j - 1, j}; + for(int i = 0; i < 3; i++){ + x[i] = xyz[id2[i]][0]; y[i] = xyz[id2[i]][1]; z[i] = xyz[id2[i]][2]; + n[i] = ntri; + if(opt->SmoothNormals){ + if(pre) p->normals->add(x[i], y[i], z[i], n[i][0], n[i][1], n[i][2]); + else p->normals->get(x[i], y[i], z[i], n[i][0], n[i][1], n[i][2]); + } + col[i] = opt->getColor(val[id2[i]][0], vmin, vmax); + } + if(!pre) p->va_triangles->add(x, y, z, n, col, 0, unique); + } + } } } - if(transform){ - for(int i = 0; i < nbnod; i++) { - double x = x2[i], y = y2[i], z = z2[i]; - x2[i] = v->Transform[0][0] * x + v->Transform[0][1] * y + v->Transform[0][2] * z; - y2[i] = v->Transform[1][0] * x + v->Transform[1][1] * y + v->Transform[1][2] * z; - z2[i] = v->Transform[2][0] * x + v->Transform[2][1] * y + v->Transform[2][2] * z; + if(opt->IntervalsType == PViewOptions::Discrete){ + for(int k = 0; k < opt->NbIso; k++){ + if(vmin == vmax) k = opt->NbIso / 2; + unsigned int col = opt->getColor(k, opt->NbIso); + double min = 0.;//FIXME View->GVFI(vmin, vmax, p->NbIso + 1, k); + double max = 0.;//FIXME View->GVFI(vmin, vmax, p->NbIso + 1, k + 1); + int nb = cutTriangle(xyz, val, min, max, i0, i1, i2); + if(nb >= 3){ + for(int j = 2; j < nb; j++){ + int id2[3] = {0, j - 1, j}; + for(int i = 0; i < 3; i++){ + double x = xyz[id2[i]][0], y = xyz[id2[i]][1], z = xyz[id2[i]][2]; + SVector3 n = ntri; + if(opt->SmoothNormals){ + if(pre) p->normals->add(x, y, z, n[0], n[1], n[2]); + else p->normals->get(x, y, z, n[0], n[1], n[2]); + } + if(!pre) + p->va_triangles->add(x, y, z, n[0], n[1], n[2], col); + } + } + } + if(vmin == vmax) break; } } - if(offset){ - for(int i = 0; i < nbnod; i++) { - x2[i] += v->Offset[0]; - y2[i] += v->Offset[1]; - z2[i] += v->Offset[2]; + if(opt->IntervalsType == PViewOptions::Iso){ + for(int k = 0; k < opt->NbIso; k++) { + if(vmin == vmax) k = opt->NbIso / 2; + //unsigned int col = PaletteDiscrete(View, View->NbIso, k); + //IsoTriangle(View, X, Y, Z, Val, + // View->GVFI(ValMin, ValMax, View->NbIso, k), col); + if(vmin == vmax) break; } } - - if(raise){ - for(int i = 0; i < nbnod; i++){ - double norm = 0.; - if(nbcomp == 1) - norm = vals[i]; - else if(nbcomp == 3) - norm = sqrt(vals[3*i] * vals[3*i] + - vals[3*i+1] * vals[3*i+1] + - vals[3*i+2] * vals[3*i+2]); - else if(nbcomp == 9) - norm = ComputeVonMises(vals + 9*i); - x2[i] += v->Raise[0] * norm; - y2[i] += v->Raise[1] * norm; - z2[i] += v->Raise[2] * norm; - } - } - - if(v->UseGenRaise){ - int ext_nbcomp = nbcomp; - double *ext_vals = vals; - if(v->ViewIndexForGenRaise >= 0) - GetValuesFromExternalView(v, type, nbcomp, &ext_nbcomp, &ext_vals, - v->ViewIndexForGenRaise); - ApplyGeneralizedRaise(v, nbnod, ext_nbcomp, ext_vals, x2, y2, z2); - } - - for(int i = 0; i < nbnod; i++){ - if(x2[i] < v->TmpBBox[0]) v->TmpBBox[0] = x2[i]; - if(x2[i] > v->TmpBBox[1]) v->TmpBBox[1] = x2[i]; - if(y2[i] < v->TmpBBox[2]) v->TmpBBox[2] = y2[i]; - if(y2[i] > v->TmpBBox[3]) v->TmpBBox[3] = y2[i]; - if(z2[i] < v->TmpBBox[4]) v->TmpBBox[4] = z2[i]; - if(z2[i] > v->TmpBBox[5]) v->TmpBBox[5] = z2[i]; - } } -// Compare barycenters with viewpoint (eye) - -static double storedEye[3] = { 0., 0., 0. }; - -int changedEye() +void addScalarQuadrangle(PView *p, double xyz[NMAX][3], double val[NMAX][9], + bool pre=false, int i0=0, int i1=1, int i2=2, int i3=3) { - double zeye = 100 * CTX.lc, tmp[3]; - tmp[0] = CTX.rot[2] * zeye; - tmp[1] = CTX.rot[6] * zeye; - tmp[2] = CTX.rot[10] * zeye; - if(fabs(tmp[0] - storedEye[0]) > 1.e-3 || - fabs(tmp[1] - storedEye[1]) > 1.e-3 || - fabs(tmp[2] - storedEye[2]) > 1.e-3) { - storedEye[0] = tmp[0]; - storedEye[1] = tmp[1]; - storedEye[2] = tmp[2]; - Msg(DEBUG, "New eye = (%g %g %g)", tmp[0], tmp[1], tmp[2]); - return 1; - } - return 0; } -int compareEye(double *q, double *w, int nbnodes) +void addScalarTetrahedron(PView *p, double xyz[NMAX][3], double val[NMAX][9], + bool pre=false) { - double d, dq, dw, cgq[3] = { 0., 0., 0. }, cgw[3] = { 0., 0., 0.}; - for(int i = 0; i < nbnodes; i++) { - cgq[0] += q[i]; - cgq[1] += q[i + nbnodes]; - cgq[2] += q[i + 2 * nbnodes]; - cgw[0] += w[i]; - cgw[1] += w[i + nbnodes]; - cgw[2] += w[i + 2 * nbnodes]; - } - prosca(storedEye, cgq, &dq); - prosca(storedEye, cgw, &dw); - d = dq - dw; - if(d > 0) - return 1; - if(d < 0) - return -1; - return 0; } -int compareEye3Nodes(const void *a, const void *b) +void addScalarHexahedron(PView *p, double xyz[NMAX][3], double val[NMAX][9], + bool pre=false) { - return compareEye((double *)a, (double *)b, 3); } -int compareEye4Nodes(const void *a, const void *b) +void addScalarPrism(PView *p, double xyz[NMAX][3], double val[NMAX][9], + bool pre=false) { - return compareEye((double *)a, (double *)b, 4); } -int compareEye5Nodes(const void *a, const void *b) +void addScalarPyramid(PView *p, double xyz[NMAX][3], double val[NMAX][9], + bool pre=false) { - return compareEye((double *)a, (double *)b, 5); } -int compareEye6Nodes(const void *a, const void *b) -{ - return compareEye((double *)a, (double *)b, 6); -} -int compareEye8Nodes(const void *a, const void *b) +void addElementsInArrays(PView *p, bool preprocessNormalsOnly=false) { - return compareEye((double *)a, (double *)b, 8); -} + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); + + int step = opt->TimeStep; + int pre = preprocessNormalsOnly; + + if(opt->RangeType == PViewOptions::Custom){ + opt->TmpMin = opt->CustomMin; + opt->TmpMax = opt->CustomMax; + } + else if(opt->RangeType == PViewOptions::PerTimeStep){ + opt->TmpMin = data->getMin(opt->TimeStep); + opt->TmpMax = data->getMax(opt->TimeStep); + } + else{ + opt->TmpMin = data->getMin(); + opt->TmpMax = data->getMax(); + } -// Draw_Post + double xyz[NMAX][3], val[NMAX][9]; -void Draw_List(Post_View * v, double ValMin, double ValMax, int type, - List_T * list, int nbelm, int nbnod, int nbcomp, - void (*draw) (Post_View *, int, double, double, double *, - double *, double *, double *)) -{ - int i, nb, offset = 0, raise = 0, transform = 0; - double X[8], Y[8], Z[8]; - - // do we need to apply an offset? - if(v->Offset[0] || v->Offset[1] || v->Offset[2]) - offset = 1; - - // do we need to apply a simple raise? - if(v->Raise[0] || v->Raise[1] || v->Raise[2]) - raise = 1; - - // do we need to apply a general transformation? - if(v->Transform[0][0] != 1. || v->Transform[0][1] != 0. || v->Transform[0][2] != 0. || - v->Transform[1][0] != 0. || v->Transform[1][1] != 1. || v->Transform[1][2] != 0. || - v->Transform[2][0] != 0. || v->Transform[2][1] != 0. || v->Transform[2][2] != 1.) - transform = 1; - - if(nbelm) { - nb = List_Nbr(list) / nbelm; - - if(v->Light && v->SmoothNormals && v->Changed) { - Msg(DEBUG, "Preprocessing of normals in View[%d]", v->Index); - v->ExternalElementIndex = 0; - for(i = 0; i < List_Nbr(list); i += nb) { - Get_Coords(v, type, nbnod, nbcomp, - (double *)List_Pointer_Fast(list, i), - (double *)List_Pointer_Fast(list, i + nbnod), - (double *)List_Pointer_Fast(list, i + 2 * nbnod), - (double *)List_Pointer_Fast(list, i + 3 * nbnod + - v->TimeStep * nbnod * nbcomp), - X, Y, Z, offset, raise, transform); - draw(v, 1, ValMin, ValMax, X, Y, Z, - (double *)List_Pointer_Fast(list, i + 3 * nbnod)); - v->ExternalElementIndex++; + for(int i = 0; i < data->getNumElements(); i++){ + int numcomp = data->getNumComponents(i); + int dim = data->getDimension(i); + int n = data->getNumNodes(i); + for(int j = 0; j < n; j++){ + data->getNode(i, j, xyz[j][0], xyz[j][1], xyz[j][2]); + for(int k = 0; k < numcomp; k++) + data->getValue(i, j, k, step, val[j][k]); + } + if(numcomp == 1){ + switch(dim){ + case 0: addScalarPoint(p, xyz, val); break; + case 1: addScalarLine(p, xyz, val); break; + case 2: + if(n == 3) addScalarTriangle(p, xyz, val, pre); + else addScalarQuadrangle(p, xyz, val, pre); + break; + case 3: + if(n == 4) addScalarTetrahedron(p, xyz, val, pre); + else if(n == 8) addScalarHexahedron(p, xyz, val, pre); + else if(n == 6) addScalarPrism(p, xyz, val, pre); + else if(n == 5) addScalarPyramid(p, xyz, val, pre); + break; } } + } +} - v->ExternalElementIndex = 0; - for(i = 0; i < List_Nbr(list); i += nb) { - Get_Coords(v, type, nbnod, nbcomp, - (double *)List_Pointer_Fast(list, i), - (double *)List_Pointer_Fast(list, i + nbnod), - (double *)List_Pointer_Fast(list, i + 2 * nbnod), - (double *)List_Pointer_Fast(list, i + 3 * nbnod + - v->TimeStep * nbnod * nbcomp), - X, Y, Z, offset, raise, transform); - draw(v, 0, ValMin, ValMax, X, Y, Z, - (double *)List_Pointer_Fast(list, i + 3 * nbnod)); - v->ExternalElementIndex++; - } +void drawArrays(PView *p, VertexArray *va, GLint type) +{ + if(!va) return; + + bool useNormalArray = true; + + glVertexPointer(3, GL_FLOAT, 0, va->getVertexArray()); + glNormalPointer(GL_BYTE, 0, va->getNormalArray()); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, va->getColorArray()); + + glEnableClientState(GL_VERTEX_ARRAY); + + if(useNormalArray){ + glEnable(GL_LIGHTING); + glEnableClientState(GL_NORMAL_ARRAY); } + else + glDisableClientState(GL_NORMAL_ARRAY); + + glEnableClientState(GL_COLOR_ARRAY); + + //glEnable(GL_POLYGON_OFFSET_FILL); + //if(drawOutline) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + + glDrawArrays(type, 0, va->getNumVertices()); + + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glDisable(GL_POLYGON_OFFSET_FILL); + glDisable(GL_LIGHTING); + + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); } // We try to estimate how many primitives will end up in the vertex @@ -435,405 +299,149 @@ void Draw_List(Post_View * v, double ValMin, double ValMax, int type, // (like the one we have for smooth normals right now), in order to // count how many primitives we will have. -int EstimateNumTri(Post_View *v) +static int estimateNumPoints(PView *p) { - int tris = v->NbST + v->NbVT + v->NbTT; - int quads = v->NbSQ + v->NbVQ + v->NbTQ; - int tets = v->NbSS + v->NbVS + v->NbTS; - int prisms = v->NbSI + v->NbVI + v->NbTI; - int pyrs = v->NbSY + v->NbVY + v->NbTY; - int hexas = v->NbSH + v->NbVH + v->NbTH; - - int heuristic = 0; - if(v->IntervalsType == DRAW_POST_ISO) - heuristic = (tets + prisms + pyrs + hexas) / 10; - else if(v->IntervalsType == DRAW_POST_CONTINUOUS) - heuristic = (tris + 2 * quads + 6 * tets + - 8 * prisms + 6 * pyrs + 12 * hexas); - else if(v->IntervalsType == DRAW_POST_DISCRETE) - heuristic = (tris + 2 * quads + 6 * tets + - 8 * prisms + 6 * pyrs + 12 * hexas) * 2; + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); + int heuristic = data->getNumPoints(); return heuristic + 10000; } -int EstimateNumLin(Post_View *v) +static int estimateNumLines(PView *p) { - return 10000; + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); + + int heuristic = data->getNumLines(); + return heuristic + 10000; } -void Draw_Post(void) +static int estimateNumTriangles(PView *p) { - int nb; - double ValMin = 0., ValMax = 0.; - Post_View *v; + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); - // draw any plugin-specific stuff - if(CTX.post.plugin_draw_function) - (*CTX.post.plugin_draw_function)(); - - if(!CTX.post.list) - return; + int tris = data->getNumTriangles(); + int quads = data->getNumQuadrangles(); + int tets = data->getNumTetrahedra(); + int prisms = data->getNumPrisms(); + int pyrs = data->getNumPyramids(); + int hexas = data->getNumHexahedra(); - if(CTX.draw_bbox || !CTX.post.draw) { - for(int iView = 0; iView < List_Nbr(CTX.post.list); iView++) { - v = *(Post_View **) List_Pointer(CTX.post.list, iView); - // draw only the bbox of visible 3D views - if(v->Visible && v->Type == DRAW_POST_3D) { - glColor4ubv((GLubyte *) & CTX.color.fg); - glLineWidth(CTX.line_width); - gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); - Draw_Box(v->BBox[0], v->BBox[2], v->BBox[4], - v->BBox[1], v->BBox[3], v->BBox[5]); - glColor3d(1.,0.,0.); - for(int i = 0; i < 6; i++) - if(CTX.clip[i] & (1<<(2+iView))) - Draw_PlaneInBoundingBox(v->BBox[0], v->BBox[2], v->BBox[4], - v->BBox[1], v->BBox[3], v->BBox[5], - CTX.clip_plane[i][0], CTX.clip_plane[i][1], - CTX.clip_plane[i][2], CTX.clip_plane[i][3]); - } - } - } + int heuristic = 0; + if(opt->IntervalsType == PViewOptions::Iso) + heuristic = (tets + prisms + pyrs + hexas) / 10; + else if(opt->IntervalsType == PViewOptions::Continuous) + heuristic = (tris + 2 * quads + 6 * tets + + 8 * prisms + 6 * pyrs + 12 * hexas); + else if(opt->IntervalsType == PViewOptions::Discrete) + heuristic = (tris + 2 * quads + 6 * tets + + 8 * prisms + 6 * pyrs + 12 * hexas) * 2; - if(!CTX.post.draw) - return; + return heuristic + 10000; +} - for(int iView = 0; iView < List_Nbr(CTX.post.list); iView++) { +class initArraysPView { + public : + void operator () (PView *p) + { + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); - v = *(Post_View **) List_Pointer(CTX.post.list, iView); + if(!p->getChanged() || data->getDirty() || !opt->Visible) return; - if(v->Visible && !v->Dirty) { + if(p->va_points) delete p->va_points; + p->va_points = new VertexArray(1, estimateNumPoints(p)); + if(p->va_lines) delete p->va_lines; + p->va_lines = new VertexArray(2, estimateNumLines(p)); + if(p->va_triangles) delete p->va_triangles; + p->va_triangles = new VertexArray(3, estimateNumTriangles(p)); - glPointSize(v->PointSize); - gl2psPointSize(v->PointSize * CTX.print.eps_point_size_factor); - - glLineWidth(v->LineWidth); - gl2psLineWidth(v->LineWidth * CTX.print.eps_line_width_factor); + if(opt->SmoothNormals) addElementsInArrays(p, true); + addElementsInArrays(p); - if(v->LightTwoSide) - glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + p->setChanged(false); + } +}; + +class drawArraysPView { + public : + void operator () (PView *p) + { + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); + + if(!opt->Visible) return; + + glPointSize(opt->PointSize); + gl2psPointSize(opt->PointSize * CTX.print.eps_point_size_factor); + + glLineWidth(opt->LineWidth); + gl2psLineWidth(opt->LineWidth * CTX.print.eps_line_width_factor); + + if(opt->LightTwoSide) + glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + else + glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); + + for(int i = 0; i < 6; i++) + if(CTX.clip[i] & (1 << (2 + p->getIndex()))) + glEnable((GLenum)(GL_CLIP_PLANE0 + i)); else - glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); - - for(int i = 0; i < 6; i++) - if(CTX.clip[i] & (1<<(2+iView))) - glEnable((GLenum)(GL_CLIP_PLANE0 + i)); - else - glDisable((GLenum)(GL_CLIP_PLANE0 + i)); - - switch (v->RangeType) { - case DRAW_POST_RANGE_DEFAULT: - ValMin = v->Min; - ValMax = v->Max; - break; - case DRAW_POST_RANGE_CUSTOM: - ValMin = v->CustomMin; - ValMax = v->CustomMax; - break; - case DRAW_POST_RANGE_PER_STEP: - if(v->TimeStepMin && v->TimeStepMax){ - ValMin = v->TimeStepMin[v->TimeStep]; - ValMax = v->TimeStepMax[v->TimeStep]; - } - else{ // possible if the view is empty - ValMin = v->Min; - ValMax = v->Max; - } - break; - } - v->ExternalMin = ValMin; - v->ExternalMax = ValMax; - - switch (v->ScaleType) { - case DRAW_POST_LINEAR: - v->GIFV = GiveIndexFromValue_Lin; - v->GVFI = GiveValueFromIndex_Lin; - break; - case DRAW_POST_LOGARITHMIC: - v->GIFV = GiveIndexFromValue_Log; - v->GVFI = GiveValueFromIndex_Log; - break; - case DRAW_POST_DOUBLELOGARITHMIC: - v->GIFV = GiveIndexFromValue_DoubleLog; - v->GVFI = GiveValueFromIndex_DoubleLog; - break; - } - - if(v->Light && v->SmoothNormals && v->Changed) - v->reset_normals(); - - if(v->UseGenRaise) - InitGeneralizedRaise(v); - - if(v->Changed){ - for(int i = 0; i < 3; i++) { - v->TmpBBox[2 * i] = VAL_INF; - v->TmpBBox[2 * i + 1] = -VAL_INF; - } - } - - // initialize alpha blending for transparency - if(CTX.alpha && ColorTable_IsAlpha(&v->CT)){ - if(v->FakeTransparency){ - // simple additive blending "a la xpost": - glBlendFunc(GL_SRC_ALPHA, GL_ONE); // glBlendEquation(GL_FUNC_ADD); - // maximum intensity projection "a la volsuite": - // glBlendFunc(GL_ONE, GL_ONE); // glBlendEquation(GL_MAX); - glEnable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - } - else{ - // real translucent blending (requires back-to-front traversal) - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glBlendEquation(GL_FUNC_ADD); - glEnable(GL_BLEND); - // if we don't use vertex arrays, do the sorting here - it's - // incorrect for hybrid views (use Plugin(DecomposeInSimplex) - // for that) - if(!CTX.post.vertex_arrays && v->DrawScalars && - (changedEye() || v->Changed)) { - Msg(DEBUG, "Sorting View[%d] for transparency (NO vertex array)", v->Index); - if(v->NbST && v->DrawTriangles) { - nb = List_Nbr(v->ST) / v->NbST; - qsort(v->ST->array, v->NbST, nb * sizeof(double), compareEye3Nodes); - } - if(v->NbSQ && v->DrawQuadrangles) { - nb = List_Nbr(v->SQ) / v->NbSQ; - qsort(v->SQ->array, v->NbSQ, nb * sizeof(double), compareEye4Nodes); - } - if(v->NbSS && v->DrawTetrahedra) { - nb = List_Nbr(v->SS) / v->NbSS; - qsort(v->SS->array, v->NbSS, nb * sizeof(double), compareEye4Nodes); - } - if(v->NbSH && v->DrawHexahedra) { - nb = List_Nbr(v->SH) / v->NbSH; - qsort(v->SH->array, v->NbSH, nb * sizeof(double), compareEye8Nodes); - } - if(v->NbSI && v->DrawPrisms) { - nb = List_Nbr(v->SI) / v->NbSI; - qsort(v->SI->array, v->NbSI, nb * sizeof(double), compareEye6Nodes); - } - if(v->NbSY && v->DrawPyramids) { - nb = List_Nbr(v->SY) / v->NbSY; - qsort(v->SY->array, v->NbSY, nb * sizeof(double), compareEye5Nodes); - } - } - } - } - - if(v->DrawPoints) { - if(v->Type == DRAW_POST_3D && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_POINT, v->SP, v->NbSP, 1, 1, - Draw_ScalarPoint); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_POINT, v->VP, v->NbVP, 1, 3, - Draw_VectorPoint); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_POINT, v->TP, v->NbTP, 1, 9, - Draw_TensorPoint); - } - if(v->DrawLines) { - if(v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_LINE, v->SL, v->NbSL, 2, 1, - Draw_ScalarLine); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_LINE, v->VL, v->NbVL, 2, 3, - Draw_VectorLine); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_LINE, v->TL, v->NbTL, 2, 9, - Draw_TensorLine); - } - - for(int pass = 0; pass < 2; pass++){ - int skip_2d = 0, skip_3d = 0; - if(pass == 0){ - if(CTX.post.vertex_arrays){ - if(v->Changed){ - Msg(DEBUG, "regenerate View[%d] vertex array", v->Index); - if(v->TriVertexArray) delete v->TriVertexArray; - v->TriVertexArray = new VertexArray(3, EstimateNumTri(v)); - v->TriVertexArray->fill = 1; - if(v->LinVertexArray) delete v->LinVertexArray; - v->LinVertexArray = new VertexArray(2, EstimateNumLin(v)); - v->LinVertexArray->fill = 1; - goto pass_0; - } - } - goto pass_1; - } - else{ - // don't even enter the classic data path if we don't have to - if(v->TriVertexArray || v->LinVertexArray){ - if(v->Boundary < 1 && !v->ShowElement && !v->Normals && - (!v->LineType || (v->LineType && v->IntervalsType != DRAW_POST_ISO)) && - v->IntervalsType != DRAW_POST_NUMERIC){ - Msg(DEBUG, "View[%d]: skiping 2D scalar pass alltogether", v->Index); - skip_2d = 1; - } - if(v->Boundary < 2 && !v->ShowElement && - (!v->LineType || (v->LineType && v->IntervalsType != DRAW_POST_ISO)) && - v->IntervalsType != DRAW_POST_NUMERIC){ - Msg(DEBUG, "View[%d]: skiping 3D scalar pass alltogether", v->Index); - skip_3d = 1; - } - } - } - - pass_0: - if(v->DrawTriangles) { - if(!skip_2d && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->ST, v->NbST, 3, 1, - Draw_ScalarTriangle); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->VT, v->NbVT, 3, 3, - Draw_VectorTriangle); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->TT, v->NbTT, 3, 9, - Draw_TensorTriangle); - } - if(v->DrawQuadrangles) { - if(!skip_2d && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->SQ, v->NbSQ, 4, 1, - Draw_ScalarQuadrangle); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->VQ, v->NbVQ, 4, 3, - Draw_VectorQuadrangle); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->TQ, v->NbTQ, 4, 9, - Draw_TensorQuadrangle); - } - if(v->DrawTetrahedra) { - if(!skip_3d && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->SS, v->NbSS, 4, 1, - Draw_ScalarTetrahedron); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->VS, v->NbVS, 4, 3, - Draw_VectorTetrahedron); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->TS, v->NbTS, 4, 9, - Draw_TensorTetrahedron); - } - if(v->DrawHexahedra) { - if(!skip_3d && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->SH, v->NbSH, 8, 1, - Draw_ScalarHexahedron); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->VH, v->NbVH, 8, 3, - Draw_VectorHexahedron); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->TH, v->NbTH, 8, 9, - Draw_TensorHexahedron); - } - if(v->DrawPrisms) { - if(!skip_3d && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_PRISM, v->SI, v->NbSI, 6, 1, - Draw_ScalarPrism); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_PRISM, v->VI, v->NbVI, 6, 3, - Draw_VectorPrism); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_PRISM, v->TI, v->NbTI, 6, 9, - Draw_TensorPrism); - } - if(v->DrawPyramids) { - if(!skip_3d && v->DrawScalars) - Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->SY, v->NbSY, 5, 1, - Draw_ScalarPyramid); - if(v->DrawVectors) - Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->VY, v->NbVY, 5, 3, - Draw_VectorPyramid); - if(v->DrawTensors) - Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->TY, v->NbTY, 5, 9, - Draw_TensorPyramid); - } - - pass_1: - if(v->TriVertexArray && v->TriVertexArray->fill){ - Msg(DEBUG, "View[%d]; %d tris in vertex array", - v->Index, v->TriVertexArray->getNumVertices()/3); - v->TriVertexArray->fill = 0; - } - if(v->LinVertexArray && v->LinVertexArray->fill){ - Msg(DEBUG, "View[%d]; %d segs in vertex array", - v->Index, v->LinVertexArray->getNumVertices()/2); - v->LinVertexArray->fill = 0; - } - } - - if(v->TriVertexArray && v->TriVertexArray->getNumVertices()){ - if(CTX.alpha && ColorTable_IsAlpha(&v->CT) && !v->FakeTransparency && - (changedEye() || v->Changed)){ - Msg(DEBUG, "Sorting View[%d] for transparency (WITH vertex array)", v->Index); - v->TriVertexArray->sort(storedEye); - } + glDisable((GLenum)(GL_CLIP_PLANE0 + i)); + + drawArrays(p, p->va_points, GL_POINTS); + drawArrays(p, p->va_lines, GL_LINES); + drawArrays(p, p->va_triangles, GL_TRIANGLES); - glVertexPointer(3, GL_FLOAT, 0, v->TriVertexArray->getVertexArray()); - glNormalPointer(GL_BYTE, 0, v->TriVertexArray->getNormalArray()); - glColorPointer(4, GL_UNSIGNED_BYTE, 0, v->TriVertexArray->getColorArray()); - - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - glEnableClientState(GL_NORMAL_ARRAY); - - if(v->Light) - glEnable(GL_LIGHTING); - else - glDisableClientState(GL_NORMAL_ARRAY); - if(CTX.polygon_offset) glEnable(GL_POLYGON_OFFSET_FILL); - glDrawArrays(GL_TRIANGLES, 0, v->TriVertexArray->getNumVertices()); - glDisable(GL_POLYGON_OFFSET_FILL); - glDisable(GL_LIGHTING); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - } + // then draw everything we cannot put in the arrays: strings, + // vectors (for now), ... + } +}; + +class drawPViewBoundingBox { + public : + void operator () (PView *p) + { + PViewData *data = p->getData(); + PViewOptions *opt = p->getOptions(); + + if(!opt->Visible || opt->Type != PViewOptions::Plot3D) return; + + glColor4ubv((GLubyte *) & CTX.color.fg); + glLineWidth(CTX.line_width); + gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); + + SBoundingBox3d bb = data->getBoundingBox(); + Draw_Box(bb.min().x(), bb.min().y(), bb.min().z(), + bb.max().x(), bb.max().y(), bb.max().z()); + glColor3d(1., 0., 0.); + for(int i = 0; i < 6; i++) + if(CTX.clip[i] & (1 << (2 + p->getIndex()))) + Draw_PlaneInBoundingBox(bb.min().x(), bb.min().y(), bb.min().z(), + bb.max().x(), bb.max().y(), bb.max().z(), + CTX.clip_plane[i][0], CTX.clip_plane[i][1], + CTX.clip_plane[i][2], CTX.clip_plane[i][3]); + } +}; - if(v->LinVertexArray && v->LinVertexArray->getNumVertices()){ - glVertexPointer(3, GL_FLOAT, 0, v->LinVertexArray->getVertexArray()); - glColorPointer(4, GL_UNSIGNED_BYTE, 0, v->LinVertexArray->getColorArray()); - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - glDrawArrays(GL_LINES, 0, v->LinVertexArray->getNumVertices()); - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - } +void Draw_Post() +{ + // draw any plugin-specific stuff + if(CTX.post.plugin_draw_function) (*CTX.post.plugin_draw_function)(); - if(v->DrawStrings) { - glColor4ubv((GLubyte *) & v->color.text3d); - Draw_Text2D3D(3, v->TimeStep, v->NbT3, v->T3D, v->T3C); - } + if(PView::list.empty()) return; - for(int i = 0; i < 6; i++) - glDisable((GLenum)(GL_CLIP_PLANE0 + i)); + if(CTX.draw_bbox || !CTX.post.draw) + std::for_each(PView::list.begin(), PView::list.end(), drawPViewBoundingBox()); - if(v->Axes && v->Type == DRAW_POST_3D){ - glColor4ubv((GLubyte *) & v->color.axes); - glLineWidth(CTX.line_width); - gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); - if(!v->AxesAutoPosition){ - Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->AxesPosition); - } - else{ - int ok = 1; - for(int i = 0; i < 6; i++) { - if(fabs(v->TmpBBox[i]) == VAL_INF){ - ok = 0; - break; - } - } - if(ok) - Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->TmpBBox); - } - } - - // reset alpha blending - if(CTX.alpha){ - glDisable(GL_BLEND); - glEnable(GL_DEPTH_TEST); - } + if(!CTX.post.draw) return; - v->Changed = 0; - } + if(!CTX.threads_lock){ + CTX.threads_lock = 1; + std::for_each(PView::list.begin(), PView::list.end(), initArraysPView()); + std::for_each(PView::list.begin(), PView::list.end(), drawArraysPView()); + CTX.threads_lock = 0; } } diff --git a/Graphics/Post_New.cpp b/Graphics/Post_New.cpp deleted file mode 100644 index 7bd0fc9e8784f49944dabb67b8da27a6d4f70d2b..0000000000000000000000000000000000000000 --- a/Graphics/Post_New.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// $Id: Post_New.cpp,v 1.1 2007-08-21 19:05:39 geuzaine Exp $ -// -// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to <gmsh@geuz.org>. - -#include "Gmsh.h" -#include "GmshUI.h" -#include "Numeric.h" -#include "Draw.h" -#include "PView.h" -#include "Context.h" -#include "gl2ps.h" - -void addElementsInArrays(PView *p) -{ - -} - -void drawArrays(PView *p) -{ - /* - double x[20], y[20], z[20]; - - for(int i = 0; i < data->getNumElements(); i++){ - int n = data->getNumNodes(i); - for(int j = 0; j < n; j++) - data->getNode(i, j, x[j], y[j], z[j]); - - if(n == 3){ - glColor3d(1, 0, 0); - glBegin(GL_TRIANGLES); - glVertex3d(x[0], y[0], z[0]); - glVertex3d(x[1], y[1], z[1]); - glVertex3d(x[2], y[2], z[2]); - glEnd(); - } - - } - */ - -} - -// We try to estimate how many primitives will end up in the vertex -// arrays, since reallocating the arrays takes a HUGE amount of time -// on Windows/Cygwin. A better way would be to slightly redesign the -// drawing routines so we can have different pre-processing steps -// (like the one we have for smooth normals right now), in order to -// count how many primitives we will have. - -static int estimateNumTriangles(PView *p) -{ - PViewData *dat = p->getData(); - int tris = dat->getNumTriangles(); - int quads = dat->getNumQuadrangles(); - int tets = dat->getNumTetrahedra(); - int prisms = dat->getNumPrisms(); - int pyrs = dat->getNumPyramids(); - int hexas = dat->getNumHexahedra(); - - PViewOptions *opt = p->getOptions(); - int heuristic = 0; - if(opt->IntervalsType == PViewOptions::Iso) - heuristic = (tets + prisms + pyrs + hexas) / 10; - else if(opt->IntervalsType == PViewOptions::Continuous) - heuristic = (tris + 2 * quads + 6 * tets + - 8 * prisms + 6 * pyrs + 12 * hexas); - else if(opt->IntervalsType == PViewOptions::Discrete) - heuristic = (tris + 2 * quads + 6 * tets + - 8 * prisms + 6 * pyrs + 12 * hexas) * 2; - - return heuristic + 10000; -} - -static int estimateNumLines(PView *p) -{ - return 10000; -} - -class initPView { - public : - void operator () (PView *p) - { - PViewData *data = p->getData(); - PViewOptions *opt = p->getOptions(); - - if(!p->getChanged() || p->getDirty() || !opt->Visible) return; - - if(p->va_lines) delete p->va_lines; - p->va_lines = new VertexArray(2, estimateNumLines(p)); - if(p->va_triangles) delete p->va_triangles; - p->va_lines = new VertexArray(3, estimateNumTriangles(p)); - - addElementsInArrays(p); - - p->setChanged(false); - } -}; - -class drawPView { - public : - void operator () (PView *p) - { - PViewData *data = p->getData(); - PViewOptions *opt = p->getOptions(); - - if(!opt->Visible) return; - - glPointSize(opt->PointSize); - gl2psPointSize(opt->PointSize * CTX.print.eps_point_size_factor); - - glLineWidth(opt->LineWidth); - gl2psLineWidth(opt->LineWidth * CTX.print.eps_line_width_factor); - - if(opt->LightTwoSide) - glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - else - glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); - - for(int i = 0; i < 6; i++) - if(CTX.clip[i] & (1 << (2 + p->getIndex()))) - glEnable((GLenum)(GL_CLIP_PLANE0 + i)); - else - glDisable((GLenum)(GL_CLIP_PLANE0 + i)); - - drawArrays(p); - } -}; - -class drawPViewBoundingBox { - public : - void operator () (PView *p) - { - PViewData *data = p->getData(); - PViewOptions *opt = p->getOptions(); - - if(!opt->Visible || opt->Type != PViewOptions::Plot3D) return; - - glColor4ubv((GLubyte *) & CTX.color.fg); - glLineWidth(CTX.line_width); - gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); - - SBoundingBox3d bb = data->getBoundingBox(); - Draw_Box(bb.min().x(), bb.min().y(), bb.min().z(), - bb.max().x(), bb.max().y(), bb.max().z()); - glColor3d(1., 0., 0.); - for(int i = 0; i < 6; i++) - if(CTX.clip[i] & (1 << (2 + p->getIndex()))) - Draw_PlaneInBoundingBox(bb.min().x(), bb.min().y(), bb.min().z(), - bb.max().x(), bb.max().y(), bb.max().z(), - CTX.clip_plane[i][0], CTX.clip_plane[i][1], - CTX.clip_plane[i][2], CTX.clip_plane[i][3]); - } -}; - -void Draw_Post_New() -{ - // draw any plugin-specific stuff - if(CTX.post.plugin_draw_function) - (*CTX.post.plugin_draw_function)(); - - if(PView::list.empty()) return; - - if(CTX.draw_bbox || !CTX.post.draw) - std::for_each(PView::list.begin(), PView::list.end(), drawPViewBoundingBox()); - - if(!CTX.post.draw) return; - - if(!CTX.threads_lock){ - CTX.threads_lock = 1; - // recompute graphics data if we need to - std::for_each(PView::list.begin(), PView::list.end(), initPView()); - std::for_each(PView::list.begin(), PView::list.end(), drawPView()); - CTX.threads_lock = 0; - } - -} diff --git a/Graphics/Post_Old.cpp b/Graphics/Post_Old.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1112bbc87d3ae0a9e9534eed5ed8182927dbee4 --- /dev/null +++ b/Graphics/Post_Old.cpp @@ -0,0 +1,839 @@ +// $Id: Post_Old.cpp,v 1.1 2007-08-24 20:14:18 geuzaine Exp $ +// +// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems to <gmsh@geuz.org>. + +#include "Gmsh.h" +#include "GmshUI.h" +#include "Numeric.h" +#include "Draw.h" +#include "Views.h" +#include "Context.h" +#include "gl2ps.h" + +extern Context_T CTX; + +// Give Value from Index + +double GiveValueFromIndex_Lin(double ValMin, double ValMax, int NbIso, int Iso) +{ + if(NbIso == 1) + return (ValMax + ValMin) / 2.; + return ValMin + Iso * (ValMax - ValMin) / (NbIso - 1.); +} + +double GiveValueFromIndex_Log(double ValMin, double ValMax, int NbIso, int Iso) +{ + if(NbIso == 1) + return (ValMax + ValMin) / 2.; + if(ValMin <= 0.) + return 0.; + return pow(10., log10(ValMin) + + Iso * (log10(ValMax) - log10(ValMin)) / (NbIso - 1.)); +} + +double GiveValueFromIndex_DoubleLog(double ValMin, double ValMax, int NbIso, + int Iso) +{ + if(NbIso == 1) + return (ValMax + ValMin) / 2.; + if(ValMin <= 0.) + return 0.; + + double Iso2 = Iso / 2.; + double NbIso2 = NbIso / 2.; + + return pow(10., log10(ValMin) + + Iso2 * (log10(ValMax) - log10(ValMin)) / (NbIso2 - 1.)); +} + +// Give Index From Value + +int GiveIndexFromValue_Lin(double ValMin, double ValMax, int NbIso, + double Val) +{ + if(ValMin == ValMax) + return NbIso / 2; + return (int)((Val - ValMin) * (NbIso - 1) / (ValMax - ValMin)); +} + +int GiveIndexFromValue_Log(double ValMin, double ValMax, int NbIso, + double Val) +{ + if(ValMin == ValMax) + return NbIso / 2; + if(ValMin <= 0.) + return 0; + return (int)((log10(Val) - log10(ValMin)) * (NbIso - 1) / + (log10(ValMax) - log10(ValMin))); +} + +int GiveIndexFromValue_DoubleLog(double ValMin, double ValMax, int NbIso, + double Val) +{ + // JF: this is obviously wrong... + if(ValMin == ValMax) + return NbIso / 2; + if(ValMin <= 0.) + return 0; + return (int)((log10(Val) - log10(ValMin)) * (NbIso - 1) / + (log10(ValMax) - log10(ValMin))); +} + + +// Color Palette + +unsigned int PaletteContinuous(Post_View * v, double min, double max, double val) +{ /* val in [min,max] */ + int index = v->GIFV(min, max, v->CT.size, val); + glColor4ubv((GLubyte *) & v->CT.table[index]); + return v->CT.table[index]; +} + +unsigned int PaletteContinuousLinear(Post_View * v, double min, double max, double val) +{ /* val in [min,max] */ + int index = GiveIndexFromValue_Lin(min, max, v->CT.size, val); + glColor4ubv((GLubyte *) & v->CT.table[index]); + return v->CT.table[index]; +} + +unsigned int PaletteDiscrete(Post_View * v, int nbi, int i) +{ /* i in [0,nbi-1] */ + int index; + + index = (nbi == 1) ? + v->CT.size / 2 : (int)(i / (double)(nbi - 1) * (v->CT.size - 1) + 0.5); + + glColor4ubv((GLubyte *) & v->CT.table[index]); + return v->CT.table[index]; +} + +// Get values from a compatible external view (i.e., a view that has +// the same number of elements as the {type,refcomp} list in the +// reference view, and the same number of time steps) + +int GetValuesFromExternalView(Post_View *v, int type, int refcomp, + int *nbcomp, double **vals, int viewIndex) +{ + Post_View **vv = (Post_View **) List_Pointer_Test(CTX.post.list, viewIndex); + + if(!vv){ + if(!v->ExternalElementIndex) + Msg(GERROR, "Nonexistent external view: drawing self instead"); + return 0; + } + + Post_View *v2 = *vv; + int nbelm = 0, comp = 0, nbnod = 0, ref; + List_T *l = NULL; + + switch(type){ + case POST_POINT: + nbnod = 1; + ref = (refcomp == 1) ? v->NbSP : ((refcomp == 3) ? v->NbVP : v->NbTP); + if(ref == v2->NbSP){ nbelm = v2->NbSP; l = v2->SP; comp = 1; } + else if(ref == v2->NbVP){ nbelm = v2->NbVP; l = v2->VP; comp = 3; } + else if(ref == v2->NbTP){ nbelm = v2->NbTP; l = v2->TP; comp = 9; } + break; + case POST_LINE: + nbnod = 2; + ref = (refcomp == 1) ? v->NbSL : ((refcomp == 3) ? v->NbVL : v->NbTL); + if(ref == v2->NbSL){ nbelm = v2->NbSL; l = v2->SL; comp = 1; } + else if(ref == v2->NbVL){ nbelm = v2->NbVL; l = v2->VL; comp = 3; } + else if(ref == v2->NbTL){ nbelm = v2->NbTL; l = v2->TL; comp = 9; } + break; + case POST_TRIANGLE: + nbnod = 3; + ref = (refcomp == 1) ? v->NbST : ((refcomp == 3) ? v->NbVT : v->NbTT); + if(ref == v2->NbST){ nbelm = v2->NbST; l = v2->ST; comp = 1; } + else if(ref == v2->NbVT){ nbelm = v2->NbVT; l = v2->VT; comp = 3; } + else if(ref == v2->NbTT){ nbelm = v2->NbTT; l = v2->TT; comp = 9; } + break; + case POST_QUADRANGLE: + nbnod = 4; + ref = (refcomp == 1) ? v->NbSQ : ((refcomp == 3) ? v->NbVQ : v->NbTQ); + if(ref == v2->NbSQ){ nbelm = v2->NbSQ; l = v2->SQ; comp = 1; } + else if(ref == v2->NbVQ){ nbelm = v2->NbVQ; l = v2->VQ; comp = 3; } + else if(ref == v2->NbTQ){ nbelm = v2->NbTQ; l = v2->TQ; comp = 9; } + break; + case POST_TETRAHEDRON: + nbnod = 4; + ref = (refcomp == 1) ? v->NbSS : ((refcomp == 3) ? v->NbVS : v->NbTS); + if(ref == v2->NbSS){ nbelm = v2->NbSS; l = v2->SS; comp = 1; } + else if(ref == v2->NbVS){ nbelm = v2->NbVS; l = v2->VS; comp = 3; } + else if(ref == v2->NbTS){ nbelm = v2->NbTS; l = v2->TS; comp = 9; } + break; + case POST_HEXAHEDRON: + nbnod = 8; + ref = (refcomp == 1) ? v->NbSH : ((refcomp == 3) ? v->NbVH : v->NbTH); + if(ref == v2->NbSH){ nbelm = v2->NbSH; l = v2->SH; comp = 1; } + else if(ref == v2->NbVH){ nbelm = v2->NbVH; l = v2->VH; comp = 3; } + else if(ref == v2->NbTH){ nbelm = v2->NbTH; l = v2->TH; comp = 9; } + break; + case POST_PRISM: + nbnod = 6; + ref = (refcomp == 1) ? v->NbSI : ((refcomp == 3) ? v->NbVI : v->NbTI); + if(ref == v2->NbSI){ nbelm = v2->NbSI; l = v2->SI; comp = 1; } + else if(ref == v2->NbVI){ nbelm = v2->NbVI; l = v2->VI; comp = 3; } + else if(ref == v2->NbTI){ nbelm = v2->NbTI; l = v2->TI; comp = 9; } + break; + case POST_PYRAMID: + nbnod = 5; + ref = (refcomp == 1) ? v->NbSY : ((refcomp == 3) ? v->NbVY : v->NbTY); + if(ref == v2->NbSY){ nbelm = v2->NbSY; l = v2->SY; comp = 1; } + else if(ref == v2->NbVY){ nbelm = v2->NbVY; l = v2->VY; comp = 3; } + else if(ref == v2->NbTY){ nbelm = v2->NbTY; l = v2->TY; comp = 9; } + break; + } + + if(!l || !nbelm || v2->NbTimeStep != v->NbTimeStep || + v->ExternalElementIndex < 0 || v->ExternalElementIndex >= nbelm){ + if(!v->ExternalElementIndex) + Msg(GERROR, "Incompatible external view: drawing self instead"); + return 0; + } + + int nb = List_Nbr(l) / nbelm; + *nbcomp = comp; + *vals = (double *)List_Pointer(l, v->ExternalElementIndex * nb + + 3 * nbnod + comp * nbnod * v->TimeStep); + return 1; +} + +// Compute node coordinates taking Offset, Raise and Explode into account + +void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, + double *x1, double *y1, double *z1, double *vals, + double *x2, double *y2, double *z2, + int offset, int raise, int transform) +{ + if(v->Explode == 1.) { + for(int i = 0; i < nbnod; i++) { + x2[i] = x1[i]; + y2[i] = y1[i]; + z2[i] = z1[i]; + } + } + else { + double xc = 0., yc = 0., zc = 0.; + for(int i = 0; i < nbnod; i++) { + xc += x1[i]; + yc += y1[i]; + zc += z1[i]; + } + xc /= (double)nbnod; + yc /= (double)nbnod; + zc /= (double)nbnod; + for(int i = 0; i < nbnod; i++) { + x2[i] = xc + v->Explode * (x1[i] - xc); + y2[i] = yc + v->Explode * (y1[i] - yc); + z2[i] = zc + v->Explode * (z1[i] - zc); + } + } + + if(transform){ + for(int i = 0; i < nbnod; i++) { + double x = x2[i], y = y2[i], z = z2[i]; + x2[i] = v->Transform[0][0] * x + v->Transform[0][1] * y + v->Transform[0][2] * z; + y2[i] = v->Transform[1][0] * x + v->Transform[1][1] * y + v->Transform[1][2] * z; + z2[i] = v->Transform[2][0] * x + v->Transform[2][1] * y + v->Transform[2][2] * z; + } + } + + if(offset){ + for(int i = 0; i < nbnod; i++) { + x2[i] += v->Offset[0]; + y2[i] += v->Offset[1]; + z2[i] += v->Offset[2]; + } + } + + if(raise){ + for(int i = 0; i < nbnod; i++){ + double norm = 0.; + if(nbcomp == 1) + norm = vals[i]; + else if(nbcomp == 3) + norm = sqrt(vals[3*i] * vals[3*i] + + vals[3*i+1] * vals[3*i+1] + + vals[3*i+2] * vals[3*i+2]); + else if(nbcomp == 9) + norm = ComputeVonMises(vals + 9*i); + x2[i] += v->Raise[0] * norm; + y2[i] += v->Raise[1] * norm; + z2[i] += v->Raise[2] * norm; + } + } + + if(v->UseGenRaise){ + int ext_nbcomp = nbcomp; + double *ext_vals = vals; + if(v->ViewIndexForGenRaise >= 0) + GetValuesFromExternalView(v, type, nbcomp, &ext_nbcomp, &ext_vals, + v->ViewIndexForGenRaise); + ApplyGeneralizedRaise(v, nbnod, ext_nbcomp, ext_vals, x2, y2, z2); + } + + for(int i = 0; i < nbnod; i++){ + if(x2[i] < v->TmpBBox[0]) v->TmpBBox[0] = x2[i]; + if(x2[i] > v->TmpBBox[1]) v->TmpBBox[1] = x2[i]; + if(y2[i] < v->TmpBBox[2]) v->TmpBBox[2] = y2[i]; + if(y2[i] > v->TmpBBox[3]) v->TmpBBox[3] = y2[i]; + if(z2[i] < v->TmpBBox[4]) v->TmpBBox[4] = z2[i]; + if(z2[i] > v->TmpBBox[5]) v->TmpBBox[5] = z2[i]; + } +} + +// Compare barycenters with viewpoint (eye) + +static double storedEye[3] = { 0., 0., 0. }; + +int changedEye() +{ + double zeye = 100 * CTX.lc, tmp[3]; + tmp[0] = CTX.rot[2] * zeye; + tmp[1] = CTX.rot[6] * zeye; + tmp[2] = CTX.rot[10] * zeye; + if(fabs(tmp[0] - storedEye[0]) > 1.e-3 || + fabs(tmp[1] - storedEye[1]) > 1.e-3 || + fabs(tmp[2] - storedEye[2]) > 1.e-3) { + storedEye[0] = tmp[0]; + storedEye[1] = tmp[1]; + storedEye[2] = tmp[2]; + Msg(DEBUG, "New eye = (%g %g %g)", tmp[0], tmp[1], tmp[2]); + return 1; + } + return 0; +} + +int compareEye(double *q, double *w, int nbnodes) +{ + double d, dq, dw, cgq[3] = { 0., 0., 0. }, cgw[3] = { 0., 0., 0.}; + for(int i = 0; i < nbnodes; i++) { + cgq[0] += q[i]; + cgq[1] += q[i + nbnodes]; + cgq[2] += q[i + 2 * nbnodes]; + cgw[0] += w[i]; + cgw[1] += w[i + nbnodes]; + cgw[2] += w[i + 2 * nbnodes]; + } + prosca(storedEye, cgq, &dq); + prosca(storedEye, cgw, &dw); + d = dq - dw; + if(d > 0) + return 1; + if(d < 0) + return -1; + return 0; +} + +int compareEye3Nodes(const void *a, const void *b) +{ + return compareEye((double *)a, (double *)b, 3); +} + +int compareEye4Nodes(const void *a, const void *b) +{ + return compareEye((double *)a, (double *)b, 4); +} + +int compareEye5Nodes(const void *a, const void *b) +{ + return compareEye((double *)a, (double *)b, 5); +} + +int compareEye6Nodes(const void *a, const void *b) +{ + return compareEye((double *)a, (double *)b, 6); +} + +int compareEye8Nodes(const void *a, const void *b) +{ + return compareEye((double *)a, (double *)b, 8); +} + +// Draw_Post + +void Draw_List(Post_View * v, double ValMin, double ValMax, int type, + List_T * list, int nbelm, int nbnod, int nbcomp, + void (*draw) (Post_View *, int, double, double, double *, + double *, double *, double *)) +{ + int i, nb, offset = 0, raise = 0, transform = 0; + double X[8], Y[8], Z[8]; + + // do we need to apply an offset? + if(v->Offset[0] || v->Offset[1] || v->Offset[2]) + offset = 1; + + // do we need to apply a simple raise? + if(v->Raise[0] || v->Raise[1] || v->Raise[2]) + raise = 1; + + // do we need to apply a general transformation? + if(v->Transform[0][0] != 1. || v->Transform[0][1] != 0. || v->Transform[0][2] != 0. || + v->Transform[1][0] != 0. || v->Transform[1][1] != 1. || v->Transform[1][2] != 0. || + v->Transform[2][0] != 0. || v->Transform[2][1] != 0. || v->Transform[2][2] != 1.) + transform = 1; + + if(nbelm) { + nb = List_Nbr(list) / nbelm; + + if(v->Light && v->SmoothNormals && v->Changed) { + Msg(DEBUG, "Preprocessing of normals in View[%d]", v->Index); + v->ExternalElementIndex = 0; + for(i = 0; i < List_Nbr(list); i += nb) { + Get_Coords(v, type, nbnod, nbcomp, + (double *)List_Pointer_Fast(list, i), + (double *)List_Pointer_Fast(list, i + nbnod), + (double *)List_Pointer_Fast(list, i + 2 * nbnod), + (double *)List_Pointer_Fast(list, i + 3 * nbnod + + v->TimeStep * nbnod * nbcomp), + X, Y, Z, offset, raise, transform); + draw(v, 1, ValMin, ValMax, X, Y, Z, + (double *)List_Pointer_Fast(list, i + 3 * nbnod)); + v->ExternalElementIndex++; + } + } + + v->ExternalElementIndex = 0; + for(i = 0; i < List_Nbr(list); i += nb) { + Get_Coords(v, type, nbnod, nbcomp, + (double *)List_Pointer_Fast(list, i), + (double *)List_Pointer_Fast(list, i + nbnod), + (double *)List_Pointer_Fast(list, i + 2 * nbnod), + (double *)List_Pointer_Fast(list, i + 3 * nbnod + + v->TimeStep * nbnod * nbcomp), + X, Y, Z, offset, raise, transform); + draw(v, 0, ValMin, ValMax, X, Y, Z, + (double *)List_Pointer_Fast(list, i + 3 * nbnod)); + v->ExternalElementIndex++; + } + } +} + +// We try to estimate how many primitives will end up in the vertex +// arrays, since reallocating the arrays takes a HUGE amount of time +// on Windows/Cygwin. A better way would be to slightly redesign the +// drawing routines so we can have different pre-processing steps +// (like the one we have for smooth normals right now), in order to +// count how many primitives we will have. + +int EstimateNumTri(Post_View *v) +{ + int tris = v->NbST + v->NbVT + v->NbTT; + int quads = v->NbSQ + v->NbVQ + v->NbTQ; + int tets = v->NbSS + v->NbVS + v->NbTS; + int prisms = v->NbSI + v->NbVI + v->NbTI; + int pyrs = v->NbSY + v->NbVY + v->NbTY; + int hexas = v->NbSH + v->NbVH + v->NbTH; + + int heuristic = 0; + if(v->IntervalsType == DRAW_POST_ISO) + heuristic = (tets + prisms + pyrs + hexas) / 10; + else if(v->IntervalsType == DRAW_POST_CONTINUOUS) + heuristic = (tris + 2 * quads + 6 * tets + + 8 * prisms + 6 * pyrs + 12 * hexas); + else if(v->IntervalsType == DRAW_POST_DISCRETE) + heuristic = (tris + 2 * quads + 6 * tets + + 8 * prisms + 6 * pyrs + 12 * hexas) * 2; + + return heuristic + 10000; +} + +int EstimateNumLin(Post_View *v) +{ + return 10000; +} + +void Draw_Post_Old(void) +{ + int nb; + double ValMin = 0., ValMax = 0.; + Post_View *v; + + // draw any plugin-specific stuff + if(CTX.post.plugin_draw_function) + (*CTX.post.plugin_draw_function)(); + + if(!CTX.post.list) + return; + + if(CTX.draw_bbox || !CTX.post.draw) { + for(int iView = 0; iView < List_Nbr(CTX.post.list); iView++) { + v = *(Post_View **) List_Pointer(CTX.post.list, iView); + // draw only the bbox of visible 3D views + if(v->Visible && v->Type == DRAW_POST_3D) { + glColor4ubv((GLubyte *) & CTX.color.fg); + glLineWidth(CTX.line_width); + gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); + Draw_Box(v->BBox[0], v->BBox[2], v->BBox[4], + v->BBox[1], v->BBox[3], v->BBox[5]); + glColor3d(1.,0.,0.); + for(int i = 0; i < 6; i++) + if(CTX.clip[i] & (1<<(2+iView))) + Draw_PlaneInBoundingBox(v->BBox[0], v->BBox[2], v->BBox[4], + v->BBox[1], v->BBox[3], v->BBox[5], + CTX.clip_plane[i][0], CTX.clip_plane[i][1], + CTX.clip_plane[i][2], CTX.clip_plane[i][3]); + } + } + } + + if(!CTX.post.draw) + return; + + for(int iView = 0; iView < List_Nbr(CTX.post.list); iView++) { + + v = *(Post_View **) List_Pointer(CTX.post.list, iView); + + if(v->Visible && !v->Dirty) { + + glPointSize(v->PointSize); + gl2psPointSize(v->PointSize * CTX.print.eps_point_size_factor); + + glLineWidth(v->LineWidth); + gl2psLineWidth(v->LineWidth * CTX.print.eps_line_width_factor); + + if(v->LightTwoSide) + glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + else + glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); + + for(int i = 0; i < 6; i++) + if(CTX.clip[i] & (1<<(2+iView))) + glEnable((GLenum)(GL_CLIP_PLANE0 + i)); + else + glDisable((GLenum)(GL_CLIP_PLANE0 + i)); + + switch (v->RangeType) { + case DRAW_POST_RANGE_DEFAULT: + ValMin = v->Min; + ValMax = v->Max; + break; + case DRAW_POST_RANGE_CUSTOM: + ValMin = v->CustomMin; + ValMax = v->CustomMax; + break; + case DRAW_POST_RANGE_PER_STEP: + if(v->TimeStepMin && v->TimeStepMax){ + ValMin = v->TimeStepMin[v->TimeStep]; + ValMax = v->TimeStepMax[v->TimeStep]; + } + else{ // possible if the view is empty + ValMin = v->Min; + ValMax = v->Max; + } + break; + } + v->ExternalMin = ValMin; + v->ExternalMax = ValMax; + + switch (v->ScaleType) { + case DRAW_POST_LINEAR: + v->GIFV = GiveIndexFromValue_Lin; + v->GVFI = GiveValueFromIndex_Lin; + break; + case DRAW_POST_LOGARITHMIC: + v->GIFV = GiveIndexFromValue_Log; + v->GVFI = GiveValueFromIndex_Log; + break; + case DRAW_POST_DOUBLELOGARITHMIC: + v->GIFV = GiveIndexFromValue_DoubleLog; + v->GVFI = GiveValueFromIndex_DoubleLog; + break; + } + + if(v->Light && v->SmoothNormals && v->Changed) + v->reset_normals(); + + if(v->UseGenRaise) + InitGeneralizedRaise(v); + + if(v->Changed){ + for(int i = 0; i < 3; i++) { + v->TmpBBox[2 * i] = VAL_INF; + v->TmpBBox[2 * i + 1] = -VAL_INF; + } + } + + // initialize alpha blending for transparency + if(CTX.alpha && ColorTable_IsAlpha(&v->CT)){ + if(v->FakeTransparency){ + // simple additive blending "a la xpost": + glBlendFunc(GL_SRC_ALPHA, GL_ONE); // glBlendEquation(GL_FUNC_ADD); + // maximum intensity projection "a la volsuite": + // glBlendFunc(GL_ONE, GL_ONE); // glBlendEquation(GL_MAX); + glEnable(GL_BLEND); + glDisable(GL_DEPTH_TEST); + } + else{ + // real translucent blending (requires back-to-front traversal) + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glBlendEquation(GL_FUNC_ADD); + glEnable(GL_BLEND); + // if we don't use vertex arrays, do the sorting here - it's + // incorrect for hybrid views (use Plugin(DecomposeInSimplex) + // for that) + if(!CTX.post.vertex_arrays && v->DrawScalars && + (changedEye() || v->Changed)) { + Msg(DEBUG, "Sorting View[%d] for transparency (NO vertex array)", v->Index); + if(v->NbST && v->DrawTriangles) { + nb = List_Nbr(v->ST) / v->NbST; + qsort(v->ST->array, v->NbST, nb * sizeof(double), compareEye3Nodes); + } + if(v->NbSQ && v->DrawQuadrangles) { + nb = List_Nbr(v->SQ) / v->NbSQ; + qsort(v->SQ->array, v->NbSQ, nb * sizeof(double), compareEye4Nodes); + } + if(v->NbSS && v->DrawTetrahedra) { + nb = List_Nbr(v->SS) / v->NbSS; + qsort(v->SS->array, v->NbSS, nb * sizeof(double), compareEye4Nodes); + } + if(v->NbSH && v->DrawHexahedra) { + nb = List_Nbr(v->SH) / v->NbSH; + qsort(v->SH->array, v->NbSH, nb * sizeof(double), compareEye8Nodes); + } + if(v->NbSI && v->DrawPrisms) { + nb = List_Nbr(v->SI) / v->NbSI; + qsort(v->SI->array, v->NbSI, nb * sizeof(double), compareEye6Nodes); + } + if(v->NbSY && v->DrawPyramids) { + nb = List_Nbr(v->SY) / v->NbSY; + qsort(v->SY->array, v->NbSY, nb * sizeof(double), compareEye5Nodes); + } + } + } + } + + if(v->DrawPoints) { + if(v->Type == DRAW_POST_3D && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_POINT, v->SP, v->NbSP, 1, 1, + Draw_ScalarPoint); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_POINT, v->VP, v->NbVP, 1, 3, + Draw_VectorPoint); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_POINT, v->TP, v->NbTP, 1, 9, + Draw_TensorPoint); + } + if(v->DrawLines) { + if(v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_LINE, v->SL, v->NbSL, 2, 1, + Draw_ScalarLine); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_LINE, v->VL, v->NbVL, 2, 3, + Draw_VectorLine); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_LINE, v->TL, v->NbTL, 2, 9, + Draw_TensorLine); + } + + for(int pass = 0; pass < 2; pass++){ + int skip_2d = 0, skip_3d = 0; + if(pass == 0){ + if(CTX.post.vertex_arrays){ + if(v->Changed){ + Msg(DEBUG, "regenerate View[%d] vertex array", v->Index); + if(v->TriVertexArray) delete v->TriVertexArray; + v->TriVertexArray = new VertexArray(3, EstimateNumTri(v)); + v->TriVertexArray->fill = 1; + if(v->LinVertexArray) delete v->LinVertexArray; + v->LinVertexArray = new VertexArray(2, EstimateNumLin(v)); + v->LinVertexArray->fill = 1; + goto pass_0; + } + } + goto pass_1; + } + else{ + // don't even enter the classic data path if we don't have to + if(v->TriVertexArray || v->LinVertexArray){ + if(v->Boundary < 1 && !v->ShowElement && !v->Normals && + (!v->LineType || (v->LineType && v->IntervalsType != DRAW_POST_ISO)) && + v->IntervalsType != DRAW_POST_NUMERIC){ + Msg(DEBUG, "View[%d]: skiping 2D scalar pass alltogether", v->Index); + skip_2d = 1; + } + if(v->Boundary < 2 && !v->ShowElement && + (!v->LineType || (v->LineType && v->IntervalsType != DRAW_POST_ISO)) && + v->IntervalsType != DRAW_POST_NUMERIC){ + Msg(DEBUG, "View[%d]: skiping 3D scalar pass alltogether", v->Index); + skip_3d = 1; + } + } + } + + pass_0: + if(v->DrawTriangles) { + if(!skip_2d && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->ST, v->NbST, 3, 1, + Draw_ScalarTriangle); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->VT, v->NbVT, 3, 3, + Draw_VectorTriangle); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->TT, v->NbTT, 3, 9, + Draw_TensorTriangle); + } + if(v->DrawQuadrangles) { + if(!skip_2d && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->SQ, v->NbSQ, 4, 1, + Draw_ScalarQuadrangle); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->VQ, v->NbVQ, 4, 3, + Draw_VectorQuadrangle); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->TQ, v->NbTQ, 4, 9, + Draw_TensorQuadrangle); + } + if(v->DrawTetrahedra) { + if(!skip_3d && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->SS, v->NbSS, 4, 1, + Draw_ScalarTetrahedron); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->VS, v->NbVS, 4, 3, + Draw_VectorTetrahedron); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->TS, v->NbTS, 4, 9, + Draw_TensorTetrahedron); + } + if(v->DrawHexahedra) { + if(!skip_3d && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->SH, v->NbSH, 8, 1, + Draw_ScalarHexahedron); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->VH, v->NbVH, 8, 3, + Draw_VectorHexahedron); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->TH, v->NbTH, 8, 9, + Draw_TensorHexahedron); + } + if(v->DrawPrisms) { + if(!skip_3d && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_PRISM, v->SI, v->NbSI, 6, 1, + Draw_ScalarPrism); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_PRISM, v->VI, v->NbVI, 6, 3, + Draw_VectorPrism); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_PRISM, v->TI, v->NbTI, 6, 9, + Draw_TensorPrism); + } + if(v->DrawPyramids) { + if(!skip_3d && v->DrawScalars) + Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->SY, v->NbSY, 5, 1, + Draw_ScalarPyramid); + if(v->DrawVectors) + Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->VY, v->NbVY, 5, 3, + Draw_VectorPyramid); + if(v->DrawTensors) + Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->TY, v->NbTY, 5, 9, + Draw_TensorPyramid); + } + + pass_1: + if(v->TriVertexArray && v->TriVertexArray->fill){ + Msg(DEBUG, "View[%d]; %d tris in vertex array", + v->Index, v->TriVertexArray->getNumVertices()/3); + v->TriVertexArray->fill = 0; + } + if(v->LinVertexArray && v->LinVertexArray->fill){ + Msg(DEBUG, "View[%d]; %d segs in vertex array", + v->Index, v->LinVertexArray->getNumVertices()/2); + v->LinVertexArray->fill = 0; + } + } + + if(v->TriVertexArray && v->TriVertexArray->getNumVertices()){ + if(CTX.alpha && ColorTable_IsAlpha(&v->CT) && !v->FakeTransparency && + (changedEye() || v->Changed)){ + Msg(DEBUG, "Sorting View[%d] for transparency (WITH vertex array)", v->Index); + v->TriVertexArray->sort(storedEye); + } + + glVertexPointer(3, GL_FLOAT, 0, v->TriVertexArray->getVertexArray()); + glNormalPointer(GL_BYTE, 0, v->TriVertexArray->getNormalArray()); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, v->TriVertexArray->getColorArray()); + + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_COLOR_ARRAY); + glEnableClientState(GL_NORMAL_ARRAY); + + if(v->Light) + glEnable(GL_LIGHTING); + else + glDisableClientState(GL_NORMAL_ARRAY); + if(CTX.polygon_offset) glEnable(GL_POLYGON_OFFSET_FILL); + glDrawArrays(GL_TRIANGLES, 0, v->TriVertexArray->getNumVertices()); + glDisable(GL_POLYGON_OFFSET_FILL); + glDisable(GL_LIGHTING); + + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + } + + if(v->LinVertexArray && v->LinVertexArray->getNumVertices()){ + glVertexPointer(3, GL_FLOAT, 0, v->LinVertexArray->getVertexArray()); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, v->LinVertexArray->getColorArray()); + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_COLOR_ARRAY); + glDrawArrays(GL_LINES, 0, v->LinVertexArray->getNumVertices()); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + } + + if(v->DrawStrings) { + glColor4ubv((GLubyte *) & v->color.text3d); + Draw_Text2D3D(3, v->TimeStep, v->NbT3, v->T3D, v->T3C); + } + + for(int i = 0; i < 6; i++) + glDisable((GLenum)(GL_CLIP_PLANE0 + i)); + + if(v->Axes && v->Type == DRAW_POST_3D){ + glColor4ubv((GLubyte *) & v->color.axes); + glLineWidth(CTX.line_width); + gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); + if(!v->AxesAutoPosition){ + Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->AxesPosition); + } + else{ + int ok = 1; + for(int i = 0; i < 6; i++) { + if(fabs(v->TmpBBox[i]) == VAL_INF){ + ok = 0; + break; + } + } + if(ok) + Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->TmpBBox); + } + } + + // reset alpha blending + if(CTX.alpha){ + glDisable(GL_BLEND); + glEnable(GL_DEPTH_TEST); + } + + v->Changed = 0; + } + } +} diff --git a/Mesh/Makefile b/Mesh/Makefile index ae455eb57f295b0a2c29552caba097ec0fdf5a03..8334072528010f613ec7354c4db9454e94cc2cc4 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.178 2007-07-31 22:09:11 geuzaine Exp $ +# $Id: Makefile,v 1.179 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -80,22 +80,22 @@ Generator.o: Generator.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ ../Numeric/Numeric.h ../Common/Context.h ../Post/Views.h \ - ../Post/ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/OS.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Common/GmshDefines.h ../Geo/MVertex.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/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/ExtrudeParams.h \ - ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ - ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \ - meshGEdge.h meshGFace.h meshGRegion.h BackgroundMesh.h BoundaryLayer.h \ - HighOrder.h + ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h ../Common/OS.h ../Geo/GModel.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ + ../Geo/MVertex.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/MElement.h ../Geo/MVertex.h \ + ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ + ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ + ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \ + ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \ + ../Geo/SBoundingBox3d.h meshGEdge.h meshGFace.h meshGRegion.h \ + BackgroundMesh.h BoundaryLayer.h HighOrder.h Field.o: Field.cpp ../Mesh/BDS.h ../Geo/GFace.h ../Geo/GPoint.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ @@ -305,16 +305,17 @@ BackgroundMesh.o: BackgroundMesh.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h BackgroundMesh.h ../Common/Context.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ + BackgroundMesh.h ../Common/Context.h ../Post/OctreePost.h \ + ../Common/Octree.h ../Common/OctreeInternals.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ + ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ + ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \ ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GModel.h \ diff --git a/Parser/Makefile b/Parser/Makefile index 43c92664858daa592c0f5a2a03b711c82fda511c..92a3399b377a0ad4ab8cc7bb281ec4eaf8d8a756 100644 --- a/Parser/Makefile +++ b/Parser/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.123 2007-08-21 19:05:43 geuzaine Exp $ +# $Id: Makefile,v 1.124 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -79,24 +79,25 @@ depend: Gmsh.tab.o: Gmsh.tab.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.h \ ../Common/Options.h ../Common/Message.h ../Post/Views.h \ ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h ../Parallel/ParUtil.h ../Common/Gmsh.h \ - ../Common/Message.h ../DataStr/Malloc.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ + ../Parallel/ParUtil.h ../Common/Gmsh.h ../Common/Message.h \ + ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \ + ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ ../Common/Context.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Common/GmshDefines.h ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \ - ../Geo/SBoundingBox3d.h ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h \ - ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ + ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h \ + ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h \ + ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/ExtrudeParams.h \ + ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.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 ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \ ../Geo/GeoInterpolation.h ../Geo/Geo.h ../Mesh/Generator.h \ ../Graphics/Draw.h ../Common/Colors.h ../Common/Options.h Parser.h \ diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index 5d1e4fd9a62767ca3a50d406db08c50aea2ee46f..a111f13e494e6d3088acabac7298a0e443132635 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.151 2007-08-21 19:05:43 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.152 2007-08-24 20:14:18 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -389,9 +389,8 @@ int MergeFile(char *name, int warn_if_missing) } else if(!strncmp(header, "$PostFormat", 11) || !strncmp(header, "$View", 5)) { -#if 0 // FIXME: test new post-pro +#if 0 // test new post-pro PView *p = new PView(false); - PView::list.push_back(p); status = p->getData()->read(name); #else status = ReadView(name); diff --git a/Plugin/Makefile b/Plugin/Makefile index 12f410875bfb31764c3aa1b62d5d4e8b75d87b18..90794f94ebb16ad34350274f676dad8c51a3c4e3 100644 --- a/Plugin/Makefile +++ b/Plugin/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.127 2007-07-09 13:54:37 geuzaine Exp $ +# $Id: Makefile,v 1.128 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -71,166 +71,177 @@ depend: # DO NOT DELETE THIS LINE Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h PluginManager.h CutMap.h \ - Levelset.h CutGrid.h StreamLines.h CutPlane.h CutParametric.h \ - CutSphere.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h Extract.h \ - ExtractElements.h ExtractEdges.h HarmonicToTime.h ModulusPhase.h \ - Integrate.h Gradient.h Curl.h Divergence.h Annotate.h Remove.h \ - MakeSimplex.h Smooth.h Transform.h Triangulate.h Warp.h \ - SphericalRaise.h Eigenvectors.h Eigenvalues.h Lambda2.h Evaluate.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - Probe.h FieldView.h ../Common/Context.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h PluginManager.h CutMap.h Levelset.h CutGrid.h \ + StreamLines.h CutPlane.h CutParametric.h CutSphere.h Skin.h \ + ../DataStr/Tree.h ../DataStr/avl.h Extract.h ExtractElements.h \ + ExtractEdges.h HarmonicToTime.h ModulusPhase.h Integrate.h Gradient.h \ + Curl.h Divergence.h Annotate.h Remove.h MakeSimplex.h Smooth.h \ + Transform.h Triangulate.h Warp.h SphericalRaise.h Eigenvectors.h \ + Eigenvalues.h Lambda2.h Evaluate.h ../Post/OctreePost.h \ + ../Common/Octree.h ../Common/OctreeInternals.h Probe.h FieldView.h \ + ../Common/Context.h Levelset.o: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - MakeSimplex.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../Graphics/Iso.h ../Common/Context.h \ - ../DataStr/Malloc.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h MakeSimplex.h \ + ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h \ + ../Graphics/Iso.h ../Common/Context.h ../DataStr/Malloc.h CutPlane.o: CutPlane.cpp CutPlane.h Levelset.h Plugin.h \ ../Common/Options.h ../Common/Message.h ../Post/Views.h \ ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h ../Common/Context.h ../Common/GmshUI.h \ - ../Graphics/Draw.h + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ + ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h CutSphere.o: CutSphere.cpp CutSphere.h Levelset.h Plugin.h \ ../Common/Options.h ../Common/Message.h ../Post/Views.h \ ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h ../Common/Context.h ../Common/GmshUI.h \ - ../Graphics/Draw.h + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ + ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h CutMap.o: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ../Common/Context.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h Smooth.o: Smooth.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Smooth.h \ - ../Common/Context.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Smooth.h ../Common/Context.h CutParametric.o: CutParametric.cpp ../Post/OctreePost.h \ ../Common/Octree.h ../Common/OctreeInternals.h CutParametric.h Plugin.h \ ../Common/Options.h ../Common/Message.h ../Post/Views.h \ ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ - ../Common/GmshMatrix.h ../Common/Context.h ../Common/GmshUI.h \ - ../Graphics/Draw.h + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ + ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h Lambda2.o: Lambda2.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Lambda2.h \ - ../Common/Context.h ../Common/ShapeFunctions.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Lambda2.h ../Common/Context.h \ + ../Common/ShapeFunctions.h Eigenvectors.o: Eigenvectors.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - Eigenvectors.h ../Common/Context.h ../DataStr/Malloc.h \ - ../Numeric/EigSolve.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Eigenvectors.h \ + ../Common/Context.h ../DataStr/Malloc.h ../Numeric/EigSolve.h Eigenvalues.o: Eigenvalues.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - Eigenvalues.h ../Common/Context.h ../DataStr/Malloc.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Eigenvalues.h \ + ../Common/Context.h ../DataStr/Malloc.h StreamLines.o: StreamLines.cpp ../Post/OctreePost.h ../Common/Octree.h \ ../Common/OctreeInternals.h StreamLines.h Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ + ../Common/GmshUI.h ../Graphics/Draw.h CutGrid.o: CutGrid.cpp ../Post/OctreePost.h ../Common/Octree.h \ ../Common/OctreeInternals.h CutGrid.h Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ + ../Common/GmshUI.h ../Graphics/Draw.h Transform.o: Transform.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - Transform.h ../Common/Context.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Transform.h \ + ../Common/Context.h Triangulate.o: Triangulate.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ Plugin.h ../Common/Options.h ../Post/Views.h ../Post/ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Triangulate.h \ - ../Common/Context.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/gmshFace.h \ - ../Geo/Geo.h ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Triangulate.h ../Common/Context.h \ + ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/gmshFace.h ../Geo/Geo.h \ + ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/MVertex.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/ExtrudeParams.h \ - ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/ExtrudeParams.h ../Geo/gmshVertex.h ../Geo/Geo.h \ - ../Geo/GVertex.h ../Geo/Range.h + ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ + ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ + ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ + ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/GPoint.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \ + ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Geo/ExtrudeParams.h ../Geo/MElement.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \ + ../Geo/gmshVertex.h ../Geo/Geo.h ../Geo/GVertex.h ../Geo/Range.h Warp.o: Warp.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Warp.h \ - ../Common/Context.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Warp.h ../Common/Context.h SphericalRaise.o: SphericalRaise.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - SphericalRaise.h ../Common/Context.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h SphericalRaise.h \ + ../Common/Context.h Skin.o: Skin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Skin.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../Common/Context.h ../DataStr/Malloc.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h \ + ../Common/Context.h ../DataStr/Malloc.h Extract.o: Extract.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Extract.h \ - ../Common/Context.h ../DataStr/Malloc.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Extract.h ../Common/Context.h \ + ../DataStr/Malloc.h ExtractElements.o: ExtractElements.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ExtractElements.h ../Common/Context.h ../DataStr/Malloc.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ExtractElements.h \ + ../Common/Context.h ../DataStr/Malloc.h ExtractEdges.o: ExtractEdges.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ExtractEdges.h ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \ + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ExtractEdges.h \ + ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \ ../DataStr/Malloc.h ../Mesh/BDS.h ../Geo/GFace.h ../Geo/GPoint.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/ExtrudeParams.h \ - ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/ExtrudeParams.h + ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ + ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Geo/ExtrudeParams.h ../Geo/MElement.h \ + ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h MakeSimplex.o: MakeSimplex.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - MakeSimplex.h ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \ + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h MakeSimplex.h \ + ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \ ../DataStr/Malloc.h Evaluate.o: Evaluate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Evaluate.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - ../Common/Context.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Evaluate.h ../Post/OctreePost.h \ + ../Common/Octree.h ../Common/OctreeInternals.h ../Common/Context.h FieldView.o: FieldView.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ../Mesh/Field.h ../Geo/Geo.h ../Common/GmshDefines.h \ - ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Mesh/Field.h \ + ../Geo/Geo.h ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ + ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../DataStr/Tree.h \ ../DataStr/avl.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GEdge.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ @@ -244,50 +255,57 @@ FieldView.o: FieldView.cpp Plugin.h ../Common/Options.h \ ../Common/ShapeFunctions.h Integrate.o: Integrate.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - Integrate.h ../Common/Context.h ../Common/ShapeFunctions.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Integrate.h \ + ../Common/Context.h ../Common/ShapeFunctions.h Gradient.o: Gradient.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Gradient.h \ - ../Common/Context.h ../Common/ShapeFunctions.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Gradient.h ../Common/Context.h \ + ../Common/ShapeFunctions.h Curl.o: Curl.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Curl.h \ - ../Common/Context.h ../Common/ShapeFunctions.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Curl.h ../Common/Context.h \ + ../Common/ShapeFunctions.h Divergence.o: Divergence.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - Divergence.h ../Common/Context.h ../Common/ShapeFunctions.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Divergence.h \ + ../Common/Context.h ../Common/ShapeFunctions.h Annotate.o: Annotate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Annotate.h \ - ../Common/Context.h ../Common/GmshUI.h ../Fltk/GUI.h \ - ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \ - ../Fltk/Popup_Button.h ../Fltk/SpherePosition_Widget.h \ - ../Graphics/Draw.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Annotate.h ../Common/Context.h \ + ../Common/GmshUI.h ../Fltk/GUI.h ../Fltk/Opengl_Window.h \ + ../Fltk/Colorbar_Window.h ../Fltk/Popup_Button.h \ + ../Fltk/SpherePosition_Widget.h ../Graphics/Draw.h Remove.o: Remove.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \ - ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Remove.h \ - ../Common/Context.h + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ + ../Common/GmshMatrix.h Remove.h ../Common/Context.h Probe.o: Probe.cpp Probe.h Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ + ../Common/GmshUI.h ../Graphics/Draw.h ../Post/OctreePost.h \ + ../Common/Octree.h ../Common/OctreeInternals.h HarmonicToTime.o: HarmonicToTime.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - HarmonicToTime.h ../Common/Context.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h HarmonicToTime.h \ + ../Common/Context.h ModulusPhase.o: ModulusPhase.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ - ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \ - ModulusPhase.h ../Common/Context.h + ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ModulusPhase.h \ + ../Common/Context.h diff --git a/Post/Makefile b/Post/Makefile index ebdc8a8c2980c7b1ec025d8f2408b4bfedda5c5b..c6e40f615df926ec6a46923889ba1f1b9f2072a6 100644 --- a/Post/Makefile +++ b/Post/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.5 2007-08-24 08:38:24 remacle Exp $ +# $Id: Makefile,v 1.6 2007-08-24 20:14:18 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -59,58 +59,22 @@ depend: rm -f Makefile.new # DO NOT DELETE THIS LINE -PView.o: PView.cpp PView.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h AdaptiveViews.h ../DataStr/List.h \ - ../Common/GmshMatrix.h /sw//include/gsl/gsl_linalg.h \ - /sw//include/gsl/gsl_mode.h /sw//include/gsl/gsl_permutation.h \ - /sw//include/gsl/gsl_types.h /sw//include/gsl/gsl_errno.h \ - /sw//include/gsl/gsl_check_range.h /sw//include/gsl/gsl_vector.h \ - /sw//include/gsl/gsl_vector_complex_long_double.h \ - /sw//include/gsl/gsl_complex.h \ - /sw//include/gsl/gsl_vector_long_double.h \ - /sw//include/gsl/gsl_block_long_double.h \ - /sw//include/gsl/gsl_vector_complex.h \ - /sw//include/gsl/gsl_block_complex_long_double.h \ - /sw//include/gsl/gsl_vector_complex_double.h \ - /sw//include/gsl/gsl_vector_double.h \ - /sw//include/gsl/gsl_block_double.h \ - /sw//include/gsl/gsl_block_complex_double.h \ - /sw//include/gsl/gsl_vector_complex_float.h \ - /sw//include/gsl/gsl_vector_float.h /sw//include/gsl/gsl_block_float.h \ - /sw//include/gsl/gsl_block_complex_float.h \ - /sw//include/gsl/gsl_vector_ulong.h /sw//include/gsl/gsl_block_ulong.h \ - /sw//include/gsl/gsl_vector_long.h /sw//include/gsl/gsl_block_long.h \ - /sw//include/gsl/gsl_vector_uint.h /sw//include/gsl/gsl_block_uint.h \ - /sw//include/gsl/gsl_vector_int.h /sw//include/gsl/gsl_block_int.h \ - /sw//include/gsl/gsl_vector_ushort.h \ - /sw//include/gsl/gsl_block_ushort.h /sw//include/gsl/gsl_vector_short.h \ - /sw//include/gsl/gsl_block_short.h /sw//include/gsl/gsl_vector_uchar.h \ - /sw//include/gsl/gsl_block_uchar.h /sw//include/gsl/gsl_vector_char.h \ - /sw//include/gsl/gsl_block_char.h /sw//include/gsl/gsl_matrix.h \ - /sw//include/gsl/gsl_matrix_complex_long_double.h \ - /sw//include/gsl/gsl_matrix_complex_double.h \ - /sw//include/gsl/gsl_matrix_complex_float.h \ - /sw//include/gsl/gsl_matrix_long_double.h \ - /sw//include/gsl/gsl_matrix_double.h \ - /sw//include/gsl/gsl_matrix_float.h /sw//include/gsl/gsl_matrix_ulong.h \ - /sw//include/gsl/gsl_matrix_long.h /sw//include/gsl/gsl_matrix_uint.h \ - /sw//include/gsl/gsl_matrix_int.h /sw//include/gsl/gsl_matrix_ushort.h \ - /sw//include/gsl/gsl_matrix_short.h /sw//include/gsl/gsl_matrix_uchar.h \ - /sw//include/gsl/gsl_matrix_char.h /sw//include/gsl/gsl_blas.h \ - /sw//include/gsl/gsl_blas_types.h /sw//include/gsl/gsl_cblas.h \ - PViewData.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Common/GmshDefines.h ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Context.h \ - ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \ - ../Geo/SBoundingBox3d.h PViewOptions.h ColorTable.h ../Common/Message.h +PView.o: PView.cpp PView.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h PViewData.h \ + ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Common/GmshDefines.h ../Geo/MVertex.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/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Context.h ../Geo/ExtrudeParams.h \ + ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \ + PViewOptions.h ColorTable.h ../Common/Message.h PViewData.o: PViewData.cpp PViewData.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ @@ -126,229 +90,46 @@ PViewData.o: PViewData.cpp PViewData.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h -PViewIO.o: PViewIO.cpp PView.h ../Common/VertexArray.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h AdaptiveViews.h \ - ../DataStr/List.h ../Common/GmshMatrix.h /sw//include/gsl/gsl_linalg.h \ - /sw//include/gsl/gsl_mode.h /sw//include/gsl/gsl_permutation.h \ - /sw//include/gsl/gsl_types.h /sw//include/gsl/gsl_errno.h \ - /sw//include/gsl/gsl_check_range.h /sw//include/gsl/gsl_vector.h \ - /sw//include/gsl/gsl_vector_complex_long_double.h \ - /sw//include/gsl/gsl_complex.h \ - /sw//include/gsl/gsl_vector_long_double.h \ - /sw//include/gsl/gsl_block_long_double.h \ - /sw//include/gsl/gsl_vector_complex.h \ - /sw//include/gsl/gsl_block_complex_long_double.h \ - /sw//include/gsl/gsl_vector_complex_double.h \ - /sw//include/gsl/gsl_vector_double.h \ - /sw//include/gsl/gsl_block_double.h \ - /sw//include/gsl/gsl_block_complex_double.h \ - /sw//include/gsl/gsl_vector_complex_float.h \ - /sw//include/gsl/gsl_vector_float.h /sw//include/gsl/gsl_block_float.h \ - /sw//include/gsl/gsl_block_complex_float.h \ - /sw//include/gsl/gsl_vector_ulong.h /sw//include/gsl/gsl_block_ulong.h \ - /sw//include/gsl/gsl_vector_long.h /sw//include/gsl/gsl_block_long.h \ - /sw//include/gsl/gsl_vector_uint.h /sw//include/gsl/gsl_block_uint.h \ - /sw//include/gsl/gsl_vector_int.h /sw//include/gsl/gsl_block_int.h \ - /sw//include/gsl/gsl_vector_ushort.h \ - /sw//include/gsl/gsl_block_ushort.h /sw//include/gsl/gsl_vector_short.h \ - /sw//include/gsl/gsl_block_short.h /sw//include/gsl/gsl_vector_uchar.h \ - /sw//include/gsl/gsl_block_uchar.h /sw//include/gsl/gsl_vector_char.h \ - /sw//include/gsl/gsl_block_char.h /sw//include/gsl/gsl_matrix.h \ - /sw//include/gsl/gsl_matrix_complex_long_double.h \ - /sw//include/gsl/gsl_matrix_complex_double.h \ - /sw//include/gsl/gsl_matrix_complex_float.h \ - /sw//include/gsl/gsl_matrix_long_double.h \ - /sw//include/gsl/gsl_matrix_double.h \ - /sw//include/gsl/gsl_matrix_float.h /sw//include/gsl/gsl_matrix_ulong.h \ - /sw//include/gsl/gsl_matrix_long.h /sw//include/gsl/gsl_matrix_uint.h \ - /sw//include/gsl/gsl_matrix_int.h /sw//include/gsl/gsl_matrix_ushort.h \ - /sw//include/gsl/gsl_matrix_short.h /sw//include/gsl/gsl_matrix_uchar.h \ - /sw//include/gsl/gsl_matrix_char.h /sw//include/gsl/gsl_blas.h \ - /sw//include/gsl/gsl_blas_types.h /sw//include/gsl/gsl_cblas.h \ - PViewData.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Common/GmshDefines.h ../Geo/MVertex.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/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Context.h \ - ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \ - ../Geo/SBoundingBox3d.h PViewOptions.h ColorTable.h ../Common/Message.h +PViewIO.o: PViewIO.cpp PView.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \ + AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h PViewData.h \ + ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Common/GmshDefines.h ../Geo/MVertex.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/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Common/Context.h ../Geo/ExtrudeParams.h \ + ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \ + PViewOptions.h ColorTable.h ../Common/Message.h Views.o: Views.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ ../Numeric/Numeric.h Views.h ColorTable.h ../Common/VertexArray.h \ - ../Common/SmoothData.h AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw//include/gsl/gsl_linalg.h /sw//include/gsl/gsl_mode.h \ - /sw//include/gsl/gsl_permutation.h /sw//include/gsl/gsl_types.h \ - /sw//include/gsl/gsl_errno.h /sw//include/gsl/gsl_check_range.h \ - /sw//include/gsl/gsl_vector.h \ - /sw//include/gsl/gsl_vector_complex_long_double.h \ - /sw//include/gsl/gsl_complex.h \ - /sw//include/gsl/gsl_vector_long_double.h \ - /sw//include/gsl/gsl_block_long_double.h \ - /sw//include/gsl/gsl_vector_complex.h \ - /sw//include/gsl/gsl_block_complex_long_double.h \ - /sw//include/gsl/gsl_vector_complex_double.h \ - /sw//include/gsl/gsl_vector_double.h \ - /sw//include/gsl/gsl_block_double.h \ - /sw//include/gsl/gsl_block_complex_double.h \ - /sw//include/gsl/gsl_vector_complex_float.h \ - /sw//include/gsl/gsl_vector_float.h /sw//include/gsl/gsl_block_float.h \ - /sw//include/gsl/gsl_block_complex_float.h \ - /sw//include/gsl/gsl_vector_ulong.h /sw//include/gsl/gsl_block_ulong.h \ - /sw//include/gsl/gsl_vector_long.h /sw//include/gsl/gsl_block_long.h \ - /sw//include/gsl/gsl_vector_uint.h /sw//include/gsl/gsl_block_uint.h \ - /sw//include/gsl/gsl_vector_int.h /sw//include/gsl/gsl_block_int.h \ - /sw//include/gsl/gsl_vector_ushort.h \ - /sw//include/gsl/gsl_block_ushort.h /sw//include/gsl/gsl_vector_short.h \ - /sw//include/gsl/gsl_block_short.h /sw//include/gsl/gsl_vector_uchar.h \ - /sw//include/gsl/gsl_block_uchar.h /sw//include/gsl/gsl_vector_char.h \ - /sw//include/gsl/gsl_block_char.h /sw//include/gsl/gsl_matrix.h \ - /sw//include/gsl/gsl_matrix_complex_long_double.h \ - /sw//include/gsl/gsl_matrix_complex_double.h \ - /sw//include/gsl/gsl_matrix_complex_float.h \ - /sw//include/gsl/gsl_matrix_long_double.h \ - /sw//include/gsl/gsl_matrix_double.h \ - /sw//include/gsl/gsl_matrix_float.h /sw//include/gsl/gsl_matrix_ulong.h \ - /sw//include/gsl/gsl_matrix_long.h /sw//include/gsl/gsl_matrix_uint.h \ - /sw//include/gsl/gsl_matrix_int.h /sw//include/gsl/gsl_matrix_ushort.h \ - /sw//include/gsl/gsl_matrix_short.h /sw//include/gsl/gsl_matrix_uchar.h \ - /sw//include/gsl/gsl_matrix_char.h /sw//include/gsl/gsl_blas.h \ - /sw//include/gsl/gsl_blas_types.h /sw//include/gsl/gsl_cblas.h \ - ../Common/Context.h ../Common/Options.h ../Mesh/BackgroundMesh.h \ - ../contrib/MathEval/matheval.h + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ + ../Common/Options.h ../Mesh/BackgroundMesh.h ViewsIO.o: ViewsIO.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ ../Numeric/Numeric.h Views.h ColorTable.h ../Common/VertexArray.h \ - ../Common/SmoothData.h AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw//include/gsl/gsl_linalg.h /sw//include/gsl/gsl_mode.h \ - /sw//include/gsl/gsl_permutation.h /sw//include/gsl/gsl_types.h \ - /sw//include/gsl/gsl_errno.h /sw//include/gsl/gsl_check_range.h \ - /sw//include/gsl/gsl_vector.h \ - /sw//include/gsl/gsl_vector_complex_long_double.h \ - /sw//include/gsl/gsl_complex.h \ - /sw//include/gsl/gsl_vector_long_double.h \ - /sw//include/gsl/gsl_block_long_double.h \ - /sw//include/gsl/gsl_vector_complex.h \ - /sw//include/gsl/gsl_block_complex_long_double.h \ - /sw//include/gsl/gsl_vector_complex_double.h \ - /sw//include/gsl/gsl_vector_double.h \ - /sw//include/gsl/gsl_block_double.h \ - /sw//include/gsl/gsl_block_complex_double.h \ - /sw//include/gsl/gsl_vector_complex_float.h \ - /sw//include/gsl/gsl_vector_float.h /sw//include/gsl/gsl_block_float.h \ - /sw//include/gsl/gsl_block_complex_float.h \ - /sw//include/gsl/gsl_vector_ulong.h /sw//include/gsl/gsl_block_ulong.h \ - /sw//include/gsl/gsl_vector_long.h /sw//include/gsl/gsl_block_long.h \ - /sw//include/gsl/gsl_vector_uint.h /sw//include/gsl/gsl_block_uint.h \ - /sw//include/gsl/gsl_vector_int.h /sw//include/gsl/gsl_block_int.h \ - /sw//include/gsl/gsl_vector_ushort.h \ - /sw//include/gsl/gsl_block_ushort.h /sw//include/gsl/gsl_vector_short.h \ - /sw//include/gsl/gsl_block_short.h /sw//include/gsl/gsl_vector_uchar.h \ - /sw//include/gsl/gsl_block_uchar.h /sw//include/gsl/gsl_vector_char.h \ - /sw//include/gsl/gsl_block_char.h /sw//include/gsl/gsl_matrix.h \ - /sw//include/gsl/gsl_matrix_complex_long_double.h \ - /sw//include/gsl/gsl_matrix_complex_double.h \ - /sw//include/gsl/gsl_matrix_complex_float.h \ - /sw//include/gsl/gsl_matrix_long_double.h \ - /sw//include/gsl/gsl_matrix_double.h \ - /sw//include/gsl/gsl_matrix_float.h /sw//include/gsl/gsl_matrix_ulong.h \ - /sw//include/gsl/gsl_matrix_long.h /sw//include/gsl/gsl_matrix_uint.h \ - /sw//include/gsl/gsl_matrix_int.h /sw//include/gsl/gsl_matrix_ushort.h \ - /sw//include/gsl/gsl_matrix_short.h /sw//include/gsl/gsl_matrix_uchar.h \ - /sw//include/gsl/gsl_matrix_char.h /sw//include/gsl/gsl_blas.h \ - /sw//include/gsl/gsl_blas_types.h /sw//include/gsl/gsl_cblas.h \ - ../Common/Context.h + ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ + AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \ - ../Common/GmshMatrix.h /sw//include/gsl/gsl_linalg.h \ - /sw//include/gsl/gsl_mode.h /sw//include/gsl/gsl_permutation.h \ - /sw//include/gsl/gsl_types.h /sw//include/gsl/gsl_errno.h \ - /sw//include/gsl/gsl_check_range.h /sw//include/gsl/gsl_vector.h \ - /sw//include/gsl/gsl_vector_complex_long_double.h \ - /sw//include/gsl/gsl_complex.h \ - /sw//include/gsl/gsl_vector_long_double.h \ - /sw//include/gsl/gsl_block_long_double.h \ - /sw//include/gsl/gsl_vector_complex.h \ - /sw//include/gsl/gsl_block_complex_long_double.h \ - /sw//include/gsl/gsl_vector_complex_double.h \ - /sw//include/gsl/gsl_vector_double.h \ - /sw//include/gsl/gsl_block_double.h \ - /sw//include/gsl/gsl_block_complex_double.h \ - /sw//include/gsl/gsl_vector_complex_float.h \ - /sw//include/gsl/gsl_vector_float.h /sw//include/gsl/gsl_block_float.h \ - /sw//include/gsl/gsl_block_complex_float.h \ - /sw//include/gsl/gsl_vector_ulong.h /sw//include/gsl/gsl_block_ulong.h \ - /sw//include/gsl/gsl_vector_long.h /sw//include/gsl/gsl_block_long.h \ - /sw//include/gsl/gsl_vector_uint.h /sw//include/gsl/gsl_block_uint.h \ - /sw//include/gsl/gsl_vector_int.h /sw//include/gsl/gsl_block_int.h \ - /sw//include/gsl/gsl_vector_ushort.h \ - /sw//include/gsl/gsl_block_ushort.h /sw//include/gsl/gsl_vector_short.h \ - /sw//include/gsl/gsl_block_short.h /sw//include/gsl/gsl_vector_uchar.h \ - /sw//include/gsl/gsl_block_uchar.h /sw//include/gsl/gsl_vector_char.h \ - /sw//include/gsl/gsl_block_char.h /sw//include/gsl/gsl_matrix.h \ - /sw//include/gsl/gsl_matrix_complex_long_double.h \ - /sw//include/gsl/gsl_matrix_complex_double.h \ - /sw//include/gsl/gsl_matrix_complex_float.h \ - /sw//include/gsl/gsl_matrix_long_double.h \ - /sw//include/gsl/gsl_matrix_double.h \ - /sw//include/gsl/gsl_matrix_float.h /sw//include/gsl/gsl_matrix_ulong.h \ - /sw//include/gsl/gsl_matrix_long.h /sw//include/gsl/gsl_matrix_uint.h \ - /sw//include/gsl/gsl_matrix_int.h /sw//include/gsl/gsl_matrix_ushort.h \ - /sw//include/gsl/gsl_matrix_short.h /sw//include/gsl/gsl_matrix_uchar.h \ - /sw//include/gsl/gsl_matrix_char.h /sw//include/gsl/gsl_blas.h \ - /sw//include/gsl/gsl_blas_types.h /sw//include/gsl/gsl_cblas.h \ - ../Plugin/Plugin.h ../Common/Options.h ../Common/Message.h \ - ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \ + ../Common/GmshMatrix.h ../Plugin/Plugin.h ../Common/Options.h \ + ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \ ../Common/OS.h OctreePost.o: OctreePost.cpp ../Common/Octree.h \ ../Common/OctreeInternals.h OctreePost.h ../DataStr/List.h Views.h \ - ColorTable.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h AdaptiveViews.h ../Common/GmshMatrix.h \ - /sw//include/gsl/gsl_linalg.h /sw//include/gsl/gsl_mode.h \ - /sw//include/gsl/gsl_permutation.h /sw//include/gsl/gsl_types.h \ - /sw//include/gsl/gsl_errno.h /sw//include/gsl/gsl_check_range.h \ - /sw//include/gsl/gsl_vector.h \ - /sw//include/gsl/gsl_vector_complex_long_double.h \ - /sw//include/gsl/gsl_complex.h \ - /sw//include/gsl/gsl_vector_long_double.h \ - /sw//include/gsl/gsl_block_long_double.h \ - /sw//include/gsl/gsl_vector_complex.h \ - /sw//include/gsl/gsl_block_complex_long_double.h \ - /sw//include/gsl/gsl_vector_complex_double.h \ - /sw//include/gsl/gsl_vector_double.h \ - /sw//include/gsl/gsl_block_double.h \ - /sw//include/gsl/gsl_block_complex_double.h \ - /sw//include/gsl/gsl_vector_complex_float.h \ - /sw//include/gsl/gsl_vector_float.h /sw//include/gsl/gsl_block_float.h \ - /sw//include/gsl/gsl_block_complex_float.h \ - /sw//include/gsl/gsl_vector_ulong.h /sw//include/gsl/gsl_block_ulong.h \ - /sw//include/gsl/gsl_vector_long.h /sw//include/gsl/gsl_block_long.h \ - /sw//include/gsl/gsl_vector_uint.h /sw//include/gsl/gsl_block_uint.h \ - /sw//include/gsl/gsl_vector_int.h /sw//include/gsl/gsl_block_int.h \ - /sw//include/gsl/gsl_vector_ushort.h \ - /sw//include/gsl/gsl_block_ushort.h /sw//include/gsl/gsl_vector_short.h \ - /sw//include/gsl/gsl_block_short.h /sw//include/gsl/gsl_vector_uchar.h \ - /sw//include/gsl/gsl_block_uchar.h /sw//include/gsl/gsl_vector_char.h \ - /sw//include/gsl/gsl_block_char.h /sw//include/gsl/gsl_matrix.h \ - /sw//include/gsl/gsl_matrix_complex_long_double.h \ - /sw//include/gsl/gsl_matrix_complex_double.h \ - /sw//include/gsl/gsl_matrix_complex_float.h \ - /sw//include/gsl/gsl_matrix_long_double.h \ - /sw//include/gsl/gsl_matrix_double.h \ - /sw//include/gsl/gsl_matrix_float.h /sw//include/gsl/gsl_matrix_ulong.h \ - /sw//include/gsl/gsl_matrix_long.h /sw//include/gsl/gsl_matrix_uint.h \ - /sw//include/gsl/gsl_matrix_int.h /sw//include/gsl/gsl_matrix_ushort.h \ - /sw//include/gsl/gsl_matrix_short.h /sw//include/gsl/gsl_matrix_uchar.h \ - /sw//include/gsl/gsl_matrix_char.h /sw//include/gsl/gsl_blas.h \ - /sw//include/gsl/gsl_blas_types.h /sw//include/gsl/gsl_cblas.h \ - ../Common/Message.h ../Common/ShapeFunctions.h + ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h AdaptiveViews.h \ + ../Common/GmshMatrix.h ../Common/Message.h ../Common/ShapeFunctions.h ColorTable.o: ColorTable.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ diff --git a/Post/PView.h b/Post/PView.h index 60dd9bd03944737b11cf89bdf1fa4d9510a9e3d1..85587c29600d5e425bc82faaf074d03455f968f9 100644 --- a/Post/PView.h +++ b/Post/PView.h @@ -41,9 +41,6 @@ class PView{ int _aliasOf; // flag to mark that some other views link to this one bool _links; - // flag to mark that this view is 'dirty' and should not be - // displayed - bool _dirty; // name of the view std::string _name; // name of the file the view was loaded from @@ -54,17 +51,21 @@ class PView{ PViewData *_data; public: PView(bool allocate=true) : - _num(0), _index(0), _changed(false), _aliasOf(-1), _links(false), - _dirty(true), _name(""), _filename(""), _options(0), _data(0), - va_lines(0), va_triangles(0), normals(0), adaptive(0) + _num(0), _index(0), _changed(true), _aliasOf(-1), _links(false), + _name(""), _filename(""), _options(0), _data(0), + va_points(0), va_lines(0), va_triangles(0), normals(0), adaptive(0) { _data = new PViewDataList(allocate); _options = new PViewOptions; + list.push_back(this); + // reset indices + for(unsigned int i = 0; i < list.size(); i++) list[i]->setIndex(i); } ~PView() { if(_options) delete _options; if(_data) delete _data; + if(va_points) delete va_points; if(va_lines) delete va_lines; if(va_triangles) delete va_triangles; if(normals) delete normals; @@ -80,8 +81,6 @@ class PView{ void setIndex(int val){ _index = val; } bool getChanged(){ return _changed; } void setChanged(bool val){ _changed = val; } - bool getDirty(){ return _dirty; } - void setDirty(bool val){ _dirty = val; } void setGlobalResolutionLevel(int level) { //if(adaptive) adaptive->setGlobalResolutionLevel(this, level); @@ -92,7 +91,7 @@ class PView{ } // vertex arrays to draw triangles and lines efficiently - VertexArray *va_lines, *va_triangles; + VertexArray *va_points, *va_lines, *va_triangles; // smoothed normals smooth_normals *normals; // adaptative rendering for high-order datasets diff --git a/Post/PViewData.cpp b/Post/PViewData.cpp index 82e601431f4ee16bbfd4157a356932e88049d5af..b3625057fcf80e31d534d3e43c7250e1c0699df2 100644 --- a/Post/PViewData.cpp +++ b/Post/PViewData.cpp @@ -1,4 +1,4 @@ -// $Id: PViewData.cpp,v 1.1 2007-08-21 19:05:43 geuzaine Exp $ +// $Id: PViewData.cpp,v 1.2 2007-08-24 20:14:19 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -114,6 +114,20 @@ void PViewDataList::finalize() List_Add(Time, &d); } } + + setDirty(false); +} + +double PViewDataList::getMin(int step) +{ + if(step < 0) return Min; + return TimeStepMin[step]; +} + +double PViewDataList::getMax(int step) +{ + if(step < 0) return Max; + return TimeStepMax[step]; } void PViewDataList::_stat(List_T *D, List_T *C, int nb) @@ -306,7 +320,7 @@ int PViewDataList::getNumComponents(int ele) return _lastNumComponents; } -void PViewDataList::getValue(int ele, int nod, int step, int comp, double &val) +void PViewDataList::getValue(int ele, int nod, int comp, int step, double &val) { if(ele != _lastElement) _setLast(ele); val = _lastVal[step * _lastNumNodes * _lastNumComponents + diff --git a/Post/PViewData.h b/Post/PViewData.h index be537e4e171a17530d614e33ee9566709b1eaa5a..f1d3bb3ee86ee4d8fefc5de07965caa0c9cce23a 100644 --- a/Post/PViewData.h +++ b/Post/PViewData.h @@ -31,13 +31,18 @@ // abstract interface to post-processing view data class PViewData { + private: + // flag to mark that the data is 'dirty' and should not be displayed + bool _dirty; public: - PViewData(){} + PViewData() : _dirty(true) {} virtual ~PViewData(){} + virtual bool getDirty(){ return _dirty; } + virtual void setDirty(bool val){ _dirty = val; } virtual void finalize(){} virtual int getNumTimeSteps() = 0; - virtual int getMin(int step=-1) = 0; - virtual int getMax(int step=-1) = 0; + virtual double getMin(int step=-1) = 0; + virtual double getMax(int step=-1) = 0; virtual SBoundingBox3d getBoundingBox() = 0; virtual int getNumPoints(){ return 0; } virtual int getNumLines(){ return 0; } @@ -53,7 +58,7 @@ class PViewData { virtual int getNumNodes(int ele) = 0; virtual void getNode(int ele, int nod, double &x, double &y, double &z) = 0; virtual int getNumComponents(int ele) = 0; - virtual void getValue(int ele, int node, int step, int comp, double &val) = 0; + virtual void getValue(int ele, int node, int comp, int step, double &val) = 0; virtual bool read(std::string filename){} }; @@ -101,8 +106,8 @@ class PViewDataList : public PViewData { ~PViewDataList(); void finalize(); int getNumTimeSteps(){ return NbTimeStep; } - int getMin(int step=-1){ return Min; } - int getMax(int step=-1){ return Max; } + double getMin(int step=-1); + double getMax(int step=-1); SBoundingBox3d getBoundingBox(){ return BBox; } int getNumPoints(){ return NbSP + NbVP + NbTP; } int getNumLines(){ return NbSL + NbVL + NbTL; } @@ -122,7 +127,7 @@ class PViewDataList : public PViewData { int getNumNodes(int ele); void getNode(int ele, int nod, double &x, double &y, double &z); int getNumComponents(int ele); - void getValue(int ele, int node, int step, int comp, double &val); + void getValue(int ele, int node, int comp, int step, double &val); bool read(std::string filename); }; @@ -135,15 +140,15 @@ class PViewDataGModel : public PViewData { PViewDataGModel(){} ~PViewDataGModel(){} int getNumTimeSteps(){ return 1; } - int getMin(int step=-1){ return 0.; } - int getMax(int step=-1){ return 1.; } + double getMin(int step=-1){ return 0.; } + double getMax(int step=-1){ return 1.; } SBoundingBox3d getBoundingBox(){ return SBoundingBox3d(); } int getNumElements(){ return _model->numElements(); } int getDimension(int ele){ return 0; } int getNumNodes(int ele){ return 0; } void getNode(int ele, int nod, double &x, double &y, double &z){} int getNumComponents(int ele){ return 1; } - void getValue(int ele, int node, int step, int comp, double &val){} + void getValue(int ele, int node, int comp, int step, double &val){} }; #endif diff --git a/Post/PViewOptions.cpp b/Post/PViewOptions.cpp index 57da58f2db4d07e9158c0b116f0a04524c71e8d8..b2a5f873726f58f3656ba47efb6e593a9002a510 100644 --- a/Post/PViewOptions.cpp +++ b/Post/PViewOptions.cpp @@ -1,4 +1,4 @@ -// $Id: PViewOptions.cpp,v 1.1 2007-08-21 19:05:43 geuzaine Exp $ +// $Id: PViewOptions.cpp,v 1.2 2007-08-24 20:14:19 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -72,5 +72,28 @@ PViewOptions::PViewOptions() UseGenRaise = 0; GenRaiseFactor = 0.; - GmshColorTable CT; + ColorTable_InitParam(2, &CT); + ColorTable_Recompute(&CT); +} + +// val in [min, max] +unsigned int PViewOptions::getColor(double val, double min, double max) +{ + //int index = v->GIFV(min, max, v->CT.size, val); + + if(CT.size == 1) return CT.table[0]; + + int index = (min == max) ? CT.size / 2 : + (int)((val - min) * (CT.size - 1) / (max - min)); + + return CT.table[index]; +} + +// i in [0, nb - 1] +unsigned int PViewOptions::getColor(int i, int nb) +{ + int index = (nb == 1) ? CT.size / 2 : + (int)(i / (double)(nb - 1) * (CT.size - 1) + 0.5); + + return CT.table[index]; } diff --git a/Post/PViewOptions.h b/Post/PViewOptions.h index 06c222898d2397e43ba9ee5bc06e1f952b4a5eb8..793258806e150ea962f161760ec8348da65ff96b 100644 --- a/Post/PViewOptions.h +++ b/Post/PViewOptions.h @@ -63,7 +63,7 @@ class PViewOptions { enum RangeType { Default, Custom, - PerStep + PerTimeStep }; enum ScaleType { Linear, @@ -77,7 +77,7 @@ class PViewOptions { int Axes, AxesAutoPosition, AxesTics[3]; char AxesFormat[3][256], AxesLabel[3][256]; double AxesPosition[6]; - double CustomMin, CustomMax; + double CustomMin, CustomMax, TmpMin, TmpMax; double Offset[3], Raise[3], Transform[3][3], DisplacementFactor, Explode; double ArrowSize, ArrowRelHeadRadius, ArrowRelStemRadius, ArrowRelStemLength; double Normals, Tangents; @@ -113,6 +113,8 @@ class PViewOptions { // static reference container that contains default values static PViewOptions reference; PViewOptions(); + unsigned int getColor(int i, int nb); + unsigned int getColor(double val, double min, double max); }; #endif