Compilation and use of the Sundials library

Source: Internet
Author: User

1Introduction

sundials (SUite of nonlinear and Differential/algebraic equation solvers) is made by the American Lawrenceliformore ( Lawrence Livemore National Laboratory developed to solve large-scale nonlinear differential / algebraic equations. The latest 2.6.x(2015.9.9. ) includes the following solvers:

Cvode???? Solves initial value problems for ordinary differential equation (ODE) systems.

Cvodes???? Solves ODE systems and includes sensitivity analysis capabilities (forward and adjoint).

Arkode???? Solves initial value ODE problems with additive Runge-kutta methods, include support for IMEX methods.

Ida???? Solves initial value problems for Differential-algebraic equation (DAE) systems.

Idas???? Solves DAE systems and includes sensitivity analysis capabilities (forward and adjoint).

Kinsol???? Solves nonlinear algebraic systems.

In addition, Sundials provides a Matlab interface to Cvodes, Idas, and Kinsol, Sundialstb.

Essentially, sundials will be FORTRAN for the nonlinear differential / several well-known function packages for algebraic equations are C translation rather than C + + translation. According to the instructions, there are several reasons for this practice:

First, a general movement away from Fortran and toward C in scientific computing are apparent.

Second, the pointer, structure, and dynamic memory allocation features in C is extremely useful in software of this compl Exity, with the great variety of method options offered.

Finally, we prefer C over C + + for Kinsol because of the wider availability of C compilers, the potentially greater Efficie Ncy of C, and the greater ease of interfacing the solver to applications written in Fortran.

sundials alternative parallel computing capabilities are also available.

1compiling1.1Prepare

Visual Studio Win64 , install first.

sundials : http://computation.llnl.gov/casc/sundials/download/download.php .

Recommended Download 2.5.0 version (does not have Arkode solver), when the author tests ( 2015.9.9.), There appear to be some issues when compiling 2.6.0 with Cmake.

Cmake : http://www.cmake.org/download/ .

when I test ( 2015.9.9.), with Cmake 3.3.1.

1.2 CmakecompilingSUNDIALS-2.5.01.2.1Create a working directory

Author in C The packing directory establishes the following path:

that is to establish C:\sundials path and create three folders in each: sundials-2.5.0-src , Sundials-2.5.0-build , Sundials-2.5.0-install . wheresundials-2.5.0-src is used to store sundials uncompressed files:

Sundials-2.5.0-build after storage Cmake The compilation was successfully generated VS project documents;

Sundials-2.5.0-install Store VS compiles the generated function library file.

1.2.2 Cmakecompiling

?

(not finished, to be continued ...) )

Compilation and use of the Sundials library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.