Skip to content
Snippets Groups Projects
Commit 3a7eb830 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

add a Universal Transverse Merctor field, add latitude / longitude and UTM...

add a Universal Transverse Merctor field, add latitude / longitude and UTM coordinates in Plugin/GSHHS.cpp
parent d3dbbcfa
No related branches found
No related tags found
No related merge requests found
# $Id: Makefile,v 1.165 2008-03-19 17:34:56 geuzaine Exp $ # $Id: Makefile,v 1.166 2008-04-06 02:33:53 remacle Exp $
# #
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -73,52 +73,47 @@ Octree.o: Octree.cpp Octree.h OctreeInternals.h ...@@ -73,52 +73,47 @@ Octree.o: Octree.cpp Octree.h OctreeInternals.h
OctreeInternals.o: OctreeInternals.cpp Message.h OctreeInternals.h OctreeInternals.o: OctreeInternals.cpp Message.h OctreeInternals.h
Options.o: Options.cpp GmshUI.h GmshDefines.h Message.h \ Options.o: Options.cpp GmshUI.h GmshDefines.h Message.h \
../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \ ../Post/PView.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
../Post/ColorTable.h ../Mesh/Generator.h Context.h Options.h \ ../Post/PViewOptions.h ../Post/ColorTable.h ../Mesh/Generator.h \
../Mesh/BackgroundMesh.h ../Plugin/PluginManager.h ../Plugin/Plugin.h \ Context.h Options.h ../Post/ColorTable.h ../Mesh/BackgroundMesh.h \
../Common/Options.h ../Common/Message.h ../Post/PViewDataList.h \ ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \
../Post/PViewData.h ../Post/AdaptiveViews.h ../DataStr/List.h \ ../Common/Message.h ../Post/PView.h ../Post/PViewDataList.h \
../Post/AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \
../Common/GmshMatrix.h ../Fltk/Solvers.h ../Fltk/GUI.h \ ../Common/GmshMatrix.h ../Fltk/Solvers.h ../Fltk/GUI.h \
../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h ../Common/GmshUI.h \ ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h ../Common/GmshUI.h \
../Fltk/Popup_Button.h ../Fltk/SpherePosition_Widget.h ../Mesh/Field.h \ ../Post/ColorTable.h ../Fltk/Popup_Button.h \
../Geo/Geo.h ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ ../Fltk/SpherePosition_Widget.h ../Mesh/Field.h ../Geo/Geo.h \
../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \ ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Numeric/NumericEmbedded.h ../DataStr/Tree.h ../DataStr/avl.h \ ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \
../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Numeric/NumericEmbedded.h ../DataStr/List.h ../DataStr/Tree.h \
../DataStr/avl.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
../Post/PView.h
CommandLine.o: CommandLine.cpp GmshUI.h GmshDefines.h GmshVersion.h \ CommandLine.o: CommandLine.cpp GmshUI.h GmshDefines.h GmshVersion.h \
Message.h ../Parser/OpenFile.h CommandLine.h Context.h Options.h \ Message.h ../Parser/OpenFile.h CommandLine.h Context.h Options.h \
../Post/ColorTable.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ ../Post/ColorTable.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/SVector3.h ../Geo/GFace.h \
../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Geo/GEdgeLoop.h ../Geo/Pair.h ../Geo/GRegion.h ../Post/PView.h \
../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h \
../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ ../Post/ColorTable.h ../Parser/CreateFile.h OS.h
../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
../Geo/SBoundingBox3d.h ../Post/PView.h ../Post/PViewData.h \
../Post/PViewOptions.h ../Post/ColorTable.h ../Parser/CreateFile.h OS.h
Gmsh.o: Gmsh.cpp ../Parser/Parser.h ../DataStr/List.h ../DataStr/Tree.h \ Gmsh.o: Gmsh.cpp ../Parser/Parser.h ../DataStr/List.h ../DataStr/Tree.h \
../DataStr/avl.h Options.h ../Post/ColorTable.h CommandLine.h OS.h \ ../DataStr/avl.h Options.h ../Post/ColorTable.h CommandLine.h OS.h \
../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \ ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \
../Common/Message.h ../Post/PView.h ../Post/PViewData.h \ ../Common/Message.h ../Post/PView.h ../Post/PViewData.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PViewOptions.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PViewOptions.h \
../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Post/ColorTable.h ../Post/PViewDataList.h ../Post/AdaptiveViews.h \
../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Numeric/Numeric.h \ ../DataStr/List.h ../Common/GmshMatrix.h ../Common/GmshMatrix.h \
../Numeric/NumericEmbedded.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h
OS.o: OS.cpp Message.h OS.o: OS.cpp Message.h
Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \ Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \
../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GEdge.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GModel.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/GFace.h ../Geo/GRegion.h ../Geo/MElement.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Parser/Parser.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h
../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SBoundingBox3d.h \
../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Parser/Parser.h \
../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h
Trackball.o: Trackball.cpp Trackball.h Trackball.o: Trackball.cpp Trackball.h
VertexArray.o: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \ VertexArray.o: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \
../Geo/SPoint3.h Context.h ../Numeric/Numeric.h \ ../Geo/SPoint3.h Context.h ../Numeric/Numeric.h \
......
This diff is collapsed.
# $Id: Makefile,v 1.198 2008-03-25 21:18:46 geuzaine Exp $ # $Id: Makefile,v 1.199 2008-04-06 02:33:53 remacle Exp $
# #
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -75,7 +75,7 @@ depend: ...@@ -75,7 +75,7 @@ depend:
# DO NOT DELETE THIS LINE # DO NOT DELETE THIS LINE
GEntity.o: GEntity.cpp GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ GEntity.o: GEntity.cpp GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
../Common/Context.h ../Common/Context.h ../Common/Context.h
GVertex.o: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \ GVertex.o: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \
SBoundingBox3d.h GPoint.h SPoint2.h GFace.h GEdgeLoop.h GEdge.h \ SBoundingBox3d.h GPoint.h SPoint2.h GFace.h GEdgeLoop.h GEdge.h \
SVector3.h Pair.h MVertex.h ../Common/Message.h SVector3.h Pair.h MVertex.h ../Common/Message.h
...@@ -92,7 +92,8 @@ GFace.o: GFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ ...@@ -92,7 +92,8 @@ GFace.o: GFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \ GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
MVertex.h MEdge.h MFace.h ../Common/Message.h ../Numeric/Numeric.h \ MVertex.h MEdge.h MFace.h ../Common/Message.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../Numeric/GaussLegendre1D.h \ ../Numeric/NumericEmbedded.h ../Numeric/GaussLegendre1D.h \
../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \
../Common/Context.h
GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \ GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
...@@ -175,8 +176,9 @@ GModelIO_Geo.o: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \ ...@@ -175,8 +176,9 @@ GModelIO_Geo.o: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \
../Common/SmoothData.h ../Parser/OpenFile.h ../DataStr/Tools.h \ ../Common/SmoothData.h ../Parser/OpenFile.h ../DataStr/Tools.h \
../DataStr/List.h ../DataStr/Tree.h ../Common/Message.h gmshVertex.h \ ../DataStr/List.h ../DataStr/Tree.h ../Common/Message.h gmshVertex.h \
MVertex.h gmshFace.h gmshEdge.h gmshRegion.h ../Parser/Parser.h \ MVertex.h gmshFace.h gmshEdge.h gmshRegion.h ../Parser/Parser.h \
../Mesh/Field.h ../Geo/Geo.h ../Post/PView.h ../Post/PViewData.h \ ../DataStr/List.h ../DataStr/Tree.h ../Mesh/Field.h ../Geo/Geo.h \
../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PView.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
../Post/PViewOptions.h ../Post/ColorTable.h
GModelIO_Mesh.o: GModelIO_Mesh.cpp GModel.h GVertex.h GEntity.h Range.h \ GModelIO_Mesh.o: GModelIO_Mesh.cpp GModel.h GVertex.h GEntity.h Range.h \
SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \ SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshDefines.h MElement.h \ GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshDefines.h MElement.h \
...@@ -212,20 +214,22 @@ Geo.o: Geo.cpp ../Common/Message.h ../Numeric/Numeric.h \ ...@@ -212,20 +214,22 @@ Geo.o: Geo.cpp ../Common/Message.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../DataStr/Malloc.h ../DataStr/Tools.h \ ../Numeric/NumericEmbedded.h ../DataStr/Malloc.h ../DataStr/Tools.h \
../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h Geo.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h Geo.h \
../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
SPoint3.h SVector3.h SBoundingBox3d.h ExtrudeParams.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../DataStr/List.h \
../Common/SmoothData.h GModel.h GVertex.h GEntity.h GPoint.h GEdge.h \ ../DataStr/Tree.h ExtrudeParams.h ../Common/SmoothData.h GModel.h \
GFace.h GEdgeLoop.h GRegion.h GeoInterpolation.h ../Parser/Parser.h \ GVertex.h GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \
../Mesh/Field.h ../Geo/Geo.h ../Post/PView.h ../Post/PViewData.h \ GeoInterpolation.h ../Parser/Parser.h ../DataStr/List.h \
../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h \ ../DataStr/Tree.h ../Mesh/Field.h ../Geo/Geo.h ../Post/PView.h \
../Common/Context.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h \
../Post/ColorTable.h ../Common/Context.h
GeoStringInterface.o: GeoStringInterface.cpp ../Common/Message.h \ GeoStringInterface.o: GeoStringInterface.cpp ../Common/Message.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../DataStr/Malloc.h \ ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../DataStr/Malloc.h \
Geo.h ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ Geo.h ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
SPoint3.h SVector3.h SBoundingBox3d.h ../DataStr/List.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../DataStr/List.h \
../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \ ../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \
../Common/SmoothData.h GeoStringInterface.h ../Parser/Parser.h \ ../Common/SmoothData.h GeoStringInterface.h ../Parser/Parser.h \
../Parser/OpenFile.h ../Common/Context.h GModel.h GVertex.h GEntity.h \ ../DataStr/List.h ../DataStr/Tree.h ../Parser/OpenFile.h \
GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h ../Common/Context.h GModel.h GVertex.h GEntity.h GPoint.h GEdge.h \
GFace.h GEdgeLoop.h GRegion.h
GeoInterpolation.o: GeoInterpolation.cpp ../Common/Message.h Geo.h \ GeoInterpolation.o: GeoInterpolation.cpp ../Common/Message.h Geo.h \
../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \
......
# $Id: Makefile,v 1.146 2008-03-19 17:34:56 geuzaine Exp $ # $Id: Makefile,v 1.147 2008-04-06 02:33:53 remacle Exp $
# #
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -74,55 +74,41 @@ Draw.o: Draw.cpp ../Common/GmshUI.h ../Common/GmshDefines.h \ ...@@ -74,55 +74,41 @@ Draw.o: Draw.cpp ../Common/GmshUI.h ../Common/GmshDefines.h \
../Common/Message.h Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Common/Message.h Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Common/Context.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ ../Common/Context.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/Pair.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GRegion.h ../Post/PView.h ../Post/PViewData.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
../Post/ColorTable.h
Mesh.o: Mesh.cpp ../Common/Message.h ../Common/GmshUI.h ../Geo/GModel.h \ Mesh.o: Mesh.cpp ../Common/Message.h ../Common/GmshUI.h ../Geo/GModel.h \
../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/Pair.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GRegion.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h Draw.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Geo/SBoundingBox3d.h ../Common/Context.h ../Common/OS.h gl2ps.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \ ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \
../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ ../Common/SmoothData.h
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h Draw.h \
../Common/Context.h ../Common/OS.h gl2ps.h ../Common/VertexArray.h \
../Common/Context.h ../Common/SmoothData.h
Geom.o: Geom.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \ Geom.o: Geom.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Common/Context.h gl2ps.h ../Common/VertexArray.h \ ../Geo/SPoint3.h ../Common/Context.h gl2ps.h ../Common/VertexArray.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Common/Context.h ../Geo/GModel.h \ ../Geo/SVector3.h ../Common/Context.h ../Geo/GModel.h ../Geo/GVertex.h \
../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/SVector3.h ../Geo/GFace.h \
../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Geo/GEdgeLoop.h ../Geo/Pair.h ../Geo/GRegion.h
../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h
Post.o: Post.cpp ../Common/Message.h ../Common/GmshUI.h \ Post.o: Post.cpp ../Common/Message.h ../Common/GmshUI.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h Draw.h \ ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h Draw.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h Iso.h ../Post/PView.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h Iso.h ../Post/PView.h \
../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h \
../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
../Common/Context.h ../Common/SmoothData.h gl2ps.h ../Common/Context.h ../Common/SmoothData.h ../Common/Context.h gl2ps.h
SelectBuffer.o: SelectBuffer.cpp ../Common/Message.h ../Common/GmshUI.h \ SelectBuffer.o: SelectBuffer.cpp ../Common/Message.h ../Common/GmshUI.h \
../Common/GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Common/GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/Pair.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GRegion.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h Draw.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Geo/SBoundingBox3d.h ../Common/Context.h SelectBuffer.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \ ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
../Geo/MElement.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h \ ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h
../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
../Geo/SVector3.h Draw.h ../Common/Context.h SelectBuffer.h \
../Common/VertexArray.h ../Common/Context.h
Iso.o: Iso.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h Iso.o: Iso.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h
Entity.o: Entity.cpp ../Common/GmshUI.h ../Numeric/Numeric.h \ Entity.o: Entity.cpp ../Common/GmshUI.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h Draw.h ../Geo/SBoundingBox3d.h \ ../Numeric/NumericEmbedded.h Draw.h ../Geo/SBoundingBox3d.h \
...@@ -130,15 +116,17 @@ Entity.o: Entity.cpp ../Common/GmshUI.h ../Numeric/Numeric.h \ ...@@ -130,15 +116,17 @@ Entity.o: Entity.cpp ../Common/GmshUI.h ../Numeric/Numeric.h \
ReadImg.o: ReadImg.cpp ReadImg.h ../Common/Message.h ../Common/GmshUI.h \ ReadImg.o: ReadImg.cpp ReadImg.h ../Common/Message.h ../Common/GmshUI.h \
../Post/PView.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ ../Post/PView.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \ ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \
../Post/PViewDataList.h ../Post/PViewData.h ../Post/AdaptiveViews.h \ ../Post/PViewDataList.h ../Post/AdaptiveViews.h ../DataStr/List.h \
../DataStr/List.h ../Common/GmshMatrix.h ../Common/GmshMatrix.h
Scale.o: Scale.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \ Scale.o: Scale.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Post/PView.h ../Post/PViewData.h \ ../Geo/SPoint3.h ../Post/PView.h ../Post/PViewData.h \
../Post/PViewOptions.h ../Post/ColorTable.h ../Common/Context.h gl2ps.h ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h \
../Common/Context.h gl2ps.h
Graph2D.o: Graph2D.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \ Graph2D.o: Graph2D.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Post/PView.h ../Post/PViewData.h \ ../Geo/SPoint3.h ../Post/PView.h ../Post/PViewData.h \
../Post/PViewOptions.h ../Post/ColorTable.h gl2ps.h ../Common/Context.h \ ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h gl2ps.h ../Common/Context.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h
gl2ps.o: gl2ps.cpp gl2ps.h gl2ps.o: gl2ps.cpp gl2ps.h
gl2gif.o: gl2gif.cpp gl2gif.h PixelBuffer.h ../Common/GmshUI.h \ gl2gif.o: gl2gif.cpp gl2gif.h PixelBuffer.h ../Common/GmshUI.h \
../Common/Message.h ../DataStr/Malloc.h Draw.h ../Geo/SBoundingBox3d.h \ ../Common/Message.h ../DataStr/Malloc.h Draw.h ../Geo/SBoundingBox3d.h \
......
// $Id: Field.cpp,v 1.26 2008-03-23 21:42:57 geuzaine Exp $ // $Id: Field.cpp,v 1.27 2008-04-06 02:33:53 remacle Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -44,26 +44,26 @@ ...@@ -44,26 +44,26 @@
extern Context_T CTX; extern Context_T CTX;
class FieldOptionDouble : public FieldOption { class FieldOptionDouble:public FieldOption
public: {
public:
double &val; double &val;
FieldOptionType get_type() FieldOptionType get_type()
{ {
return FIELD_OPTION_DOUBLE; return FIELD_OPTION_DOUBLE;
} };
FieldOptionDouble(double &_val, bool * _status = NULL) FieldOptionDouble(double &_val, bool * _status = NULL):FieldOption(_status),
: FieldOption(_status), val(_val) val(_val) {
{ };
}
double numerical_value() const double numerical_value() const
{ {
return val; return val;
} };
void numerical_value(double v) void numerical_value(double v)
{ {
modified(); modified();
val = v; val = v;
} };
void get_text_representation(std::string & v_str) void get_text_representation(std::string & v_str)
{ {
std::ostringstream sstream; std::ostringstream sstream;
...@@ -73,26 +73,26 @@ class FieldOptionDouble : public FieldOption { ...@@ -73,26 +73,26 @@ class FieldOptionDouble : public FieldOption {
} }
}; };
class FieldOptionInt : public FieldOption { class FieldOptionInt:public FieldOption
public: {
public:
int &val; int &val;
FieldOptionType get_type() FieldOptionType get_type()
{ {
return FIELD_OPTION_INT; return FIELD_OPTION_INT;
} };
FieldOptionInt(int &_val, bool * _status = NULL) FieldOptionInt(int &_val, bool * _status = NULL):FieldOption(_status),
: FieldOption(_status), val(_val) val(_val) {
{ };
}
double numerical_value() const double numerical_value() const
{ {
return val; return val;
} };
void numerical_value(double v) void numerical_value(double v)
{ {
modified(); modified();
val = (int)v; val = v;
} };
void get_text_representation(std::string & v_str) void get_text_representation(std::string & v_str)
{ {
std::ostringstream sstream; std::ostringstream sstream;
...@@ -100,24 +100,24 @@ class FieldOptionInt : public FieldOption { ...@@ -100,24 +100,24 @@ class FieldOptionInt : public FieldOption {
v_str = sstream.str(); v_str = sstream.str();
} }
}; };
class FieldOptionList:public FieldOption
class FieldOptionList : public FieldOption { {
public: public:
std::list<int> &val; std::list < int >&val;
FieldOptionType get_type() FieldOptionType get_type()
{ {
return FIELD_OPTION_LIST; return FIELD_OPTION_LIST;
} };
FieldOptionList(std::list < int >&_val, bool * _status = NULL) FieldOptionList(std::list < int >&_val, bool * _status = NULL):FieldOption(_status),
: FieldOption(_status), val(_val) val(_val)
{ {
} };
std::list<int> &list() std::list < int >&list()
{ {
modified(); modified();
return val; return val;
} }
const std::list<int> &list() const const std::list < int >&list() const
{ {
return val; return val;
} }
...@@ -134,55 +134,52 @@ class FieldOptionList : public FieldOption { ...@@ -134,55 +134,52 @@ class FieldOptionList : public FieldOption {
v_str = sstream.str(); v_str = sstream.str();
} }
}; };
class FieldOptionString:public FieldOption
class FieldOptionString : public FieldOption { {
public: public:
std::string &val; std::string & val;
virtual FieldOptionType get_type() virtual FieldOptionType get_type()
{ {
return FIELD_OPTION_STRING; return FIELD_OPTION_STRING;
} };
FieldOptionString(std::string &_val, bool *_status = NULL) FieldOptionString(std::string & _val, bool * _status = NULL):FieldOption(_status),
: FieldOption(_status), val(_val) val(_val) {
{ };
} std::string & string() {
std::string &string()
{
modified(); modified();
return val; return val;
} }
const std::string &string() const const std::string & string() const
{ {
return val; return val;
} }
void get_text_representation(std::string &v_str) void get_text_representation(std::string & v_str)
{ {
std::ostringstream sstream; std::ostringstream sstream;
sstream << "\"" << val << "\""; sstream << "\"" << val << "\"";
v_str = sstream.str(); v_str = sstream.str();
} }
}; };
class FieldOptionBool:public FieldOption
class FieldOptionBool : public FieldOption { {
public: public:
bool &val; bool & val;
FieldOptionType get_type() FieldOptionType get_type()
{ {
return FIELD_OPTION_BOOL; return FIELD_OPTION_BOOL;
} };
FieldOptionBool(bool &_val, bool *_status = NULL) FieldOptionBool(bool & _val, bool * _status = NULL):FieldOption(_status),
: FieldOption(_status), val(_val) val(_val) {
{ };
}
double numerical_value() const double numerical_value() const
{ {
return val; return val;
} };
void numerical_value(double v) void numerical_value(double v)
{ {
modified(); modified();
val = v; val = v;
} };
void get_text_representation(std::string & v_str) void get_text_representation(std::string & v_str)
{ {
std::ostringstream sstream; std::ostringstream sstream;
...@@ -190,10 +187,18 @@ class FieldOptionBool : public FieldOption { ...@@ -190,10 +187,18 @@ class FieldOptionBool : public FieldOption {
v_str = sstream.str(); v_str = sstream.str();
} }
}; };
class FieldOptionPath:public FieldOptionString
{
public:
FieldOptionType get_type()
{
return FIELD_OPTION_PATH;
};
};
void FieldManager::reset() void FieldManager::reset()
{ {
for(std::map<int, Field*>::iterator it = begin(); it != end(); it++) { for(std::map < int, Field * >::iterator it = begin(); it != end(); it++) {
delete it->second; delete it->second;
} }
clear(); clear();
...@@ -247,7 +252,6 @@ int FieldManager::max_id() ...@@ -247,7 +252,6 @@ int FieldManager::max_id()
else else
return 0; return 0;
} }
void FieldManager::delete_field(int id) void FieldManager::delete_field(int id)
{ {
iterator it = find(id); iterator it = find(id);
...@@ -260,25 +264,28 @@ void FieldManager::delete_field(int id) ...@@ -260,25 +264,28 @@ void FieldManager::delete_field(int id)
} }
// StructuredField // StructuredField
class StructuredField : public Field{ class StructuredField:public Field
{
double o[3], d[3]; double o[3], d[3];
int n[3]; int n[3];
double *data; double *data;
bool error_status; bool error_status;
bool text_format;
std::string file_name; std::string file_name;
public: public:StructuredField()
StructuredField()
{ {
options["FileName"] = new FieldOptionString(file_name, &update_needed); options["FileName"] = new FieldOptionString(file_name, &update_needed);
text_format = false;
options["TextFormat"] = new FieldOptionBool(text_format, &update_needed);
data = NULL; data = NULL;
} }
const char *get_name() const char *get_name()
{ {
return "Structured"; return "Structured";
} }
virtual ~StructuredField() virtual ~ StructuredField() {
{ if(data)
if(data) delete[]data; delete[]data;
} }
double operator() (double x, double y, double z) double operator() (double x, double y, double z)
{ {
...@@ -291,14 +298,26 @@ class StructuredField : public Field{ ...@@ -291,14 +298,26 @@ class StructuredField : public Field{
input. input.
exceptions(std::ifstream::eofbit | std::ifstream::failbit | std:: exceptions(std::ifstream::eofbit | std::ifstream::failbit | std::
ifstream::badbit); ifstream::badbit);
input.read((char *)o, 3 * sizeof(double)); if(!text_format) {
input.read((char *)d, 3 * sizeof(double)); input.read((char *)o, 3 * sizeof(double));
input.read((char *)n, 3 * sizeof(int)); input.read((char *)d, 3 * sizeof(double));
int nt = n[0] * n[1] * n[2]; input.read((char *)n, 3 * sizeof(int));
if(data) int nt = n[0] * n[1] * n[2];
delete[]data; if(data)
data = new double[nt]; delete[]data;
input.read((char *)data, nt * sizeof(double)); data = new double[nt];
input.read((char *)data, nt * sizeof(double));
}
else {
input >> o[0] >> o[1] >> o[2] >> d[0] >> d[1] >> d[2] >> n[0] >>
n[1] >> n[2];
int nt = n[0] * n[1] * n[2];
if(data)
delete[]data;
data = new double[nt];
for(int i = 0; i < nt; i++)
input >> data[i];
}
input.close(); input.close();
} }
catch(...) { catch(...) {
...@@ -340,9 +359,93 @@ class StructuredField : public Field{ ...@@ -340,9 +359,93 @@ class StructuredField : public Field{
} }
}; };
class LonLatField : public Field { class UTMField:public Field
{
int field_id, zone;
double a, b, n, n2, n3, n4, n5, e, e2, e1, e12, e13, e14, J1, J2, J3, J4,
Ap, Bp, Cp, Dp, Ep, e4, e6, ep, ep2, ep4, k0, mu_fact;
public:
UTMField()
{
field_id = 1;
zone = 0;
options["IField"] = new FieldOptionInt(field_id);
options["Zone"] = new FieldOptionInt(zone);
a = 6378137; /* Equatorial Radius */
b = 6356752.3142; /* Rayon Polar Radius */
/* see http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM */
n = (a - b) / (a + b);
n2 = n * n;
n3 = n * n * n;
n4 = n * n * n * n;
n5 = n * n * n * n * n;
e = sqrt(1 - b * b / a / a);
e2 = e * e;
e1 = (1 - sqrt(1 - e2)) / (1 + sqrt(1 - e2));
e12 = e1 * e1;
e13 = e1 * e1 * e1;
e14 = e1 * e1 * e1 * e1;
J1 = (3 * e1 / 2 - 27 * e13 / 32);
J2 = (21 * e12 / 16 - 55 * e14 / 32);
J3 = 151 * e13 / 96;
J4 = 1097 * e14 / 512;
Ap = a * (1 - n + (5. / 4.) * (n2 - n3) + (81. / 64.) * (n4 - n5));
Bp = -3 * a * n / 2 * (1 - n + (7. / 8.) * (n2 - n3) +
(55. / 64.) * (n4 - n5));
Cp = 14 * a * n2 / 16 * (1 - n + (3. / 4) * (n2 - n3));
Dp = -35 * a * n3 / 48 * (1 - n + 11. / 16. * (n2 - n3));
Ep = +315 * a * n4 / 51 * (1 - n);
e4 = e2 * e2;
e6 = e2 * e2 * e2;
ep = e * a / b;
ep2 = ep * ep;
ep4 = ep2 * ep2;
k0 = 0.9996;
mu_fact = 1 / (k0 * a * (1 - e2 / 4 - 3 * e4 / 64 - 5 * e6 / 256));
}
const char *get_name()
{
return "UTM";
}
double operator() (double x, double y, double z)
{
double r = sqrt(x * x + y * y + z * z);
double lon = atan2(y, x);
double lat = asin(z / r);
double meridionalarc = Ap * lat + Bp * sin(2 * lat)
+ Cp * sin(4 * lat) + Dp * sin(6 * lat) + Ep;
double slat = sin(lat);
double clat = cos(lat);
double slat2 = slat * slat;
double clat2 = clat * clat;
double clat3 = clat2 * clat;
double clat4 = clat3 * clat;
double tlat2 = slat2 / clat2;
double nu = a / sqrt(1 - e * e * slat2);
double p = lon - ((zone - 0.5) / 30 - 1) * M_PI;
double p2 = p * p;
double p3 = p * p2;
double p4 = p2 * p2;
double utm_x =
k0 * nu * clat * p + (k0 * nu * clat3 / 6) * (1 - tlat2 +
ep2 * clat2) * p3 + 5e5;
double utm_y =
meridionalarc * k0 + k0 * nu * slat * clat / 2 * p2 +
k0 * nu * slat * clat3 / 24 * (5 - tlat2 + 9 * ep2 * clat2 +
4 * ep4 * clat4) * p4;
return (*GModel::current()->getFields()->get(field_id)) (utm_x, utm_y, 0);
}
FieldDialogBox *&dialog_box()
{
static FieldDialogBox *dialogBox = NULL;
return dialogBox;
}
};
class LonLatField:public Field
{
int field_id; int field_id;
public: public:
LonLatField() LonLatField()
{ {
field_id = 1; field_id = 1;
...@@ -354,7 +457,7 @@ class LonLatField : public Field { ...@@ -354,7 +457,7 @@ class LonLatField : public Field {
} }
double operator() (double x, double y, double z) double operator() (double x, double y, double z)
{ {
return (*GModel::current()->getFields()->get(field_id)) return (*GModel::current()->getFields()->get(field_id))
(atan2(x, y), asin(z / sqrt(x * x + y * y + z * z)), 0); (atan2(x, y), asin(z / sqrt(x * x + y * y + z * z)), 0);
} }
FieldDialogBox *&dialog_box() FieldDialogBox *&dialog_box()
...@@ -364,9 +467,10 @@ class LonLatField : public Field { ...@@ -364,9 +467,10 @@ class LonLatField : public Field {
} }
}; };
class BoxField : public Field { class BoxField:public Field
{
double v_in, v_out, x_min, x_max, y_min, y_max, z_min, z_max; double v_in, v_out, x_min, x_max, y_min, y_max, z_min, z_max;
public: public:
BoxField() BoxField()
{ {
v_in = v_out = x_min = x_max = y_min = y_max = z_min = z_max = 0; v_in = v_out = x_min = x_max = y_min = y_max = z_min = z_max = 0;
...@@ -395,10 +499,12 @@ class BoxField : public Field { ...@@ -395,10 +499,12 @@ class BoxField : public Field {
} }
}; };
class ThresholdField : public Field {
class ThresholdField:public Field
{
int iField; int iField;
double dmin, dmax, lcmin, lcmax; double dmin, dmax, lcmin, lcmax;
public: public:
const char *get_name() const char *get_name()
{ {
return "Threshold"; return "Threshold";
...@@ -431,15 +537,17 @@ class ThresholdField : public Field { ...@@ -431,15 +537,17 @@ class ThresholdField : public Field {
} }
}; };
class GradientField : public Field {
class GradientField:public Field
{
int iField, kind; int iField, kind;
double delta; double delta;
public: public:
const char *get_name() const char *get_name()
{ {
return "Gradient"; return "Gradient";
} }
GradientField() : iField(0), kind(3), delta(CTX.lc / 1e4) GradientField():iField(0), kind(3), delta(CTX.lc / 1e4)
{ {
options["IField"] = new FieldOptionInt(iField); options["IField"] = new FieldOptionInt(iField);
options["Kind"] = new FieldOptionInt(kind); options["Kind"] = new FieldOptionInt(kind);
...@@ -484,8 +592,8 @@ class GradientField : public Field { ...@@ -484,8 +592,8 @@ class GradientField : public Field {
}; };
#if defined(HAVE_MATH_EVAL) #if defined(HAVE_MATH_EVAL)
class MathEvalExpression
class MathEvalExpression { {
bool error_status; bool error_status;
std::list < Field * >*list; std::list < Field * >*list;
int nvalues; int nvalues;
...@@ -495,7 +603,7 @@ class MathEvalExpression { ...@@ -495,7 +603,7 @@ class MathEvalExpression {
int *evaluators_id; int *evaluators_id;
std::string function; std::string function;
char *c_str_function; char *c_str_function;
public: public:
double evaluate(double x, double y, double z) double evaluate(double x, double y, double z)
{ {
if(error_status) if(error_status)
...@@ -573,10 +681,11 @@ class MathEvalExpression { ...@@ -573,10 +681,11 @@ class MathEvalExpression {
} }
}; };
class MathEvalField : public Field { class MathEvalField:public Field
{
MathEvalExpression expr; MathEvalExpression expr;
std::string f; std::string f;
public: public:
MathEvalField() MathEvalField()
{ {
options["F"] = new FieldOptionString(f, &update_needed); options["F"] = new FieldOptionString(f, &update_needed);
...@@ -601,12 +710,12 @@ class MathEvalField : public Field { ...@@ -601,12 +710,12 @@ class MathEvalField : public Field {
return "MathEval"; return "MathEval";
} }
}; };
class ParametricField:public Field
class ParametricField : public Field { {
MathEvalExpression expr[3]; MathEvalExpression expr[3];
std::string f[3]; std::string f[3];
int ifield; int ifield;
public: public:
ParametricField() ParametricField()
{ {
options["IField"] = new FieldOptionInt(ifield); options["IField"] = new FieldOptionInt(ifield);
...@@ -624,7 +733,7 @@ class ParametricField : public Field { ...@@ -624,7 +733,7 @@ class ParametricField : public Field {
} }
update_needed = false; update_needed = false;
} }
return (*GModel::current()->getFields()->get(ifield)) return (*GModel::current()->getFields()->get(ifield))
(expr[0].evaluate(x, y, z), expr[1].evaluate(x, y, z), (expr[0].evaluate(x, y, z), expr[1].evaluate(x, y, z),
expr[2].evaluate(x, y, z)); expr[2].evaluate(x, y, z));
} }
...@@ -638,39 +747,61 @@ class ParametricField : public Field { ...@@ -638,39 +747,61 @@ class ParametricField : public Field {
return "Param"; return "Param";
} }
}; };
#endif #endif
class PostViewField : public Field { class PostViewField:public Field
{
OctreePost *octree; OctreePost *octree;
public: public:int view_index;
int view_index;
double operator() (double x, double y, double z) double operator() (double x, double y, double z)
{ {
// FIXME: should test unique view num instead, but that would be slower
if(view_index < 0 || view_index >= (int)PView::list.size()) if(view_index < 0 || view_index >= (int)PView::list.size())
return MAX_LC; return MAX_LC;
if(update_needed){ if(update_needed)
{
if(octree) if(octree)
delete octree; delete octree;
octree = new OctreePost(PView::list[view_index]); octree = new OctreePost(PView::list[view_index]);
update_needed = false; update_needed = false;
} }
double l = 0.; double l = 0.;
octree->searchScalar(x, y, z, &l, 0); if(!octree->searchScalar(x, y, z, &l, 0)) {
if(l <= 0) return MAX_LC; // uncomment the following to try really hard to find an element
// around the point
/*
double fact[9] = {0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, 0.1};
for(int i = 0; i < 9; i++){
double eps = CTX.lc * fact[i];
if(octree->searchScalar(x + eps, y, z, &l, 0)) break;
if(octree->searchScalar(x - eps, y, z, &l, 0)) break;
if(octree->searchScalar(x, y + eps, z, &l, 0)) break;
if(octree->searchScalar(x, y - eps, z, &l, 0)) break;
if(octree->searchScalar(x, y, z + eps, &l, 0)) break;
if(octree->searchScalar(x, y, z - eps, &l, 0)) break;
if(octree->searchScalar(x + eps, y - eps, z - eps, &l, 0)) break;
if(octree->searchScalar(x + eps, y + eps, z - eps, &l, 0)) break;
if(octree->searchScalar(x - eps, y - eps, z - eps, &l, 0)) break;
if(octree->searchScalar(x - eps, y + eps, z - eps, &l, 0)) break;
if(octree->searchScalar(x + eps, y - eps, z + eps, &l, 0)) break;
if(octree->searchScalar(x + eps, y + eps, z + eps, &l, 0)) break;
if(octree->searchScalar(x - eps, y - eps, z + eps, &l, 0)) break;
if(octree->searchScalar(x - eps, y + eps, z + eps, &l, 0)) break;
}
*/
}
//if(l <= 0) return MAX_LC;
return l; return l;
} }
const char *get_name() const char *get_name()
{ {
return "PostView"; return "PostView";
} }
PostViewField() PostViewField() {
{
octree = NULL; octree = NULL;
options["IView"] = new FieldOptionInt(view_index, &update_needed); options["IView"] = new FieldOptionInt(view_index, &update_needed);
} }
~PostViewField() ~PostViewField() {
{
if(octree) if(octree)
delete octree; delete octree;
} }
...@@ -681,9 +812,10 @@ class PostViewField : public Field { ...@@ -681,9 +812,10 @@ class PostViewField : public Field {
} }
}; };
class MinField : public Field { class MinField:public Field
{
std::list < int >idlist; std::list < int >idlist;
public: public:
MinField() MinField()
{ {
options["FieldsList"] = new FieldOptionList(idlist, &update_needed); options["FieldsList"] = new FieldOptionList(idlist, &update_needed);
...@@ -710,9 +842,10 @@ class MinField : public Field { ...@@ -710,9 +842,10 @@ class MinField : public Field {
} }
}; };
class MaxField : public Field { class MaxField:public Field
std::list<int> idlist; {
public: std::list < int >idlist;
public:
MaxField() MaxField()
{ {
options["FieldsList"] = new FieldOptionList(idlist, &update_needed); options["FieldsList"] = new FieldOptionList(idlist, &update_needed);
...@@ -740,8 +873,8 @@ class MaxField : public Field { ...@@ -740,8 +873,8 @@ class MaxField : public Field {
}; };
#ifdef HAVE_ANN #ifdef HAVE_ANN
class AttractorField:public Field
class AttractorField : public Field { {
ANNkd_tree *kdtree; ANNkd_tree *kdtree;
ANNpointArray zeronodes; ANNpointArray zeronodes;
ANNidxArray index; ANNidxArray index;
...@@ -749,8 +882,7 @@ class AttractorField : public Field { ...@@ -749,8 +882,7 @@ class AttractorField : public Field {
std::list < int >nodes_id; std::list < int >nodes_id;
std::list < int >edges_id; std::list < int >edges_id;
int n_nodes_by_edge; int n_nodes_by_edge;
public: public:AttractorField():kdtree(0), zeronodes(0)
AttractorField() : kdtree(0), zeronodes(0)
{ {
index = new ANNidx[1]; index = new ANNidx[1];
dist = new ANNdist[1]; dist = new ANNdist[1];
...@@ -841,39 +973,38 @@ class AttractorField : public Field { ...@@ -841,39 +973,38 @@ class AttractorField : public Field {
return dialogBox; return dialogBox;
} }
}; };
#endif #endif
template<class F> class FieldFactoryT : public FieldFactory { template < class F > class FieldFactoryT:public FieldFactory {
public: public:
Field *operator()() Field * operator()() {
{
return new F; return new F;
} };
}; };
template<class F> Field *field_factory() template < class F > Field * field_factory()
{ {
return new F(); return new F();
}; };
FieldManager::FieldManager() FieldManager::FieldManager()
{ {
map_type_name["Structured"] = new FieldFactoryT<StructuredField> (); map_type_name["Structured"] = new FieldFactoryT < StructuredField > ();
map_type_name["Threshold"] = new FieldFactoryT<ThresholdField> (); map_type_name["Threshold"] = new FieldFactoryT < ThresholdField > ();
map_type_name["Box"] = new FieldFactoryT<BoxField> (); map_type_name["Box"] = new FieldFactoryT < BoxField > ();
map_type_name["LonLat"] = new FieldFactoryT<LonLatField> (); map_type_name["LonLat"] = new FieldFactoryT < LonLatField > ();
#if defined(HAVE_MATH_EVAL) #if defined(HAVE_MATH_EVAL)
map_type_name["Param"] = new FieldFactoryT<ParametricField> (); map_type_name["Param"] = new FieldFactoryT < ParametricField > ();
map_type_name["MathEval"] = new FieldFactoryT<MathEvalField> (); map_type_name["MathEval"] = new FieldFactoryT < MathEvalField > ();
#endif #endif
#if defined(HAVE_ANN) #if defined(HAVE_ANN)
map_type_name["Attractor"] = new FieldFactoryT<AttractorField> (); map_type_name["Attractor"] = new FieldFactoryT < AttractorField > ();
#endif #endif
map_type_name["PostView"] = new FieldFactoryT<PostViewField> (); map_type_name["PostView"] = new FieldFactoryT < PostViewField > ();
map_type_name["Gradient"] = new FieldFactoryT<GradientField> (); map_type_name["Gradient"] = new FieldFactoryT < GradientField > ();
map_type_name["Min"] = new FieldFactoryT< MinField> (); map_type_name["Min"] = new FieldFactoryT < MinField > ();
map_type_name["Max"] = new FieldFactoryT< MaxField> (); map_type_name["Max"] = new FieldFactoryT < MaxField > ();
map_type_name["UTM"] = new FieldFactoryT < UTMField > ();
background_field = -1; background_field = -1;
} }
......
This diff is collapsed.
# $Id: Makefile,v 1.146 2008-03-19 17:34:56 geuzaine Exp $ # $Id: Makefile,v 1.147 2008-04-06 02:33:54 remacle Exp $
# #
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -71,67 +71,59 @@ depend: ...@@ -71,67 +71,59 @@ depend:
Gmsh.tab.o: Gmsh.tab.cpp ../Common/Message.h ../DataStr/Malloc.h \ Gmsh.tab.o: Gmsh.tab.cpp ../Common/Message.h ../DataStr/Malloc.h \
../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h \ ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h \
../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \ ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \
../Post/ColorTable.h ../Post/PView.h ../Post/PViewData.h \ ../Post/ColorTable.h ../Common/Message.h ../Post/PView.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PViewOptions.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PViewDataList.h \
../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Parallel/ParUtil.h \ ../Post/AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Context.h \ ../Common/GmshMatrix.h ../Parallel/ParUtil.h ../Numeric/Numeric.h \
../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ ../Numeric/NumericEmbedded.h ../Common/Context.h ../Geo/GModel.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/Pair.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/GRegion.h ../Geo/Geo.h ../Common/GmshDefines.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Geo/gmshSurface.h ../Numeric/Numeric.h ../DataStr/List.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h ../Geo/Geo.h \ ../DataStr/Tree.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ ../Geo/GeoInterpolation.h ../Geo/Geo.h ../Mesh/Generator.h \
../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Post/PView.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \ ../Post/PViewDataList.h ../Common/Options.h ../Common/Colors.h \
../Common/SmoothData.h ../Geo/GeoInterpolation.h ../Geo/Geo.h \ ../Common/Options.h Parser.h ../DataStr/List.h ../DataStr/Tree.h \
../Mesh/Generator.h ../Graphics/Draw.h ../Common/Colors.h \ OpenFile.h ../Common/CommandLine.h FunctionManager.h \
../Common/Options.h Parser.h OpenFile.h ../Common/CommandLine.h \ ../Post/ColorTable.h ../Common/OS.h CreateFile.h ../Geo/gmshSurface.h \
FunctionManager.h ../Common/OS.h CreateFile.h ../Mesh/Field.h \ ../Mesh/Field.h ../Geo/Geo.h ../Post/PView.h ../Mesh/BackgroundMesh.h
../Mesh/BackgroundMesh.h
Gmsh.yy.o: Gmsh.yy.cpp ../Common/Message.h ../Numeric/Numeric.h \ Gmsh.yy.o: Gmsh.yy.cpp ../Common/Message.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../Geo/Geo.h ../Common/GmshDefines.h \ ../Numeric/NumericEmbedded.h ../Geo/Geo.h ../Common/GmshDefines.h \
../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \ ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../DataStr/List.h \ ../Numeric/Numeric.h ../DataStr/List.h ../DataStr/Tree.h \
../DataStr/Tree.h ../DataStr/avl.h ../Geo/SPoint2.h \ ../DataStr/avl.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
../Geo/ExtrudeParams.h ../Common/SmoothData.h Gmsh.tab.hpp Gmsh.tab.hpp
OpenFile.o: OpenFile.cpp ../Common/Message.h ../Geo/Geo.h \ OpenFile.o: OpenFile.cpp ../Common/Message.h ../Geo/Geo.h \
../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../DataStr/List.h \ ../Numeric/NumericEmbedded.h ../DataStr/List.h ../DataStr/Tree.h \
../DataStr/Tree.h ../DataStr/avl.h ../Geo/SPoint2.h \ ../DataStr/avl.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GModel.h \ ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h \
../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/GRegion.h \
../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ ../Numeric/Numeric.h ../Common/Context.h Parser.h ../DataStr/List.h \
../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../DataStr/Tree.h OpenFile.h ../Common/CommandLine.h ../Post/PView.h \
../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
../Common/Context.h Parser.h OpenFile.h ../Common/CommandLine.h \
../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
../Post/ColorTable.h ../Graphics/ReadImg.h ../Common/OS.h \ ../Post/ColorTable.h ../Graphics/ReadImg.h ../Common/OS.h \
../Mesh/HighOrder.h ../Common/GmshUI.h ../Graphics/Draw.h \ ../Mesh/HighOrder.h ../Geo/GModel.h ../Common/GmshUI.h \
../Graphics/SelectBuffer.h ../Fltk/GUI.h ../Fltk/Opengl_Window.h \ ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Graphics/SelectBuffer.h \
../Fltk/Colorbar_Window.h ../Fltk/Popup_Button.h \ ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
../Fltk/SpherePosition_Widget.h ../Mesh/Field.h ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \
../Common/GmshUI.h ../Post/ColorTable.h ../Fltk/Popup_Button.h \
../Fltk/SpherePosition_Widget.h ../Mesh/Field.h ../Geo/Geo.h \
../Post/PView.h
CreateFile.o: CreateFile.cpp ../Common/Message.h ../Geo/GModel.h \ CreateFile.o: CreateFile.cpp ../Common/Message.h ../Geo/GModel.h \
../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/Pair.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GRegion.h ../Common/GmshDefines.h OpenFile.h ../Common/Context.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
../Common/GmshDefines.h OpenFile.h ../Common/Context.h \
../Common/Options.h ../Post/ColorTable.h ../Common/GmshUI.h \ ../Common/Options.h ../Post/ColorTable.h ../Common/GmshUI.h \
../Graphics/gl2ps.h ../Graphics/gl2gif.h ../Graphics/PixelBuffer.h \ ../Graphics/gl2ps.h ../Graphics/gl2gif.h ../Graphics/PixelBuffer.h \
../DataStr/Malloc.h ../Graphics/Draw.h ../Graphics/gl2jpeg.h \ ../Common/GmshUI.h ../Common/Message.h ../DataStr/Malloc.h \
../Graphics/PixelBuffer.h ../Graphics/gl2png.h \ ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Graphics/gl2jpeg.h \
../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \ ../Graphics/gl2png.h ../Graphics/gl2ppm.h ../Graphics/gl2yuv.h
../Graphics/PixelBuffer.h ../Graphics/gl2yuv.h \
../Graphics/PixelBuffer.h
FunctionManager.o: FunctionManager.cpp FunctionManager.h FunctionManager.o: FunctionManager.cpp FunctionManager.h
This diff is collapsed.
#include "GeoEarthImport.h"
GeoEarthImport::~GeoEarthImport(){
// printf("oya\n");
// myfile->close();
// printf("oyo\n");
delete myfile;
}
GeoEarthImport::GeoEarthImport(const std::string &_filename)
: filename(_filename)
{
myfile = new std::ofstream(filename.c_str());
size_field=NULL;
loop_buff.precision(16);
il=ip=ill=is=ifi=0;
(*myfile) << "IP = newp;\n";
(*myfile) << "IL = newl;\n";
(*myfile) << "ILL = newll;\n";
(*myfile) << "IS = news;\n";
(*myfile) << "IFI = newf;\n";
(*myfile) << "Point ( IP + " << ip++ << " ) = {0, 0, 0 , 1};\n";
(*myfile) << "Point ( IP + " << ip++ << " ) = {0, 0, 6.371e6 , 1};\n";
(*myfile) << "PolarSphere ( IS + " << is++ << " ) = {IP , IP+1};\n";
new_surface();
new_loop();
}
void GeoEarthImport::set_size_field(Field *_size_field){
size_field=_size_field;
}
void GeoEarthImport::add_point(const SPoint3 &point){
SPoint3 midpoint = point;
SPoint2 stereo(-point.x()/(1+point.z()),-point.y()/(1+point.z()));
midpoint+=lastpoint;
midpoint/=2;
// printf("%g\n",sqrt(midpoint[0]*midpoint[0]+midpoint[1]*midpoint[1]+midpoint[2]*midpoint[2]));
if( ip==first_point_in_loop || !size_field || point.distance(lastpoint)*6361e3 > (*size_field)(midpoint[0]*6361e3,midpoint[1]*6361e3,midpoint[2]*6361e3)){
loop_buff<<"Point ( IP + "<<ip++<<" ) = {"<<stereo.x()<<", "<<stereo.y()<<", "<<0<<", 1};\n";
lastpoint=point;
}
}
void GeoEarthImport::add_point_lon_lat(const SPoint2 &ll){
SPoint3 xyz( cos(ll.y())*cos(ll.x()), cos(ll.y())*sin(ll.x()), sin(ll.y()));
add_point(xyz);
}
void GeoEarthImport::new_loop(){
loop_buff.str("");
first_point_in_loop=ip;
}
void GeoEarthImport::end_loop(){
if(ip-first_point_in_loop>3){
loop_buff<<"BSpline ( IL + "<<il++<<" ) = { IP + "<<first_point_in_loop<<" : IP + "<<ip-1<<", IP + "<<first_point_in_loop<<" };\n";
loop_buff<<"Line Loop ( ILL + "<<ill++<<" ) = { IL + "<<il-1<<" };";
(*myfile)<<loop_buff.str();
if(!empty_surface)
surface_buff<<", ";
surface_buff<< "ILL + "<<ill-1;
empty_surface=false;
}else{
ip=first_point_in_loop;
}
new_loop();
}
void GeoEarthImport::new_surface(){
surface_buff.str("");
surface_buff<<"Plane Surface( IS + "<<is++<<" ) = { ";
first_point_in_surface=ip;
bool empty_surface=true;
}
void GeoEarthImport::end_surface(){
if(!empty_surface){
surface_buff<<"};\n";
surface_buff<<"Field [ IFI + "<<ifi<<"] = Attractor;\n";
surface_buff<<"Field [ IFI + "<<ifi<<"].NodesList = { IP + "<<first_point_in_surface <<" : IP + "<<ip-1<<" };";
ifi++;
(*myfile)<<surface_buff.str();
}
new_surface();
}
#ifndef _GEO_EARTH_IMPORT_H_
#define _GEO_EARTH_IMPORT_H_
#include <iostream>
#include <fstream>
#include <sstream>
#include "SPoint3.h"
#include "Field.h"
#include "GeoStringInterface.h"
class GeoEarthImport{
Field *size_field;
std::ostringstream loop_buff,surface_buff;;
std::string filename;
std::ofstream *myfile;
int il,ip,is,ill,ifi;
int first_point_in_loop,first_point_in_surface;
bool empty_surface;
SPoint3 lastpoint;
void new_surface();
void new_loop();
public :
GeoEarthImport(const std::string &_filename);
~GeoEarthImport();
void set_size_field(Field *_size_field);
void add_point(const SPoint3 &point);
void add_point_lon_lat(const SPoint2 &ll);
void end_loop();
void end_surface();
};
#endif
This diff is collapsed.
# $Id: Makefile,v 1.38 2008-03-29 10:19:43 geuzaine Exp $ # $Id: Makefile,v 1.39 2008-04-06 02:33:54 remacle Exp $
# #
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -65,21 +65,19 @@ depend: ...@@ -65,21 +65,19 @@ depend:
PView.o: PView.cpp PView.h PViewData.h ../Geo/SBoundingBox3d.h \ PView.o: PView.cpp PView.h PViewData.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h PViewOptions.h ColorTable.h PViewDataList.h \ ../Geo/SPoint3.h PViewOptions.h ColorTable.h PViewDataList.h \
AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \ AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \
../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \
../Common/Context.h ../Common/SmoothData.h ../Common/Message.h ../Common/SmoothData.h ../Common/Message.h
PViewIO.o: PViewIO.cpp PView.h PViewData.h ../Geo/SBoundingBox3d.h \ PViewIO.o: PViewIO.cpp PView.h PViewData.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h PViewOptions.h ColorTable.h PViewDataList.h \ ../Geo/SPoint3.h PViewOptions.h ColorTable.h PViewDataList.h \
AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \ AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \
PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ ../Geo/Range.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/GEdge.h ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/Pair.h ../Geo/GRegion.h ../Common/StringUtils.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Common/Message.h
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
../Common/StringUtils.h ../Common/Message.h
PViewData.o: PViewData.cpp PViewData.h ../Geo/SBoundingBox3d.h \ PViewData.o: PViewData.cpp PViewData.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Geo/SPoint3.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
../Common/Message.h
PViewDataIO.o: PViewDataIO.cpp ../Common/Message.h ../Numeric/Numeric.h \ PViewDataIO.o: PViewDataIO.cpp ../Common/Message.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h PViewData.h ../Geo/SBoundingBox3d.h \ ../Numeric/NumericEmbedded.h PViewData.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Geo/SPoint3.h
...@@ -96,28 +94,21 @@ PViewDataGModel.o: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \ ...@@ -96,28 +94,21 @@ PViewDataGModel.o: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h PViewDataList.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h PViewDataList.h \
AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \ AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \
../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h ../Geo/Pair.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/GRegion.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h ../Numeric/Numeric.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Numeric/NumericEmbedded.h ../Common/Message.h
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h
PViewDataGModelIO.o: PViewDataGModelIO.cpp ../Common/Message.h \ PViewDataGModelIO.o: PViewDataGModelIO.cpp ../Common/Message.h \
PViewDataGModel.h PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ PViewDataGModel.h PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
PViewDataList.h AdaptiveViews.h ../DataStr/List.h \ PViewDataList.h AdaptiveViews.h ../DataStr/List.h \
../Common/GmshMatrix.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/GEntity.h ../Geo/Range.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/SVector3.h ../Geo/GFace.h \
../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Geo/GEdgeLoop.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/MVertex.h \
../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ ../Geo/MEdge.h ../Geo/MFace.h ../Numeric/Numeric.h \
../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ ../Numeric/NumericEmbedded.h ../Common/StringUtils.h
../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
../Common/StringUtils.h
PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h \ PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Message.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Message.h
AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \ AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \
...@@ -125,21 +116,17 @@ AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \ ...@@ -125,21 +116,17 @@ AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \
../Post/ColorTable.h ../Common/Message.h ../Post/PView.h \ ../Post/ColorTable.h ../Common/Message.h ../Post/PView.h \
../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PViewDataList.h \ ../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PViewDataList.h \
../Post/PViewData.h ../Post/AdaptiveViews.h ../Post/AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h
OctreePost.o: OctreePost.cpp ../Common/Octree.h \ OctreePost.o: OctreePost.cpp ../Common/Octree.h \
../Common/OctreeInternals.h OctreePost.h ../DataStr/List.h PView.h \ ../Common/OctreeInternals.h OctreePost.h ../DataStr/List.h PView.h \
PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h PViewOptions.h \ PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h PViewOptions.h \
ColorTable.h PViewDataList.h AdaptiveViews.h ../Common/GmshMatrix.h \ ColorTable.h PViewDataList.h AdaptiveViews.h ../Common/GmshMatrix.h \
PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ ../Geo/Range.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/GEdge.h ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GEdgeLoop.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ ../Geo/Pair.h ../Geo/GRegion.h ../Numeric/Numeric.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ ../Numeric/NumericEmbedded.h ../Common/Message.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Common/ShapeFunctions.h ../Numeric/Numeric.h ../Geo/MElement.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \ ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Message.h \
../Common/ShapeFunctions.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h
ColorTable.o: ColorTable.cpp ../Common/Message.h ColorTable.h \ ColorTable.o: ColorTable.cpp ../Common/Message.h ColorTable.h \
../Common/Context.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Context.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h
# $Id: Makefile,v 1.8 2008-03-19 16:38:16 geuzaine Exp $ # $Id: Makefile,v 1.9 2008-04-06 02:33:54 remacle Exp $
# #
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -52,5 +52,5 @@ depend: ...@@ -52,5 +52,5 @@ depend:
# DO NOT DELETE THIS LINE # DO NOT DELETE THIS LINE
Fl_Native_File_Chooser.o: Fl_Native_File_Chooser.cxx \ Fl_Native_File_Chooser.o: Fl_Native_File_Chooser.cxx \
Fl_Native_File_Chooser_MAC.cxx common.cxx FL/Fl_Native_File_Chooser.H \ Fl_Native_File_Chooser_FLTK.cxx FL/Fl_Native_File_Chooser.H \
FL/Fl_Native_File_Chooser_MAC.H FL/Fl_Native_File_Chooser_FLTK.H common.cxx
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment