instruction
stringlengths
43
28.1k
I tried to research what exactly is a SOLVER only to find a not clear-cut simple answer. My doubts still remain after going through several sites full of discussions about it. I need to clarify as to whether it is a software product, or is it an open-source tool, or is it a commercial software package? Or is it like a ...
Assuming that a program is written in either C, C++, Fortran or python, what do you think is the best format for the input file given that users could be relatively diverse, i.e. not familiar with the source code? My current interest is a thermodynanic property tool but the discussion could be more general. Here is wha...
I need to find the minimum of a function (a log-likelihood from a Potts model) in tens of thousands of dimensions. The function evaluation is quite fast, takes about $10^{-3} s$, and there is a gradient available (not implemented yet, though, but I expect similar timings). The hessian can be computed analytically, but ...
The Brinkman equations for steady flow of an incompressible fluid through rigid porous solid are: $-\dfrac{\mu_0}{k}\mathbf{v} - \mathrm{grad}p + \mu_0 \Delta \mathbf{v} =0$ and $\mathrm{div}(\mathbf{v}) = 0$ in $\Omega$ where $k > 0$ is the permeability of the solid, $\mu_0 >0$ is the viscosity of the fluid, and $p,\m...
Consider the elliptic PDE $ -\mathrm{div}(k(x)\nabla u) = f(x) \in \Omega$ and $u = 0$ on $\partial \Omega$ If $k(x)$ is piecewise constant across an interface $\Gamma$ in the domain, then we have the jump condition $k(x)\nabla u\cdot \mathbf{n}|_{\Gamma+} = k(x)\nabla u \cdot \mathbf{n}|_{\Gamma-}$ where $\mathbf{n}...
I have a 2-D mesh of triangles and I have a scalar function $f(x,y)$ defined at all the vertices of this mesh. I want to accurately estimate the values of $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$. I am aware how to do this when dealing with finite difference methods on the standard orthogona...
For activation function in neural network, I have used the function $$\frac{1}{2}(\sin x +1) \enspace .$$ But this will give me the value of either 1 or 0, allowing me to classify only 2 classes. What if I want to classify more than 2 clusters of data, then what activation function should I use?
First I would like to say that I have searched the for uncertain fitting, robust fitting, linear optimization, convex optimization, etc. But I'm lacking the knowledge to solve this problem, and I need your help. I have a function gnom(x) = sin(x)*cos(x) and an uncertain part dg(x) = alpha*sin(8x) and g(x) = gnom(x) + d...
Consider the mixed formulation of the Poisson/Darcy system for a region $\Omega$: $\alpha \mathbf{v} + \nabla p = f \\ \mathrm{div}[\mathbf{v}] = 0 $ with the boundary conditions $\mathbf{v}\cdot \mathbf{n} = v_n$ on $\Gamma_v$, $p = p_0$ on $\Gamma_p$ For the weak form: $a(\mathbf{v}, \mathbf{w}) := \int_\Omega \...
I've heard that classical Gram-Schmidt is more amenable to parallelization than modified Gram-Schmidt; apparently the reason has something to do with "level 2 BLAS", which I'm not familiar with. Also, in a comment on this question, @Jed Brown talks about left-looking and right-looking Gram-Schmidt, which I haven't fou...
Consider the Darcy equation, $$\mathbf{v} + \dfrac{k}{\mu_0}\nabla p = \mathbf{f} \\ \mathrm{div}\; \mathbf{v} = 0$$ If the coefficient $k$ is piecewise constant across an interface $\Gamma$ in the domain, we have that (1) $$\mathrm{jump}(k \cdot p\mathbf{n}) = 0 \rightarrow \mathrm{jump}(k\cdot p) =0 $$ over the in...
I have the program four1.c from Numerical Recipes in C to calculate the Discrete Fourier Transform (DFT) of a one dimensional array. I want to calculate the DFT of a two dimensional array using four1.c, how can I do it?
I am looking for the algorithm of Patankar (for example, SIMPLE, SIMPLER, SIMPLEC and PISO) written in Fortran for the simulation of heat transfer and fluid flow.
I currently have a functioning and blazing fast model written in C++ and CUDA. However, I'd like to use Scipy.minimize to fit the model to some experimental data. I was hoping it would be easy, but when I try to describe my problem to Google, it keeps telling me that I want to extend Python with C++, the documentatio...
In Matlab R2013a I have implemented the Implicit Euler (time) integration scheme. To find the $x^{n+1}$ value I use fixed point iterations: $x^{n+1} = \Delta t f(x^{n+1}) + x^n$ To test this, I use an undamped mass-spring system, which should give a simple harmonic as result. However, I seem to loose a considerable amo...
I want to solve this equation $$ -\frac{1}{2}f''(x)+2a\ f(x)^3 = f(x)\mu $$ One exact solution (there are a lot of different kinds) of this equation is $f(x) = f_\infty \tanh(\sqrt{2a}f_\infty x) $ (where $2a f_\infty^2=\mu$ ) but I want to plot an approximation of it. I use the finite difference method to write the de...
I am writing a program that creates a vtk file with a Rectilinear Grid. I am able to save data to each one of the cells using CELL_DATA, but now, I need to save data to each one of the cell faces (x6). How do I do that? Will I will be able visualize it in ParaView? EDIT: In the VTK file format, if one create a 3d recti...
I recently had trouble producing a proper streamline plot in Mathematica, and apparently the problem is a good bit harder than I appreciated. I would like to know if there exist general algorithms to produce streamline plots which deal appropriately with line spacings and terminations. Let me make the problem specific....
I am working on an eigenvalue problem in fortran. I have used Lapack to solve the problem and get the eigenvalues and eigenvectors. This is done for $201\times101$ wavenumbers, only half the wavespace due to symmetry, and for each grid-point in a large domain(in the ocean). I am searching for the maximum eigenvalue for...
Lets assume I have a iterative linear system solver, e. g. this one. Whats the typical approach on verifying and testing this kind of solvers? Is there a standard test set of linear systems one could use to verify the above BiCGStab-Implementation and if not, how would one create such test data?
Is there an analog of perfectly matched layers for finite element methods? References or small examples are much appreciated.
I'm currently searching for an elaborate referece that covers most of the approximation errors for elliptic second order problems (like, for the laplacian dirichlet problem) by using finite element methods in 2D and 3D. For example in 2D, you can receive an optimal error estimate: $$ \| u - R_hu \|_{H^1} = \mathcal{O}...
I would like to get to know more in details about Lax-Richtmyer stability analysis (esp in examples), but I didn't manage to find anything except a definition. Could you advice any sources for this subject?
How can I calculate the machine epsilon for two numbers then calculate the theoretical limit for machine epsilon in Matlab ?
I want to check numerically if a certain vector relation like $$ \alpha_1v_1+...+\alpha_kv_k=c \ (1)$$ holds (where $v_i,c$ are vectors of $100$ or more components). For this, I use least squares approximation, and to see the error, I evaluate the norm of the difference $$ \|\alpha_1v_1+...+\alpha_kv_k-c\|.$$ All $v_i...
Do anyone know what is the algorithm that MATLAB used in its built-in function "pca"? I have the following data set: 148.9820 55.8438 210.2150 149.3030 56.8891 208.4280 151.4400 55.8180 208.9240 146.5530 55.9677 211.5800 146.5770 57.2682 209.3680 145.5330 58.4735 207.6970 153.9680 55.8386 207.9600...
I want to solve $$ \frac{\partial^2}{\partial t^2}u(z,t) + a\frac{\partial^2}{\partial z^2}u(z,t) + k\frac{\partial^4}{\partial z^4}u(z,t) = 0 $$ with $u(z,0) = 1+0.1e^{-\frac{z^2}{2}}$. I'd like to study the dynamic of the wave. What is the simplest way to do it? I tried with the finite difference method but my solut...
What is the state of the art for fastest linear solver for sparse, positive semi definite and strictly diagonally dominant matrix with N varies from ~700 to ~3000, and about a 1/16 of the matrix is non zero values? (an existing library is preferred over an algorithm - C/C++). Thanks.
I need to find a numerical solution for $-\Delta U = f$, on the $\Omega = [0,1]^2$, with $ U|_{\partial \Omega} = 0$. I found a method: POISSONFD in NMLibforOctave with signature: [U,X,Y]=POISSONFD(A,C,B,D,NX,NY,FUN,BOUND), but I can't understand how I can specify bound. Something like: BOUND = inline('x * y * (y - 1)...
I have to compute the accuracy of a new Gaussian mixture fitting algorithm. One of the tests include computing the probabilities in certain intervals in a 6D hyperspace. Also, the integral of the square of the difference between PDF has to be evaluated. But problem is, Matlab doesn't have library functions that handle ...
I am facing the following problem. I know nonlinear least squares can provide a solution but I am wondering if a linear way to solve this data fitting problem may exists. This is my input dataset: I've got three different dataset composed of scattered points I know a linear equation in the form $$ y(x) = bx^2 + cx $$...
Is there a general approach to finding self-similar solutions; i.e. collapsing several functions onto a single function by some transformation? I have data from some experiments, and the functions generated clearly appear to have some kind of self-similar solution. They are the result of varying a small number (4) of d...
I have a system of equations of the form: $$ l_i^T l_j \cdot m_i^T m_j - m_i^T R l_j \cdot l_i R^T m_j = 0$$ where $R \in \mathbb{R}^{3\times3}$ is an unknown rotation matrix. $l_i, l_j, m_i, m_j \in \mathbb{R}^{3}$ are known vectors. The equation can also be rewritten: $ r^T Q r = 0 $ where $ r \in \mathbb{R}^9 $ is ...
I am having issues understanding why different languages are producing different answers for the Schur(QZ) decomposition. I am working on writing some old stuff from Matlab into Julia and Python and am running into some issues with differences between Matlab's qz, Julia's schurfact, and Scipy's qz (Julia and Scipy agr...
I'm trying to solve a PDE in Python of the form, $\dfrac{\partial c(\mathbf{x}, t)}{\partial t} = \mathrm{D} \nabla^2 c(\mathbf{x}, t) -\gamma \rho(\mathbf{x}, t) c(\mathbf{x}, t)$ where $c$ represents the concentration of a chemical, $\mathrm{D}$ and $\gamma$ are constants, and $\rho$ represents the density field of s...
I'm looking to find the most efficient way to change integers from a random number generator to a different inclusive number range. I know of 2 ways so far: Change the number into a decimal in the range of [0,1) and multiply it by the difference between the minimum and maximum values* in the new range. Find the remain...
I come from a computer graphics background without any professional in computational science. But I find my job(game engine development) being related to this field. May I ask some general questions about computational science? Last year, we made a product for deformable object(such as hair, cloth, etc.) simulation. It...
I'm student of computer science (BS) and considering computational science as the field to major in for MS program. I have two questions which might look silly but I'm really confused: 1- Are Scientific Computing and Computational Science fields the same?. In Iran we just have Scientific Computing as an MS program in c...
Although there are similar questions, I am also struggling with the implementation of the following term in "my own code" by Finite Element Method, namely, $\nabla \phi \cdot \nabla \phi$. $\phi$ is a state variable such as scalar potential. I think the descritization of this term is much more difficult than that of a...
During my wandering in Mathematica.se, I gradually noticed that a certain kind of differential equation solving problem is "troubling" us all the time, that is, the boundary value problem (BVP) of nonlinear ordinary differential equations (ODEs). The shooting method, which is used by the Mathematica function NDSolve, ...
I was wondering if anyone has any experience dealing with boundaries when implementing chebyshev differentiation. I am currently trying to implement a no slip boundary condition to solve the incompressible Navier Stokes equations in 3D, in order to ensure that flow is zero at the boundaries is it really just as simple...
My data set is a 60x10 matrix. I performed principal component analysis of this matrix with matlab using the princomp(AdjustedData) after I adjusting my original data set by subtracting the mean of each column. Because I was hoping to obtain a data set described by the top five principal components, I selected the top ...
I have a RKF45 numerical integrator that simulates polymerization of proteins using CUDA. It does so by tracking the populations of discrete length polymers, e.g. monomers, dimers, trimers, etc. all the way up to 8192-mers using the equations of the type that follow. $$\frac{dc_r}{dt}= k_nc_r^{n_c}+2k_a(c_{r-1}-c_r) +...
When writing MPI 3.0 code, should I pass argc and argv to the MPI_Init call or not, and why? EDIT: Since Bill Barth's answer raised some questions I want to make some remarks: Passing argc/argv is not required since MPI 1.1. The question is specifically about why should/shouldn't one pass argc/argv (why shouldn't you ...
Introduction Let me first state some conflicting assertions of the matter to illustrate what are the issues. Personally I would like to have my code open at every stage of development, since others shall see and take advantage of what I am doing I also like to reuse existing code third parties can contribute the pu...
I created this Python function to generate a sigmoid function where I can modify position and width: import numpy as np import matplotlib.pyplot as plt def sigmoid(x,a,b): # sigmoid function with parameters a = center; b = width return 1/(1+np.exp(-(x-a)/b)) For example changing the parameter b I can make it wider o...
I am trying to write an algebraic multi-grid solver (in c++). At a given level I determine which nodes are c-points and which nodes are f-points (where the total number of c and f points equals the matrix dimension on that level). Therefore I need two arrays: one array to hold the indices of the c-points, and one array...
I am currently trying to solve the 3D Poisson equation with a Chebyshev discretisation in the $z$ direction (from -1 to 1) and Fourier in the $x$ and $y$ (from $-\pi$ to $\pi$) I have taken the code into a point where I think it is working but am not totally sure it is outputting the correct result. Does anyone know of...
How can I test whether a given 1D root-finding procedure is robust? I know that there are data sets and resources online for different kinds of optimization, but I have yet to find anything with regard to 1D root-finding. Do you happen to know of any data sets or functions that are commonly used to test the robustness ...
I am looking to solve the incompressible Navier-Stokes equations in 3D, using an inflow boundary condition specifying a velocity: $\mathbf{u} = \mathbf{g}_0 \,\, \forall \,\, \mathbf{x} \in \Gamma_u$ and I want to use a Neumann type boundary condition where I specify pressure at the outlet $-p\mathbf{I} + \tau = p_0\m...
My question is related, but not a duplicate of Asymptotic convergence of the solution to a parabolic pde to the solution of an elliptic pde Suppose I solve the parabolic PDE: $u_t = \Delta u + f(x,t)$ on $\Omega \times(0,T]$ $\nabla u(x,t) \cdot n = 0 $ on $\partial\Omega$ $u(x,0) = g(x)$ on $\Omega$ and obtain the (un...
I am currently working on a project of building a simulator. Up till now I have mostly played around with very simple examples, but with regards to the future I have been thinking that it might be a good idea to use an external library for numerical computations, especially since I might also want to look into the poss...
given a symmetric matrix $Y \in \mathbb{R}^{n \times n}$, and an arbitrary matrix $X \in \mathbb{R}^{n \times n}$, and a vector $v \in \mathbb{R}^{n \times 1}$, is it possible to compute the following expression in $O(n^2)$ time? $$diag(X^TYX) \cdot v$$ where $diag(X)$ returns a $n \times n$ matrix with its main diagon...
I am reading the book "Numerical Recipes in Fortran 77: The Art of Scientific Computing" (Second Edition) and I came across some methods for numerical integration of 1D functions. More specifically the Gauss-Laguerre, Gauss Hermite, and Gauss Jacobi weights and abscissas appealed to me. I need them because I have some ...
I have just started learning FEniCS and have used: http://www.scientificpython.net/pyblog/fenics-linear-two-point-bvp to write a script for solving: u'' + u = 1 u(0) = 1, u'(1) = 0 with exact solution, u(x) = exp(-x)/ exp(-1) + x + ( -1+exp(-1) )/ exp(-1) Clearly the weak formulation...
Comsol Multiphysics (a popular FEM package) includes two time-stepping algorithms (IDA aka BDF, and Generalized-alpha), described in their documentation as follows (quoted here under Fair Use; emphasis mine): • IDA was created at the Lawrence Livermore National Laboratory (Ref. 4) and is a modernized implementation ...
I wrote a Fortran 2003 wrapper for the ARPACK routine znaupd, basically translating the the example driver routine zndrv1 into modern Fortran 2003 language with automatic arrays. I initialize every variable passed to the znaupd routine. Everything works perfect as long as i do not call the method zndrv1 more than once ...
I'm wondering if anyone can help me understand energy conservation when using conservation law methods (i.e. Riemann solver, High-Resolution Wave-Propagation Methods) with the addition of source terms: $ \frac{\partial \vec{Q}}{\partial t} + \nabla \cdot \vec{F} = \vec{\psi} $, where, $\vec{Q}$, and $\vec{F}$ are the c...
To get the hang of Gauss-Laguerre integration I have decided to calculate the following integral numerically, which can be compared to the known analytical solution: \begin{align} \int_0^{\infty} s^3 \exp(-s^2 t) \, \mathrm{d}t = s \end{align} The result can be seen in the graph below. The result matches the analytic...
When evaluating the integral below in python using scipy.quad I get the following warning: UserWarning: The maximum number of subdivisions (50) has been achieved. If increasing the limit yields no improvement it is advised to analyze the integrand in order to determine the difficulties. If the position of a lo...
Ok, It was hard to explain my problem in the title. I hope it made enough sense to peak the curiosity of some of you. What I've been trying to do is find the relationship between the amount of random numbers generated (n) and the probability that an equal amount of odd and even numbers are generated. (n/2 odd and n/2 e...
I have some function $F(k_x,k_y,k_z)$ that I wish to numerically integrate over a polygon domain - physically, I am integrating over the first Brillouin Zone (BZ) of the FCC lattice (a truncated octahedron). My goal is to tell Fortran what region of $k$-space and which points to integrate over, given this shape. I ca...
I was playing with N-body simulations of a game called Kerbal Space Program, which itself uses the patched conics approximation. I have read that for long term stability it is best to use symplectic integrators and one of the simplest would be Störmer-Verlet method: $$ \ddot{\vec{x}}_n = F(\vec{x}_n) $$ $$ \vec{x}_{n+1...
I bought a book where the exercises are given in Maple worksheet format (.mw). Is there an open-source software in Linux able to interpret or to convert this specific file format ?
Suppose we have two matrices $A$ and $B$ (we can assume they're symmetric; if absolutely necessary I think they may be positive definite). Then, is there any technique for solving $$(A\circ B)x=b,$$ where $\circ$ denotes the Hadamard (elementwise) product? I am seeking a direct solver if possible rather than iterati...
The most up-to-date performance benchmarks comparison between R and Matlab that I could find are several years out of date: 1 2 Is anyone aware of a more up-to-date comparison?
I'm trying to analyze a circuit card assembly (CCA). The biggest problem is always trying to mesh the thin copper layers along with the thicker epoxy layers between. I'm making the approximation that because the copper layers are so thin, and copper's thermal conductivity is so high, the normal-direction temperature ch...
I'm looking for a method to solve a large overdetermined system of linear equations in a least squares sense. The matrix is dense. I'd like to use a method that works even with limited memory (we can't load the full matrix in RAM). The matrix dimensions are something like 10,000,000 by 10,000, where I have a very large...
I've been reading up on the concept of entropy as a useful way of developing a natural residual for a system of equations. For example, the entropy function for compressible Navier-Stokes is $$H(U)=-\rho \ln(p\rho^{-\gamma})$$ with entropy flux $$F^i(U)=-\rho \ln(p\rho^{-\gamma})u_i$$ and for isentropic flow the en...
Helo, every one. May I ask for help about how to solve this problem. $\begin{align} & \text{max}_{x_i} \quad |\sum_{i=1}^{4} a_i x_i | \\ & s.t. \quad \sum_{i=1}^4 x_i^2=1 \end{align} $ The goal is to find the optimal $x_i$, the $a_i$ is known. Thank you very much. Anyone can give me some tips? Best
This is a follow-up to a different question I asked with more detail. For $v\in\mathbb{R}^n$, denote $D_v\in\mathbb{R}^n$ as the diagonal matrix with elements in $v$. Given a "tall" matrix $B\in\mathbb{R}^{n\times m}$, I would like to solve the following optimization problem: $$\min_{v\in\mathbb{R}^n} \|X-B^\top D_v B...
I want to solve a non linear system of equations of a particular kind. I find it hard to formulate clearly so I directly give a simple example. $ f''=A(f,g)\\ g''=B(f,g) $ with the boundary conditions as follow: $f'(0)=g'(0)=0$ $f'(\infty)=g'(\infty)=0$ At $x=1$, f is continuous but there is a discontinuity for $g$: $ ...
I am a Java programmer who has reached the limits of brute computer power. My relational database (and non relational databases) is not producing results quick enough and I have hit a bottleneck in the software so I am turning to math possibly improve my algorithm to my problem. I have data, lots of data! I am collecti...
How do I ensure that my function below is well conditioned as $s$ approaches $\infty$? The problem I get is that for large $s$ the function returns an indeterminate form $\frac{0}{0}$. I would otherwise have expected the function to increase monotonically from 0 to 1 as $s$ approaches $\infty$. \begin{align} f(s) = \...
The solution to the ode below looks like it is monotonically increasing: However on closer inspection we see that it is not: How can I ensure that the numerical solution is monotonically increasing? import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint def f1(theta): return -1*np...
I want to analyze buckling in a composite using the FEM. So far I have studied this references Zdenek P Bazant, Luigi Cedolin. Stability of Structures: Elastic, Inelastic, Fracture and Damage Theories. World Scientific Publishing Company, 2010. Wsben Byskov. Elementary Continuum Mechanics for Everyone. Springer, 2013...
I would like to model the 2D diffusion equation with Neumann BC's inside the following egg-shaped domain: I would like to use the finite difference method with the discretization implied by the image above, but while I can handle the interior points, I don't know how to handle the boundary values. I know how to search...
I am working on the flow stability problem. In this work the main complication is solving generalized eigenvalue problem for a large scale Non-Hermitian matrix. I need only one eigenvalue (most left on real axis), so I used shift-invert transformation. I used SLEPc library to solve this problem, especially Krylov-Shur ...
I would like to solve a system of differential equations $u+\nabla(\nabla\cdot u)=f$ or in more detail $a+\partial_t^2a+\partial_t\partial_xb+\partial_t\partial_yc=f$ $b+\partial_x^2b+\partial_x\partial_ta+\partial_x\partial_yc=g$ $c+\partial_y^2c+\partial_y\partial_tb+\partial_y\partial_xc=h$ with periodic boundary co...
I am trying to solve Euler equations on unstructured grids. Consequently, the problem reduces to solving Ax=b where A is a sparse matrix. Right know I am using Gauss-Seidel (GS) in a serial manner however, I need a parallel code. Since the grid is unstructured I cannot use red-black GS. Is there a fast parallel solver ...
I have a large system of ODEs. For various reasons, it is natural to store the values of the dependent variables in a multidimensional array. For example, these values might represent the solution of a PDE at a point in a 2D or 3D grid, after semi-discretization. The function scipy.integrate.odeint takes a vector (i....
This is an attempt to reproduce Moon et al. 1995, and the author's copy can be obtained through here. As a benchmark, we estimate the time-lagged mutual information of a simple sine signal $\sin(0.02\pi t)$ using Gaussian kernels: $$K(y)=\dfrac{\exp\left(-\dfrac{(y-y_i)^TS^{-1}(y-y_i)}{2h^2}\right)}{(2\pi)^{d/2}h^d\det...
The field of computational fluid dynamics (CFD) is dedicated to solving the Navier-Stokes equations (or some simplification of them). A subset of CFD, ocean and atmospheric models numerically solve the same equations for realistic applications. What are the differences and trade-offs between the general CFD approaches ...
I am looking for a method or algorithm to produce a value that describes how different two meshes are geometrically but that have different topologies. An example would be some CAD data that has had an FE mesh applied and the part after it has been manufactured and then scanned into a 3d triangulated mesh. The manufac...
I am using nonlinear optimizers such as BOBYQA to train a model with 10-20 parameters. It so happens that some of the parameters have high correlation. Roughly speaking, imagine that you are fitting parameters $a,b$ in a function like this: $f(x)=a\frac{x}{1+|x|}-b\frac{x^2}{1+|x|^2}$ The response to the change in pa...
There's a vast amount of literature about the numerical solution of partial differential equations. But in none of my books or lectures did I find anything about coupled systems. Internet and library research also did not lead to any introductory material. Could anyone recommend a textbook or a paper with an introducti...
I have the following set of linear equations $$a_{m+1,n}+a_{m-1,n}+m(a_{m,n+1}+a_{m,n-1})+(m^{2}+n^{2})a_{m,n}=f_{m,n}$$ Here $m$ and $n$ run from 1 to $N$, so there are $N^2$ equations for the unknowns $a_{m,n}$. Fixed boundary conditions are used such that $a_{N+1,n}=0$ etc. I would like to solve this system numerica...
I have a system of coupled ODEs that I want to solve. The functions are A(x), B(x), C(x). It is a boundary values problem. I am using Matlab bvp4c. So far I am not satisfied with my solutions. For the boundaries that are of interest for me, the solver fail (Matlab return "a singular Jacobian encountered"). For some oth...
I might have some non-linear ODEs that are being solved by scipy.integrate.odeint. However, a parameter at each time step might have to be updated by using a non-DE rule, which uses the results of the ODE solver at each timestep, together with the variable along which integration is being performed, in order to update ...
I am using bvp4c from Matlab to solve a boundary values ODEs problem. Given the ODEs and boundary conditions, is there any way to have more information on the solutions? How many do I expect? 0, 1, several? What am I supposed to understand from the bvp4c error message "singular Jacobian encountered"? No solutions at al...
Please recommend me a well documented C++ library that I could wrap with a mex-interface in Matlab. The library should have the capability to read meshes (optimal in different formats, at least in AVS-UCD-format). To these meshes some operations should be applied: Smoothing, subdivision, reduction, translations, scalin...
I have to choose between the PETSc and Trilinos libraries for a project that involves the solution of non-linear systems of equations. From their web sites they both mention support for GPUs, without giving many details (e.g. here and here). I would like to know which of these libraries is better for GPGPU. In part...
I know the method of constructing solutions. For example I have a BVP: $$ u_{xx} + u = 0 $$ subjected to: $$ u_{x}(0) = f_1, $$ $$ u_{x}(1) = f_2 $$ If I want to check the correctness of my numerical implementation, just plug in $u(x) = \sin(x)$ and then $f_1 = \cos(0), f_2 = \cos(1)$ and then run the script for implem...
So far, I have been using scipy.integrate.odeint as my "workhorse" ODE solver. My current problem requires that I solve a large system (up to ~5000) ODEs. Here's the general workflow of the odeint program, that I have noticed: get initial values and function to calculate Jacobian (or RHS) of the ODE system at $t = t_0...
Currently, my problem requires me to solve a system a large system of non-linear ODEs (up to ~5000). So far, I have been using scipy.integrate.odeint as my workhorse. A simpler subset of my problem only involves ~50 non-linear ODEs. Solving the system over an interval $[0, 10]$ takes about 3 times longer than solving t...
Suppose $A=uv^T$ where $u$ and $v$ are non-zero column vectors in $\mathbb{R}^n, n\geq 3$. $\lambda=0$ is an eigenvalue of $A$ since $A$ is not of full rank. $\lambda=v^Tu$ is also an eigenvalue of $A$ since $Au=(uv^T)u=u(v^Tu)=(v^Tu)u$. Here is my questions: (1) Are there any other eigenvalues of $A$ ? (2) If I have a...
I would prefer recommendations that don't require the use of proprietary tools (such as Matlab). I know of two ODE solving options for the Python ecosystem: PyDSTool (Dopri, Radau, other Runge-Kutta methods, and whatever scipy.integrate.ode has access to) scipy.integrate (scipy.integrate.odeint uses lsoda from the For...
I am aware of a few: a) R project b) Intel® Ordinary Differential Equations Solver Library But, I'd like to know which are the best tools that have been developed by professional physicists and mathematicians. The reason I ask is that I'd like to build an ODE solver myself from scratch but I'd like to be aware of the s...
I'm looking for a library or individual package which provides convenient optimization subroutine for Fortran, any suggestions? I'm testing the codes from Numerical Recipe, downhill simplex method and direction-set method, but the input-output interface is not convenient for chi-squared function, because we generally n...
For a linear system $$ M \dot{u} = Au \qquad \textrm{or} \qquad \dot{u} = L u $$ The generalized eigenvalue problem is $$ A e = \lambda M e $$ We can use the time-stepper approach which essentially computes the eigenvalues of the operator $$ E = \exp(L T) $$ If $\mu$ is an eigenvalue of $E$ then it is related to the or...