instruction stringlengths 43 28.1k |
|---|
I am trying to solve $M\ddot{u}=-Ku+F_\text{ext}$ for a 2D linear elastic model with $M$ be the mass matrix,$K$ the stiffness matrix and $F_\text{ext}$ the external load vector coming from a uniformly distributed load acting on one edge of the model.(Note: $F_\text{ext}$ is not time-dependent). An explicit time-scheme ... |
I need to slove one optimization problem of quadratic programming. The number of optimization variables is about 16,000. The constraints include equality constraints and inequality constraints.
I have no such practical experiences before.
There are are three choices for the probelm after reading some materials:
active... |
I need to optimize a code where the most performance critical part is doing a 'change of basis', in other words it is an unitary similarity transformation on a big real positive definite symmetric matrix real matrix. This consists in the following operation: $U^T A U$, with $A$ real positive definite symmetric matrix a... |
In many modern papers Navier-Stokes equations are solved with finite-difference or finite-volume methods using WENO reconstruction for non-viscous fluxes and central differences for viscous ones. It seems pretty straightforward to apply central difference to "simple" second derivative like $\frac{\partial^2 u}{\partial... |
I am reading a book on digital circuits. It says that
given a n-bit binary number $N$, its two's complement representation is itself, if $N$ is positive; and its two's complement representation is $2^n - N$, if $N$ is negative.
It is unclear to me what it says.
What does it mean by saying a binary number $N$ is posi... |
I want to solve a linear set of equations (Ax=b) using LU decomposition. My "A" matrix is a complex matrix which is symmetrical.
The code that I work has two parts. In the first part I do all the initialization where I compute L and U factors of the matrix.
The second part of the code runs in every time-step (which is ... |
Using Sympy, I would like to compute the negative binomial expansion of a general symbolic polynomial, e.g., $(x_1 + x_2 + x_3 + 4 x_4)^{-1}$. I understand that I can go by recursively partitioning the expression inside the parenthesis into two parts and computing their expansion like $x_1$ and $x_2 + x_3 + 4 x_4$, the... |
I would like to solve two types of simple 2D problems, namely the stationary heat equation on an L shaped geometry like this:
And also compute the magnetostactic field in an air gap of the following geometry:
Since it wouldn’t be smart to reinvent the wheel, I searched for an open-source library that could handle suc... |
In particular, I want to focus on finding the volume $V$ because I will need it to start working on solving the centre of mass
This $3D$ homogenous body (Torus section) is defined by
$$x^2 + \left(\sqrt{y^2+z^2}-5\right)^2 < 4 $$ where,
$$y<1, z>2$$
I confined the $3D$ shape to a rectangular region where
$$
-2<x<2\\
-7... |
what is the time complexity of gradient $\nabla_{f}$ using the $\mathcal O$-notation?
what is the time complexity of jacobian matrix using the $\mathcal O$-notation?
who knows some references to introduce the time complexity of gradient?
I make reply to reviewers for computational complexity of gradient and matrix oper... |
I am trying out odeint and received the error
'Excess work done on this call (perhaps wrong Dfun type).'.
The values returned are also super sensitive to small changes of the initial value. Some initial values don't run into this problem whereas others do.
rho = 0.1
beta = 0.01
N = 50
gamma = 0.20
thet... |
Initially I thought that this is the kind of question which ought to have already been answered in the form of an example online, but so far I haven't found one. I will admit that I am very new to both FEniCS and the use of FEM software for solving PDEs in general, so my goal here in solving this problem is to a gain a... |
How to best export Scene/Screenshot in Paraview as a vector graphic?
It seems PDF and PS export are not working really good for me (Paraview 5.3/5.5/5.8), either the scene is cropped at the borders or text is missing (legends).
|
I am looking for a simple to implement algorithm for the bipartite euclidean matching problem (or an implementation of any practical algorithm). I am aware of Agarwal's paper, but I would like to implement something simpler. The simplest idea I could come up with was starting with some initial matching (possibly random... |
I hope that one of you guys can help me because i have been stuck here for a week.
I am trying to read a gmsh file (.msh) using dolfin convert to XML and then download it with dolfin.
The thing is when i assemble the stiffness matrix and the mass matrix and try to generate an exemple (MonteCarlo) using these matrices ,... |
I am looking for the details of commonly-used predictors for accelerating the convergence of iterations using Newton-Raphson scheme for nonlinear problems in FEM. I am looking specifically for static problems.
Note: Such predictors based on velocity and/or acceleration are used for transient problems but they are not a... |
I am trying to solve the linear finite element equation $M\ddot{u}+Ku=F(t)$, where $M$ is the mass matrix ,$K$ the stiffness matrix and $F(t)$ the external load vector, parallel in time using XBraid package.Using Newmark's method for time integration we take three equations:
$(K+\frac{M}{dt^2β})u_{n+1}=F_{n+1}+\frac{M... |
Starting from
$$
c_p \frac{\partial u }{\partial t} = k \nabla^2 u
$$
in a one dimensional domain [0,1] where $c_p$ and $k$ are modeling two different materials:
$$
k =
\begin{cases}
1 ~\text{if} ~x < 0.5\\
2.0 ~\text{else}
\end{cases}
$$
$$
c_p =
\begin{cases}
10^{-8} ~\text{if} ~x < 0.5\\
1.0 ~\text{else}
\end{cases}... |
I am doing a solar-system simulation. I am using Ruth's 3rd order sympletic integrator to avoid the problem of Energy Drift (which I had with RK4), but the the planets quickly leave orbit, and energy is by no means conserved (just like with RK4).
I applied this to the N-body problem with the following:
(KE=1/2mv^2... |
I am trying to solve the Poisson Equation
$\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 32(x(x-1) + y(y-1))$
for a 61x61 grid using Python3 with boundary conditions being $T=0$ on all four boundaries and taking an initial guess of $T=50$. I am considering a relaxation parameter $w=1.6$.
To so... |
Help me understand a part of Brent's root finding algorithm. In a typical iteration we have samples (a,fa), (b,fb), (c,fc) all real with (a<b<c) or (c<b<a) . Also, in the case I am interested in (1< fa/fb) and (fc/fb <= -1). In that case (using Mathematica syntax), the algorithm attempts inverse quadratic interpolati... |
Consider independent random variates $X_0, X_1, . . .$ each uniformly distributed on the support $[0, 1)$
Let's say $Y = X_0 + X_1$, where $X_0$ and $X_1$ are independent uniform random variables with range $[0,1)$
I then derived the following PDF to describe the distribution of the sum $Y = X_0 + X_1$ using a convolut... |
I have a linear system of the form $A x = b$ where $A$ and $b$ are known, $A$ is "square", and $\lvert b \rvert_1 = \lvert x \rvert_1 = 1$. Unfortunately, I am working in a framework that only gives me access to a dot product, not the individual vector or operator elements. The only way I have found to solve this probl... |
I am trying to implement 3D tetrahedral elements in my finite element code (which works fine for linear triangles and quadrangles in 2D). But my simulations are crashing with tetrahedral elements. My implementation details in C++ are as follows:
Shape functions and their derivatives w.r.t. $\xi$, $\eta$ and $\zeta$
$N... |
I currently have a code that solves $u_t+ cu_x=0$ with periodic boundary conditions, and constant $c$ (using an upwind method). I'm wondering how I would alter this code to solve something of the form
$$u_t +c(x) u_x=0.$$ I'm thinking it will look of like
$$u_i^{j+1}=u_i^j-c_i \Delta t \left(\frac{u_i^j-u_{i-1}^j}{\Del... |
I am looking for a concise description to help me understand the error for Monte Carlo Integration using Uniform Sampling and Importance Sampling
For Importance Sampling I have that the error is just the square root of the variance...
$$\sqrt{\frac{1}{N}<f(Xi)^2>-<\frac{1}{N}f(Xi)>^2)}$$
for Uniform Sampling what would... |
I am trying to solve a 2D dynamic linear elasticity model parallel in time using Xbraid. The spatial domain is [0,1]x[0,1] and time domain [0,1]. For time integration I am using a backward Euler scheme and FEM for spatial descretization. I tried to run a simulation for a small spatial problem(4x4 quadrilateal elements)... |
I have a matrix $A \in \mathbb{R}^{m \times n}$ where $m \gg n$ and I want to compute the full QR decomposition $A = QR$. Where $Q$ is an orthogonal $m \times m$ matrix.
Bishof & Van Loan (1987) describe that $Q$ can be represented as the sum of a low-rank matrix plus the identity matrix:
$$Q = I + W Y$$
Where $W \in \... |
I need to take integer square roots $\lfloor \sqrt{n}\rfloor$ of (lots of) 128 bit numbers $n$. Calling gmp seems to take surprisingly long (though I can't tell for sure, since gmp routines are not showing up in the profiler information).
Is there a standard way to compute $\lfloor \sqrt{n}\rfloor$ in this situation us... |
So, my question is if one should ideally keep a record of all seeds that are used when publishing numerical work that involves one or more random number generators (e.g. a stochastic simulation), and if so, whether there's a standard approach to doing this when the number of random number generators depends on the hard... |
I have some data that looks like as follows
x-cor y-cor z-cor
0.02 0.0251 0.02
0.01 0.0257 0.02
0.014 0.02 0.03
0.023 0.003 0.05
0.013 0.002 0.77
....................
....................
I would like to draw an image like the above. Can you please suggest a way to start that in Matlab/python?
image sourc... |
I am taking a computational linear algebra course and i got stuck during a homework problem concerning the computation of inner products. I am supposed to compute the inner product:$$\mathrm{a}_{\mathrm{k}}=\frac{\left(\mathrm{g}_{\mathrm{k}} \mid \mathrm{f}\right)}{\left(\mathrm{g}_{\mathrm{k}} \mid \mathrm{g}_{\mathr... |
I have a cell centered cartesian grid and am trying to implement the flux inside the divergence term using numerical flux with a flux limiter. I found different formulas for MUSCL flux limiter, where one source seem to say one needs to use a different stencil depending on which way the quantity propagates at the face, ... |
Pasted below is my python code. It is a 4th order runge kutta that evaluates the 2nd order ode: y'' +4y'+2y=0 with initial conditions y(0)=1, y'(0)=3.
I need help fixing it. When I run my code, my analytical solution does not match my numerical solution, my professor said they should be the same. I have tried editing t... |
We'd better not to reinvent the wheel. But without some programming, one can hardly understand computational fluid-structure interaction. And I would like to know which papers or algorithms should a student reproduce in order to understand the big picture of computational fluid-structure interaction. It is better if t... |
In practice, L-BFGS is frequently held comparably to other inexact QN methods, and it provides a middle ground of sorts between Hestenes–Stiefel CG and BFGS as memory goes from zero to infinity (Numerical Optimization Ch. 7). Lots of empirical results show L-BFGS outperforms GD, at least in certain large classes of set... |
Hesthaven's book 1 mentions the following time step restriction for Navier-Stokes equations (see (7.32) in 2008 edition)
$$
\Delta t \approx \frac{h}{N^2} \frac{C}{|u| + |c| + \frac
{N^2 \mu}{h}}
$$
($h$-element size, $N$-degree of polynomial basis, $C$-constant)
Isn't this equation dimensionally incorrect? $\mu/h$ doe... |
Normally I write the incompressible Newtonian isothermal flow Navier--Stokes equations as follows:
$$\displaystyle
\frac{\partial v}{\partial t}
-\nu\Delta v
+\color{red}{(\nabla v)v}
+\frac{1}{\rho}\nabla p
=
f_b
$$
But I'm reading now the followwing
$$\displaystyle
\frac{\partial v}{\par... |
I would like to integrate a discretized field in cylindrical coordinates, given as A(r, z), with z being spaced regularly (spacing distance dz), and r being spaced non-regularly. Moreover, r[0]>0 due to the chosen discretization. For integration, I would like to use the trapezoidal approach, and start with the z-compon... |
I have to compute the trace of the product between three matrices $A,B,C$ in python, i.e. I have to compute $tr(A^TBC)$ and I was wondering what was a good way to do it in Python(here $A^T$ is the transposed of $A$). If I had just 2 matrices $A, B$ and I wanted to compute $tr(A^TB)$ I know I could do something as
nump... |
I am trying to understand the finite element method and want to apply it to a 2D equation with a triangular mesh.
I have chosen the reference element to be the triangle with vertices $(0, 0), (0, 1)\text{ and }(1, 0)$.
On this reference element, I define the three basis functions
$$\phi_1(x, y) = (1 - x)(1 - y) \quad \... |
I want to solve the nonlinear equation $\frac{d^2x}{dt^2} + k\sin x = 0$, numerically. I found that solving this elliptic integral would be cumbersome, so is there a numerical method i could use to solve it?
I have tried to apply Newton's method, but it requires a rough value of where the solution lies, which i do not ... |
For a cell-centered finite-volume calculation, with a nontrivial stencil (either using an unstructured grid or a strongly non-uniform structured grid), what are the main techniques for reconstruction of function values and derivatives on cell faces? What are their advantages and disadvantages, e.g., compared to the pol... |
I am planning to do some basic algebra on continuous, non-analytical random variabels. I want to define their probability density functions as arrays x and f(x).
Yet, I was surprised to find out that there does not seem to be any package that does basic operations like computing sum- or product distributions of two pdf... |
I want to solve an IVP in python with two variables, x and u, but I need the values of u to be between 0 and 1. Right now it is giving me a solution with negative values for u. Here is the code I have.
def model_case_3(t, z, Kmax, k, b, list_Kmax, sigma):
a=1.5
x, u= z
m=1
r = list_Kmax[0][0]
dxdt = (x)*(r*(1-a*u... |
What are the general algorithms used for diagonalization of large Hermitian matrices and Unitary matrices? ($>5000 \times 5000$)
LAPACK seems to diagonalize Hermitian matrices almost 20 times as fast as unitary matrices, and as far as I know, the routines are also different. How is the computational complexity calculat... |
I would like to research the Neuman boundary that can verify the following problem
$\begin{aligned}
&\text { (} P \text { )}\left\{\begin{array}{l}
\frac{\partial U}{\partial t}(x, t)+A \frac{\partial U}{\partial x}(x, t)=0, \quad x \in[a, b], t>0 \\
U(x, 0)=U_{0}(x), \\
\frac{\partial U}{\partial \eta}=?
\end{array}\r... |
I've been trying to solve the following (relatively simple) system of Lotka-Volterra ODEs in Python using SciPy's odeint:
$$\dot{z_1} = z_1 \left(- \sigma z_1 + \sigma z_2 + \rho z_3 - z_4 - z_5\right)$$
$$\dot{z_3} = z_3 \left(\sigma z_1 - \sigma z_2 - \rho z_3 + z_4 + z_5\right)$$
$$\dot{z_4} = z_4 \left(\sigma z_1 -... |
Is there a name/standard algorithm to solve the following equation for $X$?
$AX+X^TB=C$
Matrices $A$,$B$,$C$ are dense, diagonalizable, nearly singular, about $1000\times 1000$ in size. I've looked through SLICOT routines, and nothing looked directly applicable.
|
So I have a question about simplifying my C code ,
This is the question :
A pandemic of the Heineken virus is underway in Croatia and around the world. The National Civil Protection Headquarters plans to introduce protection measures that will take effect from Sunday at midnight, and they are:
If it is sunny and windle... |
Recently I do simulation on Lorentzian Function with FFT
Lorentzian Function is 2a/(x**2+a**2)
import numpy as np
from scipy import fft
import matplotlib.pyplot as plt
a =1
N = 500
x =np.linspace(-30,30,N)
lorentz = (2*a) * (1/(a**2 + x**2))
fourier = (fft.fft(lorentz))
fig, (ax1) = plt.subplots(nrows=1, ncols=1)
ax1... |
I have skimmed through the LAPACK user guide, but I could not find if LAPACK offers routines for Krylov Subspace based methods (such as CG or BiCGSTAB etc) and Newton method based nonlinear solvers. Also, are iterative methods available in LAPACK in general?
|
I have been working on a solver for shallow water equations with reflective boundary conditions. I have found that it diverges very fast. As a workaround I noticed yesterday that if I smooth the momentum (water column height * velocity) field as post processing in each step, the solution no longer blows up. So it seems... |
Consider the following problem,
$$ -\Delta u(x) = f(x), \qquad x \in \Omega \\ u(x) = 0,\qquad x \in \partial \Omega$$
with $\Omega = [0,1]\times [0,1]$ being the domain and $\partial \Omega$ being the boundary. The source term $f(x) \in L^2(\Omega)$ is a smooth source term. The exact solution is known.
I have generate... |
I didn't really know if this stack was the right place to post but I was reading the documentation for creating an exponential random variable in numpy. But isn't there a typo. Like shouldn't it be :
$f(x; \beta) = \frac{1}{\beta} \exp(-\frac{x}{\beta})$ instead of $f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x... |
I am trying to find a paper that I saw about a year ago. I am not sure of the actual date of the paper.
I believe it was a finite difference CFD paper. The interesting part of the paper was the addition of a single degree of freedom variable to all of the mass conservation equations. This residual mass conservation var... |
I am writing a FE program which calculates the displacements under a uniform load. I want to store the stiffness matrix in sparse form(COO) without using an external library.Assume an upper-bound for the number of non zero elements per row is known.
My problem is that I can't assemble the matrix in a sparse form and al... |
I was playing around with numerically solving the 1D wave equation with density and stiffness varying with position using central differencing methods and noticed that for certain discretization steps sizes $\Delta t$ and $\Delta x$ the solution could become unstable. Therefore, I thought maybe if I increased the order... |
I have a background image of a fractal on my phone that I would like in a higher resolution with super sampling, and decided to write my own program for it. I've got down rendering a Mandelbrot set, even using HSV/HSL as coloring methods, but I can't get my fractals to look as nice as these.
Here's a prime example, and... |
I noticed that 'Eigen' matrices with dynamic dimension are less efficient than the matrices with static dimension. My algorithm uses a lot of matrices which don't need to be resized, so I wanted to use static dimensions, but the dimension is not known in advance and this doesn't work:
const size_t n = 3;
Eigen::Matrix<... |
Why does the dot() function in MATLAB return different expressions based on the order in which I pass vectors?
|
I want a tool for load rebalances.
I have a distributed grid. Each process can handle a part of the global grid. Each process has a different node and I want to rebalance it. I want a tool that can give color on a distributed grid.
A typical procedure is:
before rebalance:
process 0: 1000 node
process 1: 600 node
aft... |
A finite set $R$ of fixed, axis aligned 2-D rectangles $r_i=\left\{x_{0i},y_{0i},W_i,H_i \right\}$ is given. These rectangles are potentially overlapping. Given a new axis aligned rectangle $t$, I would like to find the subset $S \subset R$ with minimum number of elements $M$ such that $t \subset \underset{i=1,\ldots,M... |
I have a sparse $n\times n$ matrix $A$ with a pretty interesting structure. It has a block structure with a symmetric structure but asymmetric blocks. Expressed mathematically the block $A_{jk} = A_{kj}$ but $A_{jk} \neq A_{jk}^T$, so my matrix is not actually symmetric. Are there any algorithms that can take advantage... |
In general,if we know that the marginal Gaussian distribution for some variable $\textbf{x}$ and a conditional Gaussian distribution for some $\textbf{y}|\textbf{x}$ of the forms:
$$p(\textbf{x}) = \mathcal{N}(\textbf{x}|\boldsymbol{\mu},\Lambda^{-1})$$
$$p(\textbf{y}|\textbf{x}) = \mathcal{N}(\textbf{y}|A\textbf{x}+\t... |
I am looking for a general purpose library which can solve a 2D or 3D linear elliptic PDE on a rectangular domain with mixed/Robin boundary conditions. I am a C programmer, so I would prefer a C library, but fortran is ok too since its easy to call fortran code from C. So far I have found only 1 option: MUDPACK. This i... |
Do the faces of tri-linear hex elements have to be planar? Three nodes define a plane. If the fourth node does not lie on the plane, then the nodes are not planar and the face is not plane. In general, the geometry of element may not be convex. Will this cause problems in mapping the element to the unit cube? If I reca... |
Given an LU decomposition of $A\in \mathbb{R}^{n\times n}$, is there a way to compute $\operatorname{trace}(A^{-1})$ with lower complexity than that of the inversion ($O(n^3)$ in practice)?
This question has been asked already on Mathoverflow twice and on Math.SE, but the answers there are not useful.
|
In https://commons.wikimedia.org/wiki/File:YI_%3D_PI.png, you will find a formula-based solution for an overdetermined logical matrix pseudoinverse. This simple formula gives the same result as the Moore-Penrose method. Does anyone know of any other overdetermined logical matrices that can be solved without using SVD m... |
In linear elasticity, the governing PDE is the equilibrium equations (absent of vibration considerations):
$$
-\nabla \cdot \sigma = F
$$
Is this equation simply derived from the sum of forces and moments?
In most linear elasticity papers, I see these governing equations. Is there an original source for where these equ... |
Let $\Omega\subset \mathbb{R}^{2}$ and $\tau_{h} = \{\Omega_{k}\}_{k=1}^{N}$ be a triangulation of $\Omega$. The $L^2$ error for a FEM approximation $u_{h}$ is given by:
$ || u-u_{h} ||_{L^2} = \sqrt{ \int_{\Omega} \left( u-u_{h} \right)^2 } = \sqrt{ \sum_{k=1}^{N} \int_{\Omega_{k}} \left( u-u_{h}^{k} \right)^2 } $.... |
I have a problem where I have to minimize a certain quantity $Z$ subject to the following constraints:-
$w_1 + w_2 + w_3 = 1$
$\frac{f_1(w_1*Z) + f_2(w_2 * Z) + f_3(w_3 * Z)}{Z} >= k$
where $k$ is a known constant. $f_1$, $f_2$ and $f_3$ are non-linear functions that we have empirical curves for. (These curves are a... |
Consider we have a linear bivariate polynomial:
$$p(x,y)=ax+by+c.$$
To construct the linear polynomial using least square method, we need to evaluate the value of the average polynomial $p$ in at least in three cells that approximately must be equal to the average of conservative variable $\bar{\psi}$.
$$\frac{1}{\Delt... |
In cubic spline interpolation, we use the set of knots and function values $(x_i,y_i),i=1,...,n$ to construct a (tridiagonal) system of equations for the unknowns $\sigma_i$:
$$
h_{i-1}\sigma_{i-1} + 2(h_{i-1} + h_i)\sigma_i + h_i \sigma_{i+1} = \Delta_i - \Delta_{i-1}
$$
where $h_i = x_{i+1} - x_i$ are the distances... |
I'm trying to find a convergent finite difference scheme for the PDE
\begin{equation}
\begin{split}
u_t + (x-1) u_x &= (x-1)u, \hspace{.5cm} x \in [0,1] \\
u(x,0) &= 1 \\
u(1,t) &= 1. \\
\end{split}
\end{equation}
I know that the exact solution is $u(x,t) = e^{(x-1)(1-e^{-t})} $, but just wanted some practice working w... |
I'm currently using Python's scipy.optimize package to perform parameter estimation for a system of 10 ODEs. I have some observed data, and I'm trying to find the set of parameters which makes the ODE solution best fit the data in the least squares sense. (The ODE, by the way, doesn't have an analytic solution, so I'm ... |
I want to write the following anonymous function in MATLAB.
I have a piecewise function. I want to turn this into a single expression. How can this be accomplished in MATLAB ?
$$f(x,t) =
\begin{cases}
20e^{-4x^2} & \text{if $0 \leq t \leq T/2,$} \\
0 & \text{otherwise.}
\end{cases}$$
|
Context: Hello, I am an undergrad student of physics self-studying Python Programming. I am trying to find the value of H_lam for which limit cycles corresponding to the triple galaxy system governed by the equations
given here occur
Code
# Import solve_ivp, matplotlib, numpy
from scipy.integrate import solve_ivp
impor... |
I'd like to visualize scalar data located on the nodes of a quad mesh (2D) using VTK in Python3. The closest example I've found is vtk quad mesh, but it only seems to visualize the mesh, not data on the mesh. Could someone point me to a better example?
|
I'm using lattice Boltzmann method (LBM) to do simulation of flow in a pipe. The diameter of the pipe is 0.02 m and its height is 0.1 m. I put a parabolic velocity profile at the inlet:
$$\mathbf{u}(\mathbf{r},t) = \bar{u}(t) \Bigg(2 - \frac{2|\mathbf{r}-\mathbf{r}_{C}|^{2}}{R^{2}}\Bigg)$$
Where $R$ is the radius of th... |
What I'm trying to do is simply a variation of a heavyside function, for 3 before the discontinuity and 4 after. But when I plot it, at the discontinuity it's not a straight vertical line but a sort of $x=\alpha*x$ function.
Can someone explain why it's like that?
|
I want to implement the upwind method in following advection equation problem :
$$ u_{t}+2 u_{x} =0 ,$$ for $0\leq t \leq 1,$ $0\leq x \leq 1 $
$$ u(0,x) = u_{0}(x) = \begin{cases}
10^4 (0.1-x)^2 (0.2-x)^2 & 0 < x < 0.2 \\
0 & otherwise
\end{cases} $$
with wind coefficient $\alpha = 2 $ , $Nt = 10... |
I have non-symmetric real-valued matrices with real-valued eigensystems. How to compute eigenvectors efficiently?
Using scipy.linalg.eig (which calls dgeev) is 3-4 times slower than scipy.linalg.eigh (=>dsyevd) and 2x slower than scipy.linalg.svd (=>gesdd), but neither SVD nor hermitian eigenvalue decomposition are app... |
I am searching for a faster method to calculate an approximate inverse of a large matrix (up to 32000x32000) resulting from a discrete non-linear system of partial differential equations. I'm using C++ together with the Eigen library (MKL activated). Unfortunately the resulting matrix is not sparse as it can be seen in... |
I have been writing a software package in Fortran for solution of the Vlasov-Poisson system in 2D2V. I want this software to be useful beyond its current application (e.g. systems with different number of position or velocity dimensions, change in numerical methods used, solution of full Maxwell system, etc.), which le... |
I've set up a system of differential equations, obtained after discretizing pde, in the following way
dY(1) = terms_starty;
dY(end) = terms_endy;
dY(2:end-1) = (1./Vector1).*(Matrix1*Y+Matrix2*Y);
dZ(1) = terms_startz;
dZ(end) = terms_endz;
dZ(2:end-1) = (1./Vector1).*(Matrix1*Z+Matrix2*Z);
dYZ = [dY dZ];
I'm solv... |
I have the following inhomogeneous parabolic initial/boundary value problem:
$$u_{t}(t,x) = (1-x^{2})u_{xx}(t,x)+u(t,x),$$ for $t \in [0,1]$ and $x \in [-1,1]$
$$u(0,x) = \sin(\pi x),$$ for $x \in [-1,1]$ initial condition
$$u(t,-1)=u(t,1)=0,$$ $t \in [0,1]$ Dirichlet boundary conditions.
I want to construct a Backwar... |
What is the reason NVIDIA's Turing has twice the FP16 performance compared to it's FP32 whereas AMD has same performance in FP16 and FP32?
Like GTX 1650 Super has around 8 teraflops in FP16 but half of that in FP32.
RX 580 has around 6.174 teraflops in FP16 and same number in FP32.
|
Is there any computation accelerator (like a GPGPU) available, that natively (this means in hardware, not emulated by a library) supports arithmetics using floating point numbers with a fractional part longer than 64 bit (like e.g. IEEE 754 quadruple-precision)?
|
I'm trying to solve 2D unsteady compressible Navier-Stokes equations with finite-difference or finite-volume method. Here is the system, it's pretty standard:
$$
\frac{\partial U}{\partial t} +
\frac{\partial F}{\partial x} +
\frac{\partial G}{\partial y} = 0;
$$
$$
U = \left( \begin{array} {c} \rho \\ \rho u \\ \rho ... |
I'm more or less familiar with procedures and methods to fit a curve to experimental data, and I have done this many times using Matlab. However this time I have a problem that I'm not sure how to solve and I'm stuck.
I have some experimental data which I have plotted in the figure below (blue curve).
The data seem to... |
Problem
I'm trying to calculate CPU / GPU FLOPS performance but I'm not sure if I'm doing it correctly.
Let's say we have:
A Kaby Lake CPU (clock: 2.8 GHz, cores: 4, threads: 8)
A Pascal GPU (clock: 1.3 GHz, cores: 768).
This Wiki page says that Kaby Lake CPUs compute 32 FLOPS (single
precision FP32) and Pascal cards... |
I am trying to simulate a 2-DOF planar robotic manipulator (have its joints follow a predefined trajectory) that's described by its dynamic model:
$$ M(q)\ddot{q}+C(q,\dot{q})\dot{q}+G(q) = \tau $$
where $q = [q_1 \ q_2]^T $ are the angles of the two joints, $\dot{q}$ the angular velocities and $\ddot{q}$ the angular a... |
In this StackOverflow answer, @Gokul has shown how to get a basis of the kernel of a matrix with the help of the 'Eigen' function CompleteOrthogonalDecomposition. The complete orthogonal decomposition of a matrix is related to the so-called URV decomposition of this matrix. I don't know this topic. I read somewhere th... |
The Problem
The TR-BDF2 explained in this paper [1], is quite a popular numerical scheme used to integrate $\dot{y} = f(t,y)$, consistent of the following two stages:
\begin{align}
y_{n+\gamma} & = y_n + \gamma \frac{h}{2}\left( f_n + f_{n+\gamma} \right) \tag{1} \\
%
y_{n+1} & = \frac{1}{\gamma(2-\gamma)}y_{... |
Imagine I have a differential equation and I have some data and the model is supposed to fit the data. If I now rescale the time in the range 0 to 1, do I need to adjust the parameters of the equations? How would one adjust them?
|
The Problem
I am currently reconstructing a TR-BDF2 scheme which contains the following two stages:
\begin{align}
y_{n+\gamma} & = y_n + \gamma \frac{h}{2}\left( f_n + f_{n+\gamma} \right) \tag{1} \\
%
y_{n+1} & = \frac{1}{\gamma(2-\gamma)}y_{n+\gamma} - \frac{(1-\gamma)^2}{\gamma(2-\gamma)}y_n +
\frac{1-... |
I know that the the Conjugate Gradient iteration fails when $0\in \mathcal {W}(A^{H})$, which means there's a complex vector $x+iy$ such that $(x+iy)^{T}A^{H}(x+iy)=0$. I wonder how to derive a real initial vector such that the Conjugate Gradient iteration fails if $A$ and $b$ are real based on this complex vector? The... |
I try to solve a system of coupled equations, where a very nasty division operation occurs. In fact, I need to compute a derivative of two exponential decaying functions. Let's illustrate this with the following example which can easily computed in an analytical way. Assume we have given the function $$f(z) = e^{-2z^2}... |
I need to calculate the magnetic field along a straight line in proximity of an array of 6 magnets. I used the tutorial files "magnets" included in Gmsh and I slightly modified the file in order to describe the position of the magnets in my desired configuration.
I set the mesh size with a rather small value:
Mesh siz... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.