inline void decomr(double fac1,MatrixReal& Jac) { if(calhes) { int ilo=1,ihi=n,lda=n,info; int k=-1; //find the optimum size for array work/ int nn=n; dgehrd_(&nn,&ilo,&ihi,&Jac,&lda,tau,work,&k,&info); k=work[0]; if(lwork<k) { if(work!=0) delete[] work; lwork=k; work=new double[lwork]; } dgehrd_(&nn,&ilo,&ihi,&Jac,&lda,tau,work,&k,&info); if(info!=0) throw OdesException("odes::Matrices::Matrices, decomr: info=", info); calhes=false; } E1.equal_minus(Jac); E1.addDiag(fac1); int info=dech<n>(E1,ipr); if(info!=0) throw OdesException("odes::Matrices::Matrices, decomr (dech): ", info); }
//! build and factorize "real" matrix //! \param fac1 : we add fac1*I to the Jacobian. //! \param Jac the jacobian. inline void decomr(double fac1,MatrixReal& Jac) { E1.equal_minus(Jac); E1.addDiag(fac1); int nn=n,info; dgetrf_(&nn,&nn,&E1,&nn,&(ipivr[0]),&info); if(info!=0) throw OdesException("odes::Matrices::decomr dgetrf,info=",info); }
//! see full matrix case. inline void decomr(double fac1,const MatrixReal& Jac) { E1.equal_minus(Jac); E1.addDiag(fac1); int nn=n,knsub=nsub,knsup=nsup,lldab=ldab,info; dgbtrf_(&nn,&nn,&knsub,&knsup,&E1,&lldab,&(ipivr[0]),&info); if(info!=0) throw OdesException("odes::Matrices::decomr dgbtrf,info=",info); }