Main Page   Compound List   File List   File Members  

spConfig.h

Go to the documentation of this file.
00001 /* CONFIGURATION MACRO DEFINITIONS for sparse matrix routines */
00023 /*
00024  *  Revision and copyright information.
00025  *
00026  *  Copyright (c) 1985-2003 by Kenneth S. Kundert
00027  *
00028  *  $Date: 2003/06/29 07:08:22 $
00029  *  $Revision: 1.3 $
00030  */
00031 
00032 
00033 #ifndef spCONFIG_DEFS
00034 #define spCONFIG_DEFS
00035 
00036 
00037 
00038 
00039 #ifdef spINSIDE_SPARSE
00040 /*
00041  *  OPTIONS
00042  *
00043  *  These are compiler options.  Set each option to one to compile that
00044  *  section of the code.  If a feature is not desired, set the macro
00045  *  to NO.
00046  */
00047 
00048 /* Begin options. */
00049 
00050 /* Arithmetic Precision
00051  *
00052  * The precision of the arithmetic used by Sparse can be set by
00053  * changing changing the spREAL macro.  This macro is
00054  * contained in the file spMatrix.h.  It is strongly suggested to
00055  * used double precision with circuit simulators.  Note that
00056  * because C always performs arithmetic operations in double
00057  * precision, the only benefit to using single precision is that
00058  * less storage is required.  There is often a noticeable speed
00059  * penalty when using single precision.  Sparse internally refers
00060  * to a spREAL as a RealNumber.
00061  */
00062 
00070 #define  REAL                           YES
00071 
00081 #define  EXPANDABLE                     YES
00082 
00101 #define  TRANSLATE                      YES
00102 
00113 #define  INITIALIZE                     YES
00114 
00139 #define  DIAGONAL_PIVOTING              YES
00140 
00154 #define  ARRAY_OFFSET                   NOT FORTRAN
00155 
00176 #define  MODIFIED_MARKOWITZ             NO
00177 
00183 #define  DELETE                         YES
00184 
00188 #define  STRIP                          YES
00189 
00196 #define  MODIFIED_NODAL                 YES
00197 
00205 #define  QUAD_ELEMENT                   YES
00206 
00213 #define  TRANSPOSE                      YES
00214 
00227 #define  SCALING                        YES
00228 
00234 #define  DOCUMENTATION                  YES
00235 
00241 #define  MULTIPLICATION                 YES
00242 
00246 #define  DETERMINANT                    YES
00247 
00258 #define  STABILITY                      YES
00259 
00265 #define  CONDITION                      YES
00266 
00272 #define  PSEUDOCONDITION                YES
00273 
00279 #define  FORTRAN                        YES
00280 
00288 #define  DEBUG                          YES
00289 
00290 #endif /* spINSIDE_SPARSE */
00291 
00292 /*
00293  *  The following options affect Sparse exports and so are exported as a
00294  *  side effect.  For this reason they use the `sp' prefix.  The boolean
00295  *  constants YES an NO are not defined in spMatrix.h to avoid conflicts
00296  *  with user code, so use 0 for NO and 1 for YES.
00297  */
00298 
00303 #define  spCOMPLEX                      1
00304 
00316 #define  spSEPARATED_COMPLEX_VECTORS    0
00317 
00318 #ifdef spINSIDE_SPARSE
00319 
00320 
00321 
00322 
00323 
00324 
00325 
00326 /*
00327  *  MATRIX CONSTANTS
00328  *
00329  *  These constants are used throughout the sparse matrix routines.  They
00330  *  should be set to suit the type of matrix being solved.
00331  */
00332 
00333 /* Begin constants. */
00334 
00342 #define  DEFAULT_THRESHOLD              1.0e-3
00343 
00349 #define  DIAG_PIVOTING_AS_DEFAULT       YES
00350 
00356 #define  SPACE_FOR_ELEMENTS             6
00357 
00363 #define  SPACE_FOR_FILL_INS             4
00364 
00373 #define  ELEMENTS_PER_ALLOCATION        31
00374 
00382 #define  MINIMUM_ALLOCATED_SIZE         6
00383 
00388 #define  EXPANSION_FACTOR               1.5
00389 
00415 #define  MAX_MARKOWITZ_TIES             100
00416 
00432 #define  TIES_MULTIPLIER                5
00433 
00444 #define  DEFAULT_PARTITION              spAUTO_PARTITION
00445 
00451 #define  PRINTER_WIDTH  80
00452 
00453 
00454 
00455 
00456 
00457 
00458 
00459 
00460 
00461 
00462 #endif /* spINSIDE_SPARSE */
00463 /*
00464  * PORTABILITY MACROS
00465  */
00466 
00467 #ifdef __STDC__
00468 #   define spcCONCAT(prefix,suffix)        prefix ## suffix
00469 #   define spcQUOTE(x)                     # x
00470 #   define spcFUNC_NEEDS_FILE(func,file)   \
00471                 func ## _requires_ ## file ## _to_be_included_
00472 #else
00473 #   define spcCONCAT(prefix,suffix)        prefixsuffix
00474 #   define spcQUOTE(x)                     "x"
00475 #   define spcFUNC_NEEDS_FILE(func,file)   \
00476                 func_requires_file_to_be_included_
00477 #endif
00478 
00479 #if defined(__cplusplus) || defined(c_plusplus)
00480     /*
00481      * Definitions for C++
00482      */
00483 #   define spcEXTERN            extern "C"
00484 #   define spcNO_ARGS
00485 #   define spcCONST             const
00486     typedef void *spGenericPtr;
00487 #else
00488 #ifdef __STDC__
00489     /*
00490      * Definitions for ANSI C
00491      */
00492 #   define spcEXTERN            extern
00493 #   define spcNO_ARGS           void
00494 #   define spcCONST             const
00495     typedef void *spGenericPtr;
00496 #   else
00497     /*
00498      * Definitions for K&R C -- ignore function prototypes
00499      */
00500 #   define spcEXTERN            extern
00501 #   define spcNO_ARGS
00502 #   define spcCONST
00503     typedef char *spGenericPtr;
00504 #endif
00505 #endif
00506 
00507 #ifdef spINSIDE_SPARSE
00508 
00509 
00510 
00511 
00512 
00513 
00514 
00515 /*
00516  *  MACHINE CONSTANTS
00517  *
00518  *  These numbers must be updated when the program is ported to a new machine.
00519  */
00520 
00521 /* Begin machine constants. */
00522 #include <limits.h>
00523 #include <float.h>
00524 
00526 #define  MACHINE_RESOLUTION      DBL_EPSILON
00527 
00529 #define  LARGEST_REAL            DBL_MAX
00530 
00532 #define  SMALLEST_REAL           DBL_MIN
00533 
00535 #define  LARGEST_SHORT_INTEGER   SHRT_MAX
00536 
00538 #define  LARGEST_LONG_INTEGER    LONG_MAX
00539 
00540 
00541 
00542 
00543 
00544 
00545 /* ANNOTATION */
00553 #define  ANNOTATE               NONE
00554 
00558 #define  NONE                   0
00559 
00564 #define  ON_STRANGE_BEHAVIOR    1
00565 
00569 #define  FULL                   2
00570 
00571 #endif /* spINSIDE_SPARSE */
00572 #endif /* spCONFIG_DEFS */

Generated on Mon Jun 30 12:01:27 2003 for Sparse by doxygen1.2.17