示例#1
0
static int CVDenseSolve(CVodeMem cv_mem, N_Vector b, N_Vector ycur,
                        N_Vector fcur)
{
  CVDenseMem cvdense_mem;
  realtype *bd;
  
  cvdense_mem = (CVDenseMem) lmem;
  
  bd = N_VGetData(b);
  DenseBacksolve(M, pivots, bd);
  N_VSetData(bd, b);

  /* If BDF, scale the correction to account for change in gamma */
  if ((lmm == BDF) && (gamrat != ONE)) {
    N_VScale(TWO/(ONE + gamrat), b, b);
  }

  return(0);
}
示例#2
0
static int CVDenseSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight,
                        N_Vector ycur, N_Vector fcur)
{
    CVDenseMem cvdense_mem;
    realtype *bd;

    cvdense_mem = (CVDenseMem) lmem;

    bd = N_VGetArrayPointer(b);

    DenseBacksolve(M, pivots, bd);

    /* If CV_BDF, scale the correction to account for change in gamma */
    if ((lmm == CV_BDF) && (gamrat != ONE)) {
        N_VScale(TWO/(ONE + gamrat), b, b);
    }

    last_flag = CVDENSE_SUCCESS;
    return(0);
}