instruction stringlengths 43 28.1k |
|---|
TLDR: What references and pre-requisites are necessary for a Computer Science Undergraduate to get ready for a Masters and Career in Scientific Computation / Computational X
For a Computer Science Undergraduate, Programming and Mathematics are not a problem but there is definitely a void left in Basic Sciences.
Taking ... |
I have a function $F(x)$ which drops exponentially (like differential QCD cross section vs. Invariant mass). I want to perform Monte-Carlo integration. The problem is that only small $x$'s which have large $F(x)$ are accounted. I mean if the range of $x$ is $[1, 8]$ TeV, the maximum value of $F$ is $F(1)$ and the minim... |
I've tried my best to look through the relevant suggested similar questions when posting this, and hopefully this contains enough new material to not be considered a duplicate.
I'm currently trying to draw up a semiconductor drift-diffusion simulation framework, and the work that I'm supposed to be working off of, even... |
I am attempting to implement an $h$-adaptive FEM scheme for the following simple 1D problem:
$$
-u''(x) = f(x) \;\text{in}\;(0,1)\\
u(0) = u(1) = 0.
$$
To this end, I begin with a coarse, uniform mesh of say, 4 elements and compute an error indicator on each element. I'm looking at an explicit a posteriori indicator ba... |
I want to calculate the stream function $\psi$ starting from a velocity field $(u,v)$ (such that $u=-\frac{\partial\psi}{\partial y}$ and $v=\frac{\partial\psi}{\partial x}$). I thus calculate the vorticity $\omega$ (such that $\omega=\frac{\partial v}{\partial x}-\frac{\partial u}{\partial y}$) and then solve the Pois... |
I am currently working on solving a positive definite symmetric systems in parallel. The parallel direct solver I used is MUMPS. However, the performance and efficiency of the parallel direct solver are quite disappointing compared to the sequential direct solver (Spooles is the one I used). The number of unknowns are ... |
I am implementing a finite difference method in solving the diffusive-advective equation:
$$
u_t + v \cdot u_x = D\cdot u_{xx}
$$
(v, D are constants). Planning to use the operator splitting method (see below), I am now focusing on the advective part.
I chose staggered leapfrog method (from Numerical Recipes book)
$$
u... |
I'm trying to solve the fully coupled drift-diffusion system using Newton's Method. Although I eventually plan to potentially use a Jacobian-Free Newton-Krylov approach, this is still something that I want to implement and look into.
A bit of notation for the equations presented below:
$d_{ij}$ and $l_{ij}$ are control... |
If given a displacement gradient tensor, we can easily obtain the stress tensor (using Hooke's law and the strain-displacement relationship), as well as the traction vector.
If given a traction, and knowing that traction $\boldsymbol{T} = \boldsymbol{\sigma n}$ ,where $\boldsymbol{n}$ is the normal vector, we can not ... |
For my PhD Thesis, my advisor asked me to build a solver inspired from the article "Optimal Control Theory Applied to an Objective Analysis of a Tidal Current Mapping by HF Radar, J-L Devenon, 1989". In this article, in the numerical fluid-solving part, the author linearize the shallow water 2-D equations by removing t... |
I am trying to solve the Helmholtz equation with Robin boundary conditions with complex coefficients and the weak formulation
$$
\iint_\limits\Omega\nabla p_0(x,y)\nabla\left(\overline{v(x,y)}\right)dxdy-\frac{w^2}{c^2}\iint\limits_{\Omega}p_0(x,y)\left(\overline{v(x,y)}\right)dxdy\\
+ik\int\limits_{\partial\Gamma_R}p_... |
I have a time iteration function looked on a 2D surface like this.
Since the numbers wee very small i.e. hbar=6.6260700404e-34./(2*pi), my professor told me to use our own "scaled unites" during the calculation. ie. instead of using $1e-9$ (meter), scale the unit and use $1e-6$ ($\mu m$) during the calculation. e.t.c.... |
The problem
I'm trying to make a metropolis simulation of the 2D Ising model.
Basically, it's the following, for each monte-carlo step:
Visit each lattice site,
Compute energy required to flip the spin: dE
If $exp(-\frac{dE} {kT}) > p$ where p is a random number in [0,1], flip the spin, else leave it.
Heat capacit... |
so hopefully I'll be using gmsh to make meshes out of 2-D cross sections with o thickness. I tried to make a structured mesh with quad elements of a rectangular cross-section, but when I checked the .mesh file to see if it had the correct number of elements and nodes, it hadn't and I can't seem to figure out why...
I'... |
I have a probability distribution function that I don't have its analytical form (so I can't determine its CDF). How can I generate random numbers based on this distribution function? I'm looking for a way that is similar to that of using CDF.
|
Suppose we want to find $x$ such that:
$$x=b+Ax$$
where $A$ is a large sparse square matrix with eigenvalues in the unit circle.
There are two representations of the solution:
1)
$$x=(I-A)^{-1}b,$$
2)
$$x=\sum_{k=0}^\infty{A^k b}.$$
Since we cannot practically store powers of the matrix $A$ (due to memory limits: indee... |
If you solve a given PDE (Navier stoke's, Euler, heat eqn, advection eqn, etc...) using FVM, is this PDE supposed to be valid at every cell in the discretized domain, or only in the global domain as a whole?
|
I simulated the compression problem in ANSYS and compared to the analytical solution and found some discrepancies.
The classical solution to the 1-D compression problem is:
\begin{align}
u(x) = Cx
\end{align}
subjecting to the following BCs:
\begin{align}
u(x=0) = 0 \\
\frac{du}{dx}(x=L) = C
\end{align}
This solution... |
I am working on a problem that involves semidefinite programming (constrained optimization of fairly large positive definite matrices). The software is written in C++ and calls DSDP 5.8 to solve the SDP problem. It works as advertised on small/medium test problems (up to 200 x 200 matrices, ~$10^5$ constraints), but di... |
I recently came across this paper, which describes a scheme for saving memory in representing sparse matrices. A 32-bit integer can store numbers up to ~4 billion. But when you solve a PDE you've gone parallel and partitioned the problem long before the number of unknowns is anywhere close to 4 billion. Their idea is t... |
Given square matrix $A_0$, vector $b$, vector $A_0^{-1}b$ and matrices $A_1, A_2, \dots, A_k$, in which each $A_i$ is generated from $A_{i-1}$ by replacing one single column, I would like to find an efficient method to compute all the results of
$$A_1^{-1}b, A_2^{-1}b, \dots, A_k^{-1}b$$
Any suggestions are welcome.
|
I need to find the first $n$ roots of the transcendental equation
\begin{equation}
F(k) = J_m'(kr)Y_m'(k)-J'_m(k)Y'_m(kr)
\end{equation}
for integer values of $m$ and any $r \in [0,1)$ where $J'$ and $Y'$ are derivatives of Bessel function of first and second kind. This is a (standard?) problem encountered in eigenfun... |
Suppose I have a reference quadrilateral on $[-1, -1] \times [-1, 1]$ with reference coordinates $\xi, \eta$ and a mapping to an isoparametric quadrilateral in 'physical space' described by coordinates $x, y$.
For a triangular element, the isoparametric mapping is handled the following way for the global nodal basis f... |
There are $n$ sources with the following positive volumes: $p_1, ..., p_n$ and there are $m$ destinations with the following positive volumes: $q_1, ..., q_m$. It is known that $p_1+ ...+ p_n=q_1+ ...+ q_m$. Each source is going to use its volume to fill up one or more destination(s). If a source fills one destination... |
I have difficulties in understanding the role of the weight function $w(x)$ that occurs in the solution of PDEs via the Galerkin approach. Consider a linear differential equation of the form
$$
\partial_t \,u(x,t) \ = \ L \, u(x,t)
$$
where $L= L[x,\partial_x,\partial_{xx}]$ is a differential operator.
In the Galerkin ... |
I am a complete beginner in numerical simulation and I am pretty lost about how to tackle this problem.
I have been trying for some time to find the steady state (or simulate), the following system
$$ \dot S = D_S \Delta S + \rho_S \frac{ F^n } { F^n + 1} - \delta_S S -\delta_C P^2 S $$
$$ \dot P = D_P \Delta P + \rh... |
How to numerically minimize a functional, for example,
$$J[y]=\int_{x_1}^{x_2}L(x,y(x),y'(x))dx$$
An equivalent problem is to solve the Euler equation for this functional as a differential equation. But is there a numerical method to directly minimize this functional without solving a differential equation?
|
I'm working with the tight-binding model, and I'm trying to learn the basics of how to compute the Density of States (DOS) $N(E)$ numerically.
The DOS is given by
$$N(E) = \frac{1}{N}\sum_k \delta(E-\epsilon_k)\, ,$$
where $\epsilon_k$ is the dispersion relation - in 1D, it has the form $-2t\cos(k)$, where $t$ is a pa... |
I have three-dimensional radar reflectivity data obtained as voxels (scans, rays, altitudes). The data has been sampled at irregular spacings and I want to convert this into a regular grid. In addition, I have 3-D arrays for the latitude, longitude, and altitude with the same shape(scans, rays, altitudes). Python is my... |
I am looking for numerical packages (ideally Python) to solve second kind Volterra integral equations, such as
$$u(t)=g(t)+\int_0^tK(t,s)u(s) ds$$
or Volterra-Fredholm integral equations
$$u(x,t)=g(t,x)+c\int_0^t\int_\Omega K(t,s,x,\xi)u(s,\xi) d\xi ds$$
Are there any callable functions in Python to solve such equation... |
I am attempting to numerically integrate the equation
$$\frac{\mathrm{dP} }{\mathrm{d} r}=-\left ( P+\rho\left ( r \right ) \right )\frac{m\left ( r \right )+4\pi r^{3}P}{r\left [ r-2m\left ( r \right ) \right ]}$$
to find $P\left ( r \right )$. I have defined the following:
$$\rho\left ( r \right )=\rho_{c}\left [ 1-... |
First of all sorry if this is the wrong place to ask this question, I went to a few stack sites and thought here it would be more suitable.
My problem:
I have a physical quantity $F$ that depends on $x$. At each $x$ I have an error $dF$ in the measurement of $F$.
The quantity I want to measure is defined as an integra... |
Let $A, G, Q$ be real, square, dense matrices. $G$ and $Q$ are symmetric. Let
$$H = \begin{bmatrix} A & -G \\ -Q &-A^T \end{bmatrix}$$
be a Hamiltonian matrix. I want to compute the matrix exponential of $H$. I need the full matrix exponential, $e^{tH}$, not only the matrix-vector product. Are there any specialized alg... |
I think it is well known that 2nd order NURBS curve can describe any segment of a conic section. Such a segment has 7 degrees of freedom, take an ellipse arc for example: the ellipse itself has 5 degrees of freedom (center, half-axes and rotation), and the two points on the ellipse (2 angles) give the remaining 2 degre... |
I am trying to get some code working for the 1D Poisson equation using the textbook: Nodal Discontinuous Galerkin Methods Algorithms, Analysis, and Applications.
I use the following formulation (for a homogeneous case):
In order to account for inhomogeneous cases, the textbook proposes the following:
where $\mathcal ... |
Let $V$ a Hilbert space, $a:V\times V\rightarrow \mathbb{R}$ a bounded, symmetric and positive bilinear form and $f:V\rightarrow\mathbb{R}$ bounded.
Is well known that problem
$$\left\lbrace\begin{array}{l}\textrm{Find }u\textrm{ such that}\\ a(u,v)=f(v)\quad\forall v\in V\end{array}\right.$$
is equivalent to minimize ... |
Context: I am working on implementing this paper and I am struggling to come up with a variational formulation for the Butler-Volmer interface conditions.
To simplify my question I consider the following problem:
\begin{align}
-\Delta u &= f &\text{on } \Omega \\
u &= 0 &\text{on } \partial\Omega \\
\frac{\partial u}... |
This is a continuation of my previous post, 1D analytical solution vs FEM solution for a bar under compression. For some reason, I cannot comment in it.
The analytical solution to the 1-D static compression problem is:
\begin{align}
u = \frac{du}{dx}x
\end{align}
where $x=0$ is at the fixed end, and $x=L$ is at the lo... |
I wrote a UEL (User Element in Abaqus) for one element and compared to a reference UEL which used standard FEM, where the results agreed satisfactorily, except the reaction force. The stress, strain, strain energy all were pretty accurate.
I am unable to understand this, how the reaction force is calculated?
I am si... |
What is the complexity (in flops, floating-point operations) of taking the $l_2$-norm of vector $\mathbf{v}\in\mathbb{R}^n$ (or $\mathbf{v}\in\mathbb{C}^n$ if a difference exists).
We have the following definition of the $l_2$-norm of $\mathbf{v}$:
$$
\lVert\mathbf{v}\rVert_2= \sqrt{|v_1|^2+\dots+|v_n|^2}
$$
where $|v_... |
I have a large sparse matrix which is symmetric for the location of non zero values, but the values are different. Could I still use the CG method? I don't have much knowledge of linear algebra, the matrix comes form the discretization of some PDEs and is very large, GMRES method is not appealing because of the need of... |
I have to calculate the normal derivative of a function $f(i,j)$ on a domain with an irregular boundary. Let's say something like this:
x x x x
0 x 0 0
0 0 0 0
where x indicates a solid boundary.
Which is the correct way to calculate the normal derivative of $f$ at the grid point (1,2) and (3,2)?
Should I simply sum t... |
Solving a linear PDE like
$$
\Delta u = f \quad\text{on } \Omega,\\
n\cdot \nabla u = 0 \quad\text{on } \Gamma,
$$
with Finite Elements usually goes like this:
Create the discretization $Au=b$ via
$$
\int \nabla u \cdot \nabla v_i = \int f v_i
$$
(With the $u$ and $v_i$ from some finite-dimensional trial and test spac... |
I'm trying to detect dirty floor areas in a series of images, using MATLAB and its Image Processing Toolbox, like the one that follows:
In the image above, there are two distinct areas, the whiter floor, which is considered clean, and the dirty floor, which is the area beyond the yellow warning sign. I'm looking for w... |
In the context of adaptive mesh in FEM, after a new mesh is created, the data on the old mesh are to be transferred to the new mesh. For the data on the integration points (IPs), it seems the usual way is to (1) transfer the data on IPs of the old mesh to the nodes of the old mesh, (2) use the shape function to transfe... |
In this problem I am trying to solve, I have a messy set of points distributed in 3D space, each with a defined temperature. If I would want to calculate the heat transfer scenario in this system, how would you recommend me an approach (numerically and with each computational tool)? I thought about triangulating the po... |
Here is the URL: https://github.com/avaneev/biteopt
I've tested it on numerous global optimization benchmarking functions (included), and on real-world hyperparameter optimization problems I have. Seems to be working quite well except in comparison to deterministic methods it's necessary to make several attempts at dif... |
In Gmsh, I have a test.geo file. The question is:
if I run gmsh -3 test.geo in the command line, I get the below error.
Error : Surface mesh is wrong, cannot do the 3D mesh
Info : Done meshing 3D (0.002836 s)
Info : 927 vertices 2064 elements
Error : ------------------------------
Error : Mesh generation e... |
I am interested in knowing what the time complexity is (in Big-$\mathcal O$ notation) for solving system of $N$ differential equations?
I am using ode15s in MATLAB for this but have no clue about time complexity.
|
I want to partially diagonalise real sparse symmetric positive-definite matrices, that are of dimension $n = 10^5$ and I need on the order of $k = 500$ of the smallest eigenvalues and eigenvectors. The number of non-zero elements scales with $n$, and optionally I can arrange the matrices to be band-diagonal with the nu... |
Only the first two sections of this long question are essential. The others are just for illustration.
Background
Advanced quadratures such as higher-degree composite Newton–Cotes, Gauß–Legendre, and Romberg seem to be mainly intended for cases where one can finely sample the function but not integrate analytically. Ho... |
Physics, biology, chemistry etc. have different sets of rules for making experiments: what events are considered relevant, how to avoid contamination of samples, how to create and fix a reproducing process and so on.
What are standards, protocols and best practices in ensure accuracy and reproducibility in numerical ex... |
Having shape functions $N_i(\xi,\eta), i = 1,...,N_n$ and, a normal vector $n = (n_x,n_y,n_z)$, a thickness function $F_\tau (\zeta), \tau = 1,...,N_\tau$ and nodal variables $\mathbf{Q}_u = (Q_u,Q_v,Q_w)$:
If
$$
\int_{\Omega} u \delta u dV = \int_{\Omega} F_\tau(\zeta) N_i(\xi,\eta) \mathbf{Q}_{u} F_z(\zeta) N_j(\... |
I have inherited code that solves Eigen::Matrix problems using the code shown on this page:
(A.transpose() * A).ldlt().solve(A.transpose() * b)
This works, but often my matrix size can be $[200 \times 5]$. The $A^T.A$ expression gives me a huge square matrix with 400 times as much data, so I suspect that the solver wa... |
I'm trying to make a 2-D quad-only mesh of an "I"-shaped cross-section, with elements of size 5. So far I've managed to make it quad only, but some elements are very distorted when they shouldn't be. Also, the total number of elements is incorrect. Can you please help me out?
Here's my .geo code:
Point(1) = {0, 0, 0, 1... |
Given a real function $f$, how can one efficiently evaluate $\int_0^{a_i}f(x)dx$ for millions of different $a_i$?
Applying a standard quadrature method (such as Simpson's rule or Gaussian quadrature) will incur an independent cost for each $a_i$, since in general $f(x)$ will need to be evaluated at an entirely differen... |
With a rather basic knowledge in C++, I have written my own MD simulation code. Currently, I calculate forces in the most naive way: I go through all the atoms and account for their interactions. This of course is an $\mathcal{O}(N^2)$ algorithm, and very inefficient. It wouldn't be an issue, except for my research pur... |
For structural mechanics, such as linear elasticity, I am aware of BCs such as a prescribed displacement (Dirichlet) or a prescribed traction (Neumann).
Is it possible that a boundary can have a mixture of prescribed displacement and prescribed traction, i.e., a mixture of Dirichlet and Neumann BCs for the same bounda... |
I am studying the reverse mode of
automatic differentiation.
The reverse mode of automatic differentiation allows the efficient computation of a the derivative of a single dependent variable $y$ with respect to as many independent variables $x_i$ as you want.
One assigns to each intermediate variable $v$ an adjoint var... |
Let's consider the FEM discretization of the Laplace operator without boundary conditions, i.e.,
$$
a(u,v) = \int_\Omega \nabla u \cdot \nabla v - \int_\Gamma (n\cdot \nabla u) v.
$$
For one-dimensional domains, the corresponding matrix has two empty rows (the first and the last), generally in $n$ dimensions the matrix... |
I am attempting to use the method of manufactured solutions (MMS) for code verification for linear elasticity. However, this is more of a general question regarding the general use of MMS.
In MMS, the manufacturer makes up some solution that satisfies the PDE, and then we obtain values for BCs and sources that we feed... |
I have several questions regarding suitable boundary conditions for linear elasticity.
I have read that in order for modeling linear elasticity to be well-posed, the entire boundary cannot be traction/Neumann boundary conditions, and that at least part of it needs to be specified as a fixed/Dirichlet boundary conditio... |
Does it really matter which techniques we use in the process of GA optimization? For instance, if I use the Roulette Wheel Technique instead of Tournament Method for selection, two-point crossover instead of one-point for crossover, and let’s say a single-point mutation instead of inversion method for mutation, will I ... |
From what I understand, the Gauss-Newton method is used to find a search direction, then the step size, etc., can be determined by some other method.
In addition to that, are the following statements also true?
the Gauss-Newton method always results in a direction of strict descent
the Gauss-Newton method only requi... |
I am trying to derive the formula for the second-order second derivative of the function $f(z)$ in the case of non-uniform spacings.
I start by considering that, around $z=\zeta_k$:
$$f(z)=f(\zeta_k)+(z-\zeta_k)~f'(\zeta_k)+\frac{(z-\zeta_k)^2}{2!}f''(\zeta_k)+O((z-\zeta_k)^3)$$
where the primes indicate a differentiat... |
I have a 1st order ODE system. One of the equations is piecewise function of 2 of the dependent variables. I try to solve it in Python environment.
\begin{align}\dot x_1 &= x_2 - x_3\\
\dot x_2 &= x_1 + x_4\\
\dot x_3 &= \left\{
\begin{array}{ll}
(x_2-x_{4})^{(0.5)} & x_2\ge x_{4}\\
0, & x_2\lt x_{4}
\end{array}
\righ... |
The stiffness matrix of $Ax=B$ system of linear equations, where $A$ is an $n\times n$ symmetric matrix stored in the form of symmetric skyline matrix, that is associated with a finite element model of 3-D elastic solids, when reordered with the reverse Cuthill–McKee algorithm doesn't result in a skyline matrix with li... |
I have set up a mathematical model describing the diffusion of ozone out of a gas bubble. The bubble is surrounded by a thin gas film. So actually, the model describes the diffusion of ozone through this gas film.
The mathematical model is created by discretizing the volume from $V_0$ to $V_1$. Where $V_0$ represents ... |
I am trying to perform an Integral of Hypergeometric function 2F1(a,b,c,x) from -1 to 1 for some good values of $a,b,c$ (lets say $a=1,b=2,c=3$) .
I did it in Python and Mathematica and the answer is finite although it is divergent at the point $x=1$. Anyway, I need to do this integration as a part of my very long cod... |
I have a sparse (density = 0.2%), ill-conditioned system that I am trying to solve, with no luck.
Background
I have a sequence of sampled data, where two of every 8 samples have been zeroed due to a bug. The sequence is two sinusoids in the presence of white noise.
What I'd like to do is determine the Signal to Noise R... |
I've done an extensive web search, but could not find an option. Conversion between model formats is available, but conversion of objective function and constraint equations into C code seems absent. This is needed to run complex models a little bit more effectively utilizing processor-specific compiler optimizations.
|
I am using the method of manufactured solutions to perform the order of accuracy testing. I am using a cube for the testing. The cube is size 1m on all sides.
I used 5 refinements:
$dx = dy = dz = 0.5$ ($8$ cells)
$dx = dy = dz = 0.5/2$ ($8^2$ cells)
$dx = dy = dz = 0.5/2/2$ ($8^3$ cells)
$dx = dy = dz = 0.5/2/2/2$ ... |
In a much larger MINLP problem, I have set of variables $\{a_{ij}\}_{m,n}$, such that $0 \leq a_{ij} \leq 1 $ for all $i$, $j$, which I could think of as a matrix, for which I have two requirements:
there is exactly one non-zero element per row;
there is at most one non-zero element per column.
This can easily be ach... |
I'm reading a paper where they use a discrete approximation of a logarithmic mass growth rate as follows:
$$ \frac{d \log M}{d \log t} \approx \frac{(t_B + t_A)(M_B - M_A)}{(t_B - t_A)(M_B + M_A)}$$
I'm trying to derive this approximation, but wasn't successful thus far. I tried forward, centered and backward differenc... |
This question was raised at a different place without sufficient answers.
Definition 1:
We say that a vector $x \in R^n$ is a limit point of a sequence $\{x_k\}$ in $R^n$ if there exists a subsequence of $\{x_k\}$ that converges to $x$. This definition appears frequently in the optimization literature, for instance, se... |
I am using Runge-Kutta to solve a $3 \times 3$ 2nd order linear ODE $$M x'' + C x' + K x = 0$$ and initial conditions are all zeros. Then I prescribe the 2nd variable to follow a given path.
As for prescribing displacement, I can choose two ways:
[1] One is to use Lagrangian multiplier $$M x'' + C x' + K x + P x = P x... |
Suppose I have some time dependent PDE, which can be written in the strong form as
$$
\frac{\partial u}{\partial t} + \mathcal{L}(u) = f
$$
Where $\mathcal{L}$ is some differential operator. If I write the weak form of the problem without discretizing the time term, I end up with the standard weak form problem of findi... |
I'm trying to write the following function in python:
$$
f_\mu(\mathcal X) = f_0(\mathcal X) + \sum_{i = 1}^n \max_{||\mathcal Y_{i(i)}|| \leq1} \alpha_i\langle \mathcal X_{(i)},\mathcal Y_{i(i)} \rangle - \frac{\mu_i}{2}||\mathcal Y_{i(i)}||_F^2 \\ \mathcal X, \mathcal Y \ \text{are tensors (MxNx3), } \\ \mathcal X_{... |
Typically an ODE System which involves 2 different physical problems such as diffusion and advection can be numerically approached by the well known Strang operator splitting scheme. I'm wondering if there's a generalization of this scheme to an arbitrary number of subproblems.
In my case, there's an additional issue:... |
I was using Metatrader5 and have designed a strategy for trading using MQL5 programming language.
While I was running a Strategy Optimization process, I saw the it will need 10,00= iterations or possibilities. My CPU core were not capable of processing it faster. So I thought of why not to have GPU cores. i have GTX Ti... |
Suppose I want to approximate the integral $\int_0^1 x^2\,dx$ using Riemann Sums or Darboux sums over random partitions of the interval $[0,1]$, Like in the image below:
Here, A "random" partition of $[0,1]$ containing $16$ partition points,
$$P=\{0, 0.048499, 0.097571, 0.25324, 0.28515, 0.4087, 0.45946, 0.53824, 0.... |
Given a system $Ax = b$, I'm coding a linear solver in Java that takes a triangular matrix $A$ (with 500 to 3,000 rows and columns) and a vector $b$ and solves for $x$. However, the rows and columns in $A$ are unordered and I'm looking for the quickest way to solve this system without pre-arranging such rows and column... |
I have this data, and I need to detect the outliers.
The outliers are clearly visible on the borders (start and end, in red). And I only care for outliers present at the start or end.
I could easily make a rule as "all values over 10 are outliers", but I do not have any assurance that the distance will always be over ... |
For example, the convex function $f(t)=e^{-t}$ doesn't achieve its minimum 0 on the real line. In a linear regression with $p$ predictors $X$, the loss function $f(\beta)=||Y-X\beta||^2$ achieves its minimum. But for a penalized objective $g(\beta)= ||Y-X\beta||^2+\lambda\sum_{j=1}^p|\beta_j|$ with $\lambda > 0$, does... |
I have the following question:
We have two face image files (JPEG), a Matrix of $128\times 128$ with values between 0-255.
We would like to hash both image files using a function $f(x, key)$. Where I know $x$, but don't know $key$. The $key$ is being sent by another authority (a).
It should not be possible to revert $... |
I am struggling with the following exercise from the book of Nocedal, Numerical optimization, chapter 2, exercise 2.12:
Suppose that a function $f$ of two variables is poorly scaled at the solution $x^*$. Write two Taylor expansions of $f$ around $x^*$ - one along each coordinate direction - and use them to show that t... |
For example, I have a function to optimize:
$$f_1(x,y) = x^2+y^2, \quad x_{lb}\le x\le x_{ub},\quad y_{lb}\le y\le y_{ub}$$
Then I apply rotation by $\theta$ plus translation by $x_0$ and $y_0$:
$$f_2(x,y) = ((x+x_0)\cos\theta + (y+y_0)\sin\theta)^2 + (-(x+x_0)\sin\theta + (y+y_0)\cos\theta)^2$$
Intuition tells these f... |
Are there any drawbacks to using the Method of Manufactured Solutions for convergence testing and verification studies? I really can't think of any.
|
At the Section 4.2 of this paper (which is very well known in the computational fluid dynamic community), the author claims that it is enough, for the compact finite difference formulation in eq. 4.2.3 (as applied to problem 4.2.1) to be conservative, that the matrix $B$ (note, the derivation matrix is $A^{-1}B$) have ... |
I am looking for an C/C++/Python algorithm implementation that calculates eigenvalues and eigenvectors of a symmetric, positive semidefinite covariance matrix.
A general-purpose eigen-decomposition algorithm has about $O(n^3)$ complexity, but maybe a faster method exists for symmetric, positive semidefinite covariance... |
I've been discretizing PDEs and formulating $Ax=b$ systems, and yet I don't really know what the $A$ and $b$ are in words.
I occasionally call the $A$ matrix the "Jacobian matrix," but for linear PDEs, "Jacobian" doesn't make sense, so I call it the "differential operator matrix." Is there a standard name for this $A$ ... |
In the case of partial occupancies (for example, this CIF), a supercell should be made for DFT calculations. However, numerous supercells can be built from a lattice (in the above example, 200 different supercells).
Which supercell should be used for the DFT calculations?
Many DFT works (if not most) are based on parti... |
I have to write a little finite elements code in C.
I was asked to implement the conjugate gradients method, which I have done. Now, I am looking to improve further the efficiency of my program by using the Incomplete Cholesky Decomposition.
As I understand it, instead of solving the $ Ax = B $ system, I have to solve... |
In a book for solving a nonlinear differential equation with $N+1$ points, $u_{xx} = e^{u}, u(-1)=u(1) = 0$, in $[-1,1]$ with homogeneous Dirichlet boundary conditions, the fixed point iteration is used. The MATLAB code is as follows:
u = zeros(N-1,1);
change = 1; it = 0;
while change > 1e-15
unew = D2\exp(u);
... |
I have a set of points which forms a closed loop, and I want to perform cutting/clipping a 3D model using this loop. I have used VTK but in some cases, it has a "Cannot follow edges" problem.
Is there any free library I can use to do such operation?
|
I have 20-80 users and 5-10 events with varying ranges of minimum and maximum number of free seats (2-4, 3-5, 2-6...). For example, with a range of 3-5 it is acceptable to only assign three users to the event. The users can choose weighted preferences (1,2,3) for 1-3 events. The problem is to assign as many as possible... |
I frequently work with Keras and tensorflow-gpu on my Lenovo P50 workstation which has 64GB ram and a 2GB Nvidia QUadro M1000M GPU.
Today while training my model on GPU, it ran into memory error and it exit at this line:
da_ta = np.zeros((len(data),sequence_length, cls.get_vector_size(model)), dtype=K.floatx())
So m... |
While answering one of the questions on meshing process, I encountered a lack of understanding on my end for the comparison of the mesh quality.
First, consider an unstructured mesh created in GMSH for a 2-D shape (I am not interested in this particular shape, just here for the illustration). The elements are controlle... |
I've posted the same question at GameDev Stack Exchange, but unfortunately I am not getting any response. So I am going to post ( and reword) it here. Hopefully I can get an answer!
I have a terrain ( in the form of mesh/element), and I want to indicate how the water flows in the terrain, subjected to gravity force and... |
Why do scientists bother with the np for numpy?
(Note this is more a "philosophical"/reasoning question - let us assume that you get your code to perform as intended regardless of choice of syntax)
When I write code for scientific applications, mathematical functions such as sqrt, as well as arrays and the many other f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.