instruction stringlengths 43 28.1k |
|---|
I am new to computational science and I am trying to wrap my head around how MMS works. I am solving the time independent Helmholtz equation as a simple test of the technique
so my starting equation is following with homogeneous boundary conditions on a line segment
$\Delta u +k^2u = F $
So I am supposed to take someth... |
Following the representation used in [1, pag. 11] the solution of the Dirac equation in polar coordinates for energy $E$ is of the type:
$$ \psi_{E\kappa m}(\bf{r})= \dfrac{1}{r} \Bigg( \begin{matrix}
P_{E\kappa} (r) \chi_{\kappa}^m(\theta,\phi)\\
iQ_{E\kappa} (r) \chi_{-\kappa}^m(\theta,\phi)\\
\end{matrix}\Bigg)\ ,$... |
Please note that I have nearly zero background on numerical methods.
I understand the shift invert method as described in SciPy Tutorial
The main argument of the above link is as follows. Suppose we want to solve a generalized eigenvalue problem $A\mathbf x = \lambda M \mathbf x$. Then, the shift invert method transfor... |
I am trying to find the possible modes of a 2d rectangular waveguide by solving the equation,
$$\Big(\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \gamma^2 \Big)\psi = 0$$
where $\psi$ would be $H_z$ or $E_z$ depending upon whether the mode to be solved for is TE or TM.
My approach has been to use... |
In the Numerical Recipes in section 5.7.- Numerical derivatives it's introduced de roundoff error of:
$$
f^{\prime}(x) \approx \frac{f(x+h)-f(x)}{h}
$$
as (with $h$ an "exact" number):
$$
\tag{1}
e_{r} \sim \epsilon_{f} \mid f(x) / h|
$$
With the fractional accuracy comparable to the machine accuracy $\epsilon_{f} \app... |
In the Numerical Recipes in section 5.7.- Numerical derivatives the choice of the step size $h$ in the numerical derivative should lead to a difference between $x$ and $x+h$ representable by an exact number. In C, the program steps are:
temp = x + h
h = temp - x
Question: What is the meaning of these steps?
Question:... |
For a project I am doing, I have to solve the following system of differential equations numerically using my own code:
$$
x^2K'' = KH^2 + K(K^2-1)
$$
and,
$$
x^2H'' = 2K^2H + \alpha H(H^2-x^2)
$$
Here, $K$ and $H$ are the dependent variables, and $\alpha$ is a parameter which I have to vary from 0 to infinity.
An anal... |
I have this Mathematica problem that solves numerically the time-dependent Schrödinger equation in a box:
sig = 1;
bsize = 655;
s = NDSolve[{D[u[t, x], t] == I/2*D[u[t, x], x, x],
u[0, x] == (1/(2*Pi*sig^2))^(1/4)*Exp[-x^2/(2*sig)^2],
u[t, -bsize] == u[t, bsize]},
u, {t, 0, 10}, {x, -bsize, bsize}];
wx[... |
I am trying to solve a PDE of the form
$$\frac{\partial u}{\partial t} = D \frac{\partial^2u}{\partial x^2} + k\ \ \ (1)$$
where only $k$'s first derivative with respect to $x$ is known
$$\frac{\partial k}{\partial x}=-5u\ \ \ \ (2)$$
The boundary conditions are:
$$\frac{\partial u}{\partial x}\left(t,x=0\right)=0\ \ \... |
Consider the Poisson's equation in 1D with homogeneous b.c.'s $\mathrm{d} \phi/\mathrm{d} x=0$ with the seven point Laplacian (1 -54 783 -1460 783 -54 1 / 576 on a uniform grid). The resulting system is underdetermined because the solution is known only up to an additive constant. It only exists if the compatibility co... |
I'm working with large scale constrained optimization problem. Some of my constraints can be non linear. Currently i'm using IPOPT. Quality is good by my Hessian computation too slow. It seems that i can implement hessian-vector problem much more effective. Unfortunately i cannot find how to use matrix free solver with... |
Pseudorandom numbers are used massively in Monte Carlo methods, e.g. in physics simulations. The fastest random number generators, such as the xoroshiro or xorshiro families by Vigna (see eg here) are extremely fast, taking approximately three CPU cycles for generating a 64-bit random integer. Using parallel instances ... |
I am currently using the HLLC solver to solve a 1-D system of Euler equations with very satisfactory results.
However, there are cases where my solution produces low-density, high velocity states, which lead to strange heating at the origin. The heating is strange, as I am running with a $\gamma_{adiabatic}$ close to 1... |
consider the Purely hyperbolic model problem
$$u_t+au_x=0$$
$$u(-1,t)=u(1,t) \text{ (periodic boundary)}$$
$$u(x,0)=f(x)$$
with $f(y)=\sin(2\pi y)$. Furthermore the exact solution is given by $u(x,t)=f(x-at)$. I have implemented Forward–time backward–space (see page 1: http://www.etakl.net/notes_etc/numerical/schemes.p... |
In many resources/videos I see comments being made along the lines of "and we can see here that we have a logarithm/exponential so this will be an expensive computation to make." (such as with the sigmoid activation function for a NN). What is behind these statements?
A more specific example would be: what makes $e^{-x... |
I have a first-order ODE
$$
\dot{x} = a(t) \times x, \quad x(0) \in\mathbb{R}^3.
$$
with $\|a(t)\| = 1 \;\forall t$.
Consequently, $\|x(t)\|=\|x(0)\|$ for all $t>0$. I would like this to be reflected in the numerical solution of the ODE, so for time-stepping I'm looking at geometric integrators like Crank-Nicolson.
Wha... |
Spectral methods for pulse propagation usually require at least one FFT and one iFFT for each step. In my case I have a two-dimensional radially symmetric electric field (one dimension in space, one in time) describing a strongly focused light pulse (i.e. NA > 0.5) while being relatively long in time (> 1 ps).
Due to t... |
I've to perform a multi-fluid internal flow simulation with a code which intrinsically assumes periodicity on a given direction (say z) on a cartesian grid. Nonetheless, the problem I'm trying to solve does not involve this kind of condition, in fact the fluids are running out from the computed domain through the two z... |
I am building a program to numerically solve the euler fluid equations based on finite volume discretization and am having trouble on a step where the eigenvalues of a cell need to be calculated according to the picture below. The eigenvalues for each cell are calculated by dotting the velocity vector with the normal o... |
The $\rho u^2 + p$ term corresponds to the flux of $x$-momentum through some surface. According to this equation it would give a positive momentum flux if $u$ was positive or negative. This does not make sense to me as if the velocity was reversed the momentum flux should be negative. Why is this term positive?
|
Lately, I've been trying to solve numerically the 1D Kuramoto-Sivashinsky Equation using spectral methods.
Let $\nu$ be the viscosity and $[0,L]$ the domain. The 1D equation is,
$$
u_t + uu_x + u_{xx} + \nu u_{xxxx} = 0 \iff u_t = - uu_x - (u_{xx} + \nu u_{xxxx})
$$
Introducing the linear operator
$$
\mathcal{L}u = - ... |
I understand that you must reflect the velocity of the cell across the wall and store that reflected velocity in the ghost cell (which will then be used for flux/residual calculations), but that is the extent of my understanding. I have tried implementing this in my euler flow solver but I am still seeming to get issue... |
Consider this non linear PDE:
$$u_t + c(u^2)_x =\alpha u_{xx} \text{ , } -1<x<1 , t>0 $$
with
$$u(-1,t) = g_L(t) \text{ , } u(1,t) = g_R(t) \text{ and } u(x,0)=f(x)
$$
where the 3 functions(gl,gr,f) are known. What is a (explicit) numerical scheme to solve this problem numerically? c and $\alpha$ are known constant.
L... |
I am trying to figure out the questions from Multigrid Tutorial by Briggs. However I am stuck on these two questions.
https://www.researchgate.net/publication/220690328_A_Multigrid_Tutorial_2nd_Edition
(a) Show that the eigenvalue problem for the Gauss-Seidel iteration matrix, $R_{G} \mathbf{w}=\lambda \mathbf{w}$, may... |
Suppose we want to minimize some convex functional $J(u)$ where $u$ lives in some Banach space $V$.
The classical Newton method
$$\mathrm d^2J(u_n)(u_{n + 1} - u_n) = -\mathrm dJ(u_n)$$
can be viewed as an explicit Euler discretization of the dynamical system
$$\tau\;\mathrm d^2J(u)\frac{\mathrm du}{\mathrm dt} = -\mat... |
I am reading section 9.3 in Leveque about stability. The explanations are very short and brief so I am asking for some help to understand and elaborations. The result of the section is that for FTCS method stability occures when
$$dt/dx^2=k/h^2\leq1/2$$
Can someone please provide a more thorough explaination for his "p... |
In my humble understanding MD simulations of systems with short-range(like LJ interactions) and long-range(electrostatic) has a computational complexity $O(N . log(N))$. What will be the computational complexity of a MC(monte-carlo) for the same system? Also what will be the complexities for both cases if electrostatic... |
While studying mesh quality metrics in literature and software documentation, I've seen discussions about mesh orthogonality in Finite Volume Method (FVM) contexts, but not for Finite Element Method (FEM). For FEM, the metrics generally discussed and evaluated are skewness, smoothness and aspect ratio, for example.
Thi... |
I have a complex analytic function of which I want to take the numerical derivative.
\begin{align}
f(z) &\equiv f(x,y) = u(x,y) + i v(x,y) \\
\frac{d f(z)}{d z} & = \lim_{h \to 0} \frac{f(z + h) - f(h)}{h} = \frac{\partial u(x,y)}{\partial x} + i\frac{\partial v(x,y)}{\partial x}
\end{align}
Now, I can do the partial d... |
For the simplest atom, its wave function is described by the PDE of Schrodinger equation:
$$
-i h \frac{\partial u}{\partial t }=\frac{h^{2}}{2m} \Delta u + \frac{e^{2}}{r}u$$
The potential $\frac{e^{2}}{r}$ is a function of radial distance $r$.
So, as a simple warm-up problem,let’s take the free Schrodinger equation w... |
there is one thing I don’t understand. Is the tolerance to compute the step size updated at each timestep or fixed at all timestep. Also, when we look at the documentation and how the tolerance is computed (see picture) then we compute abs(y). Is y in this case the y value at the current timestep or the whole solution... |
\begin{equation}
\begin{aligned}
\frac{\partial N}{\partial t} &+ \frac{\partial J}{\partial r} = 0, \\
\frac{\partial N}{\partial t} &+ \frac{\partial }{\partial r}(N \upsilon )= 0,
\end{aligned}
\end{equation}
where $v$ is varying across the $r$ axis.
For solving this equation, do I need the ... |
I think the answer is probably no in the linear algebra community, but I'd say anything above $10^8$ and you're starting to lose too much precision, making the situation problematic. In some statistics settings, where they use OLS, I've seen it stated that even values over $20$ are problematic, but that seems pretty ex... |
I have a two dimensional multi modal spatial signal generated from a MATLAB code using sinusoidal functions of different wave numbers, amplitudes and phases. What I want to know is that if I have the amplitude vs wave number plot of that signal, how can I extract the wavelength of the different spatial structures. For ... |
I am building a neural network to approximate a data set which takes 3 inputs and gives 1 output. After testing the network using a few different iterations of hidden layers and adjusting optimizers and activation functions, there seems to be no significant improvement to the solution. This suggests to me there is some... |
In the standard literature topics like numerical differentiation and numerical integration are usually discussed in detail. However, numerical integration is not the same as calculating the (true) antiderivative numerically.
What is the reason nobody is discussing this topic? Is there simply no application for this?
No... |
Say I have a set of $n \times n$ matrices $A_1, ..., A_m$ as numpy arrays. I'd like to create the block matrix defined below.
I'm looking for a clean, elegant, and easy-to-interpret way of doing this in numpy. I tried this with np.block:
a1, a2 = np.full((2, 2), 1), np.full((2, 2), 2)
out = np.block([[a1, (a1+a2)/2],
... |
I have this simple question but I am trying to figure out why:
Are matrices stored column-wise in MATLAB? If so then why?
I theorize that they are stored column-wise because the memory does not have a rectangular structure but rather stores data as bits. I can't find any details on MATLAB's forum regarding this matte... |
I am following this example from documentation of scikit-fuzzy library, but cannot figure out the math behind fuzzy rules there.
Here is a short version of the example.
Food quality was 6.5 (medium)
Service was 9.8 (great)
Food quality and service can have range [0, 10]
Tip amount can have a range of [0, 25]
Rules:
I... |
The question I need to solve is to maximize the satisfied constraints in linear programming.
To be more specific, Suppose I have an infeasible LP problem, my goal now, is to find the maximum number of the constraints which I can satisfy.
Put in a formulation way:
$$
\max \sum_{i=1}^K x_i,\\ \text{s.t.}\
\mathrm{diag... |
So I'm simulating a 1-dimensional random walk, with 1000 walks that each take 1000 steps.
How do I calculate the average number of times that a walker returns to the origin and then the standard deviation of the number of times that a walker returns to the origin?
I feel like I'm not understanding the logic of how to m... |
Correct me if I'm wrong, but when least squares is used in the computational science community, it's typically not in the context of regression. It could be used to solve for gradients in discretized PDEs and for other things. In these kind contexts, is there any relevance to consider considering statistical aspects su... |
I want to create a mesh for a 3D surface with coordinates defined by a parametric function. Is it possible to define this mesh using Gmsh? If it is not possible, what free software do you recommend me?
|
The FTCS method comes from the discretization of a diffusion PDE like this:
$$
a^{2} \frac{u_{i+1}^{k}-2 u_{i}^{k}+u_{i-1}^{k}}{\Delta x^{2}}=\frac{u_{i}^{k+1}-u_{i}^{k}}{\Delta t}
$$
If I have the FTCS method in the Finite difference method:
$$
u_{i}^{k+1}=r\left(u_{i+1}^{k}+u_{i-1}^{k}\right)+(1-2 r) u_{i}^{k} \qquad... |
I recently started to learn OpenMP. Albeit I have developed some intuition I still have some doubts on how to proceed under certain circumstances that are very useful for computational physicists.
My question:
In molecular simulation is typical to find central forces, $F=F(r)$ where $r = |\vec{r}_i -\vec{r}_j|$ for par... |
I am looking for recommendations on matured C++ solver for Linear Sparse Algebra problems.
The goal is to select between more or less GPU hardware agnostic libraries/frameworks that can be compiled on both Linux and Windows with quite high control on host-device memory.
My current research narrows down to the following... |
I am studying an implementation of a 3rd semi-implicit Runge Kutta method (siRK3) from the book by Villadsen & Michelsen (1978), Solution of differential equation models by polynomial approximation, Prentice-Hall.
The code expects an analytically evaluated Jacobian matrix $J = \partial F / \partial y$. In the calculati... |
Let $\Omega \subset \mathbb{R}$ in a bounded polygon domain and $f:\Omega \to \mathbb{R}$ known function.We split the boundary into two parts $\partial \Omega_{1}$ and $\partial \Omega_{2}$ such that $\partial \Omega =\partial \Omega_{1} \cup \partial \Omega_{2}.$
The elliptic problem of Dirichlet & Neumann conditions... |
I am working on implementation of AMR for my finite volume code. Let me use a 2-D mesh to describe my question.
Starting with SINGLE initial cell (let the mesh refine level k = 0) as a root of a quad-tree, and keeping splitting the cell into 4, 16, 64... sub-cells for k = 1, 2, 3...during refinement is simple and works... |
I came across this post at Cleve's Corner, where he shows that complex step differentiation is more accurate than central differences. The error in both methods is $O(h^2)$. So why exactly does complex step differentiation yield much better results? Is is because the constants hidden in $O(h^2)$ are much better for com... |
I have difficulty understanding how to generate a Gaussian random field from Karhunen--Loeve expansion.
Precisely, I need to generate a zero-mean field with covariance function $C(x, y)$. We find eigendecomposition of $C(x, y)$ from the equation:
$$
\int_0^1 C(x, y)\, e(y)\, \mathrm dy = \lambda \,e(x)
$$
I discretize ... |
I'm reading Convex Optimization by Boyd and Vandenberghe. This is how they describe Slater's condition:
What I don't understand is why it is necessary to enforce that $x$ be in the relative interior of $\mathcal{D}$, where
$$
\mathcal{D} := \bigcap_{i = 1}^m \text{dom}(f_i),
$$
i.e., it is the intersection of the doma... |
In terms of time-step, numerical error in molecular dynamics scales with square, i.e. $error \approx dt^2$. But how it look for numerical precision ? E.g. how much bigger will be numerical error when I use half precision, instead single and single instead double ?
|
I know that the definition of the Lipschitz continuity is defines as $$||f(y) - f(x)|| \leq L ||y-x||$$
My professor told me that by knowing $f$ we can find constant $L$ using the power iteration method, which essentially computes the maximum eigenvalues. Yet I don't see how definition above is related to searching fo... |
I am trying to compute the natural frequency of a cantilevered beam.
The Euler-Bernoulli equation reduces to the following problem :
$$
v''''=\lambda v, \text{with }, v(0)=0, v'(0)=0, v'''(1)=0,v''(1)=0
$$
where superscript $'$ correspond to derivation.
These are the steps to obtain a solution:
reduce the problem to... |
Note: I previously posted this question to MathStackExchange, but got no attention there. So I'm rewritting and trying over here.
Problem summary
Given a common¹ set of shape functions defined at master element space $\{\psi_j(\xi,\eta)\}$ and associated to each corner $j$ of that element;
We can compute the affine tra... |
I want to solve the first-order differential equation
$$ \begin{align}
\frac{d\alpha}{d\phi} = \frac{\phi \sigma^2 \sin(2d\alpha)+2d\sinh(\sigma^2\alpha \phi)}{-\alpha \sigma^2 \sin(2d\alpha) +2d\cos(2d\alpha)+2d\cosh(\sigma^2\alpha \phi)} \;,
\end{align}$$
where $d$ and $\sigma$ are fixed. I can't obtain a soluti... |
Every now and then there are questions asked in this site related to the shooting method for boundary value problems (see 1, 2, 3). Nevertheless, in some of the cases that I have seen here, the problem is better solved turning the boundary value problem into an algebraic system directly using a discretization method su... |
EDIT: Added another, more suitable, example below.
Disclaimer: With edge map I mean an image given as bitmap just consisting of black and white pixels.
Short description:
Briefly, I'm searching for fast, practical algorithms (or, even better, working implementations) to extract the parameters of (complete, possibly ro... |
I'm specifying the 'JPattern', sparsity_pattern in the ode options to speed up the compute time of my actual system. I am sharing a sample code below to show how I set up the system using a toy example. Specifying the JPattern helped me in reducing the compute time from 2 hours to 7 min for my real system. I'd like t... |
My problem lies in constraining state variables (look for 23,24,25). I am currently using ODE45 to solve equations and fmincon to find best control variable.How would you go about solving this? Here is my code so far:
function ster_6
optionsopt = optimset('Display','iter-detailed','Algorithm','sqp', 'TolFun', 10^(-... |
I keep coming across phrases like "highly optimized BLAS kernels" with "architecture-specific optimizations", but have never been able to find what exactly these optimizations are, and how one could go about writing their own architecture-specific optimizations.
What is a good way of getting to know different BLAS impl... |
I set out to solve the time harmonic Maxwell equation numerically which was discritzed using FEM and with the use of Nedelec elements as basis and test functions. The equation reads:
$$ \nabla \times \nabla \times E \, \, - k^2_0E=0 \quad \in \Omega $$
subject to the boundary conditions $$ n \times E =0 \quad \in \Gamm... |
SCHRODINGER’S EQUATION
$$-ih u_{t}(x,y,z,t) = \frac{h^2}{2m} u_{xx}(x,y,z,t)+ \frac{e^2}{r}u(x,y,z,t)$$
The potential $\frac{e^2}{r}$ is a variable coefficient.
So, let’s take the free Schrodinger equation $$-i u_{t}(x,y,z,t) = \frac{1}{2} u_{xx}(x,y,z,t)$$
in three dimensions, where we’ve set $h = m = 1$ and dropped t... |
I've recently posted this question.
To summarise, I'm dealing with supposedly Symmetric Positive Definite(SPD) matrices, but due to machine-precision they end up not being SPD.
In a comment, a user suggested to use the lower triangular portion of the matrix.
I would like to be sure in what way we can use that? What al... |
The PMMM which stands for parallel matrix-matrix multiplication essentially accelerates the algorithm of the matrix-matrix multiplication of two matrices $A$ and $B$ both of size $n$ so that $C:= AB$. Let us say we have $4$ processors and I wish to know how many words are stored per processor.
To my knowledge, since we... |
I'm trying to learn how to use finite volume methods and I want to solve a more general case of Stokes' second problem i.e. an infinite half-plane oscillating harmonically with no-slip boundary conditions.
I've been following the code from this lecture and changed the boundary conditions to:
u[1:-1, 1] = u[1:-1, 2] ... |
I'm concerned with trying to determine whether the same computational processes on a Turing computable algorithm can be ascertained for a quantum computer in some form of actual 'metric' for how many resources are utilized by the computer?
Is this possible to translate the same complexity to the lowest common denominat... |
I am looking at a paper comparing performance of two pricers: same model (based on Monte Carlo simulation) but one implemented on CPU (C++) and one implemented on GPU (Cuda)
The paper mentions the time taken to execute N paths (let's say 100k paths) in both cases. Additional information:
CPU implementation relies on d... |
Good morning everyone. I am working with Python and Pandas.
I have two DataFrames, of the following type:
df_C = pd.DataFrame(data=[[-3,-1,-1], [5,3,3], [3,3,1], [-1,-1,-3], [-3,-1,-1], [2,3,1], [1,1,1]], columns=['C1','C2','C3'])
C1 C2 C3
0 -3 -1 -1
1 5 3 3
2 3 3 1
3 -1 -1 -3
4 -3 -1 -1
5 ... |
I posted this question in the astronomy stackexchange. There are no responses, and it was suggested that I pose the question here. The "too long, didn't read" was taken from a comment, and my question is copy-pasted below.
TLDR:
You're asking about how some kind of classifier might work that
accepts a group of traject... |
I am trying to get a better understanding of the application of function approximation with machine learning. My question is simple, how does function approximation with ML compare to traditional interpolation methods?
EDIT: I had a misunderstanding with interpolation and approximation. My question would be better sui... |
Are there techniques to form a Pade approximation (or Pade-like approximation), except force the poles of the rational function to be negative?
I am trying to use Pade approximations to extrapolate a curve based on known derivatives of the curve at a point. The Pade approximation usually does much better than a Taylor ... |
This blog post describes an algorithm for constructing the finite element global stiffness matrix as two basic steps:
[Step 1] Initialize a table with the elements shared by a pair of connected node vertices, as shown below:
[Step 2] For each vertex in each element copy the submatrices from the element stiffness matri... |
For a scalar variable $u$, the weak form of the following Laplacian:
$$\nabla^2 u =0 $$
with the assumption that $v$ vanishes at the boundary is
$$\int \nabla v . \nabla u \, d\Omega = 0 $$
which is something you are most probably familiar with, but if $u$ is a vector, I can't seem to get a weak form which is consisten... |
It is well known that you can use the algorithm for finding the equilibrium of a Zero-sum game to solve a linear program. In particular, you can take a LP and reduce it to a zero-sum game, and use the famous algorithm for zero sum games proposed by Grigoriadis and Khachiyan.
Is this equivalence used in practice, or th... |
I am using scipy interpolation to construct a map of two coordinates to two other coordinates --- effectively one set of coordinates are 2D cartesian coordinates (called X and Y), and the other are similar to polar coordinates (radial variable r and angle coordinate t) but with no analytical expressions in term of the ... |
I am trying to solve, using the method of lines in Matlab, the wave equation IVP:
\begin{cases}
\frac{\partial^2 v}{\partial t^2} = \frac{\partial^2 v}{\partial x^2} \\
v(x, 0) = e^{-x^2} & -5\lt x\lt 5 \\
\frac{\partial v}{\partial t}(x, 0) = 0 \\
v(-5, t) = v(5, t)
\end{cases}
I rewrote the w... |
I realize this might be a too general question but here goes nothing:
I am trying different re-ordering strategies and checking the fill-in of $A=LU$.
I have 2D ($p=1$, $h=1/40$ on $\Omega = [-1,1]^2$) discretizations of the Helmholtz equation and I was genuinely surprised to see Reverse Cuthill-McKee (RCM) outperform ... |
For ODEs I have these books:
Griffiths, David, Higham, Desmond J., Numerical Methods for Ordinary Differential Equations, 2010
Alfio Quarteroni, Riccardo Sacco, Fausto Saleri, Numerical Mathematics, 2006
I'm looking for references of similar level on the numerical integrations of PDEs. I saw:
Evans, G., Blackledge... |
I've finally wrapped my head around the advantages and disadvantages of AD/AAD compared to FD and SD, but could someone please explain to me where you'd use AD/AAD in an investment bank/banking generally?
If this question has already been answered, feel free to point me in the right direction.
|
I'm quite new to SDP programming, hence I might not have been able to use the right search terms to find a solution.
I try to reformulate an SDP problem to the original form. However a side constraint gives me some headache.
Given the problem, where $X$ is a blockmatrix, which can be written like: $$X = \begin{bmatrix}... |
I have two 1D grids, each of them is a finite collection of cells, where the cell is defined by the left end and the right end, $[cell]_{i}$=$[x_{i}^{left}$,$x_{i}^{right}$]. I need to find the overlap of these grids, i.e., what cell of grid #1 overlaps with what cell of grid #2, and what is the overlapping area (lengt... |
I need to solve a system of linear first order ODEs with boundary conditions in JAVA. I was wondering if any of you know of a JAVA package with the capability of solving a boundary value problems? (i.e. a solver using finite differences or finite elements)
The type of equation I want to solve is of the following type:
... |
I am solving the Poisson Equation for 2D given by the following expression:
$$-\nabla\cdot (k(x,y) \nabla u)=f$$ in a rectangle with Dirichlet conditions on the boundary using Matlab.
In principle I have made a code to solve the same problem, but in 1D and the code is as follows:
function [U,x]=p1d(n,alpha,beta,a,f)%al... |
In John Gustaffson's book The End of Error, he discusses Ulrich Kulisch's exact dot product, which (in double precision) requires a 2100 bit fixed point register which rounds only once after the computation of the dot product is complete.
I have found only one statement about how this instruction can be used in numeric... |
I have these 3 equations and i want to solve them with numerical methods. so I am using scipy library but I don't know how to solve 3 equations together.
R, g, sigma and density are constants.
\begin{align}
&\frac{d\Phi}{ds} = -\frac{\sin\Phi}{x} + \frac{2}{R} + \frac{\Delta\rho gz}{\sigma}\, ,\\
&\frac{dx}{dx} = \cos\... |
This may not be so much of a scientific computing question but more of a MATLAB question, if that is the case, please feel free to close or migrate the question.
Root-finding problems are commonly encountered in scientific computing in various shapes and forms; but in this case, the goal is to solve a non-linear time-d... |
High dimensional finite difference problems often lead to linear systems of the form
$$
A x = b, \qquad A = B_1 \oplus B_2 \oplus \cdots \oplus B_d,
$$
where $\oplus$ denotes the Kronecker sum. $B_i \in \mathbb{R}^{n \times n}$ are 1D finite difference matrices, often tridiagonal or pentadiagonal. When $d=2$, for exa... |
This is the expression to be derived but I am not getting the exact expression as given in the image. Is the given expression given for the implicit Euler method?
Here $N_c = c (\delta t)/h$ and $\tan(\beta_2) = N_c \sin (kh)$.
|
I have a complex Hermitian matrix of size about $70000\times 70000$. I want about 100 eigenvalues near 0. However, I know that every eigenvalues are two-fold degenerate. I found out that the running time of eigsh is extremely slow (more than 5 times) compared to the situation with no degeneracy.
Also, I found out from ... |
I would like to ask a question on the stability of BDF2 applied to hyperbolic PDEs.
Say I have a hyperbolic equation as $\frac{\partial c}{\partial t} + {\bf U} \cdot {\bf \nabla}c=0$. This system is coupled to the Navier-Stokes equation (the governing equations for $\bf U$) : $\frac{\partial {\bf U}}{\partial t} + {\b... |
I am building a quantum circuit simulator using mpi4py. The simulator takes user inputs to build the initial system and quantum gates the system passes through. I can get the code to work if I do not use user inputs and just hard code in the system and gates. However, I cannot figure out how to get the code to work whe... |
I have the equation
$F(t) = \phi u + \frac{1}{2}\frac{d^2u}{dt^2} + u^3$
and broadly speaking, my task is to calculate the $\phi$ and $u(t)$ such that $F(t) = 0$.
I am testing out a new algorithm to do this (and so there are no in-built ways to implement it). This requires calculating the Jacobian of the function.
I am... |
I'm trying to do a simple implementation to study the advection-diffusion-reaction dynamics in a straight pipe.
I have points positioned along the length of the pipe (blue dots in the image above).
I came across a blog (link) that explains how a point source is implemented. However, I am not really sure how to adapt i... |
I will now explain what I understand to be the process of a finite element mass matrix assembly. I would like a reference which does something similar, or if I am mistaken about the process please let me know.
Let $\Omega$ be a bounded domain and let $\lbrace \Omega^{\left(e\right)}\rbrace_{e=1}^{E}$ be disjoint subset... |
I have installed Optim1.6.1 package. I would like to solve a system of equations in non linear finite element analysis using constraints as u=1 at certain nodes. u=0 at certain nodes. Typically I find kmat and res as below
[kmat,res]=systemmatrices(u,load,boundarycondition,material,constraints)
The optimisation syntax ... |
I am currently learning nodal DG methods, primarily through the book by Warburton, and am a bit confused on how to handle surface integrals using straight edged elements. On page 187 (and on page 214) of Warburton's book, we have
$$
\int_{\partial E_{k}} \mathbf{n} \cdot f_{h} \ell_{i}^{k}(\mathbf{x}) d\mathbf{x}.
$$
... |
I am new to GNU Octave 6.2.0 on Linux, and I am trying to use the package 'parallel' to make use of 24 threads on my machine.
I have an array (array1) that has about 500,000 rows or values (1 column) and for each member of the array I want to apply a log10 function, like this:
test = 10*log10(array1.^2); % this wor... |
I have two vectors $r$ and $m$. Both vectors are $N\times1$.
A function is calculated as -
$F(1:N) = \phi r + (r^3 + rm^2)$
$F(N+1:2N) = \phi m + (m^3+mr^2)$
F1 = (phi*r + r.^3 + r.*m.^2);
F2 = (phi*m + m.^3 + m.*r.^2);
F = [F1;F2];
I am having trouble calculating the Jacboian for this function. Here's what I did -
J... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.