[cig-commits] r4149 - in long/3D/Gale/trunk/src/StGermain: . Discretisation/Geometry/src

walter at geodynamics.org walter at geodynamics.org
Tue Aug 1 01:53:50 PDT 2006


Author: walter
Date: 2006-08-01 01:53:50 -0700 (Tue, 01 Aug 2006)
New Revision: 4149

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.c
   long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.h
   long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/TensorMath.h
Log:
 r2613 at earth:  boo | 2006-08-01 01:50:41 -0700
  r2592 at earth (orig r3715):  KathleenHumble | 2006-07-26 20:55:48 -0700
  Updated comments in
  FullTensorMath.*, ComplexVectorMath.* and TensorMath.h
  
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2612
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3714
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2613
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3715

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.c	2006-08-01 08:53:46 UTC (rev 4148)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.c	2006-08-01 08:53:50 UTC (rev 4149)
@@ -45,6 +45,7 @@
 #include <math.h>
 #include <assert.h>
 
+/**(Assumes <=3D),  Set one ComplexVector to another */
 void ComplexVector_Set(CoordC set, CoordC dest) {
 	dest[0][REAL_PART] = set[0][REAL_PART];
 	dest[0][IMAG_PART] = set[0][IMAG_PART];
@@ -53,7 +54,8 @@
 	dest[2][REAL_PART] = set[2][REAL_PART];
 	dest[2][IMAG_PART] = set[2][IMAG_PART];
 }
-
+/**(Assumes 3D),  Set complex numbers to entries of function.
+One drawback, scalars must already be defined as complex numbers */
 void ComplexVector_SetScalar( Cmplx a, Cmplx b, Cmplx c, CoordC dest ) {
 	dest[0][REAL_PART] = a[REAL_PART];
 	dest[0][IMAG_PART] = a[IMAG_PART];
@@ -65,21 +67,21 @@
 }
 
 
-	/* dest = a + b */
+	/** (Assumes 3D), Add two complex vectors:  dest = a + b */
 void ComplexVector_Add( CoordC a, CoordC b, CoordC dest ) {
 	Cmplx_Add( a[0], b[0], dest[0] );
 	Cmplx_Add( a[1], b[1], dest[1] );
 	Cmplx_Add( a[2], b[2], dest[2] );
 }	
 		
-	/* dest = a - b */
+	/* (Assumes 3D), Subtract two complex vectors: dest = a - b */
 void ComplexVector_Sub( CoordC a, CoordC b, CoordC dest ) {
 	Cmplx_Subtract( a[0], b[0], dest[0] );
 	Cmplx_Subtract( a[1], b[1], dest[1] );
 	Cmplx_Subtract( a[2], b[2], dest[2] );
 }
 			
-	/* returns the dot product of a and b */
+	/*(Assumes 3D), Returns the dot product of two complex vectors, a and b */
 void ComplexVector_Dot(CoordC a, CoordC b, Cmplx destSum ) {
 	CoordC dest;
 
@@ -90,13 +92,13 @@
 	Cmplx_Add(destSum, dest[2], destSum);
 	
 }	
-	/* dest = a * s */
+	/** (Assumes 3D), Multiply two complex vectors: dest = a * s */
 void ComplexVector_Mult(CoordC a, Cmplx s, CoordC dest ) {
 	Cmplx_Multiply(a[0], s, dest[0]);
 	Cmplx_Multiply(a[1], s, dest[1]);
 	Cmplx_Multiply(a[2], s, dest[2]);
 }
- 
+/** (Assumes 3D), Multiply complex vector by real number */ 
 void ComplexVector_MultReal(CoordC a, double valueReal, CoordC dest ) {
 	Cmplx value;
 	value[REAL_PART] = valueReal;
@@ -106,7 +108,7 @@
 	Cmplx_Multiply(a[2], value, dest[2]);
 }
 
-	/* returns the magnitude of a */
+	/** (Assumes 3D), Returns the magnitude of complex vector a */
 double ComplexVector_Mag(CoordC a ) {
 	double a_0, a_1, a_2;
 	a_0 = Cmplx_Modulus(a[0]);
@@ -114,7 +116,7 @@
 	a_2 = Cmplx_Modulus(a[2]);
 	return sqrt(a_0*a_0 + a_1*a_1 + a_2*a_2); 	
 }
