Questions tagged [sundials]

SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)

SUNDIALS was implemented with the goal of providing robust time integrators and nonlinear solvers that can easily be incorporated into existing simulation codes. The primary design goals were to require minimal information from the user, allow users to easily supply their own data structures underneath the solvers, and allow for easy incorporation of user-supplied linear solvers and preconditioners.

26 questions
7
votes
1 answer

Compiling C++ in Rcpp with external C library

I am trying to build an R package with Rcpp code which uses an external library. I had previously asked SO about how to use an external C library in a package here. The problem I have facing is as soon as I include the following line of code y =…
Satya
  • 1,708
  • 1
  • 15
  • 39
3
votes
1 answer

Solving ODEs in parallel in Julia: variable answers, hangs after several executions

I am using Julia DifferentialEquations on a large system of ODEs (127) that need to be solved repeatedly for different initial value vectors. I have found that CVODE_BDF is the fastest. I'd like to send each ODE solve() to a different processor.…
3
votes
0 answers

Parallel simd MUCH slower than serial simd in Julia

Summary: Scroll down for reproducible example which should run-from-scratch in Julia if you have the packages specified in the using lines. (Note: the ODE has a complex, re-usable structure which is specified in a Gist which is downloaded/included…
3
votes
0 answers

When calculating adjoint sensitivities in SUNDIALS/CVODES, how does one handle discontinuities in the forward solution?

I am using CVODES to calculate adjoint sensitivities for a very basic equation with solution discontinuity at t=1. When integrating the forward solution, I integrate over each interval with CVodeF() in CV_ONE_STEP mode in a loop, calling…
dws
  • 31
  • 2
3
votes
2 answers

installation of assimulo and sundials - error

I want to use Assimulo and Sundials for the solution of differential algebraic equations in Python and therefore I am trying to install it on Ubuntu. For the installation of Sundials, I followed the installation instructions and as I understand it…
veiguf
  • 31
  • 4
2
votes
1 answer

Linking against a c/c++ library

I have some basic questions regarding linking against a C/C++ library. I am trying to understand the difference in using the two different usages -L/usr/local/lib -lm usage and /usr/local/lib/libm.a usage. E.g., when I compile and link an example…
Satya
  • 1,708
  • 1
  • 15
  • 39
1
vote
0 answers

CMake undefined and duplicate symbols when building executable. Fortran77 C mix

I have a fortran 90 program which calls Sundials CVODE via the FCVODE inteface. Sundials is written in C, but they provide two interfaces to fortran. One interface is for fortran 77 applications, and one uses modern fortran methods…
nicholaswogan
  • 631
  • 6
  • 13
1
vote
2 answers

How to perform adjoint sensitivity in Python (preferably through CVODE)

I want to implement the adjoint sensitivity analysis in python, in order to determine the gradient of my objective function with respect to some parameters. In specific the objective function depends on the solution of a differential equation which…
kostas1335
  • 59
  • 1
  • 6
1
vote
0 answers

Pathos KeyError with dill when using an instance method

I'm trying to run a simple ODE system with different values of a parameter, using Assimulo to call SUNDIAL's CVode. As a case study, I wrote these functions and solved the problem in parallel successfully: from assimulo.solvers import CVode from…
1
vote
0 answers

How to install scikits.odes on Python 3.X

I'm trying out other ODE solvers besides SciPy's odeint. I found a possible one, scikits.odes package. The requirements include C and FORTRAN compiler (I downloaded MinGW-w64, no problems), LAPACK (downloaded, build, tested, seems fine), and…
1
vote
1 answer

Sundials ODE_vector to armadillo conversion for ODE approximation

I am trying to use the Sundials ODE solver libraries in order to approximate the dynamics of an extension to the multi species Lotka-Volterra competition equations. E.g. in the case of two species dx1/dt = r1 * x1 * (1 - (x1 + a12 * x2)) dx2/dt =…
jack.l
  • 101
  • 5
1
vote
1 answer

SimBiology simulation not working

I am trying to simulate a model (using the sundials solver) in MATLAB and I get the following error: CVODES returned -4 from module CVODES function CVode: At t = 0 and h = 1.3093e-009, the corrector convergence test failed repeatedly or with |h| =…
TanMath
  • 598
  • 1
  • 9
  • 27
1
vote
2 answers

Sundials installed but not running in python with assimulo

Cheerio, I am trying to use Assimulo 2.9. on a Mac OS X. For that I downloaded and installed sundials via cmake by creating a builddir to the Download file and ../Downloads/sundials-2.7.0 running $cmake ../Downloads/sundials-2.7.0 …
Paul Rousseau
  • 571
  • 2
  • 7
  • 21
0
votes
1 answer

Sundials for larger system of chemical plant

I am trying to solve a rather larger system of differential algebraic equations (DAEs) using Sundials. The DAEs contain both algebraic and differential variables. To get the initial conditions for the DAEs, I am using Ipopt and Jump, solving the…
0
votes
1 answer

Removing sundials package in Ubuntu 22.04

I am trying to install Cantera 1.8 due to some reason. I have installed the latest sundial version which is not working (problem with cvodes). Now I need to remove the sundials but I am unable to do so. I have used the following commands: sudo…
Anirudh
  • 1
  • 1
1
2