instruction stringlengths 43 28.1k |
|---|
I am trying to simulate data using parameters from a glmer() model output. The model, which comes from a published paper, is as follows: DV ~ 1 + group* sex *verb type + trial number + (1 |participant) + (1 | stimulus). All three IVs (group, sex and verb type) comprise 2 levels and are deviation coded so that, for inst... |
I tested my conjugate gradients implementation with float and double precision and contrary to my guess the double code was twice faster than the single precision code. The reason is that I need many more iterations to achieve the same residual. Mind you, that was already on a pretty small system of about just 2000 unk... |
I have an array of data whose columns are solution vectors to a system of ODEs at a specific time. I want to plot the power spectrum of a solution at a specific time, but when I attempt this I get unexpected results. I want to make sure I am plotting correctly.
First of all, I follow Matlab's format for storing the spa... |
I am trying to implement the below description from Ch. 11 of Heath's "Scientific Computing An Introductory Survey" of the Gauss-Seidel iterative method for solving a system of linear equations
\begin{align}
x^{(k+1)} &= D^{-1}(b - Lx^{(k+1)} - Ux^{(k)})\\
&= (D+L)^{-1}(b - Ux^{(k)})\,
\end{align}
However, I must be mi... |
Cross-posted on MMSE (Matter Modeling Stack Exchange).
The following are the movements of the center of mass of a polymer chain over time in a monte carlo simulation.
# cm-X cm-Y cm-Z
9.507 21.232 9.910
9.092 18.427 7.308
7.994 14.856 4.675
0.533 12.138 -1.163
-0.056 6.735 -5.470
-2.138 4.950 -7.280
0.736 13.0... |
I'm solving the following for $X$ with $A,B$ singular positive semidefinite matrices.
$$AX + XA = B$$
Because $A$, $B$ are singular, standard Lyapunov solver fails
However, if I heuristically skip dividing by 0 elements in Matlab implementation of the Lyapunov solver, I get the same answer as the least squares solution... |
Suppose I'm solving $Ax=b$ using row-action method like Kaczmarz for $m\times n$ matrix A with $m\approx \infty$ and have $H_k=\frac{1}{k}A_k^T A_k$ which is an estimate of the Hessian obtained from random $k$ rows of $A$.
How should I use $H_k$?
The problem of diving by $H_k$ is that it appears to underestimate the va... |
So what I am trying to do is to minimize the distance between the Frobenius norm of a PSD matrix and a real positive value, which can be formulated as
$$\min \left|\|\textbf{P}\|_F - J\right|^2$$
where $\textbf{P}$ is the PSD matrix to be optimized and $J$ is a real positive constant. Then the problem here is that the ... |
To start with, I need to solve this partial equation numerically, but I do not know how to do that. If I try a finite difference method, I face a problem that $u_{i,j}$ is also located in exponential, consequently, there is no way to find $u_{i,j}$.
I tried this fragmentation: $$\frac{u_{i+1,j}-2u_{i,j}+u_{i-1,j}}{\Del... |
I was wondering about the symmetry axis boundary condition in commercial CFD solvers such as ANSYS Fluent.
If the problem is the flow through a round pipe or out of a round nozzle, it is natural to set up a solver in axisymmetric space. That means a 3D flow domain $(x, r, θ)$ can be sliced along the $θ$ direction to pr... |
I am reading "Domain Decomposition: Parallel Multilevel Methods for Elliptic Partial Differential Equations" (Smith 1996), and I am confused as to how the below Alternating Schwarz algorithm (algorithm 1.1.2 from Smith 1996), specifically the term $v$ would be incorporated into a preconditioned krylov method (e.g., con... |
I have a problem to resolve with the Finite Difference method in $[a,b]$:
$$-\frac{d}{dx}(\alpha(x)\frac{du}{dx})= g(x),$$
with $\alpha(x) \in L^{\infty}$ continuous in $]a,c[$ and $]c,b[$ and discontinuous at $c$, $\alpha_{*}< \alpha(x)<\alpha_{**}$, $g \in L^2$, and $u \in C^4([a,b])$.
I want to resolve it with the F... |
i am performing parameter identification for a non-linear partial differential equation (elasticity) that I solve with finite elements.
My optimization problem is a non-linear least squares data-fitting problem because I want to fit the parameters to measured data, e.g. coming from Digital-Image-Correlation. The residu... |
Just as an exercise, I am numerically solving the following system of equations:
$$
\begin{equation}
\begin{cases}
x^2 + y^2 = 32 \\
3x + 7y = 15
\end{cases}
\end{equation}
$$
I use the following code:
from scipy.optimize import root
nfev = 0
def fun(x):
global nfev
nfev += 1
return... |
I have a set of 6 nonlinear equations, and using Sympy I find the values of the 6 unknowns. This works perfectly and it directly gives the exact solution, using sympy.solve to be specific. Now I actually have a minimum of 26 equations, and the issue is that once I try to solve for above 6 equations, like 11 equations l... |
I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on the distance to the one in front of it. The positions are governed by the following (numerical) differential equations:... |
everyone.
I am a beginner in Numerical mathematics, I have some idea of how to use Galerkin method to solve PDEs numerically, but so far I had no luck finding an example of how to solve a simple PDE using cubic Hermite polynomials. If you could help me out and provide an example of how to solve some poisson equation us... |
I am trying to solve the in-homogeneous Helmholtz equation with damping and forcing using finite element method (FEM) with FEniCSx. The equation is;
$c^2\nabla^2p - c^2\omega i d \nabla^2p + \omega^2 p = f$
where the $d$ is the damping parameter, the $i$ is complex number, the f is the forcing, the $\omega$ is the eige... |
Suppose I have $k$ pairs of $(a,b)$ where $a$ and $b$ are vectors in $\mathbb{R}^d$, $Y$ is $d\times d$ and I need least squares solution for $X$ in the following
$$\sum_{(a,b)}^k b a^T (b^T X a) = Y$$
This is equivalent to $d^2\times d^2$ linear system $\sum_{a,b} (a\otimes b)(a\otimes b)^T$ , but I need an estimate... |
Consider a vector $v$ in $\mathbb{R}^{n\times1}$. The Householder matrix is defined as follows:
$$H(v)=I-\dfrac{2vv^T}{v^Tv}.$$
It can be demonstrated that $H(v)$ is symmetric and orthonormal. The challenge lies in identifying a vector $v$ for two vectors $a$ and $b$ that are not collinear (i.e., $a\neq\alpha b$ for an... |
Backround
The mathematical model I am trying to numerically solve models wave propagation inside a cylinder with specific material properties suited for dynamic loading. The cylinder's upper base is under the impact pressure of a rigid body, while the lower base is fixed (as presented in the picture below):
Model
In i... |
I have experience with LAPACK (direct solvers) and ARPACK (sparse iterative solvers), but are there any sparse direct solvers? I am concerned more with preserving space than with fast solutions. ARPACK is fast when it converges, but seems to struggle when many eigenvalues are degenerate.
|
I am using the Levenberg-Marquardt method for calibration purposes. Typically, the RMSE of my calibration looks like:
I want to break the algorithm when the algorithm step-updates start to slow down, which is when the RMSE flat-lines at $\approx 150$. But the issue is at the start $\approx 1$ to $5$, the incremental s... |
In one dimension there are two types of quadrature schemes.
asymmetric rules like Newton-Cotes like formulas (Trapezodi, Simpson), and Clenshaw-Curtis place sampling points on boundary of the interval.
symmetric Gaussian Quadrature use only internal points which never tough the boundary.
Clear advantage of asymmeric ... |
Now, we consider a non-orthonormal basis:
$$\mathcal{S}_N=\{|\alpha\rangle,a^\dagger|\alpha\rangle,a^{\dagger 2}|\alpha\rangle,\ldots,a^{\dagger N}|\alpha\rangle\},$$
where $|\alpha\rangle$ is the coherent state and $a$ is the annihilation operator of bosonic mode.
Then, we assume $|\phi_m\rangle=a^{\dagger m}|\alpha\r... |
I want to simulate some frictional contact problems, but I'm not familiar with this field, could you please recommend some new books as introductions?thank you
|
I am trying to use matlab and YALMIP to solve a graph learning problem of recovering eigenvalues from the eigenvectors of the covariance of sampled graph signal data. This is to implement the algorithm in https://graphex.mit.edu/sites/default/files/documents/2017_Poster_Segarra.pdf. A better explanation is their paper ... |
One beginner's question about discretization of a Hamilton-Jacobi equation(non-linear)
$$
u_t = H(u_x)
$$
$u_x$ is discreated with 2nd order ENO-FD
1st order: $D_1^{\pm}u = \pm [u_{x\pm1} - u_x ] / \Delta_x$
2nd order:
$$D_2^{\pm}u = D_1^{\pm}u \mp \frac 1 2 \Delta x \{\min[ \max (D_1^{\pm}D_1^{\pm}u,0),\max(D_1^{-}... |
I would like to numerically solve the following heat equation problem:
$$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$
$$ x \in [ -1, 1 ] \tag 2$$
$$ u(x, 0) = 0 \tag 3$$
$$ u(1, t) = A \sin \Bigg({a^2 \over l^2}t\Bigg) \tag 4$$
$$ u_x(-1, t)=0 \tag 5$$
$$ u(x, 0) = 0 \tag 6$$
where $u(x,t)$ is the heat function, $... |
If I numerically compute the envelope of $\sin(\pi t)$ using a Hilbert transform, I obtain exactly what I expect:
If I do the same for $\mathrm{sinc}(t)$, still I obtain an envelope which agrees with my intuitions:
However, if I try to find the envelope of a Gibbs oscillation using the Fourier series for the Heavisid... |
I'm trying to implement mesh in Google colab from gmesh tutorials.
I have an error: Exception: Fltk not available
My code is:
try:
import google.colab # noqa: F401
except ImportError:
import gmsh
else:
try:
import gmsh
except ImportError:
!wget "https://fem... |
I have been using the QR-based approach on this link to find the null space of rectangular matrices, and possibly sparse matrices, that emerge as a result of some coupling conditions of different domains such as interface compatibility conditions. I am also aware of this link where some other people suggest some effici... |
In Scipy's solve_ivp documentation, we see the method argument can be either a string or a user-defined OdeSolver inherited from scipy.integrate._ivp.base (source code). I tried to create my own OdeSolver class and pass it into solve_ivp as follows:
from scipy.integrate._ivp.base import OdeSolver
### not actually cha... |
Suppose I have a 2D advection equation $$\frac{\partial \rho}{\partial t}=-\nabla\cdot(\vec{w}\rho)$$ with $\vec{w}=(u,v)$ non-constant and having zero divergence. I want to numerically solve this equation, but the scheme that I am currently using does not conserve mass. I am quite new to this topic. My question is:
a... |
Say I have two sets of variables $x$ and $y$ of equal size. $x$'s have a lower bound $x_{min}<0$, and $y$'s have a lower bound $0$.
Is there a linear way to constrain that $x_i\geq0$ if the solution has $y_i>0$, and $x_i\geq x_{min,i}$ if the solution has $y_i=0$.
A few other points that might be useful
$x$ and $y$ ar... |
I have previously successfully implemented the QR decomposition method in MATLAB to calculate Lyapunov exponents for Lorenz equations. See here.
This method integrates the stacked system, i.e. the system equation + the variational equation and use one common integrator to integrate them at the same time steps.
What I a... |
Don't take the derivative of the approximation but approximate the derivative
or something similar.
I don't quite remember where I heard this but I am trying to find some work on the support or denial of this statement especially when using AD to approximate (calculate derivative) of a function approximation (say a n... |
I am trying to implement the ADI scheme of Douglas and Rachford.
For $p(X,Z,t)$, there is:
$$
\begin{gathered}
A=p^{n-1}+\Delta t_n\left[F_0\left(p^{n-1}, t_{n-1}\right)+F_1\left(p^{n-1}, t_{n-1}\right)+F_2\left(p^{n-1}, t_{n-1}\right)\right] \\
B-\alpha \Delta t_n F_1\left(B, t_n\right)=A-\alpha \Delta t_n F_1\left(p^... |
I'm working on implementing the discretised Burger's equation. I am quite confused as to why it does not work when using a step-function and downwind difference formula. When using a step-function and downwind difference, Newton's method fails to converge.
Utilising downwind difference should provide results, as using ... |
I'm working on trying to solve a steady state PDE in python and I am quite new to python and I am slightly confused on the implementation details. I have an example implementation of solving a non-linear Laplace equation:
$$
-\nu \left( \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \right) \ =... |
I have a (right) sub-stochastic CSC sparse matrix $Q$ of dimension 5 million, with 200 million nonzero entries, which is a nonzero percentage of 0.0008%, so it is indeed extremely sparse. It is not banded, nor does it have any other obvious sparsity pattern.
I'm trying to solve the linear system,
$$(I-Q)x={\bf 1}$$
I'v... |
Is computing the 2-norm of a vector $x$, computed by setting $\alpha = \max_i x_i$ and then computing $|\alpha| \cdot ||x / \alpha ||_2$ (e.g., as in this link) numerically stable?
There are two parts which might be concerning numerically: you have to make $len(x)$ divisions by $\alpha$, and also take a square root. Th... |
I am solving differential equations that require inverting dense square matrices, and I wanted to know what algorithm(s) do numpy and scipy use to calculate matrix inverses?
|
I get 0 node and elements when I use -refine command line flag in gmsh.
Explicitly writing RefineMesh; in the script produces the original mesh and not a refined one.
Am I missing something while using refinement feature? I remember command line flag -refine used to work. I am using gmsh after a long a time and I wonde... |
I am trying to solve the variable-coefficient Laplace equation $$\partial(\epsilon\partial u) = (\partial\epsilon)(\partial u) + \epsilon\partial^2 u = 0$$using a finite difference scheme:
$$\left(\frac{\epsilon(x+h) - \epsilon(x-h)}{2h}\right)\left(\frac{u(x+h)-u(x-h)}{2h}\right) + \epsilon(x) \frac{u(x+h) - 2u(x) + u... |
I am working on solving the following PDE: $$\left(\mu_{x}\frac{\partial^{2}u}{\partial x^{2}}+\mu_{y}\frac{\partial^{2}u}{\partial y^{2}}\right)=f(x,y) \tag 1$$
Which is then discretised:
$$- \mu_{x} \left(\frac{u_{i-1,j} - 2u_{i,j} + u_{i+1,j}}{h^2}\right) - \mu_{y} \left(\frac{u_{i,j-1} - 2u_{i,j} +
u_{i,j+1}}{h^2}\... |
I am working on modeling incompressible elasticity at finite strains.
$$
\mathrm{Div} \boldsymbol P = \boldsymbol 0, \quad \boldsymbol X \in \Omega_0 \subset \mathbb R^3, \\
J = 1, \qquad \boldsymbol X \in \Omega_0 \subset \mathbb R^3,
$$
with given Dirichlet BCs
$$
\boldsymbol u = \bar{\boldsymbol u}, \quad \boldsymbo... |
I would like to request some literature recommendations covering Chebyshev's pseudospectral collocation method for solving space-time PDEs. It would be nice if it even contained some example problems that cover different types of equations (heat equation, wave equation, etc.), as well as an explanation of how to implem... |
I want to plot nodes from 0 to 28 without including nodes from 2:9
I tried to use this command, but got syntax error:
plt.scatter(node_coords[0:2&&10:28,0], node_coords[0:28,1], color='red', s=70)
|
Consider an ordinary differential equation (ODE) in the form $u_t=g(t,u(t))$ and apply the explicit Runge-Kutta method, as defined by the following Butcher tableau:
$$
\mathrm{RK}(s,p):\begin{array}{c|cccc}
0 & 0 & 0 & 0 \\
c_1 & a_{1,0} & 0 & 0 &0\\
c_2 & a_{2,0} & a_{2,1} & 0 &0\\
\vdots & \cdots & \cdots & \cdots &... |
So I'm trying to use the Lax-Friedrichs method to solve the inviscid burgers' equation with initial condition $$u(x,0) = \sin(x)$$, using
$$u_m^{n+1} = \frac{1}{2}(u_{m+1}^n + u_{m-1}^n) - \frac{\Delta t}{2 \Delta x}\left(\frac{(u_{m+1}^n)^2}{2} - \frac{(u_{m-1}^{n}) ^2}{2}\right)$$
I believe there should be a shock, s... |
I'm dealing with a particular reaction-diffusion equation having the form
$$ c_t = \alpha \nabla^2 c + F(c,x,t). \tag{1}$$
where $F$ is nonlinear. I would like to solve (1) with a finite-difference scheme. Specifically, I would like to use a Crank-Nicolson scheme to progress the solution forward in time. Letting $C_{i,... |
I'm currently in search of an open-source PDE solver (Finite Element Method is preferred) that can effectively handle the challenge of material properties coefficients associated with each element in mesh data (inhomogeneous material properties).
To provide more context, I'm working on a versatile method applicable to ... |
I’m currently working on solving the following PDE:
$$\begin{equation}
-(\mu_x \frac{\partial^2 u}{\partial x^2} + \mu_y \frac{\partial^2 u}{\partial y^2}) = f(x, y)\end{equation}$$
Where a right hand side F is formed, which we can use to solve Ax = b (AU = F)
I’m using Python and the scipy.sparse.linalg.spilu function... |
I am having difficulties applying the boundary condition
$$\frac{\partial \vec{V}}{\partial t} + u\frac{\partial \vec{V}}{\partial x} = \frac{1}{\operatorname{Re}}\frac{\partial ^2 \vec{V}}{\partial y^2},$$
where $\vec{V}=(u,v)$ to the momentum equation at the exit (right side of the domain) of the Incompressible Navie... |
Let $x_1,\dots,x_n\in \mathbb{R}^n$, $y_1,\dots,y_n\in \{-1,1\}$, $\lambda \ge 0$
and $K$ be the invertible Gram matrix $K=(x_i\cdot x_j)_{ij}$.
Consider
$$
(P) \qquad \qquad \min_{a\in \mathbb{R}^n} \lambda a^\intercal Ka + \frac{1}{n}\sum_{i=1}^n \max(0,1-y_i(Ka)_i)^2
$$
I want to compute the dual problem of $(P)$, ... |
How to approximate flux $F(u)\cdot n$ where $n$ denotes the unit normal outward when using finite volumes?
$$\int_{\sigma} F(u) \cdot \boldsymbol{n}_{K, \sigma} \mathrm{d} \gamma(x)$$
|
Fix a dimension $d \ge 1$. Is there an efficiently computable sequence $f : \mathbb{N} \to [0,1]^d$ such that
$f$ is either random or quasirandom (e.g., similar to Sobol sequences).
Given $n \in \mathbb{N}$ and a box $S = [a_0,b_0] \times \cdots \times [a_{d-1},b_{d-1}]$, one can find the subset $f_{S,n} = \{f_k | k... |
I want to solve the problem to determine the next intersection of a Keplerian orbit with the Sphere of Influence of a celestial body to find the next intersection within one future period of the satellite orbit (the satellite and the celestial are both in confocal Keplerian orbits around a primary star or planet and th... |
I'm currently trying to run a MIP (have access to both Gurobi and CBC) with a piecewise linear function having ~200 intervals for each of the ~30 x values I have. I am using the standard decomposition to linearize the function. I.e.
having a binary variable $y_i$ for each interval $D_i = [a, b - eps]$ s.t. if $x \in D$... |
I am developing a code to simulate a Non-Volatile Memory (NVM). For that, I need several constants (memory dimensions, feature size, temperature etc.).
Until then, all my constants were defined at compile-time using pre-processor macros and constexpr variables. But as I needed to re-compile my code each time I wanted ... |
Cross-posted on Math.SE
Are there real-world applications that call specifically for eigenvalues rather than singular values?
I often see eigendecomposition used as "poor-man's SVD"
For instance it's used in Matlab's Lyapunov solver, but that could be reformulated in terms of SVD with greater cost ($22n^3$ instead of $... |
I am trying to solve the Stokes equation containing viscosity nonlinearity using the open source finite element software underworld2 with nested PETSc. The resolution is 2000*200. The solution results of the mumps and multigrid methods were obtained respectively.
========> mumps-parallel <========
SCR Solver Summary:
R... |
I solved numerically the following wave equation with a source problem:
$$ u_{rr} + {1 \over r}u_r + u_{zz} = {1 \over c^2}u_{tt} + s(r,z,t) \tag 1 $$
$$ u_r(0,z,t) = 0 \tag 2$$
$$ u_r(r_{max},z,t) = f(z,t) \tag 3$$
$$ u_z(r, 0, t) = g(t) \tag 4$$
$$ u(r, z_{max}, t) = 0 \tag 5$$
$$ u(r,z,0)=0 \tag 6$$
$$ u_t(r,z,0)=0 ... |
Hopefully this question makes sense.
I know I can formulate an operator for a vector as a matrix, then apply that matrix to my vector to get a new vector. For example, if I define a left shift operator which shifts all elements left I can write such a matrix as follows (I will denote as $L$). I've assumed periodic boun... |
I am studying spectral methods for solving PDEs numerically. I finished a chapter that explains how to use Chebyshev's collocation method to solve them. Though the explanation in the book is quite good, I still have some questions regarding the implementation of Neumann type boundary conditions (both homogeneous and no... |
As shown in Algorithm 2 of this document a linear system $M{\bf z}_k = {\bf r}_k$ is required for every iteration of the preconditioned conjugate gradient (PCG) method. I assume this system is typically solved using the (un-preconditioned) conjugate gradient method. If this is the case, why does this approach not have ... |
When reviewing papers on the numerical solutions of Partial Differential Equations (PDEs), I observed the following equation:
$$
(1-C\tau)||\theta^n||^2 \leq ||\theta^{n-1}||^2 + C\tau (h^{2r+2}),
$$
where $\tau$ is the discrete time step, and $h$ is the spactial step size. The above equation is equal to
$$
||\theta^n|... |
How to approximate flux ()⋅ where denotes the unit normal outward when using finite volumes?
in my case it's not a conservation law so my question is how can we approximate the final term
\begin{align}
\int_{k} div(\boldsymbol{\mathcal{F}}(u)) \mathrm{d}x = \int_{\partial K} \boldsymbol{\mathcal{F}}(u) \cdot \vec{n} ~... |
I have been working with a matrix $A$ and preconditioner $P\approx A^{-1}$ that I've then applied GMRES to the (left) preconditioned linear system
\begin{equation}
P^{-1}Ax=P^{-1}b
\end{equation}
$P^{-1}A$ is not normal and so cannot be diagonalized by a unitary matrix. I have been able to show that for arbitrarily sma... |
I am solving a least squares problem. Using lsqr is relatively slow. Is there a way to add a right preconditioner for lsqr?
https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.lsqr.html
Here no option to directly use a preconditioner.
Not sure how to define a linear operator for A @ (LU)^{-1} and i... |
This is more of a conceptual question but closely related with how non-linear dynamics simulations results should be interpreted.
I am confused about the relationship of "period" in the context of period-doubling bifurcation, quasi-periodicity and dimension of the torus attractor. I find the wikipedia article on quasi-... |
I need to find a distance from a point in 3D space to a parallelepiped (a crystal lattice cell). The problem boils down to a quadratic programming task:
Let $L$ be a matrix of lattice vectors (row-wise); $q$ is a point to find a distance from. Then the problem is following:
$$\min_{\textbf{x}} |L^T \textbf{x} - \textbf... |
Scaling Issues: Many of the columns I'm analyzing are in different scales, which makes it challenging to visualize them together effectively.
Visual Representation: I initially attempted to use Matplotlib with a secondary y-axis, but the resulting plot was complex and challenging to interpret.
Time-Based Analysis: I al... |
If I am creating a grid in the $S_i$ direction with $N_S+1$ grid points. If I want more steps around some $K$, I can use:
$$
S_i=K+c \sinh \left(\xi_i\right), \quad i=0,1, \ldots, N_S
$$
where $c=\frac{K}{5}$, and;
$$
\xi_i=\sinh ^{-1}\left(\frac{-K}{c}\right)+i \Delta \xi
$$
with
$$
\Delta \xi=\frac{1}{N_S}\left[\sinh... |
The supplied code draws some data points and the corresponding regression line.
The regression line goes through or is near most of the data points on a linear scale.
.
However, on a log scale, the line doesn't look very accurate. Also, the lengths of the lines become shorter.
How can I make the regression line look ... |
I have a 3D surface, defined as collection of points in a 3D evenly spaced mesh. I have a rectangle of fixed size (height x width), and I need to find a collection of rectangles positions in the 3D space (i.e. I also need the tilt angles of the rectangle, or the vector normal to the rectangle) which will cover all the ... |
I have a curve on a plane, and a rectangle with one side much longer than the other (let's say it is a "thick segment). I need to find a set of positions of the rectangle which would include all the points of the curve. Overlaps of the rectangle positions are allowed. Possibly I would need to optimize the problem, find... |
In the 4D Henon-Heiles system, it is well-known for certain parameters the attractor is a 2D torus. I am wondering how can we plot this actual torus (embedded in 3D) by somehow projecting all 4 components to some 3D space and to observe if a torus-shaped object will pop out.
I have seen people visualize this 2D torus s... |
Please refer to the PhD thesis given at the following link:
Etienne Bernard. Algorithms and applications of the Monte Carlo method : Two-dimensional melting and perfect sampling.
I want to draw the following plot given on page 68:
Figure 3.2: Example of error estimation for the orientational correlation function of... |
I am reading a book: Introduction to Algorithms.
In the first chapter is itself, Algorithm is defined as is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output in a finite amount of time.
I am not able to understand the what doe... |
I noticed that libraries like numpy and pytorch are able to perform arbitrary tensor contractions at speeds similar to comparably sized matrix multiplications. This leads me to believe that underneath they somehow express these operations in terms of BLAS routines.
However, I can't think of a general algorithm to do so... |
I've been looking into solving a linear system $$Ax=b$$ where $A\in\mathbb{R}$ is the sparse coefficient matrix of size $K\times K$, $b\in\mathbb{R}$ is the right-hand side (i.e., the source term) of size $K\times 1$, and $x\in\mathbb{R}$ is the vector of unknowns (also of size $K\times 1$). The system of equations is ... |
Suppose we have a fluid particle mixture, where the particle have cylindrical shape, no gravitation force, flow is laminar (let's say $Re_f=100$), and we want to do numerical simulations, and we are interested in hydrodynamics forces exerted from flow on a single particle. I think the hydrodynamic forces can be categor... |
For decision vector $x$, I have a constraint that either $x\leq0$ or $x\geq5$, that is, all positive entries must be at least 5.
Is there a way to cast this under LP? The problem is already a mixed-integer program, so introducing binary/integer auxiliary variables are ok, if necessary.
I tried to use the usual positive... |
The following is the Discrete Spectral Vorticity Evolution PDE for incompressible flow:
$$ \frac{\partial \Omega_{pq}}{\partial t} = \nu \left( \frac{\partial^2 \Omega_{pq}}{\partial x^2} + \frac{\partial^2 \Omega_{pq}}{\partial y^2} \right) - \mathrm{fft2} \left( u_{ij} \frac{\partial \omega_{ij}}{\partial x} + v_{ij... |
I calculated SASA for 4 systems using the following command. The trajectory file (run.xtc) is not treated with gmx trjconv option. In my MD simulation, I followed two annealing cycles in each 50 ns simulation time. In the graph, I observed a pattern at every 25 ns and I am unable to explain why I get it. I would like t... |
For surrogate models which predict derivatives based on the current state: how do you avoid the accumulation of state errors due to modeling error in each state update?
It seems to me that if you used a surrogate model (predicting derivatives) for e.g. turbulent simulations. Then by definition of chaotic dynamics/fixed... |
I am aware of the following question Evaluating the surface integral in an FEM (Finite Elements Method) procedure. But they use the volumetric coordinates while I want to use the cartesian isoparametric coordinates.
I am using the cartesian coordinate system ($xyz$) and the corresponding isoparametric coordinate system... |
For surrogate modeling Reduced Order Models seem relatively common. And in particular one approach is called P.O.D. (proper orthogonal decomposition). Which essentially computes a linear manifold of the original state variables.
How do these reduced order models save compute costs? In particular once you have the reduc... |
I'm struggling to determine the order of error when considering the error value denoted by $\text{err}$ in relation to the variable $h$. Specifically, I aim to ascertain the value of $x$ in the expression $\text{err}=O(h^x)$. Assuming $\text{err}=ch^x$, I attempted to use the logarithm with base $h$ as follows:
$$\log_... |
I've looked into distributed numerical computation work before, but I've realized that 3D applications are all about 3d surfaces and meshes.So I'd like to look into related work on mesh and parallel numerical computation
|
So I recently learned about Polynomial Chaos Expansion (aka PCE), and it seemed to me that its purpose was to propagate uncertainty from the inputs to the outputs more efficiently (via closed-form moments). But I am no longer sure that makes sense (only considering a non-intrusive case)...
Given: $Y=\eta(X)$ s.t. $\eta... |
Context:
I was reading a tutorial on polyhedral optimization. But got confused while trying to translate the iteration domain (i.e. loop bound) to set builder notation.
Problem Description:
A code snippet from the article;
for (int i = 0; i <= 2*N; ++i)
S: Z[i] = 0.;
The iteration domain for the statement 'S' is d... |
I had heard in a lecture, perhaps 15 years ago, that the vast majority of the world's HPC resources were dedicated to solving linear systems by iterative methods. I seem to remember it was 90%. I can't find a reference for a figure like this. Are there any recent estimates for this?
|
I often do simulation of dynamics of mass points connected by strings (e.g. molecular dynamics, soft body dynamics etc.). Typically I do it simply by integration of equations of motion by e.g. verlet integrator (with some time step dt). There I evaluate all forces in every step. This includes:
hard/strong forces ( e.g... |
Finite differences are usually used to integrate ODE's and PDE's. However, sometimes they can be used for differentiation which I illustrated simply by using the Matlab code below to differentiate the function $\cos(x)$. I am confused about when I can use finite differences for differentiation, and when I can't. I woul... |
I have a triangular matrix stored in packed format (ie $L$). I need to compute $LL^T$ (not the decomposition, just the multiplication). What would be the preferred way of computing this with blas/lapack?.
One obvious way would be to follow the following steps:
Convert packed format to full triangular (DTPTTR)
Compute ... |
I have a 2-D matrix with 2 spatial coordinates and I want to be able to vectorise the process of numerically differentiating with respect to its 2 coordinates, rather than just looping along the rows and columns. On page 307 of this, they have the equations:
(2.9a) $\quad f^{\prime}\left(x_i\right) \approx \alpha_{i,-2... |
I want to find optimizations to my code for the 3BP, and more specifically computing accelerations. I'm using a data-driven approach, so I have a bodies structure that contains arrays for mass, position, velocity, and acceleration, all stored as Vector2d's of the library Eigen. So something like array<Vector2d, 3> posi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.