-	/* vector projection of a onto b, store result in dest */
+	/** (Assumes 3D), vector projection of a onto b, store result in dest */
 void ComplexVector_Proj(CoordC a, CoordC b, CoordC dest ) {
 		/* Calculate norm of b */
 		Cmplx tmp;
@@ -124,7 +126,7 @@
 		ComplexVector_Mult( dest, tmp, dest );
 }
 	
-	
+/** (Assumes 3D), Calculates cross product of two vectors */	
 void ComplexVector_Cross( CoordC a, CoordC b, CoordC dest ) {
 
 	Cmplx 	ans1, ans2;
@@ -143,7 +145,7 @@
 
 }
 
-
+/** (Assumes 3D), Divide Complex vector by complex number */
 void ComplexVector_Div( CoordC a, Cmplx s, CoordC dest )
 {
 	Cmplx	inv, one;
@@ -158,7 +160,7 @@
 	Cmplx_Multiply(a[2], inv, dest[2]);
 }
 
-
+/** (Assumes 3D), Normalises complex vector */
 void ComplexVector_Norm(CoordC a, CoordC dest) {
 	double invMag;
 	
@@ -168,7 +170,7 @@
 
 }
 
-
+/** (Assumes 3D), Swaps coords based on i,j,k input */
 void ComplexVector_Swizzle( CoordC src, unsigned char iInd, 
 		unsigned char jInd, unsigned char kInd, CoordC dst ) {
 	assert( iInd < 3 && jInd < 3 && kInd < 3 );
@@ -190,7 +192,7 @@
 
 
 /** StGermain_ComplexRotateVector takes an argument 'vectorToRotate', and rotates it through 
-three angles for the x, y and z coordinates.(phi, theta, eta) respectively I believe.
+three angles for the x, y and z coordinates.(\alpha, \beta, \gama) respectively I believe.
 The angles should be reals, and in radians.
 This function cannot use Rodrigues' Rotation Formula because that is only defined for reals.
 See: 
@@ -243,8 +245,8 @@
 	Cmplx_Add(tmp, r_2, rotatedVector[2]);
 }		
 
-/** StGermain_RotateCoordinateAxis multiplies a vector with a Rotation Matrix to rotate it around a co-ordinate axis -
-Is a simpler function than StGermain_RotateVector for more specific cases where the vector is to be rotated around one of the axes of the co-ordinate system. The arguments are the same except the the 'axis' argument is of type 'Index' which could be either I_AXIS, J_AXIS or K_AXIS. Vectors have to be the size of 3 doubles.
+/** StGermain_RotateCoordinateAxisComplex multiplies a vector with a Rotation Matrix to rotate it around a co-ordinate axis -
+Is a simpler function than StGermain_RotateComplexVector for more specific cases where the vector is to be rotated around one of the axes of the co-ordinate system. The arguments are the same except the the 'axis' argument is of type 'Index' which could be either I_AXIS, J_AXIS or K_AXIS. Vectors have to be the size of 3 doubles.
 See, Eric W. Weisstein. "Rotation Matrix." 
 From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/RotationMatrix.htm */
 void StGermain_RotateCoordinateAxisComplex( Cmplx* vector, 
@@ -338,9 +340,9 @@
 	}	
 }
 
-/** StGermain_VectorMagnitude calculates the magnitude of a vector
+/** StGermain_ComplexVectorMagnitude calculates the magnitude of a vector
 |v| = \sqrt{ v . v } 
-This function uses function StGermain_VectorDotProduct to calculate v . v. 
+This function uses function StGermain_ComplexVectorDotProduct to calculate v . v. 
 Vector has to be of size dim doubles */
 double StGermain_ComplexVectorMagnitude(Cmplx* vector, Index dim) {
 	Cmplx dotProduct;
@@ -349,10 +351,8 @@
 	return sqrt(Cmplx_Modulus(dotProduct));
 }
 
