Example #1
0
/*
   ------------------------------------------------------
   purpose -- return the number of nonzero L_{K,J} blocks
 
   created -- 98may04, cca
   ------------------------------------------------------
*/
int
FrontMtx_nLowerBlocks (
   FrontMtx   *frontmtx
) {
int   nblocks ;
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL ) {
   fprintf(stderr, "\n fatal error in FrontMtx_nLowerBlocks(%p)"
           "\n bad input\n", frontmtx) ;
   spoolesFatal();
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   fprintf(stderr, "\n fatal error in FrontMtx_nLowerBlocks()"
           "\n data mode is 1, not 2\n") ;
   spoolesFatal();
}
if ( FRONTMTX_IS_NONSYMMETRIC(frontmtx) ) {
   nblocks = frontmtx->lowerblockIVL->tsize ;
} else {
   nblocks = frontmtx->upperblockIVL->tsize ;
}
return(nblocks) ; }
Example #2
0
/*
   ---------------------------------------------------------
   purpose -- return a pointer to the lower block IVL object
 
   created -- 98jun13, cca
   ---------------------------------------------------------
*/
IVL *
FrontMtx_lowerBlockIVL (
   FrontMtx   *frontmtx
) {
IVL    *ivl ;
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL ) {
   fprintf(stderr, "\n fatal error in FrontMtx_lowerBlockIVL(%p)"
           "\n bad input\n", frontmtx) ;
   spoolesFatal();
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   fprintf(stderr, "\n fatal error in FrontMtx_lowerBlockIVL()"
           "\n data mode is 1, not 2\n") ;
   spoolesFatal();
}
if ( FRONTMTX_IS_NONSYMMETRIC(frontmtx) ) {
   ivl = frontmtx->lowerblockIVL ;
} else {
   ivl = frontmtx->upperblockIVL ;
}
return(ivl) ; }
Example #3
0
/*
   --------------------------------------------------
   purpose -- fill *pnadj with the number of fronts K
              such that U_{J,K} != 0 and *padj with a
              pointer to a list of those fronts
 
   created -- 98may04, cca
   --------------------------------------------------
*/
void
FrontMtx_upperAdjFronts (
   FrontMtx   *frontmtx,
   int         J,
   int         *pnadj,
   int         **padj
) {
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL
   || J < 0 || J >= frontmtx->nfront
   || pnadj == NULL || padj == NULL ) {
   fprintf(stderr,
           "\n fatal error in FrontMtx_upperAdjFronts(%p,%d,%p,%p)"
          "\n bad input\n", frontmtx, J, pnadj, padj) ;
   spoolesFatal();
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   fprintf(stderr, "\n fatal error in FrontMtx_upperAdjFronts()"
           "\n data mode is 1, not 2\n") ;
   spoolesFatal();
}
IVL_listAndSize(frontmtx->upperblockIVL, J, pnadj, padj) ;
 
return ; }
Example #4
0
/*
   --------------------------------------------------------
   purpose -- return a pointer to the (K,J) lower submatrix
 
   created -- 98may04, cca
   --------------------------------------------------------
*/
SubMtx *
FrontMtx_lowerMtx (
   FrontMtx   *frontmtx,
   int         K,
   int         J
) {
int    rc ;
SubMtx   *mtx ;
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL
   || J < 0 || J >= frontmtx->nfront
   || K < J || K > frontmtx->nfront ) {
   fprintf(stderr, "\n fatal error in FrontMtx_lowerMtx(%p,%d,%d)"
           "\n bad input\n", frontmtx, K, J) ;
   spoolesFatal();
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   if ( K == frontmtx->nfront ) {
      mtx = frontmtx->p_mtxLNJ[J] ;
   } else if ( K == J ) {
      mtx = frontmtx->p_mtxLJJ[J] ;
   }
} else if ( frontmtx->lowerhash == NULL ) {
   mtx = NULL ;
} else {
   rc = I2Ohash_locate(frontmtx->lowerhash, K, J, (void *) &mtx) ;
   if ( rc == 0 ) {
      mtx = NULL ;
   }
}
return(mtx) ; }
Example #5
0
/*
   --------------------------------------------------
   purpose -- fill *pnadj with the number of fronts K
              such that L_{K,J} != 0 and *padj with a
              pointer to a list of those fronts
 
   created -- 98may04, cca
   --------------------------------------------------
*/
void
FrontMtx_lowerAdjFronts (
   FrontMtx   *frontmtx,
   int         J,
   int         *pnadj,
   int         **padj
) {
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL
   || J < 0 || J >= frontmtx->nfront
   || pnadj == NULL || padj == NULL ) {
   fprintf(stderr,
           "\n fatal error in FrontMtx_lowerAdjFronts(%p,%d,%p,%p)"
          "\n bad input\n", frontmtx, J, pnadj, padj) ;
   exit(-1) ;
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   fprintf(stderr, "\n fatal error in FrontMtx_lowerAdjFronts()"
           "\n data mode is 1-D, not 2-D\n") ;
   exit(-1) ;
} else if ( FRONTMTX_IS_NONSYMMETRIC(frontmtx) ) {
   IVL_listAndSize(frontmtx->lowerblockIVL, J, pnadj, padj) ;
} else {
   IVL_listAndSize(frontmtx->upperblockIVL, J, pnadj, padj) ;
}
return ; }
Example #6
0
/*
   ---------------------------------------------------------
   purpose -- return a pointer to the upper block IVL object
 
   created -- 98jun13, cca
   ---------------------------------------------------------
*/
IVL *
FrontMtx_upperBlockIVL (
   FrontMtx   *frontmtx
) {
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL ) {
   fprintf(stderr, "\n fatal error in FrontMtx_upperBlockIVL(%p)"
           "\n bad input\n", frontmtx) ;
   spoolesFatal();
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   fprintf(stderr, "\n fatal error in FrontMtx_upperBlockIVL()"
           "\n data mode is 1, not 2\n") ;
   spoolesFatal();
}
return(frontmtx->upperblockIVL) ; }
Example #7
0
/*
   ------------------------------------------------------
   purpose -- return the number of nonzero U_{K,J} blocks
 
   created -- 98may04, cca
   ------------------------------------------------------
*/
int
FrontMtx_nUpperBlocks (
   FrontMtx   *frontmtx
) {
/*
   ---------------
   check the input
   ---------------
*/
if ( frontmtx == NULL ) {
   fprintf(stderr, "\n fatal error in FrontMtx_nUpperBlocks(%p)"
           "\n bad input\n", frontmtx) ;
   exit(-1) ;
}
if ( FRONTMTX_IS_1D_MODE(frontmtx) ) {
   fprintf(stderr, "\n fatal error in FrontMtx_nUpperBlocks()"
           "\n data mode is 1, not 2\n") ;
   exit(-1) ;
}
return(frontmtx->upperblockIVL->tsize) ; }