SUNDIAL
文章平均质量分 53
记录一些关于SUNDIAL库的东西
Feisy
more virtualization,more automation,more intelligent
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
cvode-不收敛与min step的问题
https://groups.google.com/g/sundials-users/c/AFjXpOtdmME/m/jmIPhD-rBQAJ Question: Hi there, before using CVODE I was writing single-step, implicit solvers with variable time steps. And depending on the convergence criteria the time step could get very s原创 2022-03-22 20:51:05 · 1185 阅读 · 0 评论 -
ARKODE解读
来自《ark_guide.pdf》 对于ODE,M是I,PDF,则是a well-conditioned mass matrix,模拟过程中保持不变 积分的时间采用的是多阶时间插值法,最高可以去到5阶,这个参数可以由用户设置,比如 ARKStepSetDenseOrder 下面是阶数为0-3时的插值公式 fE部分,使用显式积分,针对系统nonstiff部分 fI部分,采用隐式积分,针对系统的stiff部分 ARKODE分为三种类型:ImEx, explicit, and implicit原创 2022-03-21 10:53:55 · 452 阅读 · 0 评论 -
ArkOde的6种创建方法
原创 2022-03-20 14:51:34 · 366 阅读 · 0 评论 -
SUNDIALS例子:3D brusselator模型的模拟
问题背景:brusselator模型 The Brusselator is a theoretical model for a type of autocatalytic reaction brusselator模型是一种可以用来评估催化反应的理论模型 下面的资料来自wiki: https://en.wikipedia.org/wiki/Brusselator 3D brusselator模型 假设有们有3D的brusselator模型,𝑌 = [𝑢, 𝑣, 𝑤],它的ODE方程如下: 在不同的u0原创 2022-03-16 16:10:10 · 804 阅读 · 0 评论 -
OdeInt的stepper列表
Stepper overview Table 1.6. Stepper Algorithms Algorithm Class ..原创 2022-03-16 09:38:32 · 294 阅读 · 0 评论 -
CVODE的cvDiurnal_kry例子学习
This program solves the semi-discretized form of a pair of kinetics-advection-diffusion partial differential equations, which represent a simplified model for the transport, production, and loss of ozone and the oxygen singlet in the upper atmosphere. The原创 2022-03-14 05:01:50 · 799 阅读 · 0 评论 -
CVODE中雅可比的影响
基于cvRoberts_dns那个例子进行测试 发现:没有提供Jac的情况下速度更快一点。 有提供Jac: At t = 2.6391e-01 y = 9.899653e-01 3.470564e-05 1.000000e-02 rootsfound[] = 0 1 At t = 4.0000e-01 y = 9.851641e-01 3.386242e-05 1.480205e-02 At t = 4.0000e+00 y =原创 2022-03-14 04:48:30 · 549 阅读 · 0 评论 -
CVODE用户手册解读
本文来自:cv_guide.pdf 2.1 IVP solution The methods used in cvode are variable-order, variable-step multistep methods, based on formulas of the form CVODE使用的是变阶,变步长的多步迭代方法,最基本的形式是2.2 nonstiff 问题,使用Adms迭代方法 stiff问题,使用BDF方法。 2.2中,an一开始是等于-1,这个值很大,会导致误差很大。这也是为什么原创 2022-03-13 23:51:43 · 1240 阅读 · 0 评论 -
sundials中step size和atol,rtol的关系
https://press3.mcs.anl.gov/atpesc/files/2021/08/ATPESC-2021-Track-5-Talk-4C-Reynolds-TimeIntegrationSUNDIALS.pdf error ,step size,atol,rtol 由此可见,如果atorl,rtol设置得足够大,则同样的误差,也可以通过原创 2022-03-13 23:19:30 · 314 阅读 · 0 评论 -
sundials中explicit,implicit方法的特点
Explicit Methods easy to conceptualize easy to code no algebraic solvers required − stability limits on step sizes − tracks fastest dynamics Implicit Methods less/nonexistent stability limits steps over fastest dynamics − requires algebraic solvers − s原创 2022-03-13 23:05:28 · 343 阅读 · 0 评论 -
sundials公开的论文汇总以及5.8代码
sundials代码以及资料原创 2022-03-10 12:13:00 · 262 阅读 · 0 评论 -
官方建议的ARKODE编程步骤
Initialize parallel or multi-threaded environment, if appropriate. For example, call MPI_Init to initialize MPI if used, or set num_threads, the number of threads to use within the threaded vector functions, if used. Set problem dimensions, etc. This g.原创 2022-03-10 11:13:38 · 371 阅读 · 0 评论 -
ARKODE的错误码
ARKODE共享的返回值含义 ARK_SUCCESS (0): Successful function return. ARK_TSTOP_RETURN (1): ARKode succeeded by reachign the specified stopping point. ARK_ROOT_RETURN (2): ARKode succeeded and found one more more roots. ARK_WARNING (99): ARKode succeeded but an unus原创 2022-03-10 10:54:50 · 324 阅读 · 0 评论 -
sundials中的ATOL,RTOL
General advice on choice of tolerances. For many users, the appropriate choices for tolerance values in reltol and abstol are a concern. The following pieces of advice are relevant. The scalar relative tolerance reltol is to be set to control relative er原创 2022-03-10 09:36:27 · 487 阅读 · 0 评论 -
sundials中的定步长存在的问题
以ARK为例,定步长的方法是调用ERKStepSetFixedStep。 官方对这个接口是这样描述的: Use of this function is not recommended, since we it gives no assurance of the validity of the computed solutions. I t is primarily provided for code-to-code verification testing purposes. 意思是强烈建议不要使用该接口原创 2022-03-09 11:13:13 · 275 阅读 · 0 评论 -
SUNDIALS中的RTOL和ATOL
Relative tolerance (RTOL) controls local error relative to the size of the solution— RTOL = 10-4 means that errors are controlled to 0.01% Absolute tolerances (ATOL) control error when a solution component may be small — Ex: solution starting at a nonzero.原创 2021-11-06 23:50:49 · 919 阅读 · 0 评论 -
sundias的Usage Notes
原文链接 On the integration return and output times All SUNDIALS integrators (CVODE, CVODES, ARKode, IDA, IDAS) can be used in one of two main modes: normal and one step. Before defining the various relevant terms and describing the behavior and use of the in原创 2021-11-03 11:54:42 · 453 阅读 · 0 评论 -
关于ubuntu下sundials报undefined symbol CVodeSVtolerances的问题
这个问题的原因是我第一个加的库的链接就是sundials 通过ldd -r 查看目标文件,nm -A | grep CVodeSVtolerances 查看libsundials_cvode.a文件 我将sundials作为最后一个链接就解决这个问题。 有点莫名其妙原创 2021-11-02 16:04:42 · 218 阅读 · 0 评论 -
CVODE的一些知识点
这部分内容来自《CVODE-A Stiff_Nonstiff ODE Solver in C.pdf》《SUNDIALS-Suite of Nonlinear and Differential-Algebraic Equation Solvers.pdf》 文档有些旧,很多接口变化了,但是可以根据这些信息推测出最新的接口的一些功能 1 CVODE简介 CVODE solves ODE initial value problems in real N-space. We write such IVP pro.原创 2021-11-02 12:19:30 · 1427 阅读 · 0 评论 -
SUNDIALS的C++使用例子
SUNDIALS的C++使用例子 本例子基于cvAdvDiff_bnd.c改造。可以作为sundials使用的模板 特点 回调的函数是类的静态成员函数。不能够是成员函数,因为接口需要的是函数指针,而成员函数需要对象. 可以支持不需要jac 起始时间可以是任意时间,更改T0的值,以及main.cpp的迭代起始值即可 测试的结果和原始代码一致 ##头文件 #ifndef CV_ADV_DIFF_BND_H_ #define CV_ADV_DIFF_BND_H_ #include <stdio.h&原创 2021-10-30 17:28:31 · 748 阅读 · 0 评论 -
SUNDIALS例子的命名规则
sundials are of the form [slv][PbName][ls][prec]_[p] sundials的例子都是[slv][PbName]_[ls]_[prec]_[p] 这样的形式命名的, 中括号里面就是每个模块 [slv] identifies the solver (for cvode examples this is cv, while for fcvode examples, this is fcv); [slv]部分表明了使用了什么求解器 [PbName] identif原创 2021-10-30 10:27:37 · 183 阅读 · 0 评论 -
Sundial的c++例子
ODE原始来源 由OdeInt的例子修改而来:https://www.boost.org/doc/libs/1_67_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/tutorial/stiff_systems.html 后续目标 1 测试一下没有jac的效果 2 和OdeInt做比较 头文件 #ifndef SimpleCvodeEample_h #define SimpleCvodeEample_h #include <iostream原创 2021-10-13 18:02:14 · 634 阅读 · 0 评论 -
SUNDIALS和OdeInt的性能比较
上面的一些ODE库的比较。 我挑了SUNDIALS和OdeIntV2进行实际的比较,测试的例子是来自OdeInt: https://www.boost.org/doc/libs/1_67_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/tutorial/stiff_systems.html 一样的系统,编译参数使用O2 SUNDIALS的计算时间:710 OdeIntV2的计算时间:2610 差得有点远啊 ...原创 2021-10-09 11:25:28 · 428 阅读 · 0 评论 -
SUNDIAL的CVODE求解器的使用步骤
A skeleton of the user’s main program The following is a skeleton of the user’s main program (or calling program) for the integration of an ODE IVP. Most of the steps are independent of the nvector, sunmatrix, sunlinsol, and sunnonlinsol implementations us原创 2021-10-13 10:28:42 · 1440 阅读 · 0 评论 -
SUNDIAL各个solver的介绍
Package Purpose 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 Run原创 2021-10-13 09:48:52 · 463 阅读 · 0 评论 -
sundials库和头文件介
By default, ‘make install’ will install the SUNDIALS libraries under ‘libdir’ and the public header files under ‘includedir’. The default values for these directories are ‘instdir’/lib and ‘instdir’/include, respectively, but can be changed at the configur原创 2021-10-13 09:47:31 · 574 阅读 · 0 评论 -
用于编译c++版本的SUNDIALS例子的cmake配置
# Set the minimum required cmake version cmake_minimum_required(VERSION 3.5) project(main VERSION 0.1.0 LANGUAGES CXX C) set(PROJECT_NAME main) ADD_DEFINITIONS(-D_LINUX -D__LINUX__) set (CMAKE_C_FLAGS ${default_c_flags}) set (CMAKE_CXX_FLAGS ${defaul.原创 2021-10-13 09:36:55 · 531 阅读 · 0 评论
分享