-/* StGermain_VectorDotProduct calculates the magnitude of a vector
-|v| = \sqrt{ v . v } 
-This function uses function StGermain_VectorDotProduct to calculate v . v. 
-Vectors have to be of size dim doubles
+/* StGermain_ComplexVectorDotProduct calculates the complex valued dot product of two
+complex vectors
 */
 void StGermain_ComplexVectorDotProduct(Cmplx* vector1, Cmplx* vector2, Dimension_Index dim, Cmplx dotProduct) {
 	dotProduct[REAL_PART] = 0.0;
@@ -386,7 +386,7 @@
 	
 }
 
-/* See Eric W. Weisstein. "Cross Product." 
+/** See Eric W. Weisstein. "Cross Product." 
 From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/CrossProduct.html 
 Tested against http://www.engplanet.com/redirect.html?3859 */
 void StGermain_ComplexVectorCrossProduct(Cmplx* destination, Cmplx* vector1, Cmplx* vector2) {
@@ -406,7 +406,7 @@
 	Cmplx_Subtract(c_1, c_2, destination[2]);
 }
 
-/* StGermain_VectorCrossProductMagnitude - See Eric W. Weisstein. "Cross Product." 
+/** StGermain_VectorCrossProductMagnitude - See Eric W. Weisstein. "Cross Product." 
 From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/CrossProduct.html 
 |a \times b| = |a||b|\sqrt{ 1 - (\hat a . \hat b)^2}
 */
@@ -425,7 +425,7 @@
 }
 
 
-/** StGermain_ScalarTripleProduct - Calculates the scalar vector product of three vectors -
+/** StGermain_ComplexScalarTripleProduct - Calculates the scalar vector product of three vectors -
  * see Eric W. Weisstein. "Scalar Triple Product." From MathWorld--A Wolfram Web Resource. 
 	http://mathworld.wolfram.com/ScalarTripleProduct.html
  * Assumes 3 Dimensions */
@@ -438,10 +438,10 @@
 }
 
 
-/* StGermain_VectorNormalise calculates the magnitude of a vector
+/* StGermain_ComplexVectorNormalise calculates the magnitude of a vector
 \hat v = frac{v} / {|v|}
 This function uses function StGermain_VectorDotProduct to calculate v . v. 
-Vector has to be of size dim doubles */
+Vector has to be of size dim Cmplx */
 void StGermain_ComplexVectorNormalise(Cmplx* vector, Index dim) {
 	double mag;
 
@@ -470,8 +470,8 @@
 
 #define ONE_THIRD 0.3333333333333333333
 
-/* Calculates the position vector to the centroid of a triangle whose verticies are given by position vectors 
-Position vectors have to be of size dim doubles */
+/*StGermain_ComplexTriangleCentroid Calculates the position vector to the centroid of a triangle whose verticies are given by position vectors 
+Position vectors have to be of size dim Cmplx */
 
 void StGermain_ComplexTriangleCentroid( Cmplx* centroid, Cmplx* pos0, Cmplx* pos1, Cmplx* pos2, Index dim) {
 	Cmplx tmp;
@@ -502,7 +502,10 @@
 	}
 }
 
-
+/** Prints complex Vector using %g on all entries.
+TODO: would like this to be specified from function call
+with automatic default value
+*/
 void StGermain_PrintComplexVector( Stream* stream, Cmplx* vector, Index dim ) {
 	Index d;
 
@@ -517,7 +520,8 @@
 	
 	Journal_Printf( stream, "%g + i %g}\n", vector[d][REAL_PART], vector[d][IMAG_PART] );
 }
-
+/** Converts ComplexVector into a vector,
+but only if there are no non-zero imaginary values. */
 void ComplexVector_ToVector(CoordC complexVector, Dimension_Index dim, Coord vector) {
 	Dimension_Index index;
 	for (index = 0; index < dim; index++) {
@@ -530,7 +534,8 @@
 		}
 	}
 }
