instruction stringlengths 43 28.1k |
|---|
I have an ODE system of the general form
y' = k(y)(x) + q(z)(x)
x' = a(z)(x) + b(x)(x)
where k,q,a and b are also dependent on the states x and y. The solver(ODEINT) is throwing the error: "Max number of iterations exceeded. A new step size was not found". I am using the Rosenbrock method on a stiff system. Is th... |
I a solving the 2d steady state convection-diffusion problem on the famous flow around a cylinder in rectangular domain benchmark. My numerical results show that with Q1 finite elements, the solver is converging for Pe=5000, whereas with Q2 discretization, the solver fails to converge. What can be the reason for poor ... |
I am trying to implement an incremental projection method for the 2D incompressible Navier-Stokes. The type of projection method I am trying is
$$
\frac{u^{*} - u^{n}}{dt} = - \nabla p^{n} - u \cdot \nabla u + \nu \nabla^{2} u\\
u^{*}|_{\partial D} = u^{n+1}|_{\partial D}\\
\nabla^{2} \phi^{n+1} = \frac{\rho}{dt} \nab... |
I have been learning about the impact of cache size on code performance. I wrote a small code to see how using a column major loop in MATLAB would be better than using a row major loop, since MATLAB stores matrices in column major like FORTRAN. I also compared against MATLAB's internal multiplication routine. Here is t... |
I am using Python but I wouldn't mind changing language. All I have gotten from my research are tools to count the number of (lattice) points inside a region given the equations for the planes that enclose it. Other tools are made to optimize a given function inside the polytope (linear programming).
How about finding ... |
What are the differences between MA57 and HSL_MA57 solvers? I'm in an optimization class that will make use of symmetric indefinite factorizations, and I'm trying to learn about the distinction between these two. I know that MATLAB uses the MA57 solver but am unsure of the differences beyond this. Thanks!
|
I am dealing with a integral equation
$$ f'(t) = -\int_0^t K(s) f(t-s)\quad t\in [0,t_\max] \tag{1}$$
in which $f(t)$ and $f'(t)$ are known, well-behaved functions of $t$ and $K(t)$ is the unknown. In addition, the physics of the problem dictate that $f(t)$ and $K(t)$ are even about $t=0$. I have discretized this equat... |
I'm developing a finite volume solver for the simple twodimensional advection equation with constant velocities $u, v$ and constant mesh spaces $\Delta x$:
$$ \frac{\partial \rho}{\partial t} + u \frac{\partial \rho}{\partial x} + v \frac{\partial \rho}{\partial y} = 0$$
where $u,v > 0$.
According to this lecture, the ... |
Is it possible, in general, to combine hydrodynamical motion and expansion of material with, say, a finite difference time domain method to simulate light-matter interaction?
If so, how is this done in practice? I guess you would need some kind of operator splitting scheme. If you know more about it, can you suggest me... |
I am looking at an optimization problem that looks like this:
$$
\text{minimize}\;\; \mathbf{x}^TQ\mathbf x \;\;, \; \mathbf x \in \mathbb R^n, x_i \in \lbrace 0, 1 \rbrace\\
\text{subject to}\;\; ||\mathbf x||_1 = m < n
$$
In words, the goal is to select a fixed number $m$ of elements from $\mathbf x$ that minimizes ... |
Consider a $\mathcal{C}^1$ function $V:\Omega\rightarrow\mathbb{R}$ where $\Omega\subset\mathbb{R}^n$. If a random vector $X$ has a parametric density $p_\theta(\textbf{x})$ that's smooth in its parameters and uniformly supported on $\Omega$ we can use the score estimator for a stochastic derivative wrt $\theta\in\math... |
I'm using python 2.7 (on jupyter notebook, win10 64 bit) to perform my analysis. I need to perform continuum removal (CR) on a reflectance spectrum data. I need it to be as described [here][1].
EDITED:
I used the following code to perform CR on a reflectance spectrum:
from scipy.spatial import ConvexHull
import numpy a... |
Given $N$ data points, does polyfit of degree $N-1$ produces the unique interpolating polynomial?
For concreteness, here is a code example:
x=[1:10]
y= x.^3;
pp = polyfit(x,y,9)
where the following warning is issued:
Warning: Polynomial is badly conditioned. Add points with
distinct X values, reduce the degree of the ... |
I’m working with a heat equation of the form.
$$\frac{d(\rho(T)c_p(T)T)}{dt}-\nabla\cdot(k(T)\nabla T)=f$$ with temperature dependent density $\rho(T)$, specific heat $c_p(T)$, and thermal conductivity $k(T)$. Ordinarily this would lead to a system of nonlinear equations that would need to be solved. I was searching... |
I have a 3D solver for the incompressible Navier-Stokes equations which uses a FFT library for the Poisson equation with a uniform grid on all directions. In 2D the Poisson equation is given by:
$$
p_{xx} + p_{yy} = f_{rhs}
$$
When using a non-uniform grid, we usually map the domain to a computational space where the g... |
If I take the Fourier transform of data $x \pm \sigma$, is there a standard approach to what the error in the outputs will be? Would the best way be a direct evaluation of the upper and lower bounds?
|
I'm trying to build HSL's MA57 library, and to do so, it requires METIS. I've downloaded the .tar files to my Downloads folder, but where do I actually "build" the libraries (and subsequently store the compiled files) on a Mac? Is there a best practices location, like usr/local?
|
I am trying to use the numpy polyfit method to add regularization to my solution.
My non-regularized solution is
coefficients = np.polynomial.polynomial.polyfit(x,y,5)
ypred = np.polynomial.polynomial.polyval(x,coefficients)
How would I modify this to add L2-regularization?
|
Define the element-wise thresholding operator $T_\tau(\cdot)$ with threshold $\tau$ as
$$ [T_\tau(X)]_{i,j} = \begin{cases} X_{i,j} &\mbox{if } |X_{i,j}| \ge \tau, \\
0 & \mbox{if } |X_{i,j}| < \tau. \end{cases} $$
Clearly, $T_\tau(X)$ can be computed in quadratic $O(n^2)$ time for some $n\times n$ matrix $X$.
Quest... |
I’m trying to find a Runge–Kutta integrator that only requires the absolute minimum of storage, i.e. it fulfills one of the following three, presumably equivalent criteria:
Each evaluation of the derivative should only depend on the previous stage.
It stores only store three vectors, namely the beginning of the step, ... |
1d diffusion equation
Integrating the diffusion equation,
$$
\frac{\partial u}{\partial t} = D \frac{\partial^2 u}{\partial x^2},
$$
with a constant diffusion coefficient D using forward Euler for time and the finite difference approximation for space,
$$
u_i^{t+1} = u_i^t + D\frac{\Delta t}{\Delta x^2} ( u_{i+1}^{t} +... |
Mallat's pyramidal algorithm for the discrete wavelet transform operates on power-of-2 vector lengths. Can it be extended to work on inputs of any size without resorting to zero padding?
|
I understand the idea of constructing Low-pass and High-pass filters as a projection on the Numerical Range and Numerical Kernel of dyadic powers of a diffusion operator in the work Diffusion Wavelet Packets.
This can be represented as a tree and is implemented here:
https://github.com/aweinstein/dw/blob/master/Wavel... |
I'm trying to numerically integrate a multi-dimensional expression. The integrand is complicated; for example this is the integrand for $N=4$:
$$\begin{aligned}&x_1^6x_2^5x_3^3x_4^2(x_1-x_1x_2)(x_1-x_1x_2x_3)(x_1-x_1x_2x_3x_4)\times{}\\&{}\times(x_1x_2-x_1x_2x_3)(x_1x_2-x_1x_2x_3x_4)(x_1x_2x_3-x_1x_2x_3x_4)\end{aligned... |
As far as I can tell, nodal interpolation estimates proven with Bramble / Hilbert require higher regularity of the functions being interpolated. E.g. with linear elements in 2 dimensions, one needs $v \in W^{m,p}$ with $m p > 2, p \geq 1$ in order to have
$$ |v - I(v)|_{W^{r,p}} \leq C h^{m-r} |v|_{W^{m,p}}, $$
where $... |
I just need to calculate the largest real part of eigenvalues of a Jacobian which is highly non-normal and singular. Most of the eigenvalues are negative, and some of them are positive but near to zero relatively. I want to find the largest one except the zeroes. And I do not need the eigenvectors.
However, there are s... |
In the problem I am dealing with, I require to repeatedly solve $Ax=b$ where $A$ is a weighted Laplacian matrix of a sparse graph. The right-hand side remains constant. However each time I solve the system, only one weight of the graph changes, effectively changing 4 coefficients in the Laplacian matrix (2 diagonal and... |
Does anyone have any suggestions for good open source plotting software which has good graphical spherical coordinate plotting (from a data file). I have a three column data file where column 1 is $\theta$, column 2 is $\phi$ and column three is $f(\theta, \phi)$. I would like to plot this in spherical coordinates $(\t... |
I want to solve a small deformation solid structure problem applying periodic boundary conditions in FEM. The geometry is a square and the equations are:
$$
\text{div} \, \sigma = 0 \\
\sigma = f(\epsilon)\\
\epsilon_{ij} = \frac{1}{2}(u_{i,j} + u_{j,i}) \\
u^+ - u^- = c \\
\sigma^+ \cdot \hat{n} + \sigma^- \cdot \hat{... |
I would like to model heat diffusion at the gold / water interface after excitation of the metal surface by an ultrafast laser pulse (ca. 80 fs).
An appropriate model to start with would be the "two temperature model" (TTM) or "parabolic two step" (PTS). This model considers the electronic and lattice systems as separ... |
How to solve second order non-linear ODE
$$y'^2+y y''+\frac{2}{x} y y' -0.1 y^2=0$$ subject to $y'(1)=0$ and $y(1)=1$ over the interval $0 < x \le 1$.
I turned the equation to a PDE $y'^2+y y''+\frac{2}{x} y y' -0.1 y^2=y'_t$. I was trying to find the steady state solution when $t \to \infty$, which is the solution to... |
I am working on a library that requires subdivision of polygons into triangles. The polygons are divided into triangles by (more or less) random points that are inside them. In general, the approach is to perform the Delaunay triangulation on a set of those points. This works very well, however sometimes I get intersec... |
Let's say I have n variables. Each variable has lower and upper bounds. I want to find all suitable combinations of these variables to sum up to a required value.
An example with two variables:
$$
x_1 + x_2 = 100\\
0 <= x_1 <= 70 \\
0 <= x_2 <= 60
$$
So the result would look like
$$(x_1, x_2) \in \{(70, 30), (69.8, 3... |
In Floater's paper on barycentric rational interpolation, he shows that a stable interpolant using irregularly space points can be evaluated in $O(N)$ operations.
For equally spaces samples, cubic b-splines can be used to generate an interpolator that requires $O(1)$ evaluation, and using the Catmull-Rom curve, $O(\log... |
I am working on a 3-D problem using the finite volume method (FVM). I came across a problem dealing with the computation of gradients at a face.
The geometry that I'm working with is discretized into cells. Every face is aligned with one of the three cartesian axes. The specific FVM that I am using computes cell-avera... |
I have acceleration data from a sensor. X Y & Z.
I move the senor in the Y axis. Mostly in a straight line. So I ignore x & z.
From the sensor documentation
5.2.1 Acceleration output:
ax=((AxH<<8)|AxL)/32768*16g(g is Gravity acceleration,9.8m/s2)
ay=((AyH<<8)|AyL)/32768*16g(g is Gravity acceleration,9.8m/s2)
az=((Az... |
Can anybody help me to find books or MATLAB code examples for solving electric field of the electron gun(fig.1)with finite difference method? Python code examples are also perfect.
The electron gun includes three electrodes,1,2,3.The voltages of three electrodes are 0V,100V,1000V,respectively.
|
If you want to develop numerical algorithms for variational inequalities, you often choose a Semismooth Newton Method. In many cases, this approach involves derivatives of $\max$ or $\min$ functions in respective $L^p$-spaces, which result in pointwise evaluation of functions.
However, this isn't too much of a problem,... |
There are many software packages for the finite element method, of which the most popular are listed e.g. on Wikipedia. When it comes to the finite volume method, I'm not aware of any similarly comprehensive list. In fact, the only software package I'm actually aware of is OpenFOAM. Do you know any alternatives?
(I'm m... |
I have a Matlab code computing the solution to an eigenvalue PDE. It consists of two parts: assembly of the stiffness/rigidity matrices and solving a generalized eigenvalue problem. I mention that the assembly is done using vectorized code in Matlab. It is likely that I would need to run the program on a quite large da... |
I have a matrix $J$, and I know there are 3 existing zero eigenvalues and their eigenvectors. I want to detect if there is one extra eigenvalue to go cross zero (if it is zero, its eigenvalue will rotate to the range of previous zero eigenvectors, and the matrix will be defective!).
I can do QR decomposition to the zer... |
We know the classical solution of transport equation is determined by one initial (boundary?) condition, for example, the solution of
$$\frac{\partial u(t,x)}{\partial t}+\frac{\partial u(t,x)}{\partial x}=0$$
$$u(0,x)=e^{-x^2}$$
is
$$u(t,x)= e^{-(x-t)^2}$$
My question is, how to find this solution numerically with fi... |
I'm using 4th order RK to solve the schroedinger equation in atomic units. Say I want to simulate 400fs in intervals of h=10fs, then in atomic units this is h=413a.u and 400fs=16500a.u. 4RK involves repeated multiplication by the timestep, so with h=413 everything blows up. Could someone explain what I'm missing?
Edit... |
I am currently learning the Smoothed Particle Hydrodynamics method that I need to use later in my thesis. I have studied the mathematics behind the method and I want to code a simple example to show how the classical SPH does not reproduce a constant field exactly. So, if we consider for example
$$f(x,y)=\frac{1}{2}\l... |
I am trying to implement the algorithm from the research paper "Accurate Camera Calibration using Iterative Refinement of Control Points" from Datta et al.
Running many iterations does not show a convergence of the camera parameters.
The algorithm is defined as:
Detect calibration pattern control (also called image p... |
Apologies if this is not the right forum to ask, but there has been a somewhat related question here.
I am working on a piece of software (nonlinear constrained optimisation, coded in C++11 and Python3) that I would like to try out on a Xeon Phi. Fujitsu Europe apparently offers free remote access to a Knight's Landing... |
Trying to study the error of FDM for a second order derivative versus step size I calculated the coefficients and validated them, but the output has errors for small step sizes.
The function in question is
$$ f(x) = e^{\sin(x)} $$
With a derivative of
$$ f''(x) = \left(\cos^2(x) - \sin(x)\right)e^{\sin(x)} $$
The calcu... |
I have to find the orthogonal projection of a vector $b$ onto the matrix $A$ of size $m \times n$.
In my application, I don't have the luxury of calculating the QR factorization. All I have are routines that give me the least squares solutions with minimum norm, i.e., ${A^\dagger b}$. I can, of course, use matrix mult... |
I've encountered an odd issue with solving for the eigenvalues of the following matrix, in Matlab format:
[ 0 1 0 1 0 0 0 0 0 0 0 0 1 1;
1 0 0 0 0 0 0 0 0 0 0 0 0 0;
0 1 0 1 0 0 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0 0 0 0 0;
0 0 0 0 1 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 1 0 0 0 0 0 ... |
We have a fairly large (maybe 1000 equations) differential-algebraic equation model written in ACSLX, an obsolete modelling environment similar to Modelica. The model represents the evolution of a biological system through time, with several forcing functions such as atmospheric temperature which are usually provided o... |
I want to solve the following differential equation from a paper with the boundary condition:
The paper used the Crank–Nicolson method for solving it. I think I understand the method after googling it, but most websites discussing it use the heat equation as an example. Here we can replace the usual t variable with Xi... |
I would like to use the PDD algorithm developed by Sun to solve tridiagonal matrices in parallel for the following compact finite difference scheme:
$
\begin{align}
\dfrac{1}{4}f^{'}_{i-1} + f^{'}_i + \dfrac{1}{4}f^{'}_{i+1} &= \dfrac{3}{4} \dfrac{-f_{i-1} + f_{i+1}}{dx} \; \; \; \; \;\;\;\;\;\;\;\;\;\; \text{(Interior... |
What are the differences between supernodal and multifrontal matrix factorizations? Can you provide a few references or high-level points about the approaches?
|
I'm solving 2D axisymmetrical Euler's equations in conservative form:
$$
\frac{\partial U}{\partial t} + \frac{\partial F(U)}{\partial x} + \frac{\partial G(U)}{\partial r} = H(U)
$$
where
$$
U = \left( \begin{array}{c} r\rho \\ r\rho u \\ r\rho v \\ re\end{array} \right), \;
F(U) = \left( \begin{array}{c} r\rho u \\... |
Quantum Monte Carlo (QMC) calculations historically have been used to parameterise the exchange-correlation functionals for Density Functional Theory (DFT). For example, this article explains a way to do that: Quantum Monte Carlo investigations of density functional theory of the strongly inhomogeneous electron gas.
Ho... |
Is there a known error estimate for Gaussian quadrature when applied to a discontinuous function?
For simple one-dimensional experiments, the error appears to be bounded by $C h$, where $C$ is some constant and $h = \max |x_{i+1}-x_i|$ is the maximum spacing between two nodes, but I haven't found a clean way to show ... |
I am using MATLAB to prototype a few matrix multiply techniques and compare efficiency. Eventually, I will move the prototype codes to C. It is for a homework assignment where we need to write an efficient matrix multiply routine (by being aware of cache size, locality, etc.).
I am curious about the efficiency differen... |
I want to change my main platform from Matlab to Python due to my work, and I mainly used Matlab for the neural network, so I want to do the same thing in the Python either.
I used to make my own network architecture like the picture below.
I wanted to replicate this network in Python either, but I can't find the modu... |
I am doing work which requires as fast matrix multiplication as possible and just want to double-check with this community that the Winograd variant of Strassen's MM algorithm is the fastest practical (so no Coppersmith-Winograd) algorithm.
I am doing a lot of processing with the data before, between, and after each MM... |
A standard Quadratically Constrained Quadratic Program (QCQP) is of the form:
$$ \underset{x}{minimize} \frac{1}{2}x^TP_{0}x + q_{0}^{T}x
$$
$$
subject \; to \quad \frac{1}{2}x^TP_{i}x + q_{i}^{T}x + r_{i}\leq 0\quad i \in \{1,2,\ldots,m\}
$$
$$
\quad Ax = b
$$
It seems to me that this type of program is specifica... |
I'm trying to apply the finite-volume method (FVM), with which I'm not so familiar, so a simple 1D PDE equation. I already asked this question in the math stackexchange, but was told that it could be a better fit here.
The equation I want to solve is, to simplify,
$$\frac{\partial U}{\partial t} + A\left(x\right) \fr... |
I was looking into the Book of Riviere " Discontinuous Galerkin Methods for solving Elliptic and Parabolic Equations". In the comparaison of section 2.12 (copied below), the example of rectangular mesh indicated that the DG is more economic (has les DOFs) then the CG when using a certain space of elements. Can any one ... |
I would like to do non negative mf and I wanna ask a question about my main matrix. The question is should I include rows and columns that have no non-zero entry in them. I think if there is not a single relation information between any row and column, it doesn't make sense. Is that correct to prune those rows and colu... |
I have a set of real-valed vectors, for example
$S = \{v_1, v_2, ..., v_k\}$
$v_i = \begin{pmatrix} age_i \\ height_i \\ weight_i \\ ... \end{pmatrix}$
or whatever. Each vector has on the order of 30 components, and $k\approx 10,000$. The vectors are not normalized.
Two objectives:
count how many clusters are naturall... |
I am working on a project in numerical analysis which I have to program in C (using Lapack and Blas). Matrix is given which is tridiagonal and "almost" symmetric (one element is to be changed to make it symmetric). In order to calculate certain eigenvalues and eigenvectors I am planning to use dsyevx() routine which wo... |
I have a problem with the stability of finite difference method for the wave equation in cylindrical coordinates.
the equation is:
$$
\frac{\partial^2 \omega_n}{\partial r^2}+\frac{1}{r}\frac{\partial \omega_n}{\partial r}+\frac{\partial^2\omega_n}{\partial z^2}-\frac{\omega_n}{r^2}=\frac{1}{c^2}\frac{\partial^2\omega_... |
I'm currently trying to minimize the following function:
$$\min_{\mathbf x,\mathbf y,s} \|F\mathbf x-\mathbf a\|_2^2 + \|SF\mathbf y-\mathbf b\|_2^2 + \lambda \|\max(\mathbf x, \mathbf y)\|_1,$$
$$\mathbf x>\mathbf 0, \mathbf y>\mathbf 0.$$
Here $F$ and $S$ are both linear operators. $F$ is a discrete Fourier transfo... |
I am reading a paper that summarizes a set of simulations. Basically, the authors are trying to minimize some function using different optimization algorithms. They conclude: "Our findings point to instances of convergence at points where the first- and second-order optimality conditions fail."
What does this mean in p... |
Are there any open source tools available which can take a surface triangulation of mesh volumes and convert them to a boundary representation?
I am interested in refining multiple region tetrahedral meshes with boundary conditions applied to some of the surfaces. I have attempted to read a mesh into gmsh, but it is u... |
I need to be able to set the properties of the materials (density, size etc) and see what happens according to laws in Physics when landmasses collide each others, with or without bodies of water, such as in the plate tectonics theory.
Can you recommend a software for this?
|
I'm attempting to write a FORTRAN program that calculates the magnetic field, B, at any point outside of a bar magnet.
I'm going to use a first order euler scheme, where each side of the bar magnet is split into small cells, each with centres at (xi,yi,zi). I know I can ignore all of the sides that have any z values, ... |
Let's say that we have an objective function $f(\mathbf x,\mathbf y)$ which has the parameters $\mathbf x=[x_1\ldots x_n]$ and $\mathbf y=[y_1\ldots y_n]$. Here, $\mathbf y$ is a blackbox variable which is calculated from a simulation of a network $\mathcal N$ by taking $\mathbf x$ as input.
$f$ is an objective functi... |
I'm trying to analyse the behaviour of a wind turbine blade rigidly connected to a wall during fatigue testing, being excited in it's first mode in two orthogaonal directions simultaneously (the first 'up and down' and the first 'side to side' mode). I currently do this in two ways, both of which use a beam element mod... |
let´s say I estimated a Markov chain by splitting my data into traning and test data, and estimating the transition matrix for the traning data yields
$$ P=
\begin{bmatrix}
p11 & p12 & p13 \\
p21 & p22 & p23 \\
p31 & p32 & p33 \\
\end{bmatrix}
$$
i.e, the transitions between states 1, 2 and 3. It i... |
Maybe you can point me to some results already developed for this.
I have to solve for $X$ the following "Sylvester-like" equation:
$$ AX - XB = F(X)$$
where $A\in\mathbb{R}^{a\times n}$, $B\in\mathbb{R}^{p\times b}$, $X\in\mathbb{R}^{n\times p}$ and $F(X)$ is a nonlinear function of the elements of X.
I know I can so... |
I need to numerically evolve a density matrix using this formula(Actually I have more terms but right nows I am starting with this and facing problems):
$$\dot\rho(t) = -i[H(t), \rho(t)]$$
$H(t)$ is the Hamiltonian which is of a form $H_o + \epsilon(t)H_1$ where both $H_o$ and $H_1$ are constant $20\times20$ matrices a... |
I'm simulating a magnetic dipole that is subjected to an evolving magnetic field. In ISO convention ($\theta$ is the polar angle and $\phi$ is the azimuthal angle), my equation of motion that is giving me issues is
$$\ddot\phi = \frac{\textrm{garbage}}{\sin{\theta}}.$$
So this equation makes perfect sense, as $\theta$... |
I have the equilibrium equation in elasticity for a static case.i.e
Div T=0.
For certain implementation, I have to get the x and y component equations and then derive the weak form separately. How is it done in that case?
I am aware of getting the weak form using the vector equation as such, but what I need are two se... |
I would like to apply a rank filter on an nXm numpy array. Let's say I have this array:
a = np.random.randint(100,size=(5,5))
array([[ 9, 71, 55, 72, 43],
[46, 56, 44, 17, 64],
[53, 51, 17, 71, 36],
[12, 28, 97, 46, 35],
[29, 55, 27, 48, 5]])
I would like to run a rank filter (kernel wind... |
I have been thinking about the No Free Lunch (NFL) theorems lately, and I have a question which probably every one who has ever thought of the NFL theorems has also had. I am asking this question here, because I have not found a good discussion of it anywhere else.
The NFL theorems are very interesting theoretical resu... |
I'm having an issue solving an LP of the form:
$$\min z = c^Tx$$
$$\text{s.t.}$$
$$Ax \geq b$$
$$x\geq p$$
$1 \leq a_{ij} \ll b_i$, $p \leq 0$, and $c \geq 0$
The specific problems I'm running into with the ortools GLOP solver are:
The LP takes an insanely long time to solve on a distributed system where each worker h... |
I'm faced with an interesting problem and need some help finding existing best techniques to solve it. The setup is that we're analyzing a large system trying to find what I call "hidden subassemblies." Using round numbers, there are 1,000 different basic parts that are used in 10,000 different combinations or "assembl... |
Preface
I seem to lack a fundamental understanding of best practise recommendations given by Intels MKL user guides for using MKL in threaded applications. So let's clarify it together.
Wording and the question
There are especially two different ways to optimize numerical code. Either OpenMP or the Message Passing Inte... |
I am using the FFTW MPI in C.
I have a simple question.
Quoting from fftw.org
The multi-dimensional transforms of FFTW, in general, compute simply the separable product of the given 1d transform along each dimension of the array. Since each of these transforms is unnormalized, computing the forward followed by the b... |
I have a task to plot average temperature profile at each cross-section in the axial direction of a combustion chamber. I have $x$, $y$, $z$ coordinates data in excel as well as the corresponding temperature according to the rows, example ($x=1$,$y=1$,$z=1$, temperature = 500°C). I have around 25000 rows of it. I have ... |
This question is a continuation of
Fourth order IMEX Runge-Kutta method, concerning the implementation. Is seems to me that the first implicit stage value involves a direct evaluation, rather than solving some equation. That is, if
$\frac{d U(t)}{dt} = F_{\textit{STIFF}}(t)+F_{\textit{NONSTIFF}}(t)$, and the stages a... |
Has anyone successfully used the linear elasticity equations to model a cantilever problem?
The equation I am solving is simply:
$$\nabla \cdot \boldsymbol{\sigma} = 0$$
subject to boundary conditions at the fixed end, free surfaces, as well as where the load is applied. I apply the load as a shear stress/traction b... |
I am solving the 1D diffusion equation by discretization using the method of lines. My problem is that I don't manage to ensure mass conservation. I have read many similar questions about the topic but it seems that the problems are related to advection terms (which I don't have here). I actually believe that my proble... |
To solve stationary, incompressible, inviscid and irrotational flow around a circular cylinder, I am using general coordinates. Since the flow is symmetrical, we only consider the upper half of the plane.
I derived a PDE and proper boundary conditions in the physical domain (left image) given by $G := \{(x_1,x_2 : R_1^... |
I'm trying to make a numerical simulation of pulsar magnetosphere using FDTD on a log-spherical Yee lattice for fields and PIC for plasma particles. Field part is working like charm but issue arises when adding the plasma.
To simulate the dynamics of charged plasma particles I use Newton-Lorenz equation:
$\frac{d\gamma... |
I have a very simple problem, but can't seem to understand what I need to do. In simulating a pendulum from it's jerk equation, I'm having a hard time setting initial conditions to get it to work out. So for example the equation of motion for a pendulum is
$$\ddot{\theta} = -A \sin{\theta}$$
And I'm interested in mod... |
I would like to do a Generalized Schur (or QZ) decomposition for a pair of complex matrices $A$ and $B$.
I found the following class:
class Eigen::GeneralizedEigenSolver<_MatrixType>
but it seems that it only works for real matrices. Any ideas?
|
I am trying to solve a cubic equation in Python. However I am getting only one root of the equation. Please find the code snippet below.
import numpy as np
from scipy import optimize as op
def my_func(p):
k = 0.17
d = 3e-6
A = 1.6e-9
epsilon = 8.85e-12
Vspi = np.sqrt((8*k*np.power(d,3))/(27*e... |
In some of my computations I calculate a scalar value $\lambda_h$ (in my case an eigenvalue) depending on a finite element discretization of the domain. Usually we can manage to find estimates of the form
$$ |\lambda - \lambda_h| \leq C h^k $$
where $k$ depends on the problem, the degree of the approximation, etc.
Qu... |
I want to minimize some multivariable function $\Delta(\alpha, \beta)$. I know that this function has a zero point, $\Delta(5, 5) = 0$.
Starting from some $(\alpha, \beta)$ close to $(5,5)$ (e.g. (4.8, 5.2)), I want to use a gradient descent method to recover the 'correct' values $(5,5)$.
I can plot the surface $\alph... |
In Knuth, the following method for computing an average is presented:
\begin{align*}
M_{n} = M_{n-1} + (x_{n} - M_{n-1})/n
\end{align*}
(See here, if you don't have TAOCP.)
Assuming the samples all lie a bounded distance away from the average, then as $n \to \infty$, $(M_{n-1}-x_n)/n$ becomes very small, and eventually... |
I believe this would be an interesting problem.
I have a blackbox function which can take 2-60 input variables $(X_1,X_2,...X_n)$ which are to be optimized. I'm calling this objective function as a blackbox function because it's parameters consists of the input variables $(X_1,X_2,...X_n)$ and variables from a simulat... |
I'd like to solve numerically a system of quadratic equations:
$A_{11}x_1+A_{12}x_2+A_{13}x_3+B_{12}x_1x_2+B_{13}x_1x_3=C_1$
$A_{21}x_1+A_{22}x_2+A_{23}x_3+B_{21}x_2x_1+B_{23}x_2x_3=C_2$
$A_{31}x_1+A_{32}x_2+A_{33}x_3+B_{31}x_3x_1+B_{32}x_3x_2=C_3$
where $A_{ij}$, $B_{ij}$, $C_i$ are real numbers and $x_i$ the variabl... |
Given a set of points in a plane, and series of measurements of the distances between those points, how would I go about generating a best-fit model of the position of the points?
For example, given 3 points (A, B, C) that define a 30-40-50 right triangle, the data set might look something like this:
(0, 29.1, 39.7) - ... |
I want to simulate the shape of the free surface in a small fuel tank in microgravity, which is very slowly being emptied.
The tank is not symmetric, the geometry is given by CAD (e.g. step file).
Modelling of surface tension and contact angle is a must. The contact angle will also vary between different wall region... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.