instruction stringlengths 43 28.1k |
|---|
This question is the essence of this one. After we remove all the cruft, we can recast it as follows:
Problem: Given $b \in \mathbb{R}^n$, $C\in \mathbb{R}^{n\times m}$, and $g\in \mathrm{Range}(C^\mathrm{T})\subset \mathbb{R}^m$. Find $x\in \mathbb{R}^n$ so that $\| x-b \|$ is minimized subject to the constraint $C... |
I have a sparse symmetric matrix of dimension 1393x1393 (8308 no zero elements), with bandwidth 1380. By Cuthill–McKee algorithm, I could achieve a new matrix with bandwidth 89. If we call this matrix B, then I'm interested in calculate the inverse I-rho*B, where I is a diagonal matrix and rho is a parameter updated in... |
I have this data plotted on a graph in which all points have the same value on the y-axis, e.g a constant integer "c", while the x-axis is the time in seconds.
So, for a c = 25 on the y-axis, there are points on the graph corresponding to values on the x-axis equals to, let's say, 32, 59, 78, 142, 249, 286, 301, 310, ... |
I want to solve the 2D poisson problem using the interior penalty discontinuous Galerkin methods:
−∇a(x)(∇u)=0 in Ω.
The variational formulation is such that :
$$a_{\epsilon}(u,v)=\sum_{K\in T_h}\int_K a\nabla u\cdot \nabla v-\sum_{e\in \Gamma_h\cup \Gamma_D}\int_e\{a\nabla u\cdot n_e\}[v]+ \sum_{e\in \Gamma_h\cup \Ga... |
The documentation is fairly confusing and I know that I need to keep track of the actual grid location of my data. Writing a python script to convert binary data into this vtk format. I want to leave the legacy VTK behind so that I can utilize the parallelism that XML will give. Any help here is appreciated.
|
I want to solve a diffusion-convection problem numerically. I start from a PDE
of the form $$\partial_t f(x,t) = \partial_x(K(x)\;f(x,t))+\partial_{xx}\;f(x,t)^{m}\;.$$
It is possible to calculate a stationary solution $f_{st}(x)$, which looks something like this
$$
f_{st}(x) = (a \cosh(x-b))^c\;.
$$
Now I try to simpl... |
I am looking for a R package that performs finite element analysis. Is there a fenics or equivalent FEM package for R?
|
I have a random binary matrix $A$
$$
A=\left[\begin{array}{c c c c c}0&0&0&0&1\\0&1&0&1&0\\1&1&1&1&0\\0&1&1&0&0\\1&0&1&1&1 \end{array}\right]
$$
and a permutation of the identity matrix (denoted later as $I_p$) that will filter it. I want to find the best permutation $I_p$ (using row/column swapping) so as to maximi... |
I have an image that looks like this (it might appear low res in a browser because it is 16 MB). This image was taken with a scanning electron microscope, but because the equipment is outdated there is a lot of noise within the image.
What I would like to do is develop a program (in Java) that would take this image as... |
My problem
Maximize
$$\min_{i} \{\ c_i \cdot \prod_{j \in A(i)} {x_{j}} \prod_{j \in B(i)} {y_{j}} \} $$
Subject to
\begin{align}
&\sum_{j \in C(k)} x_{j} = 1,\ \forall k \\
&l \leq x_{j} \leq u,\ \forall j\\
&\sum_{j \in D(k)} y_{j} = 1+p,\ \forall k\\
&y_{j} \in \{1,\ p\},\ \forall j
\end{align}
where $c_i, l, u, p... |
I plan on using a Quasi-Newton method (L-BFGS) to minimize a non-linear objective function.
$$ f: \mathbb{R}^n \rightarrow \mathbb{R}$$
The gradient is kind of interesting: as the values of the first set of parameters approach infinity, the gradient of the objective function with respect to the remaining parameters wil... |
The GMRES method is for solving the linear system $Ax=b$.
Given an initial guess $x_0$ and the corresponding residual $r_0:=b-Ax_0$, we have the Krylov subspace
$$\mathcal{K}_m:=\mathop{span}\{r_0,Ar_0,A^2r_0,\ldots,A^{m-1}r_0\}.$$
The GMRES method tries to find an approximate solution $x_m$ with the correction $d_m:=... |
How can i demonstrate that a LCG has full period? Is there a way to demonstrate it or do I just need to check the parameters(a, c, m)?
|
I have to deal with FEM and the numerical solution of PDEs a lot. While I'm doing ok when just applying or implementing it, I observe a lack of understanding when authors begin to argue with "Ritz", "Galerkin", "Weak Form", "Integration by parts" and so on.
Can anyone recommend me a good book to get some basics in that... |
My knowledge of finite difference is very basic so this could be very trivial. I've seen how multidimensional finite difference works for say fluid equations, but they are also dealing with a single variable. How would one solve a coupled multidimensional equation, for example of the form
$$a \nabla a = \nabla b,$$
in... |
Assumed I have the following coupled PDEs with the variables $A(z,t)$ and $B(z,t)$ and the constants $c_1,\,c_2$:
$$\begin{split}
\partial_tA&=\partial_zA+c_1\left(A+B\right)\\
\partial_tB&=\partial_zB+c_2\left(A+B\right)
\end{split}
$$
Now I have seen this algorithm for solving those equations:
First, calculate the fi... |
I'm using the Levenberg-Marquardt algorithm to fit my data with a Gaussian function:
$$
f(x)=a\cdot e^{-\frac{(x-c)^2}{2\sigma^2}}+f_0
$$
$a$, $c$, $\sigma$ and $f_0$ are the fitting parameters. The algorithm correctly computes $a$, $c$ and $\sigma$. Given that
$$
\frac{\partial f}{\partial f_0} = 1
$$
and a $\delta \v... |
I have a data sample from an accelerometer from my phone (pretty bad accelerometer though). I'm trying to double integrate it in order to obtain the position as a function of time. I'm using a program in Python3 to integrate it, here is the code:
nm = input("Filename: ")
fil1 = open(nm,"r")
i = 0
s = 0.0
fil2 = open("... |
Suppose we have the negative, inhomogeneous advection equation:
$$\left(\frac{\partial}{\partial x}-\frac{1}{c}\frac{\partial}{\partial t}\right)v(t,x)=u(t,x)\qquad(t\in\mathbb{R}_{+},x\in\mathbb{R})$$
I want to solve it numerically, backward in time and forward in space.
Now, I have tried a few schemes without avail. ... |
I'm interested in finding the roots of the following equation:
$\tan(x) = \frac{2x}{x^2-1}$.
It is easily seen that 0 is a root and the roots are symmetric w.r.t. 0.
I wonder if an analytical solution is known or how can I find, say, 1000 roots numerically with increasing magnitudes ? I've tried Matlab built-in funct... |
My question is quite simple, but the more I look at it, the less content I am. My question is how to do a RK4 method for $y'=y$. At first I would assume the following:
$$k_1=y_n$$
$$k_2=y_n+\frac{h}{2}k_1$$
and right here you can actually start to see part of the issue that I have, namely that it seems in the second ... |
It seems that the 5th order is the corrector and the 4th order is the predictor. Can RK5 be considered as part of Predictor–corrector method?
|
Assumed I have the following two coupled equations
$$\begin{split}
\partial_tA&=a_0AB\\
\partial_tB&=b_0AB
\end{split}
$$
but I am not sure how to calculate them. One approach is a crank-nicolson approach:
$$\begin{split}
\left(1-\frac{dt\cdot a_0B_0}{2}\right)A_1&=\left(1+\frac{dt\cdot a_0B_0}{2}\right)A_0\\
\left(1-\... |
Consider 2 particles in a 2D plane. There is a long-range interaction between two particles:
$$f (r_i-r_j)= \frac{\vec{r_i} - \vec{r_j}}{|r_i-r_j|^3}$$
$$\vec{r_i} =(x_i,y_i)$$
$r_i$ determines the position of particle number $i$ in the plane. Knowing position of particles in the 2D plane and also knowing that distance... |
I have attempted to create Poisson-distributed random numbers, seeing that it is not so easy as the simple multiplicative algorithm works accurately only if the mean is less than 500. Using logarithms is slightly slower, but it works at arbitrary mean values. However, it becomes extremely slow if the mean is very large... |
For testing I would like to solve the equation
$$
\partial_tA=\nabla^2_xA,\,A_0=\sin(x)
$$
In order to solve it, I use an implicit solver
$$\left(1-\frac{\nabla^2_x}{2}dt\right)A_{n+1} = \left(1+\frac{\nabla^2_x}{2}dt\right)A_n
$$
or the Runge-Kutta-method in two different orders. For solving the whole equation I use t... |
This question was already asked here and this is a suitable form of the equation for numerically solving.
\begin{align*}
i\frac{\partial}{\partial t}u_{\ell}(r,t) = \Bigg(-\frac{1}{2} \frac{\partial ^2}{\partial r^2} + \frac{\ell(\ell+1)}{2r^2} + V(r)\Bigg)u_{\ell}(r,t)\quad \quad \quad \quad \quad \quad \quad \nonum... |
Let's say I have a random arbitrary geometry, like this one https://ibb.co/dG8fUa (something I just made up). I make one of these in 3D in SolidWorks. I have molecules/particles coming in through the inlet and leaving out of the two outlets. In a standard geometry, like a pipe or square channel, a simple way to impleme... |
Note: Thanks to comments, I realized that I have two problems, each which can be described more clearly on its own. This revised question covers the first.
I would like to solve
$$
-\Delta u - 1=0,\quad u(0,y)= 0,\quad u(1,y)=0
$$
over a rectangle using alternating Schwarz. The following is my mesh, where the small d... |
Hailing from the scicomp community recently getting into computer-graphics, I have noticed that the scicomp communities talk about mesh-based methods like FDM, FVM, FEM, etc, vs meshfree or meshless methods like SPH (though I like to call them virtual particle methods), but I've never heard them talk about Eulerian app... |
I have a set of three coupled autonomous equations:
${y_{1}}\prime = y_{1}(\frac{\Omega_{m}}{y_{1}^3} + \frac{y_{3}^2}{6.0} + \frac{V(y_{2})}{2.H_{0}^2})$
$y_{2}\prime = y_{3}$
$y_{3}\prime = -3\frac{y_{1}\prime}{y_{1}}y_{3} - \frac{1}{H_{0}^2}\frac{\partial v(y2)}{\partial y_{2}}$
And I have used the following code to... |
As per wikipedia, scientists have not been successful to accurately predict the whether which is 2 weeks ahead.
Here is the excerpt:
The atmosphere is a chaotic system, as a result, small changes to one
part of the system can grow to have large effects on the system as a
whole.This makes it difficult to accuratel... |
In a software project that I'm working on, certain computations are vastly easier for dense low-rank matrices. Some problem instances involve dense low-rank matrices, but they're given to me in full, rather than as factors, so I'll have to check the rank and factor the matrix if I want to take advantage of the low-ran... |
In case of global temperatures we are interested in aggregate values rather than local distributions. Is this the reason we can accurately predict one but not the other?
|
Consider a potential/poisson equation on a very large, complicated geometry. Currently, an self-written FEM and linear solvers from NumPy are used. Performance is, of course, not good enough for larger problems.
I'd like to switch to PETSc and use algebraic multigrid preconditioners. Surprisingly, I could not find good... |
Consider a problem where space is filled with a liquid and a solid phase, with a large, complicated geometry. On each of the phases, there's an electrical potential/poisson equation. The equations are coupled by a nonlinear surface current through the phase boundary.
Currently, an FEM is constructed for both phases and... |
I have an equation system, constructed as
$$\begin{split}
\partial_tA&=f_1(A)\cdot f_2(B)\\
\partial_tB&=f_3(B)\cdot\partial_tf_4(A)
\end{split}$$
with $f_1,\,f_2,\,f_4$ and $f_3$ nonlinear functions. One idea I had was to use the forward difference for $\partial_tf_4(A)$, i.e.
$$\partial_tf_{4,(n)}(A)=\frac{f_{4,(n-1... |
I have a rather long expression (https://pastebin.com/jUsxdCCs) that is an analytical solution of a set of differential equations generated symbolically from Maple. I need to solve a set of equations like this in C, in a 32-bit system.
The long expression has a variable omega2, which when substituted leads to a number... |
I'm playing around with dynamic programming and need to calculate a multidimensional integral $E[V(W)]$ where we assume $W$ has a log normal distribution. I was looking at the following example in this pdf, section 9.4.3 on page 83.
To give some background (I summarize from the section): The example is from economics a... |
The question is in the context of iterative numerical solution of large PDE systems with Finite Differences or Finite Elements:
Stating the Poisson equation with Neumann boundary conditions will lead to a singular system because it is invariant when adding a constant function. An often proposed option is to just "pin" ... |
I have following system of coupled Partial differential equations.
How can I solve the system by Maple?
\begin{align} m_1\frac{\partial^2 u_1}{\partial t^2}+A_1\frac{\partial ^4u_1(x,t)}{\partial x^4}+k(u_1-u_2)=F_1(t) \delta(x-x_1), \end{align}
\begin{align} m_2\frac{\partial^2 u_2}{\partial t^2}-A_2\frac{\parti... |
I need an efficient way to numerically find the first $n$ positive roots $\lambda_n$ of the transcendental equation
$$ \dfrac{J_0 (\lambda_n r) Y_1 (\lambda_n) - J_1 (\lambda_n) Y_0 (\lambda_n r)}{J_0 (\lambda_n r) Y_0 (\lambda_n) - J_0 (\lambda_n) Y_0 (\lambda_n r)} = \dfrac{\delta}{\lambda_n}$$
where $\delta$ is a co... |
The issue I have is having to compute the derivative (in real time) of the solution produced by ode45 within the events function.
Some pseudo-code to explain what I'm mean is,
function dx = myfunc(t,x,xevent)
persistent xevent
% xevent is the solution at the event
dx(1) = x(2);
dx(2) = complicated function of x(1),x(2)... |
I read the way of storing the five or seven point laplace matrix for some poisson problem but I don't understand how can i multiply, add and subtract this stored sparse matrix by a vector or another matrix?
The way says that we just store the diagonal entries which are the coefficients of the i,j,k unknown in adiag m... |
For an unconfined aquifer we have this PDE for the water table position( of course after somehow making the original Boussinesq equation linearized ):
$$ \frac{\partial^2(h^2)}{\partial x^2} + \frac{\partial^2(h^2)}{\partial y^2} = \frac{2s}{k} \frac{\partial h}{\partial t} - \frac{2N}{k}$$
where $N$, $k$ and $s$ are c... |
I have a small 2D system I'm trying to model using a non-linear extension of Darcy's law for fluid flow in porous media. I'm primarily interested in the local flow velocity, not necessarily the pressure, that's later used in the real model I'm working on:
The original equation known as Darcy's Law used in ground water ... |
I have some Python code containing a couple of for loops, which I would like to optimize by using low-level functions. My first approach is to use numpy.einsum(), but the results don't match the for-loop implementation:
## first term
T11 = 0.125 * numpy.einsum('abcd,efab,cdef,abcd,efcd',
g[:Nelec,:Nelec,Nelec:,Nele... |
$r$: cicle C1's radius
$w$,$h$: rectangle R1's edges: $x=w$, $y=h$, $x=0$, $y=0$
$(w>2r, h>2r)$
$S(x,y)$: area of intersection of C1 and R1 when center of C1 is at $(x, y)$
$X$: follows uniform distributed in $[0,w]$
$Y$: follows uniform distributed in $[0,h]$
$X$ and $Y$ is independent.
I want to know:
What is $E(S(X... |
Originally sieve of Eratosthenes requires a lot of memory. This algorithm is my attempt to limit the memory usage. In fact it requires ln(N) memory (for each found prime number we keep last crossed number).
Amount of operation (sum and compare) is still limited by sequence N/2 + N/3 + N/5 + N/7 .... + N/Pk = O(N log l... |
Consider the unit circle $x^2 + y^2 = 1$, it also represents the solution to the ODE
$$
x + y \frac{dy}{dx} = 0; y(0) = 1
$$
Suppose we don't know how to solve the above equation analytically (there are more complex cases where analytical solution is impossible), a finite difference discretization gives:
$$
y^{n+1} = y... |
My background is mainly engineering and applied research and I have been a developer or some CFD software, but mostly at high level without worrying about linear solvers and the like. This has been changing lately, has we have been wishing to integrate PETSc without our own software instead of using our own in-house s... |
I am curious if it is possible to request less than a node using SLURM.
For example, if I use the commands,
#!/bin/bash
#SBATCH --job-name="name"
#SBATCH --output="name.%j.%N.out"
#SBATCH --ntasks 1
#SBATCH --time=00:30:00
will SLURM automatically reserve an entire node for me, or will it try to fit me in on just one ... |
I'm using automatic differentiation on a function that contains a sparse nonsymmetric linear system to be solved. I was using BiCGStab to solve this part of the function, but noticed the derivatives produced by the automatic differentiation that were carried through BiCGStab were diverging in some cases. Is there an it... |
I am reading "Using MPI (3rd edition)" from William Gropp, where in chapter 4 application section 4.13, it introduces an MPI application Nek5000/NekCEM which is based on spectral element method (SEM) coupled with high-order timestepping to solve the governing IVM/BVM problems.
There is one statement about SEM that I d... |
This question is quite open, and the actual problem comes from something you would probably consider an everyday niche (something you'd probably take for granted without really thinking about it). However:
I may not disclose the actual application's nature, but I found that pizza bakeries and pizza consumers make for a... |
I am implementing a finite element solver (in 2D) to solve the generic differential equation :
$$-\nabla(a(x) \nabla u) = f$$
Brief explanation
By integrating and multipling by a test function, the weak form allows to integrate the stiffness matrix :
$$ A_{ij} = \int a(x) \nabla \phi_i(x) \nabla \phi_j(x)\, dx\quad i=1... |
What would currently be the best way to share a matrix with the math community?
(I'm aware of Matrix Market but it seems the last update was in 2007...)
|
This question may be more suited for physics.stackexchange, but I saw this post was recommended for StackOverflow or Computational Science, so I'm asking my question here.
I am trying to write a program in Matlab to evaluate an expression with fermionic annihilation and creation operators. Define
$$\{f, g \} \equiv fg ... |
I'm an undergrad who's studying electronics and fields like data sciences and mostly computing seem most interesting to me but have in-depth knowledge in neither. I learnt basic python last winter vacations and have built on it since then. I'm not too sure how further I should keep doing this and hence wanted to know h... |
Helmholtz Diffusion equation with reaction term:
$$
k\Delta u + u = f ~ \text{in} ~\Omega
$$
$$
\nabla u \cdot \mathbf{n} = 0 ~ \text{in} ~\partial \Omega
$$
For sufficiently small $k$ (relative to the mesh), there can be oscillations (with Lagrange elements) that return a negative $u$ in some regions, specially when $... |
I need to integrate the following function on the line segment from
$P_{1} = \begin{bmatrix}
-2\\-1
\end{bmatrix}$ to
$P_{2} = \begin{bmatrix}
1\\2
\end{bmatrix}$:
$$\int_{P_{1}}^{P_{2}} 4x + y \ ds$$
This question take part into the implementation of a 2D finite element solver.
How I plan to do it
Suppose that the f... |
I am doing an exercise using MPI to count frequencies of words distributed in several different files following similar steps in this instruction.
But I met a problem with step 2. In my implementation, I first sent out locally counted word-count pairs into corresponding processors according to the words' hashcode. At ... |
I am using Tchebyshev discretization to solve a system of PDEs.
Usually, I map the Tchebyshev space($\xi$, from -1 to 1) to physical space ($x$, from 0 to L) using $$x = (\xi +1)*L/2$$
Now, I also want my grids to be clustered around some point($x_c$) in the domain. Is there any standard mapping that can achieve this?... |
I'm attempting to use scipy's spilu routine as a preconditioner and I'm finding bad performance for my application (solving a global linear system arising from a DG discretization of an time-dependent ADR PDE).
Before I write tests to tune the options and compute the effect of the preconditioner on the eigenvalues of ... |
The finite difference matrix for the first derivative is
$\begin{bmatrix} -1 & 1 & 0 \\ 0 & -1 & 1 \\ 0 & 0 & -1 \end{bmatrix}$.
The finite difference matrix for the second derivative is
$\begin{bmatrix} -2 & 1 & 0 \\ 1 & -2 & 1 \\ 0 & 1 & -2 \end{bmatrix}$.
$\begin{bmatrix} -1 & 1 & 0 \\ 0 & -1 & 1 \\ 0 & 0 & -1 \end{... |
I'm trying to solve the following equation
$$u_t = u_{xx} + u(1-u^2), u_x(\pm 1) = 0,$$
using the Fourier cosine transform. The nonlinear term gives a convolution which I would rather avoid, which is why I wanted to try a pseudo-spectral method.
In MATLAB I have the following script (simplified as much as possible)
fun... |
I am trying to use a combination of JST and ROE scheme for the RANS solution of an aerodynamic problem. I notice that the ROE scheme performs poorly in terms of the convergence in the drag counts for higher angle of attacks compared to the JST scheme. I am now wondering if to run the ROE scheme to a certain degree of c... |
I would like to do the following operation: I have a "4D" matrix A and a "3D" matrix B. Both A and B are actually 2D matrices, where for A, each element is a 2D matrix, and for B, each element is a 1D matrix or vector. I would like to, for each element in the 2D floor plan, multiply the matrix on A and the matrix in B.... |
Let us consider a function $f(r,\theta,\phi)$ that can only be efficiently computed in spherical coordinates. We need its Cartesian gradient. We can implement its analytical spherical derivatives, compute the spherical gradient, $\left(\frac{\partial f}{\partial r},\frac{1}{r}\frac{\partial f}{\partial \theta},\frac{1}... |
The context of my question is how to compute high order derivates on direct numerical simulation of turbulent channel flow. It is of particular interest for fluid dynamics and turbulence research.
I want to find the coefficients of a B-spline curve given the value of the resulting function on a set of collocatioin poi... |
I have a number of evenly-spaced samples of functions that are polynomial in $1/x$ where $x$ is a continuous variable on $x\in\left[a,b\right]$, i.e. $$f(x_i)=\sum_{n=0}^{N} f_n x_i^{-n}.$$ I want to use some sort of local interpolation function like a hat function (linear interpolation), but it is pretty inaccurate (a... |
I am solving the initial value problem
$$
\frac{d}{dt} (E C_g) = -\delta, \quad E(0) = E_0,
$$
for $E$, where $E$ and $C_g$ are functions of $t$, $C_g$ is completely known, and $\delta$ is a function of $E$. Using the following first order approximations for derivatives,
\begin{align*}
\frac{d}{dt} (E C_g) = E' C_g + E... |
I have two matrices $A, B$ coming from a finite element discretization of a system of partial differential equations. $A$ represents the system matrix and is symmetric and indefinite. $B$ is symmetric positive definite and is used as a preconditioner. Direct solver is used for computation of action of $B^{-1}$. The pre... |
I have the following PDE in 2D:
$U_{x} + U_{xx} + U_y + U_{yy} + U_{xy} = f$
where $f$ is a constant.
And I'm trying to create a matrix $A$ to solve the PDE through finite differences: $AU = f$. I will invert $A$ such that $U = A^{-1}f$.
I have mixed boundary conditions in this form:
$0 = a_0U + a_1U_{x} + a_2U_{xx} + ... |
I'm looking for a good Matlab package/library for B-Splines approximation. Ideally, it would take knots $t_1, \ldots , t_n$, and data points $g(t_1),\ldots , g(t_n)$, and Produce $$Vg :\,= \sum\limits_{j=1}^n B_i ^k (t) g_i \, , $$
where the $B_i ^k$'s are the B-spline basis of order $k$ with respect to the given knot... |
Let $F: \mathbb{R} \rightarrow \mathbb{R}$ be a linear map. I want to evaluate an expression of the type $$F((ax+b)^k)$$ in terms of $F(x)$ for some fixed value of $x$ (I already know $F(x)^r$ for $r=1,...,k$).
$x$ is typically small ($0<x<1$), and $k$ is typically about $15$. $a$ is always positive (about $30$) and $b... |
(I'm not sure which of math.se / stackoverflow / scicomp.se is the right place to ask this question)
I have a C++ code which generates a complex matrix and then calculates its eigenvalues and eigenvectors using LAPACK zgeev. As an example this is one of those matrices:
I wanted to test my code so I entered the same ma... |
I'm sure this would be a common question, however yet to find an answer for.
Suppose I have two, 2D vectors in Python
RaceA =[[ Runner ID, Heart Rate, Kilometers Done,],
[1234, 67, 50],
[1256, 83,64],
[1356,92,82],
[845,80,18]]
RaceB =[[ Runner ID, Heart Rate, Kilometers Done,],
[845, 79, 74],
[5363, 86,34],
[1256,84... |
This is a follow up to this question.
I have mapped from Chebyshev space to the physical space using the mapping
$x = ((1-w)\xi^3 - x_p\xi^2 + w\xi + x_p + 1 )*(L/2)$.
When in Chebyshev space I have easily defined the spectral differentiation matrix as follows:
$$(D_N)_{00} = \frac{2N^2 +1}{6}$$
$$(D_N)_{NN} = -\frac{2... |
I am trying to implement in C or C++ a solution for a fft and Ifft when the signal values are not obtained at a constant rate, making it having a desviation between the values and the periodic ones. I do not know how I can change the algorithm of calculating the fft with synchronized signals as in https://wikimedia.org... |
This will be a very general question.
I have a 3D finite element code in Python which I would like to extend to handle "large" problems (~10^8 unknowns in the global system). Right now I am using the scipy.sparse library, which gives decent performance for iterative solvers, but I'm finding the following problems:
I'm... |
I have large arrays of data organized so that it can be processed efficiently using array processing libraries. However, there are times when I only need to process slices of the arrays where a slice might be an arbitrary, non-contiguous subset defined by a select set of index values.
For example
result = someArrayPro... |
A simulation I'm doing requires me to calculate the partial trace of a large density matrix. I am trying to calculate it using tools from numpy, but my code seems to be having some problems. For background, let me explain the arrays I am interested in a little more, and the way I'm defining the partial trace. Then, I w... |
I'd like to build a system in Python, consisting of (broadly speaking) objects which are internally described with (not necessarily just linear) equations, that I can connect with each other - similar to what can be done in OpenModelica. Is there anything like this already available or do I have to use OpenModelica for... |
I am trying to understand the mathematical side of an algorithm, which approximates the solution of coulomb's law. Their approach is to balance the two elements with the biggest positive/negative error.
Trying to understand the stability conditions of the algorithm, I am searching if there is an iterative solver with a... |
I have two sets of large positive numbers $a_1,\ldots,a_n$ and $b_1,\ldots,b_n$. By 'large' I mean of the order of $10^{10}$. I want to calculate the ratio $$R = \frac{a_1 - a_2 + \cdots +(-1)^{n+1}a_n}{b_1 - b_2 + \cdots +(-1)^{n+1}b_n}.$$ It is already known that the exact value of $R$ is between $0$ and $1$. Each of... |
I need to have a finite difference stencil for the mixed derivative
$$f_{xy}$$
on nonuniform grids such as this one:
Since I could not find a stencil in the literature, I tried to derive it by my self. As usual I started with a Taylor series expansion:
$(I)\qquad f(x+b,y+d)\approx f + b f_x+d f_y +\frac{b^2}{2}f_{xx}... |
Can we use the von Neumann stability analysis to investigate the stability of the discrete form of the following problem?
$$u_t+\frac{\partial(x^2u)}{\partial x}=S(u,x)\ .$$
Please give some hint how to use this analysis in the above problem.
|
A naïve approach to solving stochastic differential equations (SDEs) would be:
take a regular multi-step Runge–Kutta method,
use a sufficiently fine discretisation of the underlying Wiener process,
make each step of the Runge–Kutta method analogous to an Euler–Maruyama.
Now, this fails on multiple levels and I unders... |
I'm trying to reproduce the work in computing turbulent energy spectrum from isotropic turbulence flow field in a box but I have a hard time understanding James' answer about the binning part.
Would you be so kind as to try to explain it to me ? Many thanks !
|
I'm trying to solve the linear advection equation
$$u_{t} = cu_{x}, \\
x \in [x_{0}, x_{e}], \quad t \in (0, T], \quad c \in \mathbb{R} \\
u(x,0) = f(x)$$
Note that for $c > 0$, the solution is a left travelling wave so requires a boundary condition on the left, while $c < 0$ is a right travelling wave so requires a bo... |
I want to develop a distributed algorithm with MPI which have load balancing capability. But there is a situation that I'm not very clear about, which is, when the number of tasks is less than the number of processors available, I need to detect that and terminate those processors whose ranks (actually rank + 1) are gr... |
I am trying to plot a reference solution for the 1D wave equation using python.
The above link states the following: For a rod fixed at the right end and free at the left end and subjected to a hammer blow at the left end at $t = 0$ s where the hammer blow induces a constant velocity $V_0$ to occur from $x<a<L$, the di... |
I like to represent the following numbers in a data structure, like in trees or list but with one parent node and possibly many child nodes
1.3.1.1.0
1.3.1.1.1
1.3.1.1.2
1.3.1.2.0
1.3.1.2.1
1.3.1.3.0
...
Which data structure allow me to store and search the given values?
|
Consider the equation
$$\frac{\partial}{\partial t}v(t,x)=\frac{\partial}{\partial x}v(t,x)$$,
for $t,x\in\mathbb{R}$.
I'd like to solve this equation forward in space and backward in time, updating in space given the initial condition in space: $v(t,0)=f(t)$.
Now, we can discretise in time and take the backward differ... |
Consider one dimensional hyperbolic pde
$$u_t+f'(u)u_x=0$$
For the above problem ,CFL condition is $\Delta t\leq \dfrac{\Delta x}{|f'(u)|}.$
But if we include the source term $,S(u,t),$ which depend upon $u$ and $t$ in above equation i.e.
$$u_t+f'(u)u_x=S(u,t)$$
What is the influence of $S(u, t)$ in the CFL condit... |
Let A be a n×n positive-definite Hermitian matrix. I already have the QR decomposition of A. Is there an efficient way to utilize this knowledge to speed up the Cholesky decomposition of A?
|
I work in Molecular dynamics of biomolecules. I am familiar with the software NAMD. We use NAMD in our CPU cluster with the aid of mpirun.
Without GPUs can I implement large scale deep learning?
Is there any scalable software out there like NAMD, but for Machine learning and deep learning? Is there any Machine Learni... |
There is a problem I want to solve. The function is:
\begin{align}
&\underset{a,b,\textbf{vec}}{\text{minimize} \text{ }\text{ }\text{ }\text{ } } f=\sum_{i=1}^{b}(\textbf{vec}_i)^{a}\\
&\text{subject to } \text{ }\text{ } f \geq F, \text{ } \sum_{i=1}^b \textbf{vec}_i = D, \text{ } a\leq N, b \leq D, \{\textbf{vec}... |
I'm using LAPACK zgeev routine to get eigenvalues and eigenvectors of a symmetric matrix in C++. Problem is zgeev is being called in a loop but it sorts eigenvalues (and eigenvectors) differently sometimes.
For example, this is the eigenvalues from the first round of loop:
(-1.29007e-5 - 5.207e-6*i)
(1.28782e-5 + 7.40... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.