instruction stringlengths 43 28.1k |
|---|
I am currently trying to familiarise myself with (Pseudo-)Spectral Methods for solving differential equations. Now, I am struggling to understand some obviously crucial concept of this approach. The notes that I have read so far proceed their explanation of spectral methods roughly as follows:
The solution $f(x)$ to a ... |
I've made a previous question here and also in SO wondering why only the fsolve solver converges for the simple one dimensional unsteady conduction problem
$$ \frac{\partial T}{\partial t} = \alpha \frac{\partial^2T}{\partial x^2}$$
$\alpha = 0.001$
$T(x=0,t) = 60°C$
$T(x=L,t) = 25°C$
$T(x,t=0) = 25°C$
One of the answe... |
I am using backtracking linesearch to globalize a (semismooth) newton solver to minimize a (strongly semismooth) strongly convex function , and I am observing something strange (which may be a bug). For some problems, I observe that the accepted step size alternates between 0 and 1 in successive iterations. On other pr... |
I am dealing with a non-trivial Riemannian metric $H$ defined on a particular subset of Euclidean space ($E \subset \mathbb{R}^n$). I was able to show the Riemannian manifold $(E,H)$ is geodesically complete. I am interested in finding a geodesic that connects arbitrary points. I think this is accomplished via the shoo... |
Consider the following nonlinear diffusion problem,
$$
\frac{\partial u}{\partial t} = x^{-2}\frac{\partial}{\partial x}\left(x^2 u^4 \frac{\partial u}{\partial x}\right), \quad 0 < x < 1
$$
We can notice that if $v = u^5/5$, we can simplify the diffusion term to
$$
\frac{\partial u}{\partial t} = x^{-2}\frac{\partial}... |
Suppose $u$,$v$ are vectors and $A$ is a convergent $d\times d$ diagonal + rank-1 matrix.
How do I estimate $u^T A^k v$ in $O(d)$ time?
Powers of convergent diagonal $D$ can be computed in $O(d)$ time by utilizing Laplace transform.
For a general DPR1 matrix, there's $O(d^2)$ algorithm but I need something that works m... |
I'm quite new to the smoothed particle hydrodynamics method, so I'm trying to find Matlab or Python code to help me understand it. Specifically, I want to know how to solve the one-dimensional diffusion equation like in this paper,
$$\frac{\partial u}{\partial t} = \lambda \frac{\partial^2 u}{\partial x^2}$$
SPH is rev... |
I'm attempting to solve a strange differential equation problem. My goal is to know if there are kinds of ODE solver packages to solve this kind of problem.
I'm solving a 1D Partial Differential Equation for the vertical temperature structure of a planet's atmosphere:
$$\frac{\partial T}{\partial t} = - \frac{g}{c_p} \... |
I have lots of difficulties trying to make a phase plot for the motion of the particle trapped in Lennard-Jones potential:
$$V(q)=\epsilon\left[\left(\frac{q_\mathrm{min}}{q}\right)^{12}-2\left(\frac{q_\mathrm{min}}{q}\right)^{6}\right]$$
where $q$ is particle's position and $q_\mathrm{min}$ is the point where $V$ has ... |
[UPDATING]
The old one is a simplified version of the current one. Here is a solution based on the answer proposed by professor Bangerth down below. To describe what I am trying to do, first rewrite the question into
$$\max_X\|(I-\alpha X)^{-1}X\circ AE\|_F^2$$
where $X,A$ still are $n$ by $n$ square matrices, $E$ is a... |
I am a physicist who is fairly new to numerical analysis, currently, I am trying to simulate a non-linear paraxial equation, and part of my calculation involves solving a 2D Poisson equation with Dirichlet boundary conditions and a source function.
In order to solve the 2D Poisson equation, I tried using the iterative ... |
I have the following problem:
$$argmin_{\vec{x},\phi}||A\vec{x}-\vec{y}e^{j\phi}||_2^2$$
Here, $x$ and $y$ are vectors and $\phi$ is a constant phase factor that applies to the all entries of $y$. I could not make any progress in this problem. If anyone can point me to a possible closed form solution that would be grea... |
I was reading Scientific Computin, An Introductory Survey, by Michael Heath. In the Example 1.11, he madr a Finite Difference Aproximation, with the usual approxination : $f’(x)\neq \frac{f(x+h)-f(x)}{h}$. He postules the following:
We want h to be small so that the approximation will be accurate, but if h is too sma... |
I am trying to calculate classical trajectories for a single positive ion and a single electron inside an RF trap. Therefore, I am dealing with a two-body system that possesses:
Coulomb potential with a singularity
time-dependent potential that is periodic in time and quadratic in space (smooth, relatively weak - comp... |
I am looking for a numerical integration library like this one. The examples look very appealing but I see that all test functions use very barebones C arrays.
Do you have any recommendations of libraries for numerical integration over functions of multi-variate arguments that bind easily to Eigen?
I suppose in a pinch... |
In any FEM problem involving mechanics, we try to solve the differential equation for the displacement field, $u$ given the force vector in the nodes, $F$. In industry, we often see our automobiles getting deformed in ways we had not expected it to. Now, the reason is we simplify the real-world problem with approximate... |
I have a simulation that can generate quite a bit of data when it runs, for example $650\cdot 400 \cdot 400$ floating point numbers. Without compression, that's a few gigabytes worth if I want to save the whole simulation and not just some data extracted from it. However, with some methods, like Crank-Nicolson, we know... |
A recent question in Astronomy SE Numerical Programming using odeint takes more than 17 minutes got me interested in looking closer at SciPy's odeint.
The problem is a modified orbital mechanical problem in the solar system. I'd used odeint with great success in orbital mechanics without really understanding the detail... |
I am trying to solve the following PDE:
$$
\begin{align*}
u_{xx} + u_{yy}
=
\begin{cases}
- \cos(x) \quad -\pi/2 \leq x \leq \pi/2, \\
0 \quad \text{otherwise}
\end{cases}
\end{align*}
$$
The domain is the rectangle with vertices $(-π, 0), (-π,2), (π,0)$ and $(π,2)$. The boundary conditi... |
Consider a system of the following form:
$$(A+K)x=b$$
where $A$ is symmetric, positive definite and block diagonal (in fact, a block diagonal matrix made of stiffness matrices arising from FEM discretizations at multiple timesteps, grouped together). Multiplying our linear system by $P^t=K^tA^{-1}+I$, we get $$(K+K^t +... |
I am trying to numerically solve the Poisson's equation
$$
u_{xx} + u_{yy} = - \cos(x) \quad \text{if} - \pi/2 \leq x \leq \pi/2 \quad \text{0 otherwise}
$$
The domain is the rectangle with vertices $(-π, 0), (-π,2), (π,0)$ and $(π,2)$. The boundary conditions are mixed:
Dirichlet: $u(x,0) = 0$
Neumann: $u_y(x,2) = 0... |
It all starts with this Cauchy problem:
$$
\begin{cases}
\sin(2x(t)) -\cos(3x'(t)) = x(t) + x'(t) \\
x(0) = 1 \\
\end{cases}
\quad \quad \text{with} \; t \in [0,10]\,.
$$
Not knowing which way to turn, I started Mathematica:
Clear[t, x];
xsol = NDSolveValue[{Sin[2 x[t]] - Cos[3 x'[t]] == x[t] + x'[t], x[0] == 1}, x,
... |
I need to approximate the following in $O(d)$ time for $d\times d$ diagonal $A$ and rank-1 $B$
$$u^T \exp(-A+B) v$$
Here $u,v$ are vectors in $\mathbb{R^+}^d$, $A,B$ are positive semi-definite and $B$ is relatively small
The following approximations take $O(d)$ to compute and get me within factor of 2 of true value on ... |
I set my t_start and t_stop as 0.52 (lj unit), and I ran the nvt first. after it reached equilibration I ran the nve but found the temperature of the last 1000steps went up to 0.56 while my coworker still had the normal result around 0.52. we even used the same code but our results are quite different. why does the ave... |
I am trying to solve the $\textbf{1-D}$ Poisson equation for a semiconductor structure at equilibrium (There is no external bias applied).
$\textbf{Background}$
\begin{equation}
\frac{d^2V}{dx^2} = -\frac{\rho(V)}{\epsilon}\\
\rho(V) = q(N_D-N_A+p(V)-n(V))
\end{equation}
When there are two different semiconductors plac... |
I'm working with ODEs, $$\dot{x} = f(x, t),$$ where the (higher) derivatives of the right-hand side have discontinuities. In particular, $f(x, t)$ is obtained by interpolation of discrete samples, and the number of continious derivatives thus depend on the order of interpolation.
I know from Theorem II.3.1 on page 157 ... |
Can someone give an estimate of the Time and memory required to diagonalize a 20000 by 20000 complex hermitian matrix using numpy in python ?
|
As commonly known for programming on computer, if x is a finite precision floating-point number such as double/float in C language, arcsin(sin(x)) is usually not equal to x due to the numerical issue. I'm wondering whether there is a way to design a sin function and an arcsin function such that arcsin(sin(x))=x where x... |
I am interested in integrals of the form
$$
\int_{[0,1]^{d}} |x|^{\gamma}f(x)dx.
$$
$\gamma>0$ and $f$ has some singular behavior at $\vec{0}$. The weight function $|x|^\gamma$ is commonly used in weighted Sobolev spaces which include reduced regularity functions.
For $d=1$, a Gauss-Jacobi quadrature rule with $(\alpha... |
I find this fft algorithm on the link
The code looks simple and easy to implement. But it does not have inverse fast Fourier transformation. A brief search on the internet shows that to get the inverse of it, the data should be divided by the length of the array. Dividing this, however, does not produce the original in... |
Suppose that we are given a large, real-symmetric matrix $L$, which is simply too large to perform exact diagonalization on numerically. If we want to study its spectrum, one tool we can use is the Lanczos algorithm. This algorithm takes $L$ and an initial vector, call it $q_0$, and uses $q_0$ to produces a tridiagonal... |
Suppose I already have a C program that solves a specific computational problem. I want to convert that into a CUDA program.
What steps should I follow to do that?
For instance, can I think as follows?
Step 1. select which part you want to parallelize.
Step 2. determine if a GPU-friendly algorithm could be adapted.
E.g... |
I have the following energy functional of $p$-Laplacian equation:
$$
E(u) = \frac{1}{p} \int_{\Omega} |\nabla u|^p dx
$$
for $2.8 \leq p \leq 5$.
My goal is to minimize the energy functional by using nonlinear conjugate gradient method ( https://en.wikipedia.org/wiki/Nonlinear_conjugate_gradient_method ) .
To apply non... |
This question is mainly an inquiry about the usefulness of Discontinuous Galerkin (DG) for the time-independent transport equation of the form
$$\sigma u+\beta\cdot\nabla u =f,\;\;\;\text{on }\Omega\subset\mathbb{R}^2$$
when the advection field $\beta$ is a non-constant function of $x$ (or $u$). Boundary conditions are... |
Within my work, I am trying to compare analytically retrieved power spectra with ones calculated from fft packages in python.
The problem I have, is that the analytic form of the peaks I derived does not match the fft result.
The minimal example I tested for that is the fourier transform of a cosine, in which I only co... |
I am considering the problem of simulating the evolution of an interface given as a curve in 2D (or surface in 3D) that evolves according to a velocity specified at the interface of the form:
$$\vec{v} = - \frac{f}{H} \hat{n},$$
with $H$ the mean curvature at that point, $f$ some function dependent on position (in some... |
Crossposted at MathOverflow
Consider a quadratic programming problem with the following format:
$$
\text{min} Q(x) = c^Tx+\frac{1}{2}x^TDx \\
$$
$$
\text{s.t.} Ax\leq b, \\
x\geq 0
$$
where $D$ is a $n\times n$ positive definite matrix and $A$ is a $m\times n$ matrix. We know when $n$ and $m$ are small, for example, w... |
Simply i want to solve for schrodinger equation for finite potential well problems in spherical coordinates. For case in which l=0 . It is simple but when l changes. The solution are spherical bessel and spherical hankel function. Hankel function have an imaginary argument. Using scipy python library i am not even a... |
Is the spatial second derivative of the strain energy of a hyperelastic material positive definite in general?
If this is not a general property of hyperelastic materials are there techniques for approximating positive definiteness? Or are some hyperelastic material models positive definite?
I am doing some large-scale... |
I have been trying to calculate the matrix inverse of some large matrix with entries ranging by orders of magnitude. I tried to use the matrix decomposition to simplify the computation, where a matrix
\begin{equation}
(AB)
\end{equation}
could be decomposed into two matrices, $A$, and $B$. The matrix $A$ is some diagon... |
I am trying to use FreeFem++ to solve the heat geodesics algorithm.
The algorithm is:
solve $\dot u = \Delta u$ at a specific time $t$.
compute $X = \frac{\nabla u_t}{|\nabla u_t|}$
solve $\Delta\phi = \nabla \cdot X$
I am having a hard time doing step 2. The documentation does talk about gradients, but it seems to u... |
I am evaluating the local mass matrix over a 3D curvilinear 10-node tetrahedral element. According to an index-naming rule, the shape functions are:
\begin{equation}
\begin{bmatrix}
2L^2_0 - L_0\\
2L^2_1 - L_1\\
2L^2_2 - L_2\\
2L^2_3 - L_3\\
4L_0L_1\\
4L_1L_2\\
4L_0L_2\\
4L_0L_3\\
4L... |
I'm solving $Ax = b$ with PETSc, $A$ sparse and asymmetric.
I'm using BCGS or FGMRES or TFQMR as a solver, and ILU as a preconditioner.
When I use 1 core, everything works as expected. But with 8 cores, no,
I get -5, KSP_DIVERGED_BREAKDOWN, or maximum number of iterations exceeded.
What could be wrong? I am pretty sure... |
Here is a simple T-shaped structure in RFEM. The structure is loaded from above, into the intersection of all members.
I performed a buckling analysis, and obtained the buckling modes that I'm interested in. Looking at the results, the software claims that the horizontal members are in tension, and performs no calcula... |
I am looking for efficient algorithms to cut a mesh along edges. I have a (half-edge) mesh and a list of inner edges that I want to cut, such that both are new boundary edges. At each vertex there can be an arbitrary number of cuts, either starting at the vertex or crossing the vertex. If you are cutting incrementally,... |
This is known as an articular pillar. It lies on the outer surface of the bone. We have 3D Slicer openCV, but we are unable to find it as its a little irregular in shape and also its 3D in nature. Kindly help in suggesting how we may find it.
OpenCV couldnt be used because its to calculate volume only of 2D structures.... |
I am trying to implement beam propagtion method in a two-dimensional lattice to solve Helmholtz equation by following the scheme given this paper. I am using Matlab for implementation.
The expected results are:
For ordered Lattice:
For disordered lattice:
There is localization in the disordered lattice due to And... |
I am very new to the subject of fractional derivatives which arise while characterizing the anomalous transport of passive scalar in turbulence.
I have found an equation of the following form, to describe such anomalous transport, which I have to solve numerically,
$$\partial_{t}f(x,t)=kD^{\alpha}_{|x|}f(x,t)+g(x,t)$$
... |
I was plotting the energy variation in a mass-spring system. If I define the initial conditions to be at maximum displacement from the origin, the potential energy is plotted correctly but kinetic energy isn't. However, if I define the initial conditions to be at the zero position and maximum velocity, kinetic energy i... |
I am given with a function $f(x)$ on a grid $X_{old}\in \{x_{min},x_{max}\}$ with a non uniform spacing.
I need to interpolate that function on a new log-spaced grid $X_{new}\in\{x^{\prime}_{min},x^{\prime}_{max}\}$ with same numbers of discretized point, $\mathcal{N}$, such that the following constraint is satisfied,
... |
import numpy as np
import scipy.signal as ss
from scipy.fft import fft, ifft
x = np.array([1, 2, 3])
y = np.array([4, 5, 6])
np.convolve(x,y) --> gave me result as array([ 4, 13, 28, 27, 18])
Now, I wanted to get the same answer using FFT and the code is below.
a = fft(x)
b = fft(y)
d = ifft(x*y)
d --> gives array([31... |
I am writing a 2D implementation of MLS-MPM, I have fluids working perfetly fine, solids technically work as well, at low time steps.
This is the fluid simulation at a large time step:
https://i.stack.imgur.com/ZLnY9.jpg
And this is a pciture of the solids at a low time step after a large amount of simulation:
I am ru... |
Let's say I have a linear program that incurs a series of slight changes to it, so I want to warm-start it. I've read various things that recommend using the dual simplex algorithm over the primal depending on the nature of the change, e.g.
If the objective coefficients are changed or columns are added, warm start the... |
I am a student researcher who is new to the HPC domain.
I have recently taken a project where I am working on optimizing the parameter search space (both application level and hardware level parameters) for running HPC applications. In order to do this, I am trying to implement the Multi-arm bandit approach to find the... |
I have a triangle mesh which is an approximation of a smooth graph. i.e. a scalar function of $xy$.
I am interested in finding extrema. One naive way I did it was to look at some number of points around each point (using the mesh graph to locate the neighbours) and test the height. If a point was higher than all its ne... |
Currently, I am studying a 2D nonlinear Schroedinger equation and searching for the fastest method.
$$
\begin{equation}
i \frac{\partial \psi}{\partial t} = [-\frac{1}{2} \nabla^2 + V_0(r) - i\gamma + g|\psi|^2]\psi + \Phi(r,t),
\end{equation}
$$
Studying the amplitude of the solution to this time-dependent equation ... |
Sorry for the screenshot but I don't want to try to format this on latex:
We have this annotation of the Navier-Stokes equations:
I am particularly puzzled by the viscosity/stress term. For an elastic material, say jelly, that term makes sense to me. When you apply light deformations to the jelly (don't rupture it) it... |
Context
Let suppose a solution to a finite element problem (associated to a mesh) stored in a vector $X$ of size $(N \cdot d)$ corresponding to $N$ nodes in the mesh and $d$ degrees of freedom for each node.
This vector could be organised this way :
$X = (X_1^1, \ldots, X_1^d, X_2^1, \ldots, X_2^d,\mathbf{\cdots}, X_N... |
Can we use gradients of surrogates of a black box function and the actual function evaluation for optimization involving an expensive black box simulation? Is there any merits to it?
|
I am using the ScaLAPACK PDGESV routine to solve large dense linear systems distributed over many supercomputer nodes, but ultimately I only need a small portion of the solution vector (e.g. the first 10 out of 500,000 elements), and I'm wondering if there is a way to take advantage of the fact that I don't need the en... |
I have a 2D vector $\boldsymbol{u}$ and it's norm is $\lambda$. I have this function:
$$\boldsymbol{T}=\dfrac{\boldsymbol{u}}{\lambda} e^\lambda$$
I need to compute $\boldsymbol{T}$ and it's Jacobean around zero as part of my Newton finite element problem.
The function is poorly defined around 0 and this is causing div... |
I was working on a problem from "Computational Physics using python: Chapter 17." The problem is concerned with simulating the thermodynamics behind the spin of electrons and the resulting change in energy and magnetization. The last part of the problem asks for making a graph for the average domain size versus tempera... |
This is my first time attempting to implement a finite difference method for a PDE in Python, and I am having a bit of trouble. The PDE I am trying to solve is as follows:
$$
\begin{cases}
v_t - 3v_x = 0, & (x,t) \in [0,1] \times [0,1] \\
v(x,0) = 3 - 6x, & 0 \leq x \leq 1 \end{cases}
$$
The analy... |
I'm a PhD student in mechanical engineering and I have to perform a lot of simulations for my project. In my lab we use several well-known libraries, from FEM to machine learning. As we're doing performance critical simulations, I've heard the advisor saying that being able to read assembly code is certainly a very pro... |
Hi I am a computer scientist working on MHD code for astrophysics simulation. We use a finite difference scheme where we first solve the spatial derivatives and with them solve the right hand side and take timestep forward.
Now I am interested in looking into adding AMR into our code. However most AMR material concerns... |
I am working on solving Poisson's eq. $\Delta u = -f$ using conjugate gradient method. I am using scipy's linalg.cg function. In this problem, the source function $f$ changes slightly in each iteration, after which I want to solve the equation again. Given that I know that the old solution is close to the current one, ... |
Suppose $h$ is a vector of $d$ positive numbers adding up to 1. I'm looking for a $O(d)$ algorithm to estimate eigenvalues of the following diagonal + rank1 matrix:
$$A=2\operatorname{diag}(h)-hh^T$$
Empirically it appears that $2h$ gives a good starting point for eigenvalues of $A$. How could I improve this estimate i... |
I see things like this deal.II example, (ctrl + f for "superMUC") which seems to show some pretty impressive scaling (nearly twice as fast for twice as many CPU cores for a wide range of cores). I'm aware of some other software that manages this as well--especially if one uses GPUs. In the example at hand, Poisson's eq... |
I developed a new method to solve this equations $\frac{d{y}^{2}}{dx^{2}}=g(x,y,\frac{dy}{dx})$ for a general g(x,y,z), wich their solution is a function f(x)=y. Obviously you need $y(x_0)=y_0$ and $y'(x_0)=y_1$.
The thing is i do not have a clue how to study stability of solutions, or to see if converges rapidly to th... |
I have been recently getting into the field of various processes on networks. For example, stochastic processes like percolation, Ising models, various statistical-physics models; or deterministic models like simulating a set of coupled non-linear differential equations.
I have encountered NetworkX in Python as one of ... |
I need to compute a series of matrix multiplications involving 3x3 matrices and a series of matrix norms also involving 3x3 matrices and I wonder how I can set these computations up with numpy such that they are computed quickly (preferably below 10ms).
I am given matrices $A,B \in \mathbb{C}^{3 \times 3}$ and I need t... |
I have the following PDE
$$
u_t = k \Delta u + \alpha u H(u-c)
$$
I am trying to show the boundedness property to apply LMT. I get confused with the estimates of third term.
The space I have
$$V = \{v\in H^1(\Omega) : v(0,y)=v(1,y)~ and~ \frac{\partial v}{\partial y}(x,0)=0=\frac{\partial v}{\partial y}(x,1)\}$$
and t... |
I am reading Hongkai Zhao's paper The Fast Sweeping method. I have implemented the method in 2D and now I want to move onto 3D.
However section 2.6 confuses me.
The article says:
But I have no idea how that is actually supposed to work. i.e. On a purely computational level, what steps do I actually follow to solve th... |
My question is in the context of the finite element method.
Incompressible Navier-Stokes equations can be solved using the coupled method or projection/fractional step methods. Each method has its advantages and disadvantages. Projection methods are said to be cost-effective because of smaller matrix systems; however, ... |
I've been trying to validate the physics behind a particle system framework, but I'm having some difficulties.
A particle system is a set of lumped masses connected by spring-damper elements. Linear forces are assumed.
By setting the damping to 0, fixing one particle at a position of 0, and letting the other freely osc... |
I have been dealing with the standard libraries of scipy.optimize for rootfinding and optimization problems, but the problems i want to solve are very large, which makes the standard solvers run out of memory.
I've tried the large scale solvers (newton_krylov) but they are in my experience extremely unreliable no matte... |
In 1D the force of gravity does not diminish with distance however here I use 1D to mean the point mass only moves in a line in 3D space, with the other mass stationary at the origin.
I started by putting the equation $y''(t)=-y/abs(y)^3$ into a numerical ODE solver with the starting velocity set to 0 and at first the ... |
A grid offers an obvious definition for the partial derivatives at a grid point, given
$x$ the value of a point $p$ in an $n$ dimensional grid, the forward partial derivative that point for coordinate $i$ would be:
$$ \frac{x - x_{p_{i-1}}}{h}$$
i.e. take the value at $p$ the value at the point "behind" $p$ on the chos... |
Suppose the original loss function is
$$\min_{\mathbf{V}}\frac{1}{2}\|\mathbf{V} - Q(\mathbf{V})\odot\mathbf{U}\mathbf{E} - \beta Q(\mathbf{V})\mathbf{V}\|_2^2$$
where $\odot$ denotes the element-wise product, $\mathbf{V}$ is a n by 1 vector, $\mathbf{U}$ is a n by n matrix, $\mathbf{E}$ is a all-ones vector, $Q$ is co... |
I'm trying to implement multigrid approach for a Poisson equation $\frac{1}{r}\frac{\partial}{\partial r}\left( r \frac{\partial H}{\partial r} \right) = f$ with all Neumann boundary conditions. Jacobi iteration with underrelaxation is used for smoothening ($\omega = 2/3$ as in Briggs Multigrid tutorial). After few ite... |
Are there existing implementations for rank-one updating of symmetric matrices eigensystems?
This is the mathematical statement of the problem. Let $S=QDQ^T$
$$S + vv^T = QDQ^T +vv^T = Q_{new}D_{new}Q_{new}^T$$
This paper describes the algorithm for efficiently computing update, but the closest thing I found was SLAED7... |
Problem statement
Let $A$ be an $n\times n$ matrix and $b$ an $n$-dimensional vector. For $j\in \{1, \dots, n \}$, let $A_j$ be the matrix where we take $A$ and replace the $j^{\rm th}$ column with $b$. I want to find the vector $z = \frac{\tilde z}{\max_j |\tilde z_j|}$, where $\tilde z = (\det A_1, \dots, \det A_n)$.... |
My problem is to iterate through $[0.95,1] \times [0.95,1] \times[0.95,1] \in \mathbb{R}^{3}$. Is there a generic way to do this? I was considering rolling it all out and effectively vectorising the problem.
I would like to use Eigen but I think using a vector of MatrixXd elements seems not wise.
Any tips or help would... |
I am working on a problem that is a modified version of a two-knapsack knapsack problem. I am able to find the optimal choices by using Gurobi. However, I would like to estimate a coefficient that is added linearly to my objective function so that the results most closely match my data. I will describe the problem belo... |
I was playing a little bit with the Runge-Kutta procedure for the Incompressible Navier-Stokes equation and came up with something strange, so I would like to know where I'm wrong or doing something I shouldn't.
Let's consider
$u_i = u^n + \Delta t \sum_{j=0}^{i-1}a_{ij}F(u_j)u_j - c_i \Delta t G \phi_i $
where $F$ is ... |
Setup
I am having a hard time translating the formulas in the 2016 MPM course from siggraph into algorithmic computations.
In particular we have equations 200 and 201
$$h(v^{n+1}) = Mv^{n+1} - \Delta t f(x^n + \Delta t v^{n+1}) - Mv^n = 0$$
$$v^{i+1} = v^i - \bigg(\frac{\partial h}{\partial v}(v^i) \bigg)^{-1}h(v^i)$$
... |
I'm trying to simulate the orbits of Mars and Earth in MATLAB using the 4th order Runge-Kutta method for numerical integration. However, the orbits appear as straight lines rather than the expected ellipses.
I've used a variety of physical constants and the initial positions and velocities of the planets at perihelion.... |
I am reading this paper on improving time steps for solving simulation problems:
https://www.math.ucla.edu/~jteran/papers/GSSJT15.pdf
The authors developed this energy function:
$$E(x) = \frac{1}{2\Delta t ^ 2}(x-\hat x)^TM(x - \hat x) + \phi$$
In this particular formulation, $x$ is the global, flattened, vector of p... |
I'm trying to do a model for the transition liquid-gas based on the Ising model and the metropolis algorithm, instead of using values of spins, I'm saying that a cell is occupied by a particle or not. My specific heat doesn't show a discontinuity and I'm struggling to find the problem. I have tried to increase the size... |
I am trying to write a QR algorithm in Python for eigenvectors and eigenvalues finding for large symmetric matrices,
My initial thought was to use Householder transformation with a Wilkinson shift on a Hessenberg matrix when I ran it on an 800×800
matrix is did not converge within reasonable time. I tested the algorith... |
I'm calculating a simple plate arrangement in RFEM:
The plate has dimensions of 1m X 1m, thickness of 50mm. Elastic modulus of the material is 205000.0 N/mm2, Poisson's ratio is 0.3.
The plate is loaded in the middle, with 10kN load. Self-weight has been neglected. The plate is simply supported at 4 corners:
Accordin... |
Consider the simple standard Laplacian in 2D or 3D:
$$\nabla (\alpha \nabla u) =f $$
with $\alpha$ being a scalar. $\alpha$ can take values that can vary largely between 1e-8 and 1 throughout the domain. After discritizing the equation above with FEM one arrives at a linear system which will encounter convergence diffi... |
Making a really long explanation short. I am looking for an energy density function for an incompressible isotropic fluid that involves both viscoscity and pressure.
The reason is, there is a way to take really large time steps when simulating something using MPM, but it only works if one has an energy density function... |
Consider two wavefunctions $\psi_{1}$ and $\psi_{2}$ over $\otimes_{i=1}^{N}S$. I want to evaluate the overlap between these two functions numerically:
$$
\int d\tau \psi_{2}^{\star}\psi_{1}
$$ in the large $N$ limit.
Given that $\psi_{2}^{\star}\psi_{1}$ is not a valid PDF, we cannot directly apply the MH algorithm fo... |
I have 1 dependent variable that is categorical. And I have 3 explanatory variables, the two continuous variables are likely interrelated and the 1 categorical variable is not interlinked.
The sample group has been measured at two different times and has mostly similar participants.
Now I want to find out how a change ... |
I am currently modelling what happens, to lift induced drag, when you apply washout to a wing (Twist). However I have a few issues
the drag values I calculate are into the 1000s
the drag values oscilate between, mesh studies (I could have +ve 10000s then -ve0.001 then +ve 100s)
My residules never truly converge but... |
I've been working on solving Poisson problem using CNN model (you can ignore the Poisson problem part if you not familiar and jump to the image processing/CNN part). More specifically, I am solving electric potential problem ($\phi$) by CNN algorithm with particle distribution ($\rho$) as the input in Cartesian coordin... |
My project requires me to track objects such as cars via a drone.
I have a live video stream in which I would like to detect and track objects, the view doesn't change that much as the drone is nearly stationary moving only about 50 meters left and right at an altitude of 500m. For the proper tracking (and in general b... |
The context of my question is two-phase incompressible solvers such as interFoam in OpenFOAM, but I have seen this trick used elsewhere. To handle gravity these solvers subtract the hydrostatic pressure forming a modified pressure:
$p^* = p - \rho \boldsymbol{x}\cdot\boldsymbol{g}$
and then apply Chorin's projection to... |
In Fritsch and Carlson's paper on monotone interpolation, they identify numerous conditions under which a cubic Hermite interpolator will be monotone. For example: On the subinterval $[t_i, t_{i+1}]$ where $p(t_i) = y_i$ and $p(t_{i+1}) = y_{i+1}$, if we choose endpoint derivatives $d_i = d_{i+1} = 0$, then the interpo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.