码迷,mamicode.com
首页 > 其他好文 > 详细

SUNDIALS库的编译和使用

时间:2015-09-10 09:35:16      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:

1 简介

SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)是由美国劳伦斯利福摩尔(Lawrence Livemore)国立实验室开发,主要用于求解大规模非线性微分/代数方程。最新的2.6.x2015.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.

本质上,SUNDIALSFORTRAN中针对非线性微分/代数方程的几个有名函数包进行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 准备

Visual Studio 2013 win64,先安装。

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

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

Cmakehttp://www.cmake.org/download/

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

1.2 Cmake编译SUNDIALS-2.5.0

1.2.1 建立工作目录

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

技术分享

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

技术分享

sundials-2.5.0-build存放之后Cmake编译成功生成的VS工程项目文件;

sundials-2.5.0-install存放VS编译生成的函数库文件。

1.2.2 Cmake编译

?

(未完,待续。。。)

SUNDIALS库的编译和使用

标签:

原文地址:http://www.cnblogs.com/JudeZHU/p/4796751.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!