instruction
stringlengths
43
28.1k
In section 3.2 of this paper [1], where 2D planar frame structures are being analyzed, the authors mentioned a transformation matrix to be used in extracting the element displacement vector from the displacement vector of the ground structure in global coordinates. $u_i^e = (u_x^{(1)},u_y^{(1)}, \theta^{(1)},u_x^{(2)},...
I have two matrix A and B, I want to find pattern B in matrix A. So I get 2 pattern similar like pattern B. What the name of this operation? and How I write this in mathematics notation? Thank you in advance
I am wondering what is the fastest way to compute the zeroes of the trigonometric polynomial $$ T(x) = \sum_{i=1}^La_i\sin\big(2\pi(a_i x) - \phi_i \big), \\ a_i \in \mathbb{N}, \\ \phi_i \in \left[-\pi,\pi\right[, \\ x \in \left[-\frac{1}{2},+\frac{1}{2}\right[. $$
I have a system of coupled differential equations, one of which is second-order. I am looking for a way to solve them in Python. I would be extremely grateful for any advice on how can I do that! $k$ is just a constant $$ \left(\frac{dr}{dT}\right)^2=k-\left(1-\frac{5}{r}\right)\left(3+\frac{2}{r^2}\right)\\ \frac{d\v...
I have a function $f:x\mapsto \vec{y}$ with $x \in [0,1]$ and $\vec{y}=(y_1,...,y_n) \in \mathbb{R}^n$. $n$ is a small integer e.g. $n=8$. Each of the component functions in $y_i(x)$ "oscilate" up and down (roughly between -1.5 and 1.5). A snippet of two such component functions looks like this, I know that $f$ is inv...
I have a 3D surface in $x$, $y$, and $z$. where $z$ is a function of $x$ and $y$ and my points are on a structured grid in $x$ and $y$. My function $z$ is highly oscillatory and irregular with multiscale phenomena. I'd like a fitting tool that will capture the large scale phenomena and provide a differentiable closed f...
I'm trying to create my own 3d shape descriptor, the idea is that how I may evaluate how much my descriptor is well and good? What I checked is that they evaluate descriptors through shape matching, shape retrieval, etc.. But my case now is before applying my descriptor to an application, though, Descriptor could be w...
I have two almost identical FORM (by NIKHEF) scripts here: script_1 script_2 which differ only in summation at the end. In first case the summation in done in one step, in the second case summation it is done in two steps. When I subtract the results of the two previous scripts I get a non-zero result http://147.213.1...
I had a question regarding the implementation of the TVB limiter for the RKDG method by Cockburn. I have seen that some implementations of the DG method use normalized Legendre polynomials such that the basis functions take the form $$ \phi_{i}^{k}(x) = \sqrt{2k + 1}P^{k}(x). $$ With this formulation, we have $$ u_{h}...
I want to code this problem in MATLAB. It would be a huge help if someone can suggest to me how I can approach it. I need to solve the below-highlighted equation, I need dT/drho. For that, I need to solve for dRp/drho. I do have a dependence on rho but I don't have it explicitly. I have grid points, where I know the v...
In pre-smoothing we eliminate high frequencies,but what about post-smoothing?Is it used for the remain high frequencies that pre-smoothing didn't eliminate?
I have the following coupled equations for the conservation of mass and momentum of a compressible fluid : \begin{equation} \rho_t + (\rho u)_z = 0, \end{equation} $$ (\rho u)_t + (\rho u^2)_z + \tfrac{1}{k}\rho_z = \left(\frac{dp}{dz}\right)_f + \rho g $$ over the domain $[0, 2L]\times[0, \infty)$ for density and velo...
If we use an aggresive coarsening how does this affect the convergence of a MG cycle?Is the convergence slower?Do we need more cycles in this case?
I'm trying to create a model that will give me the best parts that lead to a maximized score out of a sequence. my data(spark rdd) looks like this: ("dan", "john", "john", "guy", 45) ("john", "dan", "guy", 60) ("guy", "guy", "guy", "guy", "guy", "guy", "guy", "guy" 8) ("guy", "john", "john", "guy", "mark", 0) the numb...
Suppose the convex polytope is the set of feasible solutions $\mathbf{x}\in\mathbb{R}^n$ for the linear system $\mathbf{A}\mathbf{x}=\mathbf{b}\,,\; \mathbf{A}\in\mathbb{R}^{m\times n}$ subject to some (linear) constraints $\mathbf{0}\leq\mathbf{x}\leq\mathbf{v}$; how is it possible to select an interior point of said ...
I have two different mesh files (both are .inp files obtained from Abaqus) that represent the exact same geometries with the same boundary conditions, etc. The only difference is that one of them is meshed in a structured fashion and the other one is meshed in an unstructured way. Now here is my question, how do I find...
For a linear least squares problem, it is possible to define a resolution matrix, relating the estimated model parameters to the true model parameters. If we are solving a regularized problem, $$ \min_x || y - A x ||^2 + x^T \Lambda x $$ then $$ x_{est} = (A^TA + \Lambda)^{-1} A^T y $$ and if we assume that $y = A x_{t...
For the Krylov subspace method to solve the large sparse linear system, we first need to generate a subspace Km = span{v,Av,...A^{m-1}v}, which indeed a process that we convert a linearly independent basis to an orthonormal basis: $$ V_mAV_m = H_m, $$ where $H_m$ is a upper Hessenberg matrix, which has about $m^2/2$ no...
I'm numerically solving a linear coupled ODE of the form $$y^{\prime}(t) = \hat{M}(t)y(t)=\left[\begin{array}{cc}0& A(t)\\ B(t)& 0\end{array}\right]y(t),$$ and the difficulty I'm running into is that $A(t)$ and $B(t)$ don't change for long periods of time and suddenly change rapidly. Here is a plot of one example I'm ...
I need to solve the following system of partial differential equations \begin{align} \psi_{x} &= -i a \psi - b \phi,\quad &(1)\\ \phi_{x} &= b \psi + i a \phi,\quad &(2)\\ \psi_{t} &= - ic \psi + d \phi, \quad &(3)\\ \phi_{t} &= - d \psi + i c \phi, \quad &(4) \end{align} where $\psi=\psi(x,t),\; \phi=\phi(x,t)$ and ...
I need to visualize the response of a function $$y=f(x_1, x_2, … , x_d)$$ with d in the order of 10-12 (the function f was sampled using finite element simulations). For lower-dimensional design studies (d=4 or 5) I would do a 3D plot, plot of $y=f(x_1, x_2)$ and then use several glyphs (colour and size for instance) ...
I need to solve a rooting problem of a polynomial (the order of which is 2(N-1), where N=48). So far I'm using Python Numpy algorithm (that relies on computing the eigenvalues of the companion matrix), but this is too slow solution for me. The polynomial can be written as: $$\sum_{l=-N+1}^{N-1}D_{l}z^{l}$$ where $D_{l}...
I am solving the steady-state incompressible Stokes equations in 2D: \begin{equation} \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} = 0, \end{equation} \begin{equation} \mu\left[\frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2}\right] - \frac{\partial p}{\partial x} = 0, \en...
I have a situation where I can generate a system of $M$ linear equations for $N$ variables ($N \ne M$). Implicitly this is of the form $Ax=b$ with $A \in \mathbb{R}^{M \times N}$, although I never explicitly construct $A$ (even as a sparse matrix), but I can evaluate $Ax$ implicitly for any vector $x \in \mathbb{R}^N$ ...
I have been working on formulating my requirements in the form of an optimization problem in a multi-output regression setting. Firstly, I would like to make the variables I used in the problem and their dimensions clear. There are $Q$ outputs, $N$ samples, and $P$ covariates (features). $\hat{Y}\in\mathbb R^{Q\times N...
I have programmed a couple of Matlab implementations of nonlinear Conjugate Gradient methods (Fletcher Reeves and Polak Ribeire). However, I am concerned with how many steps it's taking to optimise the function $f(x,y) = x^2 + 5x^4 + 10y^2$, roughly 100. I have read that the bound for convergence is $O(n)$ where $n$ is...
I'm interested in studying the effect of mesh size on the behavior of the solution curves of 1D convection-diffusion problem. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$ I could use MATLAB's pdepe solver to solve the above system. function sol=so() format s...
In a code that I work with (written in python, but also tagging as matlab because numpy is so close and I could use it if need be), we use a transfer matrix method to compute the properties of a physical system. That is, for a particle at initial position $\vec{x}_i$, we compute the final position as $$\vec{x}_f = \ha...
If we discretize a parabolic pde to obtain the system of ODE's $\frac{\boldsymbol{B}}{\Delta t} \boldsymbol{u}_k = (\boldsymbol{K} + \frac{\boldsymbol{B}}{\Delta t}) \boldsymbol{u}_{k-1} + \boldsymbol{f}_k$ where $\boldsymbol{B}$ is the mass while $\boldsymbol{K}$ is the stiffness matrix, is there any condition on $\fr...
I will appreciate if I may find someone how can clarify for me the part regarding the quality of feature descriptor, shown in the figure below: and this screenshot is from the article: SHREC All my problem is that I'm not able to understand the situation clearly, appreciate simple words hoping to understand. Further i...
Suppose we have a linear objective function that we want to maximize. All variables are from the set of reals. We have a constraint of the form: $$\max(x_1,x_2) + \max(x_3,x_4)\leq c\,, \text{ with } c\in\mathbb{R}$$ Can we transform this such that we obtain a linear program? I have read that constraints of the form $...
I'm solving the following 1D transport equation in MATLAB's pdepe solver. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$ At the inlet (left boundary), Dirichlet boundary condition is applied $C(1) = C_L$ . (1 is the inlet node number) At the outlet (right bound...
I am a newbie in FEM. I would like to get clarity regarding a few questions on shape functions in this post (please use as simple language as possible). What is the relation between Shape function and Degrees of freedom of any element? Are shape function chosen based on DOF of the element? What all parameters of a sys...
How can I convert a local shape function given in terms of normalized/natural coordinates to global shape function in terms of x and y coordinate system in Hermitian cubic shape function. Please explain using a 1 Dimensional problem. What is a general expression for Hermitian cubic shape function.
I am working on voting behavior using game theory. I have a simultaneous move Bayesian game with n-players (voters) who have to vote for one of two candidates or abstain. Are there softwares or packages for solving such n-player games (finding the Nash equilibria or even approximate Nash-Equilibria) or any other way to...
I am attempting to numerically solve the following problem. I decompose it into a system of two first order ODEs and then solve via the shooting method. I use the fourth order Runge-Kutta (RK4) method to solve each iteration of the shooting method. $$k \frac{d^2T}{dx^2}=h(T-T_{\inf}) + \sigma(T^4-T^4_{surr})\\ T_{inf} ...
I'm reading a paper right now which criticizes a method because it uses trapezoid rule, rather than "more advanced quadrature rules like the Gauss quadrature"... The Gaussian quadrature rule requires, given $N$, the calculation of a bunch of weights and nodes. After these weights and nodes are known, the integral can b...
In order to compute $$ \hat{f}_k = \sum_{m = 0}^{M - 1} e^{-2\pi i k m \theta} f_m, \ \ k = 0, ..., M - 1$$ for any $\theta$, my book states that this can be done using fractional Fourier transform as follows. So, as you can see, they define the $c$-vector, then the $g$-vector, and then the final equation is a 2-ti...
What is fasted way to find roots of second order polynomial up to single decimal point using a program.
I am studying the different topology optimization methods. There are numerous resources out there but when it comes to comparing different algorithms, in terms of strengths and weaknesses most of these resources remain very ambiguous and don't give a clear feedback on why a method is more advantageous compared to one o...
Does the convergence rate of multigrid depend on the total number of smoothing steps or on the number of pre and post smoothing steps seperately?
The optimization problem is $$\min_{x\in K} \|h - x\|_2$$ where $$K = \{v\in R^n : \exists \lambda \geq 0\ v_1=v_2=\ldots=v_k=\lambda \ \text{and} \ |v_i| \leq \lambda \ \text{for} \ i=k+1,\ldots,n \}$$ , where $h, k, n$ are all known. Could someone tell me how to write down this constraint in cvx? I couldn't think o...
How come Finite Volume Method(FVM) handle the unstructured meshes and Finite difference Method cannot, whereas in FVM to approximate the fluxes at the boundary we use the central differencing? My understanding is that in FDM, to apply Taylor series, we need lines on which other independent variables are constant (as on...
This is a follow up to my previous post here I'm solving the following 1D transport equation . $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$ At the inlet (left boundary), Dirichlet boundary condition is applied $C(1) = C_L$ . (1 is the inlet node number) At th...
Recently I have stumbled upon this video of M. J. Gander https://www.youtube.com/watch?v=dn5vqN8ezuE and the coresponding notes that he wrote on Time Parallel Time Integration and I find it a quite interesting topic. I would like to ask about the possible gain of applying the parareal algorithm to particle simulations...
This question relates to the topic of locking free finite element development. In the case of application of reduced integration to global stiffness matrix for the Timoshenko beam element with quadratic shape function of field variables, I get an integrand up to 4th degree in case I calculate this integrand with 2 Gaus...
I have a vector field that represents a incompressible fluid flow (ie. divergence-free, ideally) that contains a certain percentage of vectors that are completely incorrect, due to the procedure used to obtain this field. These vectors thus do not follow the flow. The vector field is also noisy, and is not on a grid; t...
I have followed different sources of information and achieved the following formulation for the ADF $t$ test statistics. I implemented it to run several hundred thousands of ADFs t statistics on GPU at once. My formulation Follows almost entirely Wikipedia convention $$ \Delta y_t = \alpha + \beta t + \gamma y_{t-1} + ...
I have solved the unsteady diffusion equation using piece-wise linear Finite elements(triangles) for spatial discretisation and Forward Euler for temporal discretisation. I have the following mesh convergence results. I'm not sure how to interpret them. The error was calculated using an analytical solution at time = 2 ...
What I know 1=negative,0=positive Example 1. 27-13=14 Example 2. -39+92=53 For example 1. 27 to binary is 11011 13 to binary is 1101 So 1101 change to two complement will be 0011. So for the calculation 11011+0011 gives me 11110. However the correct answer should be 1110, which is binary of 1...
Multi-output ridge regression: $$W^{*}=\underset{W}{\arg \min } \frac{1}{\mathcal{N}}\|Y-WX\|_{F}^{2}+\lambda\|W\|_{F}^{2}$$ There are $Q$ outputs, $N$ samples, and $P$ covariates (features). $\hat{Y}\in\mathbb R^{Q\times N}$ is the prediction matrix, $$\hat{Y}=WX$$ where $W\in\mathbb R^{Q\times P}$ is the parameter ...
I'm solving the coupled ODE $$ \left[\begin{array}{c}x^\prime(z)\\p_x^\prime(z)\end{array}\right] = C(z)\cdot\left[\begin{array}{c}x(z)\\p_x(z)\end{array}\right] = \left[\begin{array}{cc}0& A(z)\\B(z) & 0\end{array} \right]\cdot\left[\begin{array}{c}x(z)\\p_x(z)\end{array}\right] $$ using the implicit Euler method to g...
Given three vectors in $\mathbb{R}^{512}$, my task is to compute a Minimum Volume Enclosing Ellipsoid (MVEE). I have tried Kachiyan's algorithm, but it requires at least as many vectors as there are dimensions, which I do not have at my disposal (attempts to create synthetic vectors resulted in useless ellipsoids). Thu...
I'm just doing a very simple experiment. I'm calculating wall shear stress based on Poiseuille flow for a pipe by using lattice Boltzmann method (LBM) and FEM to compare their values with the analytical solution, which is calculated as: $$\tau = \frac{2 \mu u_\max}{R}$$ Where we have: $u(r) = u_\max \left(1 - (\frac{r}...
What could be the arguments of using fractional Fourier transform instead of multiscale wavelet for data analysis ? Optimization of the good time-frequency domain parameter? good in the sens of best time-frequency domains that minimize spectral entropy of the data. But often, best entropy is achieved in a full 100% fr...
I have a matrix in Coordinate format and I will convert it to CSC. As a reference, the format I am using looks like this, but I am not using the pointerE matrix, which I think is superfluous. My conversion algorithm seems quite slow and I am losing some time sorting the row data by row number. I can't figure out why ...
For our Bachelors thesis we're trying to solve the Schrodinger equation $i\partial_tu = -\nabla^2u+Vu$ in FEniCS. Given the domain $[-5, 5]^2$ with an initial value of $u_0(x, y)=e^{(-2(x^2+y^2))}$ and with $V(x,y)=\frac{x^2}{4}+9y^2$ at time $T=2$ the solution $|u|^2$ should look like the following image given by our ...
I'm trying to understand the influence of Neumann boundary condition while simulating 1D diffusion equation $$ \frac{\partial C}{\partial t} = \nabla \cdot (D \nabla C). $$ The initial value is set to 3 at the inlet node and the rest of the nodes are discretized to zero. Neumann boundary condition is used at both the l...
For a project I'm doing, I have to numerically solve a nonlinear parabolic stochastic partial differential equation, of the form $$ u_t = u_{xx} + f(u)(u_x)^2 + a(u) + b(u)W(t, x), $$ where primes are derivatives with respect to $x$, $W(t, x)$ is space-time white noise, $f$, $a$ and $b$ are smooth and in general nonli...
This is a follow up to my previous post here, I'm solving for convection in 1D $$\frac{\partial C}{\partial t} = - v\frac{\partial C}{\partial x}$$ The discretization of the above equation is presented using a backward difference formula, $$\frac{d C}{dt} = -v \frac{C_{i} - C_{i-1}}{\Delta x}$$ The boundary condition i...
I am trying to solve the 2-d heat equation on a rectangle using finite difference method. I am confused as to how to incorporate non linear radiation boundary condition at the edge. $-k\frac{\partial T}{\partial n}=\sigma\epsilon(T^4-T^4_{\infty})+h(T-T_{\infty})$ Is the following implementation reasonable? $-k\frac{T^...
ABAQUS gives a .inp file (in pre-processing stage) where the information with regard to the preprocessed model is defined, information such as geometry, mesh type, number of elements, boundary conditions, etc. This file is in turn used for the processing part in a solver. I have a solver that takes in .inp files and I ...
I have a function f(x) = sin(x)/x^3 whose first derivative I am trying to estimate using 1st, 2nd and 4th order Finite Difference schemes. I tried to plot the truncation error in MATLAB and I found myself with increasing error with smaller step size. I am not sure where I am wrong. Attached is my code snippet. syms y d...
The wall shear stress is defined based on Matyka et. al. eq. A.4: $$\vec{\tau} = 2 \mu (\mathbf{S} \cdot \vec{n} - (\vec{n} \cdot \mathbf{S} \cdot \vec{n})\vec{n})$$ Where $\mathbf{S} = \frac{1}{2} (\nabla \mathbf{u} + (\nabla \mathbf{u})^{T})$ is shear rate tensor and $\mu$ is kinematic viscosity. There is one more po...
As described in https://openfoam.com/documentation/user-guide/controlDict.php I can use writeControl timeStep writeInterval 1 purgeWrite 10 to keep the last ten timesteps while purging older ones. On the other hand I can use writeControl runTime writeInterval 0.1 (without purgeWrite) to get a permanent...
I am trying to understand the difference between explicit Euler and semi-implicit Euler integration, where in explicit Euler the current position is calculated as $$x_{n+1} = x_n + v_n$$ and semi-implicit Euler method where it is calculated as: $$x_{n+1} = x_n + v_{n+1}$$ with $x$ being position and $v$ the velocity, $...
I am trying to learn about basics of computational fluid dynamics, at the moment on the simple example of linear advection in 1D. I am am currently testing the theoretical predictions of the order of accuracy of different methods, and the results that I am finding are not what I would expect them to be, and I don't und...
I am trying to implement a basic level set program for fluid simulation in C++ and visualize it using SFML, so far I have the following simple program for propagating a circular curve: https://gist.github.com/BhayanakMoth/da8250c849aeead098a61afbf655fb76 However, I am not sure if this the correct way. Since I am workin...
I would like to solve this equation (which is adapted in my case, a plug flow reactor when a reaction occurs): $ \frac{df}{dt} = D \frac{d²f}{dz²} - u \frac{df}{dz} + r(z,t) $ with $r(z,t)= - k f^{n}$ (f power to n) where $k$ and $n$ are positive kinetic constants. $r$ is the local reaction rate. $D$ is the dispersion...
I try to get into GMRES via Arnoldi-Decomposition. For my understanding, I Implemented the Arnoldi-Decomposition in python. import numpy as np n = 5 A = np.random.rand(n,n) v = np.random.rand(n) M = np.zeros_like(A) M[:,0] = v for i in range(1,5): M[:,i] = np.matmul(A,M[:,i-1]) d = np.linalg.matrix_rank(M) V = np...
I would like to solve some equations which basically look like this $$\frac{\partial u}{\partial x}=F\left(v,\frac{\partial v}{\partial y},\frac{\partial^2 v}{\partial y^2}\right),$$ $$\frac{\partial v}{\partial x}=G\left(u,\frac{\partial u}{\partial y},\frac{\partial^2 u}{\partial y^2}\right).$$ My current plan is to ...
I've implemented an algorithm that can calculate the cofactor-matrix of a matrix in $\mathcal{O}(n^5)$. The algorithm just step-by-step iterates over the whole matrix ($\mathcal{O}(n^2)$) and for every $(i,j)$ in the matrix, it then calculates the determinant of the "sub-matrix" (leaving off row $i$ and column $j$) by...
I already know the Big O for partial pivoting is $O(n^3)$ and remain the same for complete pivoting. I also know the big theta complexity for partial pivoting is $2/3 n^3$ I would like to know the complexity of complete pivoting in big theta
As the title said, I want to solve a coordinate transformed heat equation using fourier spectral method. In particular, I am interested in transforming an uniform grid into an adaptive non-uniform grid. Without the transformation, the heat equation on an uniform grid $ \xi $ is $$U_t = U_{\xi\xi}$$ We can solve it num...
In my simulations I am using dense matrix-vector multiplications and 2D-fft transformations quite often, for matrix sizes of 8kx8k and up. Hence, I assume that using a GPU is beneficial for speeding up my code. The problem is, though, that my development PC does not have an external GPU, and does not support the additi...
Does the velocity Verlet handle variable time steps? I found controversial statements about it. In the paper Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method", BIT Numerical Mathematics, Vol. 33, 1993, p. 172–175. the author proves that the Verlet methods, including the leapfrog (velocit...
I am trying to write a multigrid solver for Poisson's equation, $-\Delta u=f$, on the unit square, $\Omega=(0,1)^2$ with periodic boundaries. My primary source has been Multigrid by Trottenberg, Oosterlee and Schuller, 2001. Based on their discussion I'm using the standard 2nd order central difference for the derivativ...
Are there any well-known optimization libraries (ideally with Python bindings or even in Python) supporting (unconstrained) minimization (of $f:\mathbb{R}^n \to \mathbb{R}$ for $n$ for $n\sim 10^1,10^2$) with support for arbitrary precision input/output? I have a (mathematical physics) problem where I genuinely want to...
I would like to perform a matrix multiplication like: $C=A*B*A'$ using cusparse library function cusparseDcsrgemm2. To do this I split it into two matrix-matrix multiplications where all matrices are stored in CSR format with zero based index which is specified in the cusparse matrix description. However the first m...
I am trying to solve a system of differential equations using finite difference method. There are few terms of the form $\frac{A(r)}{r}$, both $A(r)$ and r go to zero at the boundary. Analytically this term is well defined but numerically these terms are leading to error which very quickly break the simulation. I am u...
I want to apply the weighted least squares method in order to identify parameters of a dynamic process. The process is described by a second order differential equation of the form: $$ \ddot{y}+a_1\dot{y}+a_2y=b_0u $$ where $\ y,u $ are the output and input of the process respectively and are measured as well. The unk...
Let $\vec{a} \in \mathbb{R}^\alpha$, and let $H$ be a rank 3 tensor with dimensions $M_{[i \in \mathbb{N}]} \times N_{[j \in \mathbb{N}]} \times \alpha_{[k \in \mathbb{N}]}$ (where the subscript are the indexing of each one of the dimensions). We can analogously look at the tensor $H$ as a matrix $H'$ which each elemen...
I at the moment try to fully understand the Bareiss algorithm for calculating determinants. One question that came to my mind is the following: Why is LU-decomposition much more often used than the Bareiss algorithm? I mean, they both have a complexity of $\mathcal{O}{(n^3)}$, so what's the problem with Bareiss?
I have the following expression to be numerically integrated in a vector-based library (e.g. numpy, MATLAB, etc), $$ F(r_2) = \frac{1}{r_2^n} \int_0^{r_2} r_1^n f(r_1)\ \mathrm{d}r_1, $$ where $n$ is an integer that can have value up to $40$ and $r_1$ and $r_2$ can have values of many orders of magnitude (e.g. $r_2 \in...
I am numerically solving the Schrodinger Equation in 1D first and in higher dimension later, but I want to know the convergence rate of my numerical solver in different grid size and numerical methods. To calculate the error (or convergence rate), I will need an analytical solution to compare with, but I don't seem to...
From the given point cloud (Fig. 1), I use Scipy-TDA to extract persistence diagram (Fig. 2). What I'm interested in is to extract 3 circles. For example, I'd like to know 3 center points and labels for each point. I'm quite newbie to topological data analysis. Anyone to help me or guide the process? Edit: To show a ...
How to solve for $f(A)x=b$? For GMRES, an answer is given in this book chapter: http://link.springer.com/chapter/10.1007%2F978-3-642-58333-9_2. Ungated version: https://www.researchgate.net/profile/Henk_Van_der_Vorst/publication/226001699_Linear_Systems_Eigenvalues_and_Projection/links/02e7e5301220731a71000000/Linear-S...
In different books and on Wikipedia, you can see mentions of Cholesky decomposition and only sometimes of LDL decomposition. As far as I understand, LDL decomposition can be applied to a broader range of matrices (we don't need a matrix to be positive-definite). I am specially looking to solve hundreds of thousands la...
I am new here and this is my very first question: I hope I respect all the criteria and rules. I am just getting started with partitioned approaches for solving FSI problems. I am interested in a Chorin-Temam projection scheme for the fluid, with semi implicit coupling. This is the paper I am referring to: https://arxi...
I encountered the split operator method to solve the time dependent Schrödinger equation during a lecture. I understand the method on a theoretical basis (I think at least), but I'm struggling to understand one specific aspect of the implementation. Take a look at the following Pseudo-code (taken from arxiv:1306.3247,...
I am slightly confused regarding the meaning of the $i-th$ gradient-jump term $[\nabla \phi_i]$ in the context of finite element methods, used in the assembly of the stiffness matrix (an example with deal.ii). On face $F$ with unit normal $\nu$, the jump term is defined as $$ [\nabla \phi ] = \nu \cdot (\nabla\phi^+-\n...
This is related to a question I answered on Stack Overflow regarding calculating the square root of a number. I was thinking about it and realized that the formula is just the first in a family of algorithms to calculate the $p$th root of a number (ie solve $y=x^p$ for $x$). $$ x_n = \left( \frac{p}{2} \right) \frac{\d...
I am trying to calculate and visualize the electric field inside and outside of a parallel plate capacitor by assuming a uniform distribution of point charges on each plate and by adding up the Coulomb-fields directly (I want this approach for educational purposes) with the following Python program. Mathematically spe...
I found after some research that the most numerically stable way to solve the least squares problem is through QR factorization. For $n$ number of observations and $p$ number of parameters it takes the following form: $$Q_{n,p}R_{p,p} = X_{n, p} $$ Where $R$ is a square upper-triangular and $Q$ is orthogonal. And the ...
I have a set of points in 2D obtained from a pendular movement with some noise. I want to determine where is equilibrium point ($x_0$, $y_0$) from which the rope is fixed. There are at least two approaches to solve this using linear regression. I'm not sure which one to choose and why the first method gave me no accept...
I am trying to understand the notion of reduction of a problem to another problem. As it is known this has huge impact on classifying the complexity of a problem. The definition of reduction involves the notion of instances. From wiki we read that a computational problem can be viewed as an infinite collection of insta...
I am looking for a detailed reference on the implementation of the Morley element for FEM, specifically for the biharmonic equation. By detailed, I mean that it should discuss the problems associated with transforming the reference element, as well as handling different boundary conditions.
I have written a SOR algorithm to solve the Laplace equation on a 2d grid. The outside of the grid is fixed at 0 and the central square is fixed at 10. I can obtain the fully converged solution for some values of the relaxation parameter $\beta$ but not others. In the other cases the convergence condition is never m...
I need to compute the equivalent thermal resistance and thermal capacitance of a structure used for heat transfer. For illustration purpose let’s say it’s the 2D problem of the following figure. In the top surface (nodes 1 to 4) I have a constant heat generation boundary condition (BC) and in the bottom surface (nodes ...
I want to integrate programming into my learning in math and science in a very specific way. I want to create visualizations and simulations of concepts I am learning. When I learn a numerical method of graphing differential equations I want write a program that can do it for me, when I learn about tunnelling in QM I w...