xlnt库如何编译_SUNDIALS库的编译和使用

本文介绍了SUNDIALS库的编译和使用过程,包括SUNDIALS的功能、版本选择、CMake配置、Visual Studio 2013环境下动态库的生成与安装。通过详细步骤展示了如何在Windows系统上编译SUNDIALS 2.5.0版本,并创建和配置一个Win32控制台应用程序来运行样例模型。
摘要由CSDN通过智能技术生成

1简介

SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)是由美国劳伦斯利福摩尔国立实验室(Lawrence Livermore National Laboratory)开发的C语言函数库,主要用于求解大规模非线性微分/代数方程。最新的2.6.x(2015.9.9.)包括以下求解器:

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.

其中主要的求解器经过了数十年的不断开发和完善,如下图所示:

8b021e5ac43daabc0c1ea7f5b0870d1d.png

本质上,SUNDIALS将之前开发的FORTRAN函数包进行C翻译而不是C++翻译。根据说明,这种做法有以下几点理由:

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

Second, the pointer, structure, and dynamic memory allocation features in C are extremely useful in software of this complexity, 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 efficiency of C, and the greater ease of interfacing the solver to applications written in Fortran.

SUNDIALS还提供了可选择的并行计算能力。

1编译

1.1准备

Win7 SP1 64位旗舰版。

Visual Studio 2013 SP3 win64,先安装。

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

建议下载2.5.0版本(不具有ARKODE求解器),笔者测试时(2015.9.9.),用Cmake编译2.6.0时似乎有一些问题。

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

笔者测试时(2015.9.9.),用Cmake 3.3.1。

1.2 Cmake编译SUNDIALS-2.5.0

1.2.1建立工作目录

笔者在C盘根目录建立如下路径:

fae3f8deab714ce56c46e511d8074919.png

即建立C:\sundials路径,并在其中分别建立三个文件夹:sundials-2.5.0-src、sundials-2.5.0-build、sundials-2.5.0-install。其中,sundials-2.5.0-src用于存放SUNDIALS解压缩文件:

640184ae4ba72be723cd3d7c12683816.png

sundials-2.5.0-build存放

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值