annotate liboctave/numeric/DASRT.cc @ 15271:648dabbb4c6b

build: Refactor liboctave into multiple subdirectories. Move libcruft into liboctave. * array/Array-C.cc, array/Array-b.cc, array/Array-ch.cc, array/Array-d.cc, array/Array-f.cc, array/Array-fC.cc, array/Array-i.cc, array/Array-idx-vec.cc, array/Array-s.cc, array/Array-str.cc, array/Array-util.cc, array/Array-util.h, array/Array-voidp.cc, array/Array.cc, array/Array.h, array/Array2.h, array/Array3.h, array/ArrayN.h, array/CColVector.cc, array/CColVector.h, array/CDiagMatrix.cc, array/CDiagMatrix.h, array/CMatrix.cc, array/CMatrix.h, array/CNDArray.cc, array/CNDArray.h, array/CRowVector.cc, array/CRowVector.h, array/CSparse.cc, array/CSparse.h, array/DiagArray2.cc, array/DiagArray2.h, array/MArray-C.cc, array/MArray-d.cc, array/MArray-decl.h, array/MArray-defs.h, array/MArray-f.cc, array/MArray-fC.cc, array/MArray-i.cc, array/MArray-s.cc, array/MArray.cc, array/MArray.h, array/MArray2.h, array/MArrayN.h, array/MDiagArray2.cc, array/MDiagArray2.h, array/MSparse-C.cc, array/MSparse-d.cc, array/MSparse-defs.h, array/MSparse.cc, array/MSparse.h, array/Matrix.h, array/MatrixType.cc, array/MatrixType.h, array/PermMatrix.cc, array/PermMatrix.h, array/Range.cc, array/Range.h, array/Sparse-C.cc, array/Sparse-b.cc, array/Sparse-d.cc, array/Sparse.cc, array/Sparse.h, array/boolMatrix.cc, array/boolMatrix.h, array/boolNDArray.cc, array/boolNDArray.h, array/boolSparse.cc, array/boolSparse.h, array/chMatrix.cc, array/chMatrix.h, array/chNDArray.cc, array/chNDArray.h, array/dColVector.cc, array/dColVector.h, array/dDiagMatrix.cc, array/dDiagMatrix.h, array/dMatrix.cc, array/dMatrix.h, array/dNDArray.cc, array/dNDArray.h, array/dRowVector.cc, array/dRowVector.h, array/dSparse.cc, array/dSparse.h, array/dim-vector.cc, array/dim-vector.h, array/fCColVector.cc, array/fCColVector.h, array/fCDiagMatrix.cc, array/fCDiagMatrix.h, array/fCMatrix.cc, array/fCMatrix.h, array/fCNDArray.cc, array/fCNDArray.h, array/fCRowVector.cc, array/fCRowVector.h, array/fColVector.cc, array/fColVector.h, array/fDiagMatrix.cc, array/fDiagMatrix.h, array/fMatrix.cc, array/fMatrix.h, array/fNDArray.cc, array/fNDArray.h, array/fRowVector.cc, array/fRowVector.h, array/idx-vector.cc, array/idx-vector.h, array/int16NDArray.cc, array/int16NDArray.h, array/int32NDArray.cc, array/int32NDArray.h, array/int64NDArray.cc, array/int64NDArray.h, array/int8NDArray.cc, array/int8NDArray.h, array/intNDArray.cc, array/intNDArray.h, array/module.mk, array/uint16NDArray.cc, array/uint16NDArray.h, array/uint32NDArray.cc, array/uint32NDArray.h, array/uint64NDArray.cc, array/uint64NDArray.h, array/uint8NDArray.cc, array/uint8NDArray.h: Moved from liboctave dir to array subdirectory. * cruft/Makefile.am, cruft/amos/README, cruft/amos/cacai.f, cruft/amos/cacon.f, cruft/amos/cairy.f, cruft/amos/casyi.f, cruft/amos/cbesh.f, cruft/amos/cbesi.f, cruft/amos/cbesj.f, cruft/amos/cbesk.f, cruft/amos/cbesy.f, cruft/amos/cbinu.f, cruft/amos/cbiry.f, cruft/amos/cbknu.f, cruft/amos/cbuni.f, cruft/amos/cbunk.f, cruft/amos/ckscl.f, cruft/amos/cmlri.f, cruft/amos/crati.f, cruft/amos/cs1s2.f, cruft/amos/cseri.f, cruft/amos/cshch.f, cruft/amos/cuchk.f, cruft/amos/cunhj.f, cruft/amos/cuni1.f, cruft/amos/cuni2.f, cruft/amos/cunik.f, cruft/amos/cunk1.f, cruft/amos/cunk2.f, cruft/amos/cuoik.f, cruft/amos/cwrsk.f, cruft/amos/dgamln.f, cruft/amos/gamln.f, cruft/amos/module.mk, cruft/amos/xzabs.f, cruft/amos/xzexp.f, cruft/amos/xzlog.f, cruft/amos/xzsqrt.f, cruft/amos/zacai.f, cruft/amos/zacon.f, cruft/amos/zairy.f, cruft/amos/zasyi.f, cruft/amos/zbesh.f, cruft/amos/zbesi.f, cruft/amos/zbesj.f, cruft/amos/zbesk.f, cruft/amos/zbesy.f, cruft/amos/zbinu.f, cruft/amos/zbiry.f, cruft/amos/zbknu.f, cruft/amos/zbuni.f, cruft/amos/zbunk.f, cruft/amos/zdiv.f, cruft/amos/zkscl.f, cruft/amos/zmlri.f, cruft/amos/zmlt.f, cruft/amos/zrati.f, cruft/amos/zs1s2.f, cruft/amos/zseri.f, cruft/amos/zshch.f, cruft/amos/zuchk.f, cruft/amos/zunhj.f, cruft/amos/zuni1.f, cruft/amos/zuni2.f, cruft/amos/zunik.f, cruft/amos/zunk1.f, cruft/amos/zunk2.f, cruft/amos/zuoik.f, cruft/amos/zwrsk.f, cruft/blas-xtra/cconv2.f, cruft/blas-xtra/cdotc3.f, cruft/blas-xtra/cmatm3.f, cruft/blas-xtra/csconv2.f, cruft/blas-xtra/dconv2.f, cruft/blas-xtra/ddot3.f, cruft/blas-xtra/dmatm3.f, cruft/blas-xtra/module.mk, cruft/blas-xtra/sconv2.f, cruft/blas-xtra/sdot3.f, cruft/blas-xtra/smatm3.f, cruft/blas-xtra/xcdotc.f, cruft/blas-xtra/xcdotu.f, cruft/blas-xtra/xddot.f, cruft/blas-xtra/xdnrm2.f, cruft/blas-xtra/xdznrm2.f, cruft/blas-xtra/xerbla.f, cruft/blas-xtra/xscnrm2.f, cruft/blas-xtra/xsdot.f, cruft/blas-xtra/xsnrm2.f, cruft/blas-xtra/xzdotc.f, cruft/blas-xtra/xzdotu.f, cruft/blas-xtra/zconv2.f, cruft/blas-xtra/zdconv2.f, cruft/blas-xtra/zdotc3.f, cruft/blas-xtra/zmatm3.f, cruft/daspk/datv.f, cruft/daspk/dcnst0.f, cruft/daspk/dcnstr.f, cruft/daspk/ddasic.f, cruft/daspk/ddasid.f, cruft/daspk/ddasik.f, cruft/daspk/ddaspk.f, cruft/daspk/ddstp.f, cruft/daspk/ddwnrm.f, cruft/daspk/dfnrmd.f, cruft/daspk/dfnrmk.f, cruft/daspk/dhels.f, cruft/daspk/dheqr.f, cruft/daspk/dinvwt.f, cruft/daspk/dlinsd.f, cruft/daspk/dlinsk.f, cruft/daspk/dmatd.f, cruft/daspk/dnedd.f, cruft/daspk/dnedk.f, cruft/daspk/dnsd.f, cruft/daspk/dnsid.f, cruft/daspk/dnsik.f, cruft/daspk/dnsk.f, cruft/daspk/dorth.f, cruft/daspk/dslvd.f, cruft/daspk/dslvk.f, cruft/daspk/dspigm.f, cruft/daspk/dyypnw.f, cruft/daspk/module.mk, cruft/dasrt/ddasrt.f, cruft/dasrt/drchek.f, cruft/dasrt/droots.f, cruft/dasrt/module.mk, cruft/dassl/ddaini.f, cruft/dassl/ddajac.f, cruft/dassl/ddanrm.f, cruft/dassl/ddaslv.f, cruft/dassl/ddassl.f, cruft/dassl/ddastp.f, cruft/dassl/ddatrp.f, cruft/dassl/ddawts.f, cruft/dassl/module.mk, cruft/fftpack/cfftb.f, cruft/fftpack/cfftb1.f, cruft/fftpack/cfftf.f, cruft/fftpack/cfftf1.f, cruft/fftpack/cffti.f, cruft/fftpack/cffti1.f, cruft/fftpack/fftpack.doc, cruft/fftpack/module.mk, cruft/fftpack/passb.f, cruft/fftpack/passb2.f, cruft/fftpack/passb3.f, cruft/fftpack/passb4.f, cruft/fftpack/passb5.f, cruft/fftpack/passf.f, cruft/fftpack/passf2.f, cruft/fftpack/passf3.f, cruft/fftpack/passf4.f, cruft/fftpack/passf5.f, cruft/fftpack/zfftb.f, cruft/fftpack/zfftb1.f, cruft/fftpack/zfftf.f, cruft/fftpack/zfftf1.f, cruft/fftpack/zffti.f, cruft/fftpack/zffti1.f, cruft/fftpack/zpassb.f, cruft/fftpack/zpassb2.f, cruft/fftpack/zpassb3.f, cruft/fftpack/zpassb4.f, cruft/fftpack/zpassb5.f, cruft/fftpack/zpassf.f, cruft/fftpack/zpassf2.f, cruft/fftpack/zpassf3.f, cruft/fftpack/zpassf4.f, cruft/fftpack/zpassf5.f, cruft/lapack-xtra/crsf2csf.f, cruft/lapack-xtra/module.mk, cruft/lapack-xtra/xclange.f, cruft/lapack-xtra/xdlamch.f, cruft/lapack-xtra/xdlange.f, cruft/lapack-xtra/xilaenv.f, cruft/lapack-xtra/xslamch.f, cruft/lapack-xtra/xslange.f, cruft/lapack-xtra/xzlange.f, cruft/lapack-xtra/zrsf2csf.f, cruft/link-deps.mk, cruft/misc/blaswrap.c, cruft/misc/cquit.c, cruft/misc/d1mach-tst.for, cruft/misc/d1mach.f, cruft/misc/f77-extern.cc, cruft/misc/f77-fcn.c, cruft/misc/f77-fcn.h, cruft/misc/i1mach.f, cruft/misc/lo-error.c, cruft/misc/lo-error.h, cruft/misc/module.mk, cruft/misc/quit.cc, cruft/misc/quit.h, cruft/misc/r1mach.f, cruft/mkf77def.in, cruft/odepack/cfode.f, cruft/odepack/dlsode.f, cruft/odepack/ewset.f, cruft/odepack/intdy.f, cruft/odepack/module.mk, cruft/odepack/prepj.f, cruft/odepack/scfode.f, cruft/odepack/sewset.f, cruft/odepack/sintdy.f, cruft/odepack/slsode.f, cruft/odepack/solsy.f, cruft/odepack/sprepj.f, cruft/odepack/ssolsy.f, cruft/odepack/sstode.f, cruft/odepack/stode.f, cruft/odepack/svnorm.f, cruft/odepack/vnorm.f, cruft/ordered-qz/README, cruft/ordered-qz/dsubsp.f, cruft/ordered-qz/exchqz.f, cruft/ordered-qz/module.mk, cruft/ordered-qz/sexchqz.f, cruft/ordered-qz/ssubsp.f, cruft/quadpack/dqagi.f, cruft/quadpack/dqagie.f, cruft/quadpack/dqagp.f, cruft/quadpack/dqagpe.f, cruft/quadpack/dqelg.f, cruft/quadpack/dqk15i.f, cruft/quadpack/dqk21.f, cruft/quadpack/dqpsrt.f, cruft/quadpack/module.mk, cruft/quadpack/qagi.f, cruft/quadpack/qagie.f, cruft/quadpack/qagp.f, cruft/quadpack/qagpe.f, cruft/quadpack/qelg.f, cruft/quadpack/qk15i.f, cruft/quadpack/qk21.f, cruft/quadpack/qpsrt.f, cruft/quadpack/xerror.f, cruft/ranlib/Basegen.doc, cruft/ranlib/HOWTOGET, cruft/ranlib/README, cruft/ranlib/advnst.f, cruft/ranlib/genbet.f, cruft/ranlib/genchi.f, cruft/ranlib/genexp.f, cruft/ranlib/genf.f, cruft/ranlib/gengam.f, cruft/ranlib/genmn.f, cruft/ranlib/genmul.f, cruft/ranlib/gennch.f, cruft/ranlib/gennf.f, cruft/ranlib/gennor.f, cruft/ranlib/genprm.f, cruft/ranlib/genunf.f, cruft/ranlib/getcgn.f, cruft/ranlib/getsd.f, cruft/ranlib/ignbin.f, cruft/ranlib/ignlgi.f, cruft/ranlib/ignnbn.f, cruft/ranlib/ignpoi.f, cruft/ranlib/ignuin.f, cruft/ranlib/initgn.f, cruft/ranlib/inrgcm.f, cruft/ranlib/lennob.f, cruft/ranlib/mltmod.f, cruft/ranlib/module.mk, cruft/ranlib/phrtsd.f, cruft/ranlib/qrgnin.f, cruft/ranlib/randlib.chs, cruft/ranlib/randlib.fdoc, cruft/ranlib/ranf.f, cruft/ranlib/setall.f, cruft/ranlib/setant.f, cruft/ranlib/setgmn.f, cruft/ranlib/setsd.f, cruft/ranlib/sexpo.f, cruft/ranlib/sgamma.f, cruft/ranlib/snorm.f, cruft/ranlib/tstbot.for, cruft/ranlib/tstgmn.for, cruft/ranlib/tstmid.for, cruft/ranlib/wrap.f, cruft/slatec-err/fdump.f, cruft/slatec-err/ixsav.f, cruft/slatec-err/j4save.f, cruft/slatec-err/module.mk, cruft/slatec-err/xerclr.f, cruft/slatec-err/xercnt.f, cruft/slatec-err/xerhlt.f, cruft/slatec-err/xermsg.f, cruft/slatec-err/xerprn.f, cruft/slatec-err/xerrwd.f, cruft/slatec-err/xersve.f, cruft/slatec-err/xgetf.f, cruft/slatec-err/xgetua.f, cruft/slatec-err/xsetf.f, cruft/slatec-err/xsetua.f, cruft/slatec-fn/acosh.f, cruft/slatec-fn/albeta.f, cruft/slatec-fn/algams.f, cruft/slatec-fn/alngam.f, cruft/slatec-fn/alnrel.f, cruft/slatec-fn/asinh.f, cruft/slatec-fn/atanh.f, cruft/slatec-fn/betai.f, cruft/slatec-fn/csevl.f, cruft/slatec-fn/d9gmit.f, cruft/slatec-fn/d9lgic.f, cruft/slatec-fn/d9lgit.f, cruft/slatec-fn/d9lgmc.f, cruft/slatec-fn/dacosh.f, cruft/slatec-fn/dasinh.f, cruft/slatec-fn/datanh.f, cruft/slatec-fn/dbetai.f, cruft/slatec-fn/dcsevl.f, cruft/slatec-fn/derf.f, cruft/slatec-fn/derfc.in.f, cruft/slatec-fn/dgami.f, cruft/slatec-fn/dgamit.f, cruft/slatec-fn/dgamlm.f, cruft/slatec-fn/dgamma.f, cruft/slatec-fn/dgamr.f, cruft/slatec-fn/dlbeta.f, cruft/slatec-fn/dlgams.f, cruft/slatec-fn/dlngam.f, cruft/slatec-fn/dlnrel.f, cruft/slatec-fn/dpchim.f, cruft/slatec-fn/dpchst.f, cruft/slatec-fn/erf.f, cruft/slatec-fn/erfc.in.f, cruft/slatec-fn/gami.f, cruft/slatec-fn/gamit.f, cruft/slatec-fn/gamlim.f, cruft/slatec-fn/gamma.f, cruft/slatec-fn/gamr.f, cruft/slatec-fn/initds.f, cruft/slatec-fn/inits.f, cruft/slatec-fn/module.mk, cruft/slatec-fn/pchim.f, cruft/slatec-fn/pchst.f, cruft/slatec-fn/r9gmit.f, cruft/slatec-fn/r9lgic.f, cruft/slatec-fn/r9lgit.f, cruft/slatec-fn/r9lgmc.f, cruft/slatec-fn/xacosh.f, cruft/slatec-fn/xasinh.f, cruft/slatec-fn/xatanh.f, cruft/slatec-fn/xbetai.f, cruft/slatec-fn/xdacosh.f, cruft/slatec-fn/xdasinh.f, cruft/slatec-fn/xdatanh.f, cruft/slatec-fn/xdbetai.f, cruft/slatec-fn/xderf.f, cruft/slatec-fn/xderfc.f, cruft/slatec-fn/xdgami.f, cruft/slatec-fn/xdgamit.f, cruft/slatec-fn/xdgamma.f, cruft/slatec-fn/xerf.f, cruft/slatec-fn/xerfc.f, cruft/slatec-fn/xgamma.f, cruft/slatec-fn/xgmainc.f, cruft/slatec-fn/xsgmainc.f: Moved from top-level libcruft to cruft directory below liboctave. * numeric/CmplxAEPBAL.cc, numeric/CmplxAEPBAL.h, numeric/CmplxCHOL.cc, numeric/CmplxCHOL.h, numeric/CmplxGEPBAL.cc, numeric/CmplxGEPBAL.h, numeric/CmplxHESS.cc, numeric/CmplxHESS.h, numeric/CmplxLU.cc, numeric/CmplxLU.h, numeric/CmplxQR.cc, numeric/CmplxQR.h, numeric/CmplxQRP.cc, numeric/CmplxQRP.h, numeric/CmplxSCHUR.cc, numeric/CmplxSCHUR.h, numeric/CmplxSVD.cc, numeric/CmplxSVD.h, numeric/CollocWt.cc, numeric/CollocWt.h, numeric/DAE.h, numeric/DAEFunc.h, numeric/DAERT.h, numeric/DAERTFunc.h, numeric/DASPK-opts.in, numeric/DASPK.cc, numeric/DASPK.h, numeric/DASRT-opts.in, numeric/DASRT.cc, numeric/DASRT.h, numeric/DASSL-opts.in, numeric/DASSL.cc, numeric/DASSL.h, numeric/DET.h, numeric/EIG.cc, numeric/EIG.h, numeric/LSODE-opts.in, numeric/LSODE.cc, numeric/LSODE.h, numeric/ODE.h, numeric/ODEFunc.h, numeric/ODES.cc, numeric/ODES.h, numeric/ODESFunc.h, numeric/Quad-opts.in, numeric/Quad.cc, numeric/Quad.h, numeric/SparseCmplxCHOL.cc, numeric/SparseCmplxCHOL.h, numeric/SparseCmplxLU.cc, numeric/SparseCmplxLU.h, numeric/SparseCmplxQR.cc, numeric/SparseCmplxQR.h, numeric/SparseQR.cc, numeric/SparseQR.h, numeric/SparsedbleCHOL.cc, numeric/SparsedbleCHOL.h, numeric/SparsedbleLU.cc, numeric/SparsedbleLU.h, numeric/base-aepbal.h, numeric/base-dae.h, numeric/base-de.h, numeric/base-lu.cc, numeric/base-lu.h, numeric/base-min.h, numeric/base-qr.cc, numeric/base-qr.h, numeric/bsxfun-decl.h, numeric/bsxfun-defs.cc, numeric/bsxfun.h, numeric/dbleAEPBAL.cc, numeric/dbleAEPBAL.h, numeric/dbleCHOL.cc, numeric/dbleCHOL.h, numeric/dbleGEPBAL.cc, numeric/dbleGEPBAL.h, numeric/dbleHESS.cc, numeric/dbleHESS.h, numeric/dbleLU.cc, numeric/dbleLU.h, numeric/dbleQR.cc, numeric/dbleQR.h, numeric/dbleQRP.cc, numeric/dbleQRP.h, numeric/dbleSCHUR.cc, numeric/dbleSCHUR.h, numeric/dbleSVD.cc, numeric/dbleSVD.h, numeric/eigs-base.cc, numeric/fCmplxAEPBAL.cc, numeric/fCmplxAEPBAL.h, numeric/fCmplxCHOL.cc, numeric/fCmplxCHOL.h, numeric/fCmplxGEPBAL.cc, numeric/fCmplxGEPBAL.h, numeric/fCmplxHESS.cc, numeric/fCmplxHESS.h, numeric/fCmplxLU.cc, numeric/fCmplxLU.h, numeric/fCmplxQR.cc, numeric/fCmplxQR.h, numeric/fCmplxQRP.cc, numeric/fCmplxQRP.h, numeric/fCmplxSCHUR.cc, numeric/fCmplxSCHUR.h, numeric/fCmplxSVD.cc, numeric/fCmplxSVD.h, numeric/fEIG.cc, numeric/fEIG.h, numeric/floatAEPBAL.cc, numeric/floatAEPBAL.h, numeric/floatCHOL.cc, numeric/floatCHOL.h, numeric/floatGEPBAL.cc, numeric/floatGEPBAL.h, numeric/floatHESS.cc, numeric/floatHESS.h, numeric/floatLU.cc, numeric/floatLU.h, numeric/floatQR.cc, numeric/floatQR.h, numeric/floatQRP.cc, numeric/floatQRP.h, numeric/floatSCHUR.cc, numeric/floatSCHUR.h, numeric/floatSVD.cc, numeric/floatSVD.h, numeric/lo-mappers.cc, numeric/lo-mappers.h, numeric/lo-specfun.cc, numeric/lo-specfun.h, numeric/module.mk, numeric/oct-convn.cc, numeric/oct-convn.h, numeric/oct-fftw.cc, numeric/oct-fftw.h, numeric/oct-norm.cc, numeric/oct-norm.h, numeric/oct-rand.cc, numeric/oct-rand.h, numeric/oct-spparms.cc, numeric/oct-spparms.h, numeric/randgamma.c, numeric/randgamma.h, numeric/randmtzig.c, numeric/randmtzig.h, numeric/randpoisson.c, numeric/randpoisson.h, numeric/sparse-base-chol.cc, numeric/sparse-base-chol.h, numeric/sparse-base-lu.cc, numeric/sparse-base-lu.h, numeric/sparse-dmsolve.cc: Moved from liboctave dir to numeric subdirectory. * operators/Sparse-diag-op-defs.h, operators/Sparse-op-defs.h, operators/Sparse-perm-op-defs.h, operators/config-ops.sh, operators/mk-ops.awk, operators/module.mk, operators/mx-base.h, operators/mx-defs.h, operators/mx-ext.h, operators/mx-inlines.cc, operators/mx-op-decl.h, operators/mx-op-defs.h, operators/mx-ops, operators/sparse-mk-ops.awk, operators/sparse-mx-ops, operators/vx-ops: Moved from liboctave dir to operators subdirectory. * system/dir-ops.cc, system/dir-ops.h, system/file-ops.cc, system/file-ops.h, system/file-stat.cc, system/file-stat.h, system/lo-sysdep.cc, system/lo-sysdep.h, system/mach-info.cc, system/mach-info.h, system/module.mk, system/oct-env.cc, system/oct-env.h, system/oct-group.cc, system/oct-group.h, system/oct-openmp.h, system/oct-passwd.cc, system/oct-passwd.h, system/oct-syscalls.cc, system/oct-syscalls.h, system/oct-time.cc, system/oct-time.h, system/oct-uname.cc, system/oct-uname.h, system/pathlen.h, system/sysdir.h, system/syswait.h, system/tempnam.c, system/tempname.c: Moved from liboctave dir to system subdirectory. * util/base-list.h, util/byte-swap.h, util/caseless-str.h, util/cmd-edit.cc, util/cmd-edit.h, util/cmd-hist.cc, util/cmd-hist.h, util/data-conv.cc, util/data-conv.h, util/f2c-main.c, util/functor.h, util/glob-match.cc, util/glob-match.h, util/kpse.cc, util/lo-array-gripes.cc, util/lo-array-gripes.h, util/lo-cieee.c, util/lo-cutils.c, util/lo-cutils.h, util/lo-ieee.cc, util/lo-ieee.h, util/lo-macros.h, util/lo-math.h, util/lo-traits.h, util/lo-utils.cc, util/lo-utils.h, util/module.mk, util/oct-alloc.cc, util/oct-alloc.h, util/oct-base64.cc, util/oct-base64.h, util/oct-binmap.h, util/oct-cmplx.h, util/oct-glob.cc, util/oct-glob.h, util/oct-inttypes.cc, util/oct-inttypes.h, util/oct-locbuf.cc, util/oct-locbuf.h, util/oct-md5.cc, util/oct-md5.h, util/oct-mem.h, util/oct-mutex.cc, util/oct-mutex.h, util/oct-refcount.h, util/oct-rl-edit.c, util/oct-rl-edit.h, util/oct-rl-hist.c, util/oct-rl-hist.h, util/oct-shlib.cc, util/oct-shlib.h, util/oct-sort.cc, util/oct-sort.h, util/oct-sparse.h, util/pathsearch.cc, util/pathsearch.h, util/regexp.cc, util/regexp.h, util/singleton-cleanup.cc, util/singleton-cleanup.h, util/sparse-sort.cc, util/sparse-sort.h, util/sparse-util.cc, util/sparse-util.h, util/statdefs.h, util/str-vec.cc, util/str-vec.h, util/sun-utils.h: Moved from liboctave dir to util subdirectory. * Makefile.am: Eliminate reference to top-level liboctave directory. * autogen.sh: cd to new liboctave/operators directory to run config-ops.sh. * build-aux/common.mk: Eliminate LIBCRUFT references. * configure.ac: Eliminate libcruft top-level references. Switch test programs to find files in liboctave/cruft subdirectory. * OctaveFAQ.texi, install.txi, mkoctfile.1: Eliminate references to libcruft in docs. * libgui/src/Makefile.am, libinterp/Makefile.am, src/Makefile.am: Update include file locations. Stop linking against libcruft. * libinterp/corefcn/module.mk: Update location of OPT_INC files which are now in numeric/ subdirectory. * libinterp/dldfcn/config-module.awk: Stop linking against libcruft. * libinterp/interpfcn/toplev.cc: Remove reference to LIBCRUFT. * libinterp/link-deps.mk, liboctave/link-deps.mk: Add GNULIB_LINK_DEPS to link dependencies. * libinterp/oct-conf.in.h: Remove reference to OCTAVE_CONF_LIBCRUFT. * liboctave/Makefile.am: Overhaul to use convenience libraries in subdirectories. * scripts/miscellaneous/mkoctfile.m: Eliminate reference to LIBCRUFT. * src/mkoctfile.in.cc, src/mkoctfile.in.sh: Stop linking againt libcruft. Eliminate references to LIBCRUFT.
author Rik <rik@octave.org>
date Fri, 31 Aug 2012 20:00:20 -0700
parents liboctave/DASRT.cc@560317fd5977
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
1 /*
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
2
14138
72c96de7a403 maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents: 11586
diff changeset
3 Copyright (C) 2002-2012 John W. Eaton
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
4
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
6
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
10 option) any later version.
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
11
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
15 for more details.
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
16
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
19 <http://www.gnu.org/licenses/>.
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
20
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
21 */
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
22
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
23 #ifdef HAVE_CONFIG_H
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
24 #include <config.h>
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
25 #endif
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
26
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
27 #include <cfloat>
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
28
5765
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5307
diff changeset
29 #include <sstream>
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5307
diff changeset
30
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
31 #include "DASRT.h"
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
32 #include "f77-fcn.h"
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
33 #include "lo-error.h"
7231
2eb392d058bb [project @ 2007-11-30 18:53:29 by jwe]
jwe
parents: 7017
diff changeset
34 #include "lo-math.h"
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
35 #include "quit.h"
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
36
11495
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
37 typedef octave_idx_type (*dasrt_fcn_ptr) (const double&, const double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
38 const double*, double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
39 octave_idx_type&, double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
40 octave_idx_type*);
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
41
11495
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
42 typedef octave_idx_type (*dasrt_jac_ptr) (const double&, const double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
43 const double*, double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
44 const double&, double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
45 octave_idx_type*);
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
46
11495
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
47 typedef octave_idx_type (*dasrt_constr_ptr) (const octave_idx_type&,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
48 const double&, const double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
49 const octave_idx_type&,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
50 double*, double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
51 octave_idx_type*);
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
52
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
53 extern "C"
4552
6f3382e08a52 [project @ 2003-10-27 20:38:02 by jwe]
jwe
parents: 4548
diff changeset
54 {
6f3382e08a52 [project @ 2003-10-27 20:38:02 by jwe]
jwe
parents: 4548
diff changeset
55 F77_RET_T
11495
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
56 F77_FUNC (ddasrt, DDASRT) (dasrt_fcn_ptr, const octave_idx_type&,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
57 double&, double*, double*, const double&,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
58 octave_idx_type*, const double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
59 const double*, octave_idx_type&, double*,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
60 const octave_idx_type&, octave_idx_type*,
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11574
diff changeset
61 const octave_idx_type&, double*,
11495
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
62 octave_idx_type*, dasrt_jac_ptr,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
63 dasrt_constr_ptr, const octave_idx_type&,
8a5e980da6aa style fixes
John W. Eaton <jwe@octave.org>
parents: 10350
diff changeset
64 octave_idx_type*);
4552
6f3382e08a52 [project @ 2003-10-27 20:38:02 by jwe]
jwe
parents: 4548
diff changeset
65 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
66
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
67 static DAEFunc::DAERHSFunc user_fsub;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
68 static DAEFunc::DAEJacFunc user_jsub;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
69 static DAERTFunc::DAERTConstrFunc user_csub;
3993
f23bc69132cc [project @ 2002-07-16 20:18:56 by jwe]
jwe
parents: 3992
diff changeset
70
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
71 static octave_idx_type nn;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
72
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
73 static octave_idx_type
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
74 ddasrt_f (const double& t, const double *state, const double *deriv,
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
75 double *delta, octave_idx_type& ires, double *, octave_idx_type *)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
76 {
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
77 BEGIN_INTERRUPT_WITH_EXCEPTIONS;
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
78
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
79 ColumnVector tmp_state (nn);
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
80 ColumnVector tmp_deriv (nn);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
81
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
82 for (octave_idx_type i = 0; i < nn; i++)
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
83 {
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
84 tmp_state(i) = state[i];
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
85 tmp_deriv(i) = deriv[i];
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
86 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
87
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
88 ColumnVector tmp_fval = (*user_fsub) (tmp_state, tmp_deriv, t, ires);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
89
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
90 if (tmp_fval.length () == 0)
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
91 ires = -2;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
92 else
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
93 {
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
94 for (octave_idx_type i = 0; i < nn; i++)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
95 delta[i] = tmp_fval(i);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
96 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
97
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
98 END_INTERRUPT_WITH_EXCEPTIONS;
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
99
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
100 return 0;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
101 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
102
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
103 octave_idx_type
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
104 ddasrt_j (const double& time, const double *state, const double *deriv,
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
105 double *pd, const double& cj, double *, octave_idx_type *)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
106 {
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
107 BEGIN_INTERRUPT_WITH_EXCEPTIONS;
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
108
5775
ace8d8d26933 [project @ 2006-04-24 19:13:06 by jwe]
jwe
parents: 5765
diff changeset
109 // FIXME -- would be nice to avoid copying the data.
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
110
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
111 ColumnVector tmp_state (nn);
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
112 ColumnVector tmp_deriv (nn);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
113
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
114 for (octave_idx_type i = 0; i < nn; i++)
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
115 {
15018
3d8ace26c5b4 maint: Use Octave coding conventions for cuddled parentheses in liboctave/.
Rik <rik@octave.org>
parents: 14138
diff changeset
116 tmp_deriv.elem (i) = deriv[i];
3d8ace26c5b4 maint: Use Octave coding conventions for cuddled parentheses in liboctave/.
Rik <rik@octave.org>
parents: 14138
diff changeset
117 tmp_state.elem (i) = state[i];
3991
48d2bc4a3729 [project @ 2002-07-16 17:46:50 by jwe]
jwe
parents: 3990
diff changeset
118 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
119
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
120 Matrix tmp_pd = (*user_jsub) (tmp_state, tmp_deriv, time, cj);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
121
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
122 for (octave_idx_type j = 0; j < nn; j++)
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
123 for (octave_idx_type i = 0; i < nn; i++)
15020
560317fd5977 maint: Cuddle open bracket used for indexing C++ arrays in source code.
Rik <rik@octave.org>
parents: 15018
diff changeset
124 pd[nn * j + i] = tmp_pd.elem (i, j);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
125
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
126 END_INTERRUPT_WITH_EXCEPTIONS;
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
127
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
128 return 0;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
129 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
130
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
131 static octave_idx_type
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
132 ddasrt_g (const octave_idx_type& neq, const double& t, const double *state,
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11574
diff changeset
133 const octave_idx_type& ng, double *gout, double *, octave_idx_type *)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
134 {
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
135 BEGIN_INTERRUPT_WITH_EXCEPTIONS;
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
136
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
137 octave_idx_type n = neq;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
138
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
139 ColumnVector tmp_state (n);
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
140 for (octave_idx_type i = 0; i < n; i++)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
141 tmp_state(i) = state[i];
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
142
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
143 ColumnVector tmp_fval = (*user_csub) (tmp_state, t);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
144
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
145 for (octave_idx_type i = 0; i < ng; i++)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
146 gout[i] = tmp_fval(i);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
147
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
148 END_INTERRUPT_WITH_EXCEPTIONS;
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4133
diff changeset
149
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
150 return 0;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
151 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
152
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
153 void
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
154 DASRT::integrate (double tout)
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
155 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
156 DASRT_result retval;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
157
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
158 // I suppose this is the safe thing to do. If this is the first
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
159 // call, or if anything about the problem has changed, we should
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
160 // start completely fresh.
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
161
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
162 if (! initialized || restart
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
163 || DAEFunc::reset || DAERTFunc::reset || DASRT_options::reset)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
164 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
165 integration_error = false;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
166
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
167 initialized = true;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
168
11574
a83bad07f7e3 attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
169 info.resize (dim_vector (15, 1));
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
170
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
171 for (octave_idx_type i = 0; i < 15; i++)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
172 info(i) = 0;
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
173
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
174 octave_idx_type n = size ();
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
175
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
176 nn = n;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
177
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
178 // DAERTFunc
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
179
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
180 user_csub = DAERTFunc::constraint_function ();
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
181
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
182 if (user_csub)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
183 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
184 ColumnVector tmp = (*user_csub) (x, t);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
185 ng = tmp.length ();
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
186 }
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
187 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
188 ng = 0;
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
189
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
190 octave_idx_type maxord = maximum_order ();
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
191 if (maxord >= 0)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
192 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
193 if (maxord > 0 && maxord < 6)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
194 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
195 info(8) = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
196 iwork(2) = maxord;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
197 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
198 else
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
199 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
200 (*current_liboctave_error_handler)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
201 ("dassl: invalid value for maximum order");
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
202 integration_error = true;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
203 return;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
204 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
205 }
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
206
4428
067160691cc9 [project @ 2003-06-16 19:09:11 by jwe]
jwe
parents: 4192
diff changeset
207 liw = 21 + n;
4133
402d7b86a0a2 [project @ 2002-10-29 23:57:34 by jwe]
jwe
parents: 4066
diff changeset
208 lrw = 50 + 9*n + n*n + 3*ng;
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
209
11574
a83bad07f7e3 attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
210 iwork.resize (dim_vector (liw, 1));
a83bad07f7e3 attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
211 rwork.resize (dim_vector (lrw, 1));
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
212
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
213 info(0) = 0;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
214
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
215 if (stop_time_set)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
216 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
217 info(3) = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
218 rwork(0) = stop_time;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
219 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
220 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
221 info(3) = 0;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
222
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
223 restart = false;
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
224
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
225 // DAEFunc
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
226
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
227 user_fsub = DAEFunc::function ();
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
228 user_jsub = DAEFunc::jacobian_function ();
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
229
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
230 if (user_fsub)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
231 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
232 octave_idx_type ires = 0;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
233
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
234 ColumnVector fval = (*user_fsub) (x, xdot, t, ires);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
235
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
236 if (fval.length () != x.length ())
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
237 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
238 (*current_liboctave_error_handler)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
239 ("dasrt: inconsistent sizes for state and residual vectors");
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
240
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
241 integration_error = true;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
242 return;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
243 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
244 }
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
245 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
246 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
247 (*current_liboctave_error_handler)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
248 ("dasrt: no user supplied RHS subroutine!");
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
249
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
250 integration_error = true;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
251 return;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
252 }
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
253
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
254 info(4) = user_jsub ? 1 : 0;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
255
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
256 DAEFunc::reset = false;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
257
11574
a83bad07f7e3 attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
258 jroot.resize (dim_vector (ng, 1), 1);
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
259
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
260 DAERTFunc::reset = false;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
261
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
262 // DASRT_options
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
263
4050
6481f41a79f3 [project @ 2002-08-17 02:18:18 by jwe]
jwe
parents: 4049
diff changeset
264 double mss = maximum_step_size ();
6481f41a79f3 [project @ 2002-08-17 02:18:18 by jwe]
jwe
parents: 4049
diff changeset
265 if (mss >= 0.0)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
266 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
267 rwork(1) = mss;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
268 info(6) = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
269 }
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
270 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
271 info(6) = 0;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
272
4050
6481f41a79f3 [project @ 2002-08-17 02:18:18 by jwe]
jwe
parents: 4049
diff changeset
273 double iss = initial_step_size ();
6481f41a79f3 [project @ 2002-08-17 02:18:18 by jwe]
jwe
parents: 4049
diff changeset
274 if (iss >= 0.0)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
275 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
276 rwork(2) = iss;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
277 info(7) = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
278 }
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
279 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
280 info(7) = 0;
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
281
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
282 if (step_limit () >= 0)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
283 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
284 info(11) = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
285 iwork(20) = step_limit ();
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
286 }
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
287 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
288 info(11) = 0;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
289
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
290 abs_tol = absolute_tolerance ();
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
291 rel_tol = relative_tolerance ();
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
292
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
293 octave_idx_type abs_tol_len = abs_tol.length ();
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
294 octave_idx_type rel_tol_len = rel_tol.length ();
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
295
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
296 if (abs_tol_len == 1 && rel_tol_len == 1)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
297 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
298 info.elem (1) = 0;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
299 }
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
300 else if (abs_tol_len == n && rel_tol_len == n)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
301 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
302 info.elem (1) = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
303 }
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
304 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
305 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
306 (*current_liboctave_error_handler)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
307 ("dasrt: inconsistent sizes for tolerance arrays");
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
308
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
309 integration_error = true;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
310 return;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
311 }
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
312
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4043
diff changeset
313 DASRT_options::reset = false;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
314 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
315
11502
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
316 double *px = x.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
317 double *pxdot = xdot.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
318
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
319 octave_idx_type *pinfo = info.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
320
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
321 double *prel_tol = rel_tol.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
322 double *pabs_tol = abs_tol.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
323
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
324 double *prwork = rwork.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
325 octave_idx_type *piwork = iwork.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
326
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
327 octave_idx_type *pjroot = jroot.fortran_vec ();
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
328
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
329 double *dummy = 0;
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 11495
diff changeset
330 octave_idx_type *idummy = 0;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
331
4575
c7ba572047df [project @ 2003-10-31 06:05:37 by jwe]
jwe
parents: 4552
diff changeset
332 F77_XFCN (ddasrt, DDASRT, (ddasrt_f, nn, t, px, pxdot, tout, pinfo,
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
333 prel_tol, pabs_tol, istate, prwork, lrw,
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
334 piwork, liw, dummy, idummy, ddasrt_j,
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
335 ddasrt_g, ng, pjroot));
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
336
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
337 switch (istate)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
338 {
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
339 case 1: // A step was successfully taken in intermediate-output
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
340 // mode. The code has not yet reached TOUT.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
341 case 2: // The integration to TOUT was successfully completed
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
342 // (T=TOUT) by stepping exactly to TOUT.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
343 case 3: // The integration to TOUT was successfully completed
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
344 // (T=TOUT) by stepping past TOUT. Y(*) is obtained by
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
345 // interpolation. YPRIME(*) is obtained by interpolation.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
346 t = tout;
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
347 break;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
348
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
349 case 4: // The integration was successfully completed
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
350 // by finding one or more roots of G at T.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
351 break;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
352
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
353 case -1: // A large amount of work has been expended.
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
354 case -2: // The error tolerances are too stringent.
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
355 case -3: // The local error test cannot be satisfied because you
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
356 // specified a zero component in ATOL and the
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
357 // corresponding computed solution component is zero.
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
358 // Thus, a pure relative error test is impossible for
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
359 // this component.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
360 case -6: // DDASRT had repeated error test failures on the last
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
361 // attempted step.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
362 case -7: // The corrector could not converge.
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
363 case -8: // The matrix of partial derivatives is singular.
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
364 case -9: // The corrector could not converge. There were repeated
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
365 // error test failures in this step.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
366 case -10: // The corrector could not converge because IRES was
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
367 // equal to minus one.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
368 case -11: // IRES equal to -2 was encountered and control is being
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
369 // returned to the calling program.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
370 case -12: // DASSL failed to compute the initial YPRIME.
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
371 case -33: // The code has encountered trouble from which it cannot
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
372 // recover. A message is printed explaining the trouble
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
373 // and control is returned to the calling program. For
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
374 // example, this occurs when invalid input is detected.
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
375 integration_error = true;
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
376 break;
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
377
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
378 default:
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
379 integration_error = true;
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
380 (*current_liboctave_error_handler)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
381 ("unrecognized value of istate (= %d) returned from ddasrt",
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
382 istate);
7482
29980c6b8604 don't check f77_exception_encountered
John W. Eaton <jwe@octave.org>
parents: 7231
diff changeset
383 break;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
384 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
385 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
386
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
387 DASRT_result
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
388 DASRT::integrate (const ColumnVector& tout)
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
389 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
390 DASRT_result retval;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
391
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
392 Matrix x_out;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
393 Matrix xdot_out;
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
394 ColumnVector t_out = tout;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
395
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
396 octave_idx_type n_out = tout.capacity ();
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
397 octave_idx_type n = size ();
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
398
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
399 if (n_out > 0 && n > 0)
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
400 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
401 x_out.resize (n_out, n);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
402 xdot_out.resize (n_out, n);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
403
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
404 for (octave_idx_type i = 0; i < n; i++)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
405 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
406 x_out(0,i) = x(i);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
407 xdot_out(0,i) = xdot(i);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
408 }
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
409
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
410 for (octave_idx_type j = 1; j < n_out; j++)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
411 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
412 integrate (tout(j));
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
413
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
414 if (integration_error)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
415 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
416 retval = DASRT_result (x_out, xdot_out, t_out);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
417 return retval;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
418 }
3992
53b4eab68976 [project @ 2002-07-16 19:36:52 by jwe]
jwe
parents: 3991
diff changeset
419
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3996
diff changeset
420 if (istate == 4)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
421 t_out(j) = t;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
422 else
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
423 t_out(j) = tout(j);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
424
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
425 for (octave_idx_type i = 0; i < n; i++)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
426 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
427 x_out(j,i) = x(i);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
428 xdot_out(j,i) = xdot(i);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
429 }
3992
53b4eab68976 [project @ 2002-07-16 19:36:52 by jwe]
jwe
parents: 3991
diff changeset
430
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3996
diff changeset
431 if (istate == 4)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
432 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
433 x_out.resize (j+1, n);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
434 xdot_out.resize (j+1, n);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
435 t_out.resize (j+1);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
436 break;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
437 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
438 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
439 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
440
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
441 retval = DASRT_result (x_out, xdot_out, t_out);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
442
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
443 return retval;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
444 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
445
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
446 DASRT_result
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11574
diff changeset
447 DASRT::integrate (const ColumnVector& tout, const ColumnVector& tcrit)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
448 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
449 DASRT_result retval;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
450
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
451 Matrix x_out;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
452 Matrix xdot_out;
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
453 ColumnVector t_outs = tout;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
454
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
455 octave_idx_type n_out = tout.capacity ();
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
456 octave_idx_type n = size ();
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
457
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
458 if (n_out > 0 && n > 0)
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
459 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
460 x_out.resize (n_out, n);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
461 xdot_out.resize (n_out, n);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
462
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
463 octave_idx_type n_crit = tcrit.capacity ();
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
464
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
465 if (n_crit > 0)
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
466 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
467 octave_idx_type i_crit = 0;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
468 octave_idx_type i_out = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
469 double next_crit = tcrit(0);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
470 double next_out;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
471 while (i_out < n_out)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
472 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
473 bool do_restart = false;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
474
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
475 next_out = tout(i_out);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
476 if (i_crit < n_crit)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
477 next_crit = tcrit(i_crit);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
478
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
479 octave_idx_type save_output;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
480 double t_out;
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
481
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
482 if (next_crit == next_out)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
483 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
484 set_stop_time (next_crit);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
485 t_out = next_out;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
486 save_output = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
487 i_out++;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
488 i_crit++;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
489 do_restart = true;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
490 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
491 else if (next_crit < next_out)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
492 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
493 if (i_crit < n_crit)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
494 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
495 set_stop_time (next_crit);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
496 t_out = next_crit;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
497 save_output = 0;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
498 i_crit++;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
499 do_restart = true;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
500 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
501 else
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
502 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
503 clear_stop_time ();
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
504 t_out = next_out;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
505 save_output = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
506 i_out++;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
507 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
508 }
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
509 else
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
510 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
511 set_stop_time (next_crit);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
512 t_out = next_out;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
513 save_output = 1;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
514 i_out++;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
515 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
516
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
517 integrate (t_out);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
518
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
519 if (integration_error)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
520 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
521 retval = DASRT_result (x_out, xdot_out, t_outs);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
522 return retval;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
523 }
3992
53b4eab68976 [project @ 2002-07-16 19:36:52 by jwe]
jwe
parents: 3991
diff changeset
524
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3996
diff changeset
525 if (istate == 4)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
526 t_out = t;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
527
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
528 if (save_output)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
529 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
530 for (octave_idx_type i = 0; i < n; i++)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
531 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
532 x_out(i_out-1,i) = x(i);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
533 xdot_out(i_out-1,i) = xdot(i);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
534 }
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
535
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
536 t_outs(i_out-1) = t_out;
3994
a41827ec5677 [project @ 2002-07-16 23:57:09 by jwe]
jwe
parents: 3993
diff changeset
537
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3996
diff changeset
538 if (istate == 4)
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
539 {
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
540 x_out.resize (i_out, n);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
541 xdot_out.resize (i_out, n);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
542 t_outs.resize (i_out);
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
543 i_out = n_out;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
544 }
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
545 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
546
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
547 if (do_restart)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
548 force_restart ();
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
549 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
550
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
551 retval = DASRT_result (x_out, xdot_out, t_outs);
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
552 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
553 else
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
554 {
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
555 retval = integrate (tout);
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
556
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
557 if (integration_error)
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
558 return retval;
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
559 }
3990
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
560 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
561
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
562 return retval;
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
563 }
46388d6a4e44 [project @ 2002-07-16 06:20:39 by jwe]
jwe
parents:
diff changeset
564
3995
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
565 std::string
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
566 DASRT::error_message (void) const
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
567 {
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
568 std::string retval;
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
569
5765
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5307
diff changeset
570 std::ostringstream buf;
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5307
diff changeset
571 buf << t;
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5307
diff changeset
572 std::string t_curr = buf.str ();
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
573
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3996
diff changeset
574 switch (istate)
3995
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
575 {
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
576 case 1:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
577 retval = "a step was successfully taken in intermediate-output mode.";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
578 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
579
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
580 case 2:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
581 retval = "integration completed by stepping exactly to TOUT";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
582 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
583
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
584 case 3:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
585 retval = "integration to tout completed by stepping past TOUT";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
586 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
587
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
588 case 4:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
589 retval = "integration completed by finding one or more roots of G at T";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
590 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
591
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
592 case -1:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
593 retval = std::string ("a large amount of work has been expended (t =")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
594 + t_curr + ")";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
595 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
596
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
597 case -2:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
598 retval = "the error tolerances are too stringent";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
599 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
600
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
601 case -3:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
602 retval = std::string ("error weight became zero during problem. (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
603 + t_curr
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
604 + "; solution component i vanished, and atol or atol(i) == 0)";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
605 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
606
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
607 case -6:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
608 retval = std::string ("repeated error test failures on the last attempted step (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
609 + t_curr + ")";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
610 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
611
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
612 case -7:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
613 retval = std::string ("the corrector could not converge (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
614 + t_curr + ")";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
615 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
616
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
617 case -8:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
618 retval = std::string ("the matrix of partial derivatives is singular (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
619 + t_curr + ")";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
620 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
621
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
622 case -9:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
623 retval = std::string ("the corrector could not converge (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
624 + t_curr + "; repeated test failures)";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
625 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
626
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
627 case -10:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
628 retval = std::string ("corrector could not converge because IRES was -1 (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
629 + t_curr + ")";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
630 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
631
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
632 case -11:
4043
6fae69a1796e [project @ 2002-08-15 03:36:27 by jwe]
jwe
parents: 3998
diff changeset
633 retval = std::string ("return requested in user-supplied function (t = ")
10314
07ebe522dac2 untabify liboctave C++ sources
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
634 + t_curr + ")";
3996
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
635 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
636
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
637 case -12:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
638 retval = "failed to compute consistent initial conditions";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
639 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
640
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
641 case -33:
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
642 retval = "unrecoverable error (see printed message)";
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
643 break;
98107d72871c [project @ 2002-07-17 16:22:05 by jwe]
jwe
parents: 3995
diff changeset
644
3995
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
645 default:
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
646 retval = "unknown error state";
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
647 break;
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
648 }
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
649
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
650 return retval;
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3994
diff changeset
651 }