instruction stringlengths 43 28.1k |
|---|
I asked a question on Stack Overflow Performance Issue with VP Trees and Nearest Neighborsand I was not satisfied with the answer and so I thought I would reword my question for this site and post this question as a computational science question.
I am using the VPTree to store the coordinates of my sparse array as da... |
SU2 is an open-source CFD suite that is built around a RANS-solver. The main PDE that is solved, is the following:
$$
\frac{\partial}{\partial t} \mathbf{U} + \nabla \cdot \mathbf{F^c} - \nabla \cdot \mathbf{F^v} = \mathbf{Q} \qquad \mathrm{in}\ \Omega, t > 0
$$
In this equation, $\mathbf{U}$ is the state vector and $\... |
I am comparing the run-time of two algorithm by solving different instance of the problems. Sample of my data:
problem_id | algo_original_time | algo_improved_time
---------------------------------------------------------
prob_01 | 0.56 | 0.036
prob_02 | 0.26 | 0.005
pr... |
I am trying to visualize a higher dimensional vector field. Is there a way to do this. I asked this question here, I was told to post it here.
As an example, one can use
$$\begin{eqnarray}
\dot{x}&=& \left(J-R\right)x
\end{eqnarray}$$
where $x\in \mathbb{R}^5$ $J $ is a skew-symmetric matrix and $R$ is a positive... |
This is a continuation of the question asked here. I want to solve numerous least squares systems of the form
$$
D_i A x \approx D_i b
$$
where $D_i$ are $m \times m$ diagonal matrices with positive elements on the diagonal, $A$ is $m \times n$ with $m > n$, $x$ is $n \times 1$, and $b$ is $m \times 1$.
The answer give... |
While playing around I managed to design a Cellular Automaton (CA) that behaves like a fluid. Very basic behavior, like diffusion, obstacle avoidance, pressure etc. And that got me wondering about it. Designing by hand doesn't seem like the way to go; is there any work that tried to explore the rule space using other m... |
I have research work where I need to compute a matrix inversion. The matrix has a size $31300\times31300$. I am using a universal java matrix package to invert this matrix. But as the dimension of the matrix is huge, it throws error memory out of scope. Cpu cannot allocate huge memory space.
So, to find out a solution ... |
I try to implement some big matrix inversion. My system configuration is Hardware:- Memory: 62.8GiB, Processor: Intel Xeon(R)CPU E5-2670 v3 @2.30GHZ*48 To implement matrix inversion I am using universal Java matrix package. I want to invert a 31000*31000 dimension matrix. It is a Sparse matrix, most of the cell of this... |
When I open U for example, I find:
dimensions [0 1 -1 0 0 0 0]
That means m/s
What are the other dimensions?
|
For learning purposes, how do I create an scalar variable like temperature divided by 2 and outputs it on files generated?
|
In Yurii Nesterov's Introductory Lectures on Convex Optimization, there is a description of the rate of convergence and corresponding upper bound for the analytical complexity of a minimization problem:
$$\min f(x),\quad x \in \mathbb R^n$$
The error at iteration $k$ is denoted by $r_k=||x_k-x^*||$ where $x_k$ is the ... |
I am trying to implement the Thomas algorithm using OpenCL.
__kernel void thomas(__global float *a_d, __global float *b_d, __global float *c_d, __global float *d_d, __global float *x_d,
__local float *shared, int system_size, int num_systems, int iterations)
{
int thid = get_lo... |
I need to put $N$ spheres with given radius $R$ randomly in a Volume $[-0.5,0.5]^3$, without any overlap of spheres.
If I choose values so that all the spheres will occupy ~57% of the total volume, I find it difficult to get results.
The basic scheme to place the $i$-th particle after $i-1$ particles have been placed:
... |
Analytical
Inside the box, the wavefunction is:
\begin{equation}
\frac{\hbar^2}{2m} \frac{d^2 \psi(x)}{dx^2} = E \psi(x) \iff
\frac{d^2 \psi(x)}{dx^2} = k^2 \psi(x)
\end{equation}
where $k = \frac{\sqrt{2mE}}{\hbar}$. Outside the box:
\begin{equation}
-\frac{\hbar^2}{m} \frac{\partial^2 \psi(x)}{\partial x^2} = (E ... |
When a timestep $h$ is rejected using a Runge-Kutta pair, such as Dormand–Prince, the algorithm resumes from the same initial point $t$ with a smaller timestep. A different idea is to resume at an intermediate point $t + kh$ where $1/7 < k < 4/5$, using the 4th order interpolation. The estimated error would be tested a... |
Existing algorithms for solving ODEs handle functions $\frac{dy}{dt} = f(y, t)$, where $y \in \mathbb R^n$. But in many physical systems, the differential equation is autonomous, so $\frac{dy}{dt} = f(y)$, $y \in \mathbb R^n$, with the $t$ left out. With this simplifying assumption, what improvements can be seen in exi... |
I want to implement a Bilinear Finite Volume discretisation of the anisotropic diffusion problem:
$$\frac{du}{dt} = \nabla \cdot (\textbf{D} \nabla u)$$
Both my degrees of freedom as well as the Diffusion Tensors are given on the vertices of my quadrilateral grid. I can, therefore, use bilinear test/trialfunctions on e... |
I have a linear system of complex numbers. I am using LAPACK' zgesv (actually I am using intel MKL LAPACKE, but I am assuming the algorithm is the same). No assumption can be made about the system.
I tried to follow its subroutine calls, but I got lost. What algorithm does it use, how many operations will be needed acc... |
I'm trying to solve this advection-diffusion equation (ADE):
$$\frac{\partial \phi}{\partial t} + \nabla \cdot (-D \nabla \phi + \mathbf{u} \phi) = 0$$
In fact, this ADE framework is coupled to a Navier-Stokes (NS) solver and I get velocity field ($\mathbf{u}$) from NS solver. My question is about ADE boundary conditio... |
I'm trying to implement a model I found in a paper, but there is something I do not understand. The authors say they use TDMA to solve their equations; however, they use a 3rd order upwind biased approximation to discretize the convective terms. This leads to an almost tridiagonal matrix (with coeff. for the terms $i-1... |
I have a question for the format of Schrodinger equation
$$\psi(x,t) = \int_0^\infty c_n e^{-iE_nt/\hbar} \psi_n(x)$$
Why do we have $i$ instead of $-i$?
|
For teaching purposes I'd need a continuous function of a single variable that is "difficult" to approximate with polynomials, i.e. one would need very high powers in a power series to "fit" this function well. I intend to show my students the "limits" of what can be achieved with power series.
I thought about concocti... |
I understand that the function applyrule uses patmatch to identify patterns and apply transformations accordingly.
Suppose, I want to write a rule for transforming spatial derivatives along $z-$direction of field components $E_i(x,y,z)$ to momentum space, so that:
$\partial_{z}(E_i(x,y,z)) \to -ikE_i(x,y,z)$.
I trie... |
I have come across an optimization problem with the following objective function:
$$f(x_0,y_0,z_0,x_1,y_1,z_1,...,x_N,y_N,z_N) = \sum_{i=0}^N f_i(x_i,y_i,z_i, \alpha(x_{i+1}-x_i) + \beta(y_{i+1}-y_i))$$
i.e. the objective function is the sum of the functions $f_i$ that only depend on three variables $x_i,y_i,z_i$ and o... |
The discussion in How does density functional theory scale with system size? already tells, how DFT scales with the number of electrons.
I want to simulate some clusters, so the simulation cell contains much vacuum and its size can be changed without affecting the number of electrons.
I know that with a larger cell le... |
I'm interested in running Hartree-Fock calculations on single atoms for a project, and I was trying to find more information about how to actually run them instead of just derivations of equations. Most of what I've found involves simulating molecules, but since I just want to do single atoms, can I use the hydrogen wa... |
I want the eigenvalues of the following generalized eigenvalue problem:
$$ Av = \lambda M v $$
where
$A\in\mathbb{R}^{n\times n}$ is sparse, symmetric, and positive semi-definite
$M\in\mathbb{R}^{n\times n}$ is sparse, symmetric, and indefinite (i.e. neither positive nor negative definite)
I want the eigenvalues $\l... |
Imagine a simple triangular base mesh in finite element method with an unknown number of elements (varying by the user). How can connectivity matrix be coded to be generated automatically?
|
Can someone recommend the best way to solve a least squares fitting problem with B-splines, with additional equality constraints? I want to solve:
$$
\min_x || b - A x ||^2, \textrm{subject to: } C x = d
$$
where $A$ is $m \times n$ and $C$ is $p \times n$. Specifically I want to fit B-splines and force the first deriv... |
I am trying to simulate a robot manipulator dynamics in SciLab.
Basically, I generated a step function that has constant acceleration for half of the time and then the same acceleration but negative for the other half, so I get a smooth transition between the manipulator positions.
This code generates the velocity and ... |
I simply want to solve the elliptic equation:
$$
-\kappa \nabla^2 u + u = f
$$
where $f\in [0,1]$. When using continuous Galerkin with Lagrange elements, I have noticed that $\kappa$ has to be greater than a certain value related to the mesh resolution to avoid values of $u$ under 0 or over 1. I would like to avoid the... |
You can set the Absolute or Relative ODE solver tolerances in Matlab with the options structure from an odeset command. But how do I find the default values for the different ODE solvers?
|
I have a nonlinear function fun with n inputs and n outputs. I also have a function jac which calculates the Jacobian, which is sparse. Which SciPy method, if any, can I use to find the root of fun?
I am surprised that I can't find a method in scipy.optimize that takes a Jacobian in sparse matrix format. But I believe... |
I'm interested in solving a differential equation in which I don't know the analytical form of the right hand side, I only know its numerical value for a finite set of values of the independent variable:
$$\frac{dy}{dx}=f(x_i).$$
I haven't found a library that allows me to solve this problem and I want to make sure if ... |
I was doing my research/project using WENO as the limiter in finite volume methods to solve hyperbolic conservation law. I have no idea why the result in the characteristic wise method has a big error compared to component-wise. This is my current solution that I get from my solver, it shows that there is a numerical i... |
I am trying to attain the Moore-Penrose pseudoinverse of a very large, very sparse, rank-degenerate, singular, and square matrix. ($75000 \times 75000$, near rank). The matrix is a graph Laplacian and I need to find the resistance distance between a large number of nodes (LU determinates are too slow). I realize the in... |
I am trying to solve a particular form of the Euler / Navier-Stokes equations in 1D, with very strong and non-linear diffusion coefficients.
My system of equations is
\begin{cases}
\frac{\partial n}{\partial t} + \frac{\partial}{\partial x}\left(nv \right ) = S_n\\
\frac{\partial \left( ... |
I have a cube which is divided into 8 small cubes by bisecting each edge, I am trying to find out the surface area of each of the faces and the corresponding outward normals for them. This operation is done on a finite element mesh, so I have transformed the cube into the isoparametric form using shape(basis) functions... |
I'm trying to get the normal modes of a system of springs and dasphots using
the basic dynamic equations for a linear, damped elastic structure:
$ M \ddot{u}(t) + C \dot{u}(t) + K u(t) = f(t) $
to get the normal modes, the following QEP (quadratic eigenvalue problem) must be solved
$ (\lambda^2M+\lambda C+K)\bar{\psi... |
I have just started with PETSc hence it might seem like a very stupid question but I couldn't find any answer in manual.
After Calling KSPSolve, where can I access the soluition for my linear system?
Example for a matrix:
$$
\left(\begin{array}{ccc}
2 &-1 & 0\\
-1 &2&-1\\
0&-1&2
\end{array}\right)
\left(\begin{array}... |
If $u_1$ and $u_2$ are solutions of (weak-form) Laplace equation on a connected domain $\Omega$, with Dirichlet boundary values $u_{\partial\Omega, 1}$ and $u_{\partial\Omega, 2}$, respectively. If $$u_{\partial\Omega,1} \neq u_{\partial\Omega, 2},$$ we know $$\|u_1-u_2\|_{L^2(\Omega)} \neq 0.$$
My question is, for any... |
What is the difference between the Dishonest Newton method and the Very Dishonest Newton method? Is there a difference or do they mean the same thing?
I have tried searching for this on the internet but I can't find anything. I understand that in the ordinary ("honest") Newton method, the Jacobian is computed in each i... |
Suppose I know the expected sparsity of a matrix (i.e. the number of non-zeros / total possible number of non-zeros). Is there a rule of thumb (perhaps approximate) for deciding whether to use sparse matrix storage (specifically, compressed row storage) vs. storing it as a dense matrix?
Speed is more important in my a... |
The goal is to display the relation between K and E in the following equation:
$$\cos(K) = 5 \text{sinc}( 5.12\sqrt{E} ) - \cos(5.12\sqrt{E} )$$
The intended result is:
However, using the following code:
k = linspace(0, 3*pi, 99); % 0 < k < 3pi , crystal momentum.
E = linspace(0.1, 3.5, 99);% Energy.
[X, Y] = meshgr... |
As a simple exercise for a class in computational methods for physics, we've learned how to implement the RK4 (Runge-Kutta 4th-order) algorithm for a very simple exponential decay. E.g. the function y(t) is governed by
Based on the RK4 definition from most sources, and specifically in this case Wikipedia,
determinin... |
If I just need a chain of cartesian coordinates (as parameters/dimensions) that photon travels one after another until it reaches to a stop (hitting a wall or something), can GA minimize its path to get true ray tracing, if objective function returns total time of travel and whole 3D space is uniformly divided into nod... |
I am trying to solve the viscous Burger equation
$$
\frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} = \mu \frac{\partial^2 u}{\partial x^2}
$$
with Neumann boundary conditions. I am
using the Maccormack predictor-corrector scheme:
$$
u_j^\overline{{n+1}} = u_j^n - \frac{\Delta t}{\Delta x}(F_{j+1} - F_j^... |
I have asked this question already on maths and mathoverflow.
Just a question about a literature reference. I am writing a paper for engineers.
Usually for the Lagrange multiplier problem
$$
\nabla f(x)+\lambda \nabla g(x)=0
$$
the sensitivity result that the multiplier $\lambda$ gives the sensitivity for changes in t... |
In a traditional PDE solver on unstructured meshes, we know exactly the sparse pattern of the Jacobian matrix, and we know that the amount of data to communicate is far smaller than the amount of local data.
Then is it more efficient to use ghosted PETSC Vec (created with VecCreateGhost or VecCreateGhostWithArray) tha... |
I am applying optim() function in R to obtain maximum likelihood estimates of the fixed effects and random effects in a model with bivariate random effects. The code works well but it is very slow in executing the line of code involving the optim() function. I would like to know if there is/ are any specialized optimiz... |
Problem
In the case of a finite element code, I have many small (order of 30x30) matrix inverses (or LU factorizations), one per finite element. These matrix inverses never change and must be applied to vectors repeatedly in the context of a matrix-free solver.
Storing all these inverses is the memory bottleneck of the... |
I'm thinking to couple my fluid flow solver based on lattice Boltzmann method with a mechanical deformation solver based on finite element method to take account for solid deformation in my models. In fact, I'm looking for a fluid-structure interaction framework, which its fluid solver was written based on lattice Bolt... |
I am switching from OSX to Linux, which I am familiar with but have no greater experience. There are several different alternatives: archlinux, gnome, ubuntu etc. Which would you recommend for a PhD student in numerical analysis? I mainly use Julia, Fortran, C++, Python and occasionally Matlab. Thus it should be easy t... |
I'm new to numerical analysis, and have been learning root finding algorithms. I am a bit confused about the difference between Muller's method, and Newton's method using an n-degree interpolating polynomial.
How is the Muller's method, which approximates f(x) using a quadratic polynomial, different from the Newton's m... |
I've been trying to learn about root finding using Newton's method, which uses a quadratic interpolating polynomial. I found this text, Numerical methods for roots of polynomials, PART 2: McNamee & Pan, which has relevant theory, but there seems to be some error in the text.
While calculating $x_{i+1}$, shouldn't th... |
I was doing error analysis of numerical scheme and I get $L_1$ error for each grid size with $N$ element. I was searching reference to compute accuracy order/rate from that error data but doesn't find any good reference. Anyone know?
Error:
$e=|u-u_{exact}|$
$L_1$ error:
$L_1=1/N \sum_{i=1}^{N} e_i$
|
The Langevin function $\mathcal{L}(x) = \mathrm{coth}(x) - \frac{1}{x}$ occurs in computations related to elastomers and paramagnetic materials. It is easily computed accurately and with high performance as long as the issue of subtractive cancellation near the origin is addressed, e.g. by using a minimax polynomial ap... |
I struggle with this problem:
I understand how to apply Newton's method to a already given function but I can't seem to find that function in this case from the given input n, t, d and s. I'm completely new to numerical method's so sorry if I don't see the obvious. It would be nice if someone could lead me in the righ... |
I am trying to compute the following integration
$$
\int_0^\infty e^{-y}y^{a/2}L_c^b(y)L_e^d(y)dy
$$
using the generalized Gauss-Laguerre quadrature routine in the GNU Scientific Library. Here the $L$'s are the generalized Laguerre functions, and $a>-1, b>0, d>0$.
I am not sure how to choose the number of quadrature p... |
I am currently enjoying writing computational codes as a hobby. Right now I've worked out an Euler method and results are pretty good with up to $x=1$. Over $x=1$, instability starts to kick in. May I know why is this so? The equations are as below:
$$
df=-\frac{x^2}{y},\quad y(0)=1
$$
#Euler Method
import numpy as np
... |
I am trying to solve a non-linear time-dependent heat equation
$$\partial_tT=\nabla \left(k_T(T)\nabla T\right) + f$$ (similar to question Solving a non-linear heat equation with the galerkin method gives negative values) with a FEM-approach, using the continuous Galerkin method for the FEM part, the Newton method for ... |
I need to solve the following equation:
$$
\begin{pmatrix}
\frac{\omega^2}{c^2}\varepsilon_x-\mu_z^{-1}k_y^2-\mu_y^{-1}k_z^2 & \mu_z^{-1}k_xk_y & \mu_y^{-1}k_xk_z\\
\mu_z^{-1}k_xk_y &\frac{\omega^2}{c^2}\varepsilon_y-\mu_z^{-1}k_x^2-\mu_x^{-1}k_z^2 &\mu_x^{-1}k_yk_z\\
\mu_y^{-1}k_xk_z & \mu_x^{-1}k_yk_z&\frac{\omega^2... |
How well do explicit Runge-Kutta "tableau" methods compare to the state of the art ODE solvers and when do they fail? I've been reading Butcher's ODE book and he does a good job at introducing tableaus to represent different Runge-Kutta methods. This includes methods with built-in error estimates for adaptive steps siz... |
Writing this comment reminded me of something I noticed years ago about evaluating Bessel functions of the first kind $J_n(x)$ in Excel. (BESSELJ)
I don't use Excel now but at the time I'd checked MacOS and Windows computers with several different released versions of Excel and they all had the same problem.
This was c... |
I am developing a FEM fluid solver using the Taylor-Hood algorithm, i.e. quadratic interpolation for velocity, and linear for pressure.
I have developed the code for 2-D quadrilaterals and triangles, and everything worked fine.
I am trying to do it in 3D, using a combination of 20-noded and 8-noded hexahedrals, and I h... |
I have the following problem:
$$\begin{bmatrix}A &B \\C& D\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}\lambda I_m & 0 \\ 0& \mu I_n\end{bmatrix}\begin{bmatrix}x \\y\end{bmatrix}
$$
where $A$, $B$, $C$, $D$ are matrices, $I_m,I_n$ are identity matrices of sizes $m,n$, $x,y$ are vectors and $\lambda$ a... |
Many dense linear algebra decompositions (QR, SVD...) on an $m\times n$ matrix have cost
$$
O(\max(m,n)\min(m,n)^2)
$$
when implemented in practice on a computer. Is there a colloquial name or a more compact notation for this complexity? For instance, something like "linearithmic"? Or, how would you write it in the mos... |
I have a vague understanding of the compatibility equations for linear elasticity. They appear to be necessary in obtaining a unique displacement field. However, why is it that, in my papers I've come across, the compatibility equations aren't solved for in the linear elastic numerical formulation? Are they not a gover... |
I have found that in unstructured mesh, discretizing the laplacian operator with finite volumes requires special care, as given in An Introduction to Computational Fluid Dynamics: The Finite Volume Method, (section 11.8) but this is limited to constant normals along the element faces. What happens when these faces are ... |
I am using a second-order finite difference in space and time approximation for the 1D wave equation.
No source but initial data: $I(x)=\mathrm{e}^{-400 (x-0.5)^2}$.
Velocity $c=1$, $nx=501$, $nt=1001$, $x \in[0,1]$ , $t \in[0,1]$, $dt=0.001$.
After 0.2 seconds I get
However, if I change the initial condition to a sp... |
I am working on a multi-commodity flow problem where for a graph $G=(V, E)$, some flows are permitted to be split and some flows should strictly follow one path. I have formulated this problem as follows.
Problem Formulation
$$ \min \sum_{(i,j) \in E} \sum_{f \in F} c_{ij}^fx^f_{ij}$$
$$ \sum_{j \in V}x^f_{ij} - \sum_{... |
What are common methods to choose pivot blocks in Block LU (for non-SPD/non-Diagonally Dominant Matrices)?
|
The partial differential equation,
\begin{align}
\dfrac{\partial f}{\partial x} + a(x)\dfrac{\partial f}{\partial y} = 0
\qquad & f(0,y) = f(L_1,y) = c_0e^{-y} \\
& f(x,0) = c_0 \;,\; f(x,L_2) = c_0e^{-L_2}
\end{align}
for $f=f(x,y)$ has the nontrivial solution,
\begin{equation}
f(x,y) = Ae^{(-y-h(x))} \;,\quad a(x)=-\... |
I need to optimize affine transformations for of a set of triangles using energy function based on the connectivity.
The energy of an edge $e_j$ between triangles $T_a, T_b$ is given by
$$
E_j = \left[(A_a v_{a,1} + t_a) - (A_b v_{1,b} + t_b) \right]+
\left[(A_a v_{a,2} + t_a) - (A_b v_{2,b} + t_b) \right]
$$
where $(A... |
I have a TTree in ROOT with 1000 events and 15 variables associated to each of them. I would like to convert this in its entirety to an hdf5 dataset. How do I organise my data in HDF5 Groups such that I can access data both by event number and by variable (if I wanted all the data from the 'kinetic energy' variable, fo... |
Problem
Solving a non-linear system of equations.
The number of variables is the same as the number of equations.
When I fix a set of variables (say $\vec{y}$) and keep another set free (say $\vec{x}$), the system becomes an under-determined, dense, and linear system of the subset of variables
$$A(\vec{y})\vec{x} = \v... |
I adapted this FEniCS code for my problem and I'm wondering if there is any good resource about how to choose the penalty parameter $\alpha$? Best case would be, if I can define it through some relation of the diffusion coefficient $D$ and element height $h$.
|
I set up two one-way wave equations for constant velocity $c$ in one-dimension. When I implement them I get a highly unstable (divergent) solution. I wonder if someone could give me a suggestion about what could be wrong with my reasoning. Thanks.
The idea behind the PML method
Perfectly Matched Layer
is to attenuate t... |
I am currently implementing classical density functional theory for a radially symmetric system.
In mathematical terms, I am searching for a function $f(r)$ that minimizes a functional $\Omega[f]$.
The simplest part of $\Omega$ looks like this: $\int\limits_0^R r^2 f(r)(\ln(f(r))-1)\mathrm{d}r$, but there are others th... |
I'm using Abaqus/CAE to create a cup deep drawing simulation and everything worked perfectly, but my objective is to run the same exact simulation on Calculix (I am new to using this program) and compare the results.
So I used the same geometry and mesh and converted all the keywords from the input file of Abaqus to ma... |
Consider the implicit ODE
$$
M(y)\dot{y} = F(t,y)
$$
If $M$ is non-singular for all $y$
How to use the forward-Euler method to numerically solve for $y$ without inverting $M(y)$?
I only came out following method:
Forward Euler, $y_{n+1} = y_n + h \dot{y_n}$
Multiply by $M(y_n)$ to obtain $M(y_n) y_{n+1} = M(y_n) y_n ... |
If $A$ has eigenvalue $\lambda_A$
$$B = I - c\frac{I-rA}{I-\bar{r}A}$$
How to derive the eigenvalue $\lambda_B$?
$$\lambda_B=1-c\frac{1-r\lambda_A}{1-\bar{r}\lambda_A}$$
where $c, r, \bar{r}$ are constants.
This formula occurs at the derivation of speedup modified Newton iteration in solving DAE. There are no details i... |
I'm coding an iterative algorithm of constrained continuous optimisation. An augmented Lagrangian algorithm (outer) calls a bound-constrained L-BFGS-B algorithm (inner), which calls a line search algorithm. Optimisation problems have between 1 and 10,000 bound-constrained variables and 100–200 nonlinear constraints.
T... |
I am implementing the advection equation $u_x+(1/c)u_t=0$ following a Crank-Nicholson finite difference scheme. The equation for this is
\begin{eqnarray*}
-\frac{\gamma}{4} w_{n-3 j+1} + w_{n-2 j+1} + \frac{\gamma}{4} w_{n-1 j+1}
= \frac{\gamma}{4} w_{n-3 j} + w_{n-2 j} - \frac{\gamma}{4} w_{n-1 j}.
\end{eqnarray*}... |
Ideally, I would like to get the symbolic/algebraic integral of the function and plot the resulting surface in 3d. I am not sufficiently versed in SciPy to know if this is even really possible.
|
In Yurii Nesterov's Introductory Lectures on Convex Optimization, there is a bound for the total number of iterations for some process. See page 109:
$$\left[\frac{1}{\ln(2(1-\kappa))} \ln\frac{t_0-t^*}{(1-\kappa) \epsilon}+2\right]\cdot \left[1+\sqrt\frac{L}{\mu}\ln\frac{2(L-\mu)}{\kappa \mu}\right]\\+\sqrt\frac{L}{\m... |
MKL and FFTW offer 1-D FFTs that can operate on many inputs simultaneously - in other words, they can batch-transform the columns of some input matrix. Is the performance of these multi-transforms significantly superior to just looping over the inputs (assuming they are stored as columns of the same matrix) and perform... |
I am cross posting this question to the mathermatics stack exchange. please find it either at this link, https://math.stackexchange.com/q/2952989/430980, or below:
I have a question concerning the derivatives of approximate matrix inverses. I have a system, $$Ax = b$$ which I solve approximately (and with an iterative ... |
I need to calculate a matrix $A$ (at least some elements of it, see below) as defined by the following equation
$$ A=B(\mathbb{1}-B)^{-1} $$
where B is a square matrix of dimension $N$ and $\mathbb{1}$ is $N \times N$ identity matrix.
Inspired by this post:
https://www.johndcook.com/blog/2010/01/19/dont-invert-that-mat... |
When solving a linear system $Ax=b$ where $A=B^TCB$ do I need to form $A$ explicitly by two matrix-matrix multiplications or is there another more simple way?
$C$ is a NxN matrix and not always symmetric. $B$ is NxM and not symmetric.
|
Consider Poisson’s equation
$$- \Delta u = f{\rm\qquad{ in }}\;\Omega $$
with following mixed boundary cconditions
$$u = g{\rm\qquad{ on }}\;\Gamma \subset \partial \Omega $$
$$\frac{{\partial u}}{{\partial n}} = h{\qquad\rm{ on }}\;\partial \Omega \backslash \Gamma$$
where $\frac{{\partial u}}{{\part... |
I have been working with an algorithm, which uses
additions of floating point vectors,
(sparse matrix of floats)x(dense vector of floats) dot products
I recently found out that I can get the same functionality form the algorithm if I set everything (vectors and matrices) to integers. The details are nontrivial and bo... |
I am interested in solving a large number of small linear systems of equations, $Ax=b$, with $A$ either $2\times2$ or $3\times3$. Assuming none of these systems are actually singular, is there anything to deter me from forming $A^{-1}$ explicitly using Cramer's rule and computing $x=A^{-1}b$? The only things that comes... |
I'm looking for resources on fast, numerically stable pairwise euclidean distance algorithms. In particular, suppose $A \in \mathbb{R}^{M \times D}$ and $B \in \mathbb{R}^{N \times D}$ are two sets of row vectors. I would like to compute the matrix,
$$X \in \mathbb{R}^{M \times N}, \quad X_{i,j} = \|A_i - B_j\|_2^2.$$
... |
Consider the integer lattice in $2d$, namely the set $\mathbb{Z}^2 = \{(x,y): x,y\in \mathbb{Z}\}$, and let $u:\mathbb{Z}^2 \to \mathbb{R} $ be a function defined on some bounded subset of $\mathbb{Z}^2$. The discrete (graph) Laplace of $u$, denote it by $\Delta^1$, at point $(x,y)$ is defined as
$$
\tag{1} \Delta^1 u... |
I'm looking for a comparison between the Jacobian-Free Newton-Krylov (JFNK) method performance compared to the conventional CFD nonlinear solution methodologies like SIMPLE.
Does anyone know if such a document exists? Also, if anyone has any intuition on this without any direct evidence, I would like to hear about it.... |
I have a sparse square matrix $A$ with size $n \times n$ and number of nonzero entries $nnz$.
The goal is making a sub-matrix $B$ with $s$ nonzeros which are randomly chosen from $A$. Duplicates are ok, so we need at most $s$ nonzeros in $B$.
The probability of entry $A_{kl}$ being chosen is $p_{ij} = \frac{A_{ij}^2}{\... |
What I have are 3D grayscale images of brains where dark pixels indicate blood vessels (see below, red arrows mark blood vessels). The objective is to obtain some descriptive statistics about them, such as number of vessels in the brain or volume fraction of the brain occupied by vessels. Currently, some poor student ... |
I am trying to solve the 3D Poisson equation
$$\nabla\cdot(\epsilon(\mathbf{r})\nabla) u(\mathbf{r}) = f(\mathbf{r})$$
I notice intel advertises routines that appear to solve
$$\nabla^2u(\mathbf{r}) = f(\mathbf{r})$$
Does anyone know if I can find similar such routines for solving the more general electrostatics Poiss... |
Goal: Optimize convex function $f(\vec{x})$ subjected to constraint $A\vec{x} = \vec{b}$ starting at a point $\vec{x}_0$ that satisfies the constraint.
The problem only has equality constraint. Why does the solution requires using the KKT condition, which is for inequality constraint?
This lecture note mention using KK... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.