-
+/** Converts vector into Complex vector, seting all imaginary 
+parts to zero */
 void Vector_ToComplexVector(Coord vector, Dimension_Index dim, CoordC complexVector) {
 	Dimension_Index index;
 	for (index = 0; index < dim; index++) {

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.h	2006-08-01 08:53:46 UTC (rev 4148)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/ComplexVectorMath.h	2006-08-01 08:53:50 UTC (rev 4149)
@@ -27,10 +27,10 @@
 **  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 **
 ** Role:
-**    Provides basic vector operations.
+**    Provides basic complex vector operations.
 **
 ** Assumptions:
-**    - Coord is an array of 3 Cmplx. 
+**    - CoordC is an array of 3 Cmplx. 
 **
 ** Comments:
 **    In any operation that involves two or more input vectors, those vectors 

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.c	2006-08-01 08:53:46 UTC (rev 4148)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.c	2006-08-01 08:53:50 UTC (rev 4149)
@@ -300,7 +300,7 @@
 For a given tensorArray and return the answers in a ComplexEigenvector structure.*/
 void TensorArray_CalcAllEigenFunctions(TensorArray tensor, Dimension_Index dim, Bool eigenFlag, ComplexEigenvector* eigenvectorList) {
 /**This function will call the blas-lapack library and calculate the eigenvalues and eigenvectors */
-	/** Define functions needed to pass to blaslapack library function */
+	/* Define functions needed to pass to blaslapack library function */
 	char jobVecLeft='V';
 	char jobVecRight='N';
 	
@@ -317,52 +317,52 @@
 	//char* 	errorStringValues;
 	Stream* errorStream = Journal_Register( ErrorStream_Type, "FullTensorMath" );
 	
-	/** Set size of workspace to pass to function */
+	/* Set size of workspace to pass to function */
 	dimWorkSpace = 10*dim;
 
-	/** define array size */
+	/* define array size */
 	arrayA = Memory_Alloc_Array( double, dim * dim, "ArrayA" );				
 
-	/** define output eigenvalue matrices */
+	/* define output eigenvalue matrices */
 	outputReal = Memory_Alloc_Array( double, dim, "OutputReal" );				
 	outputImag = Memory_Alloc_Array( double, dim, "OutputImag" );
 	for (row_I = 0; row_I < dim; row_I++) {
 		outputReal[row_I] = 0;
 		outputImag[row_I] = 0;
 	}
-	/** Define workspace */
+	/* Define workspace */
 	workSpace = Memory_Alloc_Array( double, dimWorkSpace, "DimWorkSpace" );
 	
-	/** Transpose array so that it is in Fortran-style indexing */
+	/* Transpose array so that it is in Fortran-style indexing */
 	for( row_I = 0 ; row_I < dim ; row_I++ ) {
 		 for( col_I = 0 ; col_I < dim ; col_I++ ) {
 			arrayA[ ( row_I * dim ) + col_I ] = tensor[TensorArray_TensorMap(row_I, col_I, dim)];
 		 }
 	}
-	 /** Turn off eigenvector calculations if eigenvector flag is not set */
+	 /* Turn off eigenvector calculations if eigenvector flag is not set */
 	if (eigenFlag == False) {
 		 jobVecLeft = 'N';
 	}
-	/** Set sizes for eigenvectors */
+	/* Set sizes for eigenvectors */
 	if (jobVecLeft=='V') {
-		/** times size by 2 to account for complex eigenvectors */
+		/* times size by 2 to account for complex eigenvectors */
 		leadDimVL = 2*dim;
 	}
 	else {
 		leadDimVL = 1;
 	}
-	/** Set sizes for alternate eigenvectors
+	/* Set sizes for alternate eigenvectors
 	This is currently always turned off since calculating right eigenvectors
 	as well is redundant */
 	if (jobVecRight=='V') {
-		/** times 2 to account for complex eigenvectors */
+		/* times 2 to account for complex eigenvectors */
 		leadDimVR = 2*dim;
 	}
 	else {
 		leadDimVR = 1;
 	}
 	
-	/** set size of eigenvector arrays */
+	/* set size of eigenvector arrays */
 	leftEigenVec = Memory_Alloc_Array( double, leadDimVL * dim, "LeftEigenVec" );				
 	rightEigenVec = Memory_Alloc_Array( double, leadDimVR * dim, "RightEigenVec" );
 	for (row_I = 0; row_I < leadDimVL * dim; row_I++) {
@@ -372,7 +372,7 @@
 		rightEigenVec[row_I] = 0;
 	}
 	
-	/** Definitions of lapack call inputs (from dgeev man page):
+	/* Definitions of lapack call inputs (from dgeev man page):
 
 		JOBVL   (input) CHARACTER*1
 				  = 'N': left eigenvectors of A are not computed;
@@ -440,7 +440,7 @@
 	*/	 
 
 
-	/** Passes into blaslapack function:
+	/** Passes into blaslapack function dgeev:
 		 From Man page:
 		 	1.  JOBVL			2.	JOBVR 			3.	N 
 			4.	A 				5.	LDA 			6.	WR 
@@ -456,14 +456,14 @@
 			13. &dimWorkSpace	14. &INFO		 
 		 */
 		 
-	/** Call blas-lapack function, dgeev through stg_lapack header file substitution
-	to take account of dirrerent Fortran compilers	*/	 
+	/** Calls blas-lapack function, dgeev through stg_lapack header file substitution
+	to take account of different Fortran compilers	*/	 
 	stg_dgeev( &jobVecLeft, &jobVecRight, &dim, arrayA, &dim, 
 	 		outputReal, outputImag, leftEigenVec, &leadDimVL, 
 	 		rightEigenVec, &leadDimVR, workSpace, &dimWorkSpace, &INFO );
 
 
-	/** Check flag for succesful calculation */
+	/* Check flag for succesful calculation */
 
 	if (INFO < 0) {
 		Journal_Printf( errorStream, "Error in %s, Blas-Lapack failed at %f-th argument for tensor:", 
@@ -479,9 +479,9 @@
 	}
 	
 
-/**Pass values back */
+/*Pass values back */
 	errorValue = STG_TENSOR_ERROR;	
-	/** Assign eigenvalues */
+	/* Assign eigenvalues */
 	for (col_I=0; col_I < dim; col_I++) {
 		
 		eigenvectorList[col_I].eigenvalue[REAL_PART] = outputReal[col_I];
@@ -494,12 +494,12 @@
 		}	
 	}
 	
-	/** If eigenvectors have been calculated */
+	/* If eigenvectors have been calculated */
 	if (eigenFlag == True ) {
 		int index_K;
 		int numSign;
 		
-		/** Assign eigenvectors - see format for VL in comments for lapack pass above*/
+		/* Assign eigenvectors - see format for VL in comments for lapack pass above*/
 		for (col_I=0; col_I < dim; col_I++) {
 			
 			if (outputImag[col_I] == 0.0) {
@@ -511,7 +511,7 @@
 			else {
 				for (index_K = col_I; index_K <= col_I + 1; index_K++) {
 					
-					/** set sign of complex vector components */
+					/* set sign of complex vector components */
 					if (index_K == col_I) {
 						numSign = -1;
 					}
@@ -520,8 +520,8 @@
 					}	
 					for (row_I = 0; row_I < dim; row_I++) {
 					
-						/** u(index_J, index_I) = v(index_I, index_J) 
-											     -/+ i *v(index_I, index_J+1) */
+						/* u(col, row) = v(row, col) 
+											     \+- i * v(row, col + 1) */
 						eigenvectorList[index_K].vector[row_I][REAL_PART] = 
 							leftEigenVec[col_I * leadDimVL + row_I];
 			
@@ -535,7 +535,7 @@
 			}
 		}
 	}
-	/** Round up values that are less than the error bar */
+	/* Round up values that are less than the error bar */
 	for (row_I = 0; row_I < dim; row_I++) {
 		for (col_I = 0; col_I <dim; col_I++) {
 			
@@ -550,7 +550,7 @@
 	
 	
 				
-	/** Free memory and exit function */
+	/* Free memory and exit function */
 	Memory_Free( arrayA );
 	Memory_Free( outputReal );
 	Memory_Free( outputImag );

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.h	2006-08-01 08:53:46 UTC (rev 4148)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/FullTensorMath.h	2006-08-01 08:53:50 UTC (rev 4149)
@@ -27,10 +27,9 @@
 **  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 **
 ** Role:
-**    Provides basic vector operations.
+**    Provides basic full tensor operations and conversions.
 **
 ** Assumptions:
-**
 ** Comments:
 **
 ** $Id: FullTensorMath.h  $
@@ -44,6 +43,17 @@
 #include "ComplexVectorMath.h"
 #include "TensorMath.h"
 
+
+/** Create complex eigenvalue and vector:
+	This creates a Cmplx tuple to represent the vector
+	And a Complex value to represent the eigenvalue.
+	These can be referenced by:
+	{eigenvectorName}.vector[{indexNumber}], or {eigenvectorName}.eigenvalue
+	*/
+typedef struct {
+	XYZC    vector;
+	Cmplx eigenvalue;
+} ComplexEigenvector;
 	/** TensorArray - Tensor (t_{ij}) here is defined in 2D as
 	 * t_{00} = tensor[0] t_{01} = tensor[1]
 	 * t_{10} = tensor[2] t_{11} = tensor[3] 
@@ -69,43 +79,34 @@
 	 * tensor[4] = u_{02} = u_{20}
 	 * tensor[5] = u_{12} = u_{21}
 	 */
-/** Create complex eigenvalue and vector:
-	This creates a Cmplx tuple to represent the vector
-	And a Complex value to represent the eigenvalue.
-	These can be referenced by:
-	{eigenvectorName}.vector[{indexNumber}], or {eigenvectorName}.eigenvalue
-	*/
-	 
-typedef struct {
-	XYZC    vector;
-	Cmplx eigenvalue;
-} ComplexEigenvector;
 
-
 /** TensorIndex creates an enumerated type that can be used as 
 Tensor indices for referencing:
 These indexes are defined as: 
 	ST ~ symmetric tensorArray
-	FT ~ full tensorArray
-	2D ~ in 2 dimensions
-	3D ~ in 3 dimensions
-For example, tensorArray[FT2D_00]
+	FT ~ full tensorArray \\
+	2D ~ in 2 dimensions \\
+	3D ~ in 3 dimensions \\
+For example, tensorArray[FT2D_00] \\
 
 And the indexes follow this naming scheme (for full tensors):
 For 2D:
-\left{ 	a_{00},	a_{01}
+\left{ 	a_{00},	a_{01} \\
 		a_{10},	a_{11} \right}
 For 3D:		
-\left{ 	a_{00},	a_{01},	a_{02}
-		a_{10},	a_{11},	a_{12}
+\left{ 	a_{00},	a_{01},	a_{02} \\
+		a_{10},	a_{11},	a_{12} \\
 		a_{20}, a_{21}, a_{22} \right}
 
 Symmetric tensors only use the upper triangle indicee definitions.
 
 */
  typedef enum TensorIndexST2D { ST2D_00=0, ST2D_11=1, ST2D_01=2 } TensorIndexST2D;
+ /** See description for TensorIndexST2D */
  typedef enum TensorIndexFT2D { FT2D_00=0, FT2D_11=3, FT2D_01=1, FT2D_10=2 } TensorIndexFT2D;
+ /** See description for TensorIndexST2D */
  typedef enum TensorIndexST3D { ST3D_00=0, ST3D_11=1, ST3D_22=2, ST3D_01=3, ST3D_02=4, ST3D_12=5} TensorIndexST3D;
+  /** See description for TensorIndexST2D */
  typedef enum TensorIndexFT3D { FT3D_00=0, FT3D_11=4, FT3D_22=8, FT3D_01=1, FT3D_02=2, FT3D_10=3, FT3D_12=5, FT3D_20=6, FT3D_21=7} TensorIndexFT3D;
 
 /*Define mapping function for enumerated types to arrays */

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/TensorMath.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/TensorMath.h	2006-08-01 08:53:46 UTC (rev 4148)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/src/TensorMath.h	2006-08-01 08:53:50 UTC (rev 4149)
@@ -26,7 +26,7 @@
 **  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 **
 ** Role:
-**    Provides basic vector operations.
+**    Provides basic tensor operations.
 **
 ** Assumptions:
 **



More information about the cig-commits mailing list