[cig-commits] commit: updating meta files for Eigenvectors and MeshViewer
Mercurial
hg at geodynamics.org
Mon Nov 24 11:29:42 PST 2008
changeset: 88:c2f9576fc655
parent: 86:7a689a5e914f
user: rob at hijiki.maths.monash.edu.au
date: Wed Nov 05 17:18:15 2008 +1100
files: DrawingObjects/src/Eigenvectors.meta DrawingObjects/src/EigenvectorsCrossSection.meta DrawingObjects/src/MeshViewer.c DrawingObjects/src/MeshViewer.h DrawingObjects/src/MeshViewer.meta DrawingObjects/src/VectorArrowCrossSection.meta
description:
updating meta files for Eigenvectors and MeshViewer
diff -r 7a689a5e914f -r c2f9576fc655 DrawingObjects/src/Eigenvectors.meta
--- a/DrawingObjects/src/Eigenvectors.meta Fri Oct 31 18:38:45 2008 +1100
+++ b/DrawingObjects/src/Eigenvectors.meta Wed Nov 05 17:18:15 2008 +1100
@@ -3,7 +3,7 @@
<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
<param name="Name">lucEigenvectors</param>
-<param name="Author">...</param>
+<param name="Author">Robert Turnbull</param>
<param name="Organisation">MCC</param>
<param name="Project">gLucifer</param>
<param name="Location">./gLucifer/DrawingObjects/src/</param>
@@ -11,9 +11,9 @@
<param name="Copyright">Copyright (c) 2005, Monash Cluster Computing</param>
<param name="License">http://www.opensource.org/licenses/bsd-license.php</param>
<param name="Parent">lucEigenvectorsCrossSection</param>
-<param name="Reference">...</param>
-<param name="Summary">...</param>
-<param name="Description">...</param>
+<param name="Reference">N/A</param>
+<param name="Summary">N/A</param>
+<param name="Description">Samples the values of a tensor field in a grid and draws arrows to represent the Eigenvectors. (For more information about partameters and dependencies look at parent class lucEigenvectorCrossSection)...</param>
<!--Now the interesting stuff-->
@@ -26,6 +26,17 @@
</list>
<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">
+ <struct name="eigenvectors">
+ <param name="Type">lucEigenvectors</param>
+ <param name="TensorField">StrainRateField</param>
+ <param name="leastColour">Green</param>
+ <param name="middleColour">Yellow</param>
+ <param name="greatestColour">Red</param>
+ <param name="arrowHeadSize">0.1</param>
+ <param name="lengthScale">0.4</param>
+ <param name="resolution">10</param>
+ </struct>
+</param>
</StGermainData>
diff -r 7a689a5e914f -r c2f9576fc655 DrawingObjects/src/EigenvectorsCrossSection.meta
--- a/DrawingObjects/src/EigenvectorsCrossSection.meta Fri Oct 31 18:38:45 2008 +1100
+++ b/DrawingObjects/src/EigenvectorsCrossSection.meta Wed Nov 05 17:18:15 2008 +1100
@@ -3,7 +3,7 @@
<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
<param name="Name">lucEigenvectorsCrossSection</param>
-<param name="Author">...</param>
+<param name="Author">Robert Turnbull</param>
<param name="Organisation">MCC</param>
<param name="Project">gLucifer</param>
<param name="Location">./gLucifer/DrawingObjects/src/</param>
@@ -11,67 +11,59 @@
<param name="Copyright">Copyright (c) 2005, Monash Cluster Computing</param>
<param name="License">http://www.opensource.org/licenses/bsd-license.php</param>
<param name="Parent">lucOpenGLDrawingObject</param>
-<param name="Reference">...</param>
-<param name="Summary">...</param>
-<param name="Description">...</param>
+<param name="Reference">N/A</param>
+<param name="Summary">N/A</param>
+<param name="Description">Samples the values of a tensor field in a plane and draws arrows to represent the Eigenvectors.</param>
<!--Now the interesting stuff-->
-
-
<list name="Params">
<struct>
<param name="Name">resolution</param>
<param name="Type">UnsignedInt</param>
- <param name="Default">8</param>
- <param name="Description">...</param>
+ <param name="Default">128</param>
+ <param name="Description">The default value for the resolutionX, resolutionY and resolutionZ. If these values aren't set the sampling grid will be uniform with this number of verticies in each direction.</param>
</struct>
<struct>
<param name="Name">resolutionX</param>
<param name="Type">UnsignedInt</param>
<param name="Default">defaultResolution</param>
- <param name="Description">...</param>
+ <param name="Description">The number of sample points in the X direction.</param>
</struct>
<struct>
<param name="Name">resolutionY</param>
<param name="Type">UnsignedInt</param>
<param name="Default">defaultResolution</param>
- <param name="Description">...</param>
+ <param name="Description">The number of sample points in the Y direction.</param>
</struct>
<struct>
<param name="Name">resolutionZ</param>
<param name="Type">UnsignedInt</param>
<param name="Default">defaultResolution</param>
- <param name="Description">...</param>
+ <param name="Description">The number of sample points in the Z direction.</param>
</struct>
<struct>
<param name="Name">crossSection</param>
<param name="Type">String</param>
<param name="Default">""</param>
- <param name="Description">...</param>
- </struct>
- <struct>
- <param name="Name">dim</param>
- <param name="Type">UnsignedInt</param>
- <param name="Default">2</param>
- <param name="Description">...</param>
+ <param name="Description">The description of the plane in the format: "axis=value". e.g. x=1.5 will descrive a Y-Z plane where the X coordinate is 1.5. The axis is case insensitive.</param>
</struct>
<struct>
<param name="Name">leastColour</param>
<param name="Type">String</param>
<param name="Default">"black"</param>
- <param name="Description">...</param>
+ <param name="Description">The colour of the arrow corresponding to the Eigenvector with the least Eigenvalue.</param>
</struct>
<struct>
<param name="Name">middleColour</param>
<param name="Type">String</param>
<param name="Default">"black"</param>
- <param name="Description">...</param>
+ <param name="Description">The colour of the arrow corresponding to the Eigenvector with the middle Eigenvalue. (Only useful in 3D)</param>
</struct>
<struct>
<param name="Name">greatestColour</param>
<param name="Type">String</param>
<param name="Default">"black"</param>
- <param name="Description">...</param>
+ <param name="Description">The colour of the arrow corresponding to the Eigenvector with the greatest Eigenvalue.</param>
</struct>
<struct>
<param name="Name">arrowHeadSize</param>
@@ -83,15 +75,63 @@
<param name="Name">lengthScale</param>
<param name="Type">Double</param>
<param name="Default">0.3</param>
- <param name="Description">...</param>
+ <param name="Description">This is a factor to scale the size of the arrows by.</param>
</struct>
<struct>
<param name="Name">lineWidth</param>
<param name="Type">Double</param>
<param name="Default">1.0</param>
- <param name="Description">...</param>
+ <param name="Description">The width of the lines for each arrow.</param>
</struct>
-
+ <struct>
+ <param name="Name">scaleEigenValue</param>
+ <param name="Type">Double</param>
+ <param name="Default">1.0</param>
+ <param name="Description">Multiplying factor for when you are visualising using the Eigenvalues.</param>
+ </struct>
+ <struct>
+ <param name="Name">notEigenValue</param>
+ <param name="Type">Double</param>
+ <param name="Default">0.3</param>
+ <param name="Description">The length of the arrows if they aren't scaled by the Eigenvalue.</param>
+ </struct>
+
+ <struct>
+ <param name="Name">useEigenValue</param>
+ <param name="Type">Bool</param>
+ <param name="Default">True</param>
+ <param name="Description">Whether or not to use the Eigenvalues to scale the size of the arrows representing the Eigenvectors.</param>
+ </struct>
+ <struct>
+ <param name="Name">plotEigenVector</param>
+ <param name="Type">Bool</param>
+ <param name="Default">True</param>
+ <param name="Description">Whether arrows for the Eigenvectors should be drawn.</param>
+ </struct>
+ <struct>
+ <param name="Name">plotEigenValue</param>
+ <param name="Type">Bool</param>
+ <param name="Default">True</param>
+ <param name="Description">Whether dots for the Eigenvalues should be drawn. The larger the dots, the greater the value of the Eigenvalue.</param>
+ </struct>
+ <struct>
+ <param name="Name">leastColourForNegative</param>
+ <param name="Type">String</param>
+ <param name="Default">"black"</param>
+ <param name="Description">When you are plotting the Eigenvalues - this is the colour of the particle dot if the Eigenvalue is negative.</param>
+ </struct>
+ <struct>
+ <param name="Name">middleColourForNegative</param>
+ <param name="Type">String</param>
+ <param name="Default">"black"</param>
+ <param name="Description">When you are plotting the Eigenvalues - this is the colour of the particle dot if the Eigenvalue is negative. (Only useful in 3D)</param>
+ </struct>
+ <struct>
+ <param name="Name">greatestColourForNegative</param>
+ <param name="Type">String</param>
+ <param name="Default">"black"</param>
+ <param name="Description">When you are plotting the Eigenvalues - this is the colour of the particle dot if the Eigenvalue is negative.</param>
+ </struct>
</list>
<list name="Dependencies">
@@ -99,14 +139,24 @@
<param name="Essential">True</param>
<param name="Name">TensorField</param>
<param name="Type">FieldVariable</param>
- <param name="Description">...</param>
+ <param name="Description">The Tensor Field you want to visualise.</param>
</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 162 of the c file and then remove this comment afterwards -->
-
-
</list>
<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">
+ <struct name="eigenvectorCrossSection">
+ <param name="Type">lucEigenvectorsCrossSection</param>
+ <param name="TensorField">StrainRateField</param>
+ <param name="crossSection">y=0.4</param>
+ <param name="leastColour">Green</param>
+ <param name="middleColour">Yellow</param>
+ <param name="greatestColour">Red</param>
+ <param name="arrowHeadSize">0.1</param>
+ <param name="lengthScale">0.4</param>
+ <param name="resolution">10</param>
+ </struct>
+
+
+</param>
</StGermainData>
diff -r 7a689a5e914f -r c2f9576fc655 DrawingObjects/src/MeshViewer.c
--- a/DrawingObjects/src/MeshViewer.c Fri Oct 31 18:38:45 2008 +1100
+++ b/DrawingObjects/src/MeshViewer.c Wed Nov 05 17:18:15 2008 +1100
@@ -49,7 +49,6 @@
#include <StgDomain/StgDomain.h>
#include <StgFEM/StgFEM.h>
#ifdef GLUCIFER_USE_PICELLERATOR
- #include <StgFEM/StgFEM.h>
#include <PICellerator/PICellerator.h>
#endif
@@ -126,16 +125,15 @@ void _lucMeshViewer_Init(
void _lucMeshViewer_Init(
lucMeshViewer* self,
Mesh* mesh,
- Name colourName,
- lucColour localColour,
- lucColour shadowColour,
- lucColour vacantColour)
+ Name localColourName,
+ Name shadowColourName,
+ Name vacantColourName )
{
self->mesh = mesh;
- lucColour_FromString( &self->colour, colourName );
- memcpy( &(self->localColour), &localColour, sizeof(lucColour) );
- memcpy( &(self->shadowColour), &shadowColour, sizeof(lucColour) );
- memcpy( &(self->vacantColour), &vacantColour, sizeof(lucColour) );
+ lucColour_FromString( &self->localColour, localColourName );
+ lucColour_FromString( &self->shadowColour, shadowColourName );
+ lucColour_FromString( &self->vacantColour, vacantColourName );
+
assert( Stg_Class_IsInstance( mesh, Mesh_Type ) );
self->renderEdges = NULL;
@@ -143,6 +141,9 @@ void _lucMeshViewer_Init(
void _lucMeshViewer_Delete( void* drawingObject ) {
lucMeshViewer* self = (lucMeshViewer*)drawingObject;
+
+ if ( self->edges )
+ Memory_Free( self->edges );
_lucOpenGLDrawingObject_Delete( self );
}
@@ -157,7 +158,6 @@ void* _lucMeshViewer_Copy( void* drawing
lucMeshViewer* self = (lucMeshViewer*)drawingObject;
lucMeshViewer* newDrawingObject;
newDrawingObject = _lucOpenGLDrawingObject_Copy( self, dest, deep, nameExt, ptrMap );
- memcpy( &(newDrawingObject->colour), &(self->colour), sizeof(lucColour) );
memcpy( &(newDrawingObject->localColour), &(self->localColour), sizeof(lucColour) );
memcpy( &(newDrawingObject->shadowColour), &(self->shadowColour), sizeof(lucColour) );
memcpy( &(newDrawingObject->vacantColour), &(self->vacantColour), sizeof(lucColour) );
@@ -192,32 +192,23 @@ void _lucMeshViewer_Construct( void* dra
void _lucMeshViewer_Construct( void* drawingObject, Stg_ComponentFactory* cf, void* data ){
lucMeshViewer* self = (lucMeshViewer*)drawingObject;
Mesh* mesh;
- Name localColourName;
- Name shadowColourName;
- Name vacantColourName;
/* Construct Parent */
_lucOpenGLDrawingObject_Construct( self, cf, data );
mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Mesh", Mesh, True, data );
- localColourName = Stg_ComponentFactory_GetString( cf, self->name, "localColour", "Black") ;
- shadowColourName = Stg_ComponentFactory_GetString( cf, self->name, "shadowColour", "Blue");
- vacantColourName = Stg_ComponentFactory_GetString( cf, self->name, "vacantColour", "Grey");
+
self->nodeNumbers = Stg_ComponentFactory_GetBool( cf, self->name, "nodeNumbers", False);
self->elementNumbers = Stg_ComponentFactory_GetBool( cf, self->name, "elementNumbers", False);
self->displayNodes = Stg_ComponentFactory_GetBool( cf, self->name, "displayNodes", False);
- lucColour_FromString( &self->localColour, localColourName );
- lucColour_FromString( &self->shadowColour, shadowColourName );
- lucColour_FromString( &self->vacantColour, vacantColourName );
-
_lucMeshViewer_Init(
self,
mesh,
- Stg_ComponentFactory_GetString( cf, self->name, "colour", "black" ),
- self->localColour,
- self->shadowColour,
- self->vacantColour);
+ Stg_ComponentFactory_GetString( cf, self->name, "localColour", "black" ),
+ Stg_ComponentFactory_GetString( cf, self->name, "shadowColour", "blue" ),
+ Stg_ComponentFactory_GetString( cf, self->name, "vacantColour", "Grey" )
+ );
}
void _lucMeshViewer_Build( void* drawingObject, void* data ) {
@@ -271,11 +262,6 @@ void _lucMeshViewer_CleanUp( void* drawi
void _lucMeshViewer_BuildDisplayList( void* drawingObject, void* _context ) {
lucMeshViewer* self = (lucMeshViewer*)drawingObject;
- lucColour colour;
-
- /* Initialise colour value */
- memcpy( &colour, &self->colour, sizeof(lucColour) );
- lucColour_SetOpenGLColour( &colour );
glPointSize( 1.0 );
@@ -474,7 +460,7 @@ void lucMeshViewer_RenderLocal( void* dr
vertexFunc = glVertex2dv;
/* Set color. */
- glColor3f( self->localColour.red, self->localColour.green, self->localColour.blue );
+ lucColour_SetOpenGLColour( &self->localColour );
/* Render vertices. */
if(self->displayNodes){
@@ -584,8 +570,18 @@ void lucMeshViewer_Render( void* drawing
void lucMeshViewer_BuildEdges( lucMeshViewer* self ) {
#if 0
+ unsigned e_i;
+
assert( self );
-
+
+ self->nEdges = Mesh_GetLocalSize( self->mesh, MT_EDGE );
+ self->edges = Memory_Alloc_2DArray( unsigned, self->nEdges, 2, "edges" );
+
+ for( e_i = 0; e_i < self->nEdges; e_i++ ) {
+ /* Find node IDs for each edge */
+
+ }
+
nVerts = Mesh_GetLocalSize( );
done = AllocArray( Bool, nVerts );
#endif
diff -r 7a689a5e914f -r c2f9576fc655 DrawingObjects/src/MeshViewer.h
--- a/DrawingObjects/src/MeshViewer.h Fri Oct 31 18:38:45 2008 +1100
+++ b/DrawingObjects/src/MeshViewer.h Wed Nov 05 17:18:15 2008 +1100
@@ -65,16 +65,15 @@
Mesh* mesh; \
/* Other info */ \
/* Colour Stuff */ \
- lucColour colour; \
+ lucColour localColour; \
+ lucColour shadowColour; \
+ lucColour vacantColour; \
/* Other Stuff */ \
/* Stg_Class info */ \
unsigned nEdges; \
unsigned** edges; \
lucMeshViewer_RenderEdgesFunc* renderEdges; \
\
- lucColour localColour; \
- lucColour shadowColour; \
- lucColour vacantColour; \
Bool nodeNumbers; \
Bool elementNumbers; \
Bool displayNodes;
diff -r 7a689a5e914f -r c2f9576fc655 DrawingObjects/src/MeshViewer.meta
--- a/DrawingObjects/src/MeshViewer.meta Fri Oct 31 18:38:45 2008 +1100
+++ b/DrawingObjects/src/MeshViewer.meta Wed Nov 05 17:18:15 2008 +1100
@@ -3,7 +3,7 @@
<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
<param name="Name">lucMeshViewer</param>
-<param name="Author">...</param>
+<param name="Author">Cecile Duboz and Luke Hodkinson</param>
<param name="Organisation">MCC</param>
<param name="Project">gLucifer</param>
<param name="Location">./</param>
@@ -11,55 +11,48 @@
<param name="Copyright">Copyright (c) 2005, Monash Cluster Computing</param>
<param name="License">http://www.opensource.org/licenses/bsd-license.php</param>
<param name="Parent">lucOpenGLDrawingObject</param>
-<param name="Reference">...</param>
-<param name="Summary">...</param>
-<param name="Description">Allows to diaply a mesh, using different coloutr for the different node categories (local, shadow..)</param>
+<param name="Reference">N/A</param>
+<param name="Summary">N/A</param>
+<param name="Description">Displays a mesh, using different colour for the different node categories (local, shadow..)</param>
<!--Now the interesting stuff-->
-
-
<list name="Params">
+ <struct>
+ <param name="Name">displayNodes</param>
+ <param name="Type">Bool</param>
+ <param name="Default">False</param>
+ <param name="Description">If true, the nodes will appear as small squares.</param>
+ </struct>
<struct>
<param name="Name">localColour</param>
<param name="Type">String</param>
<param name="Default">"Black"</param>
- <param name="Description">Colour used to draw the local nodes</param>
+ <param name="Description">Colour used to draw the local nodes.</param>
</struct>
<struct>
<param name="Name">shadowColour</param>
<param name="Type">String</param>
<param name="Default">"Blue"</param>
- <param name="Description">Colour used to draw the Shadow nodes</param>
+ <param name="Description">Colour used to draw the Shadow nodes. (Not currently implemented)</param>
</struct>
<struct>
<param name="Name">vacantColour</param>
<param name="Type">String</param>
<param name="Default">"Grey"</param>
- <param name="Description">Colour used to draw the vacant nodes</param>
+ <param name="Description">Colour used to draw the vacant nodes. (Not currently implemented)</param>
</struct>
+
<struct>
<param name="Name">nodeNumbers</param>
<param name="Type">Bool</param>
<param name="Default">False</param>
- <param name="Description">If true, all the nodes numbers will be drawn</param>
+ <param name="Description">If True, all the nodes numbers will be drawn. (Not currently implemented)</param>
</struct>
<struct>
<param name="Name">elementNumbers</param>
<param name="Type">Bool</param>
<param name="Default">False</param>
- <param name="Description">if True, all the element numbers will be drawn</param>
- </struct>
- <struct>
- <param name="Name">displayNodes</param>
- <param name="Type">Bool</param>
- <param name="Default">False</param>
- <param name="Description">If true, the nodes will appear as small squares</param>
- </struct>
- <struct>
- <param name="Name">colour</param>
- <param name="Type">String</param>
- <param name="Default">"black"</param>
- <param name="Description">general colour used if the other ones are not set</param>
+ <param name="Description">If True, all the element numbers will be drawn. (Not currently implemented)</param>
</struct>
</list>
@@ -69,13 +62,17 @@
<param name="Essential">True</param>
<param name="Name">Mesh</param>
<param name="Type">Mesh</param>
- <param name="Description">Mesh to draw</param>
+ <param name="Description">Mesh to visualise.</param>
</struct>
-
-<!-- PLEASE, check the above struct information is accurate, in line number 191 of the c file and then remove this comment afterwards -->
-
</list>
<!-- Add an exmaple XML if possible -->
-<param name="Example">...</param>
+<param name="Example">
+ <struct name="meshViewer">
+ <param name="Type">lucMeshViewer</param>
+ <param name="Mesh">linearMesh</param>
+ <param name="displayNodes">true</param>
+ <param name="localColour">blue</param>
+ </struct>
+</param>
diff -r 7a689a5e914f -r c2f9576fc655 DrawingObjects/src/VectorArrowCrossSection.meta
--- a/DrawingObjects/src/VectorArrowCrossSection.meta Fri Oct 31 18:38:45 2008 +1100
+++ b/DrawingObjects/src/VectorArrowCrossSection.meta Wed Nov 05 17:18:15 2008 +1100
@@ -11,8 +11,8 @@
<param name="Copyright">Copyright (c) 2005, Monash Cluster Computing</param>
<param name="License">http://www.opensource.org/licenses/bsd-license.php</param>
<param name="Parent">lucOpenGLDrawingObject</param>
-<param name="Reference">...</param>
-<param name="Summary">...</param>
+<param name="Reference">N/A</param>
+<param name="Summary">N/A</param>
<param name="Description">Samples the values of a vector field in a plane and draws arrows to represent the direction and scaled to represent the magnitude.</param>
<!--Now the interesting stuff-->
@@ -23,25 +23,25 @@
<param name="Name">resolution</param>
<param name="Type">UnsignedInt</param>
<param name="Default">8</param>
- <param name="Description">The default value for the resolutionX, resolutionY and resolutionZ. If these values aren't set the sampling grid will be uniform with this number of verticies in each direction.</param>
+ <param name="Description">The default value for the resolutionX, resolutionY and resolutionZ. If these values aren't set the sampling grid will be uniform with this number of arrows in each direction.</param>
</struct>
<struct>
<param name="Name">resolutionX</param>
<param name="Type">UnsignedInt</param>
<param name="Default">defaultResolution</param>
- <param name="Description">The number of sample points in the X direction.</param>
+ <param name="Description">The number of arrows in the X direction.</param>
</struct>
<struct>
<param name="Name">resolutionY</param>
<param name="Type">UnsignedInt</param>
<param name="Default">defaultResolution</param>
- <param name="Description">The number of sample points in the Y direction.</param>
+ <param name="Description">The number of arrows in the Y direction.</param>
</struct>
<struct>
<param name="Name">resolutionZ</param>
<param name="Type">UnsignedInt</param>
<param name="Default">defaultResolution</param>
- <param name="Description">The number of sample points in the Z direction.</param>
+ <param name="Description">The number of arrows in the Z direction.</param>
</struct>
<struct>
<param name="Name">crossSection</param>
More information about the CIG-COMMITS
mailing list