Index: trunk/psLib/src/dataManip/psConstants.h
===================================================================
--- trunk/psLib/src/dataManip/psConstants.h	(revision 1879)
+++ trunk/psLib/src/dataManip/psConstants.h	(revision 1903)
@@ -1,5 +1,14 @@
-//
-// Source code comments.
-//
+/** @file  psComments.h
+ *
+ *  This file will hold definitions of various constants as well as common
+ *  macros used throughout psLib.
+ *
+ *  @author GLG, MHPCC
+ *
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-25 23:05:07 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
 
 #define DETERMINE_BRACKET_STEP_SIZE 0.10
@@ -9,2 +18,44 @@
 #define RIGHT_SPLINE_DERIV 0.0
 
+/** Preprocessor macro to generate error on an incorrect type */
+#define PS_CHECK_VECTOR_TYPE(NAME, TYPE) \
+if (NAME->type.type != TYPE) { \
+    psError(__func__,"Invalid operation: %s has incorrect type.", #NAME); \
+}
+
+/** Preprocessor macro to generate error on a NULL vector */
+#define PS_CHECK_NULL_VECTOR(NAME) \
+if (NAME == NULL || NAME->data.V == NULL) { \
+    psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME); \
+}
+
+/** Preprocessor macro to generate error on a NULL poniter */
+#define PS_CHECK_NULL_PTR(NAME) \
+if (NAME == NULL) { \
+    psError(__func__,"Invalid operation: %s is NULL.", #NAME); \
+}
+
+/** Preprocessor macro to generate error for zero length vector */
+#define PS_CHECK_EMPTY_VECTOR(NAME) \
+if (NAME->n < 1) { \
+    psError(__func__,"Invalid operation: %s has zero n value.", #NAME); \
+}
+
+/** Preprocessor macro to generate error on differing size vectors */
+#define PS_CHECK_VECTOR_SIZE_EQUAL(VEC1, VEC2) \
+if (VEC1->n != VEC2->n) { \
+    psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
+}
+
+#define PS_PRINT_VECTOR(NAME) \
+for (int my_i=0;my_i<NAME->n;my_i++) { \
+    printf("%s->data.F32[%d] is %f\n", #NAME, my_i, NAME->data.F32[my_i]); \
+} \
+printf("\n"); \
+
+#define PS_MAX(A, B) \
+(A > B) ? A : B \
+
+#define PS_MIN(A, B) \
+(A < B) ? A : B \
+
