instruction stringlengths 43 28.1k |
|---|
I'm working on a project that requires unknown image elements to be filled in, and am using a simple inpainting algorithm, which I would like to understand better. It works by repeatedly convolving a 3x3 filter (in 2D) with the image. The center point of the filter has coefficient zero (of course!), while the corners h... |
I'm using LAPACK zgeev to calculate eigenvectors of a symmetric complex matrix of high dimensions ($n \approx 2000$). I need these eigenvectors to satisfy
$$\sum_{m=1}^{n} \frac{\lvert m \rangle \langle \overline m \lvert}{\langle \overline m\lvert m \rangle} = I_n$$
Where $\lvert m\rangle$ is an eigenvector and $\lan... |
I want to write a simple simulation for heat conduction in a unstructured triangular mesh.
I already made it work for a structured rectangular grid with the ADI method, but now I need more complex geometries.
With $d_x=\frac{\kappa \Delta t}{(\Delta x)^2}$ and $d_y=\frac{\kappa \Delta t}{(\Delta y)^2}$ you can say:
$$d... |
To improve the time efficiency of my code, I'd like to test a lower precision for real number, using e.g. half precision (2 bytes).
However, I'm not sure if I can do that in Fortran.
After playing with the intrinsic SELECTED_REAL_KIND procedure, it seems that gfortran can only deal with 4, 8, 10 or 16 bytes precisions.... |
I am getting this strange error with paraview 5.4.
For example, if I load one of the example visualisations:
and if I export it as eps or pdf, then the color legend is place in the bottom left corner:
This does not happen for jpg or png files.
Anybody know how to fix this?
Thanks
|
I'm solving 2D Euler's equations in Cartesian coordinates:
$$
\frac{\partial U}{\partial t} + \frac{\partial F}{\partial x} + \frac{\partial G}{\partial y} = 0, \qquad
U = \left( \begin{array}{c} \rho \\ \rho u \\ \rho v \\ e \end{array} \right), \quad
F = \left( \begin{array}{c} \rho u \\ p+\rho u^2 \\ \rho uv \\ (e+... |
I am solving a 1d Shock tube problem of compressible fluid obeying Euler equations(Hyperbolic pde). I am trying to simulate it using Finite Volume Method using Roe's Scheme. Half of the tube contains highly compressed fluid and other half is not compressed with density ratio of ~1000.
Euler Equation: $$ ∂Q/∂t + ∂F/∂x =... |
I am solving a non linear second order implicit initial value problem using finite difference method, but my results do not converge. Please guide me with an example, how we can apply finite difference method with big accuracy.
The problem is $$(A+By(t)-C(-y'(t))^-1/3)y''(t)=-(By'(t)^2+C),\qquad y(t=0)=0,$$ using fdm, ... |
I've a read a paper about investing where they used a dynamic programming approach to solve a finite horizon problem, i.e.
$$\max_{x_t} E[u(W_T)] $$
where $u$ is a utility function and $W_T$ denotes the terminal wealth. The Bellman equation can then be written as
$$ V_t(W_t) = \max_{x_t}E[V_{t+1}(W_{t+1})|W_t]$$
with... |
I'm trying to solve a very simple advection PDE
$\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=0$
where $c<0$.
I have been able to implement a simple Modelica code to solve the equation and it works just fine for $c>0$ with the exact same boundary conditions, though. So my question is why my code is no... |
I am trying to use backwards finite difference method to numerically solve a pair of partial differential equations:
$\frac{\partial \left(pv\right)}{\partial x}+\frac{\partial p}{\partial t}=0$
$\frac{\partial \left(pv^2\right)}{\partial x}+\frac{\partial \left(pv\right)}{\partial t}+c\frac{\partial p}{\partial x}=0$... |
I'm trying to solve the heat equation in FiPy and right now it works, but I have one problem:
The material I have to simulate has different diffusion coefficients in the x and y direction (due to its fibre layerd structure). I know, that you can make your diffusion coefficient dependent to a variable in FiPy.
My grid i... |
I have a 9 systems of nonlinear ODEs to solve. I want to determine the endemic equilibrium points.
How do I go about it?
I tried manual calculation but it becomes cumbersome. Can software be used for this purpose?
|
I'm measuring the integral of a quantity which, mathematically, requires the computation of a dilogarithm function.
$$\operatorname{Li}_2(be^{ax})$$
where $b$ and $a$ (are real and) can be positive or negative. Dilogarithm has very nice properties that enable us to compute its value efficiently, For $|z|<1$, the follow... |
I have been looking into simple ways of calculating numerically the total fluid stress tensor $ \pi_{ij}$ if the flow field is known in every $ x,y,z $ point. Applying the fluid stress equation (see below) isn't really straightforward since it requires an analytical velocity field. I understand this question might be "... |
I am computing the inverse of a complex matrix. I execute ZGETRF but U(2,2) = 0. When I compute ZGETRI, the inverse is determined. Can I trust this inverse?
|
I have the same problem as in this question.
But can someone elaborate on the answer? The poster says that:
Solving this system of 4 ODE's with rk4 will solve for all your state variables simultaneously. position and velocity do not need to be handled seperately (and shouldn't be).
How is this actually implemented? T... |
I have written Poisson solvers using two different methods:
A classic Jacobi scheme and one using the multigrid solver Hypre. I made up a couple of test cases ensuring the validity of those solvers.
For both cases the domain is defined as $(x,y) \in [-1,1]^2$ with periodic boundary conditions. Also, the grids first and... |
I am trying to estimate the FD stencil for boundary as mentioned in this paper (section 4.1) using MATLAB. The stencil order (6th) is higher than the one mentioned in paper (4th).
$$ f_1' +\alpha f_2' = \frac{1}{h} (c_1f_1 + c_2f_2 + c_3f_3 +c_4f_4+ c_5f_5 + c_6 f_6 + c_7 f_7 )$$
Each term of both sides is expanded us... |
In order to integrate a two dimensional function of the form
$$\int_{1}^\infty \int_{-\sqrt{x^2-1}}^{\sqrt{x^2-1}} e^{-x} \rm{d}y \rm{d}x,$$
I have been attempting to use the following code (written in C++) taken mostly from the Numerical Recipes book which calls a gaussian quadrature routine for the integration:
sta... |
The water height $h$ and 2d velocity field $(u,w)$ are "extrapolated
to non-fluid-cells, i.e., setting $h$ equal to the value in the
nearest fluid cell." [Bridson]
I'm using finite differences.
Looking at the course notes, this extrapolation seems involved: tracking the zero level set surface $\phi$ (using signe... |
I am trying to solve Stokes problem using Finite element method.
My question is how to impose that total pressure over the surface is zero to remove the constant pressure mode?
|
I would like to perform a decane/water(tip4p) interface simulation using GROMACS to analyse the fluctuation of the interface over a long period of time (50ps - 1ns).
Though I have a rough idea on how to perform it, I still am unsure about how to create a initial configuration which looks like the figure give below (A.... |
Assume I have two functions $f$ and $g$, with derivatives of $g$ at point $x$ and derivatives of $f$ at point $g(x)$ available.
What is the fastest way of computing derivatives of $f \circ g (x)$ ?
|
I have a PDE (coming from a Bellman equation with $z$ under brownian motion). Let $z \in [0,\infty)$ and $t \in [0,T]$. To sketch the equation:
$$
(r - g(t)) v(t,z) = \pi(t,z) + (\gamma - g(t))v_z(t,z) + \frac{\sigma^2}{2}v_{zz}(t,z) + v_t(t,z)
$$
with a terminal condition $v(T,z)$ and ugly nonlinear boundary condit... |
Are there any high performance integer BLAS libraries that implement matrix multiplication i.e. i32gemm and i64gemm ? I need to use them for a cryptographic application and can tolerate overflows, i.e. I don't require the kernel to do any wraparound checks.
The difference between a Igemm and an Fgemm is that the latter... |
I'm prototyping a system that finds the 3D pose of a object in a video sequence. For this I minimize a error function involving the rotation and translation of the object as parameters and two sets of points (polluted with gaussian noise but no outliers) as data.
I have tried to parameterize the rotation matrix both us... |
Suppose I have a multi-dimensional vector space $X$, and a collection of $n$ vectors $\{x_i\}_{i=1}^n \subset X$, which are not evenly "spaced-out" in $X$. I am searching for $m<<n$ of these $x_i$ that are good representatives of $X$, or in other words, they are roughly equi-distant to each other.
How can I find these ... |
Considering that COMSOL forum is dead and CFD-online is not responsive, I'm gonna try asking my question here:
I have done a 2D simulation in COMSOL multiphysics. I have two independent variables x and t and two dependent variable u1 and u2. Comsol gives me 2D projections of the 3D graphs u1(x,t) and u2(x,t) as below:... |
I have $n$ points that form a grid with empty space and I need to find an algorithm that would calculate the total distance of those points with time complexity lower than $O(n^2)$.
a grid with $n=5$ could be represented as a matrix:
$$
\begin{matrix}
0 & 0 & 1 \\
1 & 0 & 1 \\
0 & 1 & 1 ... |
Problem
I would like to solve a nonlinear integro-differential equations on a 2D square domain $\Omega$ subject to Neumann boundary conditions using finite differences:
$$\frac{\partial u}{\partial t} = f(u) + \int_\Omega G(x'-x)\left[u(x')-u(x)\right] dx'.$$
The variable $u(x,t)$ depends on space and time, $f$ is a no... |
I need to diagonalize such kind of matrix during research: it's n-by-n, with it's upper-left (n-1)-by-(n-1) corner be diagonal while the nth row & column are dense. It's observed that the self adjoint eigensolver is not quite efficient as a solution when n is greater than roughly 2000 and there is no existing eigensolv... |
These are the discretized drift diffusion equations as taken from the book "Analysis and Simulation of Semiconductor Devices". The electron continuity equation is:
$$((\Delta_{j-1}^y+\Delta_j^y)/2\Delta_i^x).D_{i+1/2,j}^n.B((\varphi_{i+1,j}-\varphi_{i,j})/V_T).n_{i+1,j} + ((\Delta_{j-1}^y+\Delta_j^y)/2\Delta_{i-1}^x).... |
I'm trying to implement Dinur-Nissim algorithm and am stuck at how to solve the set of linear inequalities with multiple unknowns and a large number of equations along with constraints.
Example:
\begin{align}
0.2 \leq c_4 \leq 0.66\\
0.66 \leq c_3 \leq 1.56\\
0.96 \leq c_3 + c4 \leq 2.26\\
\end{align}
Constraints:
$$0... |
I have this dataset, and I am using y = (a * x^n) / (b + x^n) Hill function as the model, where a is the limit of the Hill curve, b is the point at which a/2 is reached (for n = 1) and n is the cooperativity or steepness of the curve.
Currently, I am storing all X,y values, computing the parameters from scipy.optimize.... |
I want to simulate a simple 3D diffusion (e.g., an ink released from one side of a vessel) using SciPy. There are some tutorials for one-dimensional diffusion. Although the ink goes in one direction, it will not be straight. I appreciate if you can help me to consider the spread of the ink along with other dimensions t... |
Suppose I am given a vector $v^0\in\mathbb{R}^n$ and integers $k,\ell\in\mathbb{Z}$. Assuming $k$ is close to zero (e.g. $0\leq k\leq5$), is there an algorithm for solving the following integer optimization problem?
$$
\boxed{
\begin{array}{rl}
\min_v & \|v-v^0\|_2\\
\mathrm{s.t.} & v_i\in\{-k,\ldots,0,\ldots,k\}\ \fo... |
I'm interested in modeling the electromagnetic fields radiated from an accelerated charge, but do not want to reinvent stuff if possible. I suspect there are software packages already out there which allows a person to provide the incoming accelerating field or trajectory of the charge, and is returned an array of valu... |
I want to compute the difference $\Delta f(x_1,x_2) = f(x_1)-f(x_2)$ of a smooth function $f(x)$ at two points $x_1$ and $x_2$ which are close to each other. The magnitude of the expected result, $|\Delta f(x_1,x_2)|$, is often small compared to $|f(x_1)|$ and $|f(x_2)|$ and several significant digits are lost if I eva... |
I am trying to calculate the singular value decomposition of this matrix using numpy.linalg.svd .
However, reconstructing the matrix from the SVD gives a poor reconstruction - in particular, the first row and second column are far smaller in the reconstruction than in the original matrix.
u, w, vt = np.linalg.svd(M)
np... |
I would like to volumetrically render 3D scalar data in Paraview, and I'm not sure if my inability to do so is incorrect usage of VTK or Paraview.
I have built a *.vtu VTK unstructured grid file containing 2 cells consisting of 10 PolyVertex objects with scalar data associated with each point. These are meant to repres... |
Thank you all
1.) I am trying to solve the lid-driven cavity problem for an incompressible Stokes and Navier Stokes equations using the general "Mixed" finite element method. Dirichlet boundary conditions are specified everywhere on the boundary.
When I try to solve these systems of equations, my matrix showing is that... |
I am looking for different approaches to extract 3D polylines out of Point Clouds.
We are able to create these point clouds out of different data sources of real world surveys (LIDAR, RADAR, etc...) and to classify points (as metallic in common soil for example). What I am looking for is academic work/papers on algori... |
I'm trying to implement finite-difference WENO method to progressively complex equations and systems.
At the moment I'm successful with singular scalar equations (constant advection and Burgers), and trying to advance to 1D system of Euler equations.
I've read that there are two approaches to apply WENO to systems of c... |
What data structure (or C++ library implementing it) is most suitable for efficient high dimensional histogramming?
I have an application where I need to compute something similar to a histogram in a high dimensional space ($d=10..20$). Even with a large linear bin size, there would be too many bins in total. However, ... |
Let's say that I have a FEM code which yields the following problem:
$$
\mathbf{A}\mathbf{x} = \mathbf{b}.
$$
In order to solve this more efficiently with an iterative method, I would like to precondition it,
$$
\mathbf{BAx} = \mathbf{Bb},
$$
using domain decomposition. This is a common application for domain decomposi... |
I tried to used f2py, Cython and Numba to make a simple loop structure be faster in python. Python implementation:
def Python(A):
B = 0.0
for i in range(100):
for j in range(100):
for k in range(100):
for l in range(100):
B = B + A[i,j,k,l]
return B
Numa ... |
I'm trying to apply finite-difference characteristic-wise WENO method to 1D Euler equations:
$$
U_t + F(U)_x = 0, \; \;\text{where} \;\; U = (\rho, \rho u, e) \;\; \text{and} \;\;F(U) = (\rho u, \rho u^2+p, (e+p)u)
$$
Physical values are set at grid points $x_j$, so we need to approximate fluxes at mid-points $x_{j\pm ... |
I was using scipy.integrate.odeint function , the ode is
$$\frac{y\ dx - x\ dy}{(x+y)^2} + dy = dx$$
with solution
$$y^2 - x^2 - y = c (x + y)\ .$$
Solving it via odeint
from scipy.integrate import odeint
import numpy as np
import matplotlib.pyplot as plt
def dy_dx(y, x):
return ((x+y)**2 - y)/((x+y)**2 - x)
xs = np... |
I would like to solve a system of second-order differential equations to describe the dynamics of a system of particles.
Two Newton-like forces are responsible for the motion of each particle $i$: A force acting on each particle due to other particles $f_{i,j}$ and a stochastic term of noise $f_{\mathrm{noise}}$.
The f... |
I am looking for libraries for solving large scale linear system (10e5) of equations using parallelization and shared memory.
1. Sparse, complex symmetric, SPD.
2. Suitable for higher order FEM ,DGFEM using Domain decomposition.
3. Suitable for iterative solvers with built in preconditioners.
4. Suitable for C++ an... |
Given a set of ODE's $ \dot{z} = f(z) $ (or discrete time $ z_{t+1} = f(z_t) $), is there a way to numerically find constants of motion?
For $ f(z_t) \approx M z_t $, diagonalizing the matrix $ M $ and finding eigenvalues equal to 1 works, but this only finds linear combinations of $ z $ that are constant. I would like... |
When applying the classical formula for the angle between two vectors:
$$\alpha = \arccos \frac{\mathbf{v_1} \cdot \mathbf{v_2}}{\|\mathbf{v_1}\| \|\mathbf{v_2}\|}$$
one finds that, for very small/acute angles, there is a loss of precision and the result is not accurate. As explained in this Stack Overflow answer, one ... |
How to determine if a PDE is structure-preserving (energy,mass conserved)? Are there some standards in judging the preserving-structure? Or rather, how to derive the formulation of energy-preserved form of a PDE? I am new to this field, I am long for receiving some references (some books, representative papers or s... |
I tried to simulate soliton propagation by solving the nonlinear Schrödinger equation using the split-step Fourier method. The following is an example of the Matlab code copied from a textbook.
alpha = 0;
beta_2 = 1;
gamma = 1;
A = N*sech(T); % initial pulse shape
L = max(size(A));
delta_omega = 1/L/delta_T*2*pi;
om... |
Is it possible to solve an equation with only a single derivative such as:
$$\frac{\partial U(x,t)}{\partial t} = A - BU(x,t)$$
with finite difference methods?
I ask as I am trying to solve the below equation using a finite difference method.
$$\frac{\partial \vec{m}(x,t)}{\partial t} = -\frac{\partial \vec{j}_{m}}{\p... |
I want to trace electrostatic field lines emerging from 2D surfaces in 3D space. Eventually I want to find their intersection with an (uncharged) mesh.
The charge distribution $\sigma(x), x \in \Gamma \subset \mathbb{R}^3$ is defined by requiring a constant potential $\phi(x) = \phi_\Gamma\ \forall x\in\Gamma$.
For the... |
I have a 2d distribution of moving points with known trajectories represented in a 640x480 image. Here is the initial state:
I have to find the minimum number of rectangles with fixed dimensions (35x42 pixels) that are able to cover all my input data, minimizing also the overlapping areas for each step.
So far I tried... |
It has been discussed that Intel MKL can exhibit irreproducible behavior under certain conditions. In fact, this is a known thing and described by Intel as Conditional Numerical Reproducibility.
A colleague has recently encountered this issue while trying to find the eigenvalues of a matrix and he realized that the fun... |
For a Bounday Element Method problem I require the solution of a system of linear equations with multiple right-hand sides. Though this is a dense system, I still want to do it via Petsc in parallel. Would the best way to do this be through something such as -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package m... |
I am trying to solve Lid driven square cavity flow problem of Stokes equation using finite element method. I have boundary conditions for velocity as zeros on every boundary but u=1 on top boundary. can you please help me with the boundary conditions of stream function and how to obtain ? especially on top boundary.
I ... |
After successful implementation of characteristic-wise finite-difference WENO method to 1D Euler equations, I'm moving to 2D equations on cartesian grid:
$$
\frac{\partial U}{\partial t} + \frac{\partial F(U)}{\partial x} + \frac{\partial G(U)}{\partial y} = 0
$$
where
$$
U = \left( \begin{array}{c} \rho \\ \rho u \\ \... |
I can't seem to find a good algorithm for the one-to-exactly-two assignment problem. Good algorithms are known for the classical assignment problem, where N tasks need to be assigned to to M agents in a one-to-one correspondence.
In my case of the one-to-exactly-two assignment problem, I have N tasks and M agents. Howe... |
I have data for a random variable and I wish to test whether it conforms to the Tracy-Widom distribution. However, the T-W distribution is hard to compute. Is there a readly available table of its values I can just download?
|
I am a newbie in finite difference methods, so I apologize in advance if the question is trivial.
I am trying to solve the advenction equation, i.e.
$\frac{\partial \phi(x,t)}{\partial t} + v \frac{\partial \phi(x,t)}{\partial x}=0$, where $v$ is a velocity, with the finite difference method. The system is of course al... |
I want to solve the following optimization problem:
$$\min_{A,B,X} \|Y-AX\|_F^2 + \lambda_1 \|Z-BX\|_F^2+ \lambda_2 \|B\|_F^2$$
$$s.t ~~x_{ij}~ \geq 0$$
in which, $Y$ and $Z$ are data matrices and are $d \times n$ and $l \times n$ (the corresponding columns of $Y$ and $Z$ are data samples), and $A,B,X$ are the paramet... |
I have two arrays $f(z)$ and $z$ both indexed by k and I want to solve $\frac{df}{dz}=\mu(1-f)$ to find $\mu(z)$
What would be the best numerical method to solve this equation?
|
I want to use FEM to solve a 2D eigenvalue problem for the biharmonic equation
\begin{align}
&K \psi= \lambda M \psi\\
&\psi=\nabla \psi\cdot \hat{n}=0\quad \text{on boundaries}
\end{align}
where $K$ is the stiffness matrix corresponding to
$$K_{ij} = \int_{A} \nabla^2 \psi_i \nabla^2 \psi_j \mathrm{d}A$$
and $M$ is t... |
Is there an algorithm that can determine the interaction laws between particles (or point-like objects) based on their motion?
A simple case: an algorithm that determines the gravitational interaction from nothing but the motion of the planets in the solar system. Without a lookup table of particle interactions.
|
I have small scale dense least squares problem with box constraints
$$\mbox{argmin}||Ax - b||^2 \quad $$
$$\mbox{subject to} \quad l_i \leq x_i \leq u_i,$$
Number of variables is about 10-50, several hundreds in worst case. Number of constraints is equal to number of variables. So i can factorize $A$ and/or $A^TA$. Als... |
It is conventional wisdom that programmers should use std::hypot whenever one implements an expression of the form $r = \sqrt{x^2 + y^2}$
In my example, my expression is $r = \sqrt{1 + c^2}$, where $0 \le c \le 1, c \in \Re$. My first instinct is to reach for hypot() to implement - I am interested in both double and f... |
Given a 2D irregular spaced data like shown in the figure, I would like to know how to find derivatives at '*' by interpolating the values at 'o'. Does lagrange 2D interpolation work at irregular spaced data
|
I'm a novice to finite element and I'm finding quite hard to find the actual difference between Test function(s) and Basis function(s).
I would be glad if somone could explain me that and point out how can they differ from one another and in which cases its useful that they differ (or not).
|
In the course of trying to implement algorithms for Voronoi and Laguerre diagrams, I realized I needed to verify if my implementation is working correctly using a point (or circle) configuration with a known Voronoi (or power) diagram.
I have not been successful in looking for datasets with known diagrams. Does anyone ... |
I need to do a matching on a hypergraph. I read that in the case of a hypergraph there is no adjacency matrix.
How do I represent edges then?
|
Let $p$ be a polynomial with floating-point coefficients and let $a$ be a floating-point value.
Is there a method for accurately evaluating the sign of $p(a)$ in floating-point arithmetic?
I don't care about the actual value $f(a)$, only about its sign. But I want the exact sign.
If it helps, we can assume that $ 0 \le... |
I wanted to find and plot the eigenvalues of large (around $1000\times1000$) matrices. But discovered when using the eig function in matlab, it gives complex eigenvalues when it shouldn't. For example, in the code below I have a Tridiagonal Toeplitz matrix, which should have all real eigenvalues.
But it seems eig is un... |
I'm simulating a nano particle and wish to calculate the activation energy of the reaction where an atom is displaced from one point on the lattice to a neighboring void( might be at higher energy than initial).
Calculating this activation energy using energy difference will require me to calculate the complete trajec... |
I am interested in reading about the analysis (existence, uniqueness, error estimates) of elliptic problems solved with a Mixed method that uses the Raviart Thomas elements (so far so good, easy to find) but with the presence of hanging nodes, (I haven't found anything). I have a paper from 2002 that claims this tha... |
I'm working with python vtkDelaunay3D package for a special purpose. I have set some points but I do not know how can I measure euclidean distance between points with this package. Is there anyone who knows measuring euclidean distance between points with this package in python?
|
I am curious of whether optimisation algorithms (whatever simplex, active-set quadratic programming, interior point sequential etc.) can fail due to numerical errors and how to avoid them. But I cannot find related literature online. It seems people mostly study the numerical stability of various matrix factorisation m... |
I have a quadratic binary optimization problem of the form
\begin{align}
&\max x^TQx \cr
&\text{subject to }x\in\mathcal{X}\subseteq\{0,1\}^n,
\end{align}
where $\mathcal{X}$ is the feasible area defined by linear constraints and binary requirement on the variables. I can assume that all entries in the matrix $Q$ are n... |
I am learning C/C++ for Scientific Computing and I have a question regarding the usage of scientific libraries for basic operations.
Suppose I have to write a small program in C for a bioinformatics project: for some operations I need to use matrices and very basic computations on them (LU for instance). I went through... |
I'm pretty new to translating simulation to reality so please forgive the perhaps naive approach I'm taking here.
If we have a (quasi-2D) experimental video of a certain concentration changing with time, and we wish to determine the diffusion coefficient by comparing the video with a simulation, one can use the discret... |
I am using an FEM code written in Fortran which I did not design. For a particular problem, the program complains that the determinant of the Jacobian matrix is inferior to zero.
I vaguely understand that the Jacobian matrix is related to the shape functions and that it must be inverted to map shape function coordinat... |
My goal is to compute the k smallest eigenvalues of large symmetric sparse matrices. For this purpose I use python scipy's eigsh method in shift-invert mode which uses ARPACK. The matrices usually have around 900,000-1,000,000 rows. Now the computation time for these matrices on my system is normally around 30 minutes.... |
I have been trying to solve Time Independent Schrodinger's equation in one dimension using Numerov Method as discussed in this excellent lecture notes I found on net.
The Numerov method can solve an equation of the following kind:
$$\frac{{d^2}y}{dx^2}=-g(x) y(x) +s(x) $$
We can compare this with out Time Independent... |
I am trying to make a code for 1D shallow water equation (nonlinear without source terms) using the MacCormack method for sinusoidal wave propagation. My issue is that the wave fluctuates and does not produce a smooth result. I think there might be an issue with my boundary conditions as I am giving boundary condition ... |
Cross-posted from Math Stackexchange: https://math.stackexchange.com/questions/2421964/approximating-solutions-to-quadratic-recurrence
I have a branching process problem that has been reduced to solving a system of recurrences defined for $0 \leq i \leq T$, for some large positive integer $T$ and fixed constants $d, \m... |
I have a numerical optimization problem that I am trying to scale appropriately, in order to allow for the solver to achieve faster and more accurate results. I found a paper here that had a short section on nondimensionalization on page 44, that simply stated the following:
In order to nondimensionalize a quantity, j... |
I'm in the context of this publication: http://www.gilbertbernstein.com/resources/booleans2009.pdf
I applied quantization to my point coordinates: All coordinates are integer lying in [0, 2 power 20]. The C++ type representing a coordinate is int64_t.
A plane p is represented in integer homogeneous coordinates (a, b, c... |
I want to solve
\begin{align}
\nabla^4\psi+\alpha\nabla^2\psi+\beta\psi=F(x,y);\quad
\nabla \psi\cdot \hat{n}=\nabla^3\psi\cdot \hat{n}=0\quad \text{on boundaries}
\end{align}
with a 2d FEM scheme. With the biharmonic operator, linear test functions are ruled out. I can integrate the first term by parts twice, so that... |
Let's say I have a matrix $\mathbf{A}\in\mathbb{R}^{n\times n}$, and its associated inverse, $\mathbf{A}^{-1}$. The elements of $\mathbf{A}$ are given in IEEE single precision, i.e. 23-bit mantissa, and I use the lapack routines $\texttt{sgetrf}$ and $\texttt{sgetri}$ to compute $\mathbf{A}^{-1}$ through a single-preci... |
Let's say I am running a FDTD simulation of a wave-equation to determine a transfer function of an LTI system:
\begin{equation}
H(f) = \dfrac{Y(f)}{X(f)}\
\end{equation}
where $Y(f)$ and $X(f)$ are Fourier transforms of signals measured at some point in the FDTD grid for a grid with an "obstacle" inserted and an empty ... |
I am looking for an alternative and robust alternative to Gram-Schmidt orthogonalization, but with one constraint:
I have a unit vector $\mathbf{v}_1 \in \mathbb{R}^d \,\text{s.t.} \,\|\mathbf{v}_1^T\mathbf{v}_1\|=1$ and I want to find a set of $d-1$ vectors $\{\mathbf{v}_2\cdots \mathbf{v}_{d}\} \perp \mathbf{v}$, ort... |
A solution to the 1D consolidation problem is given by
$$\frac{\partial}{\partial t} p = c_{v} \frac{\partial^{2}}{\partial y^{2}} p$$
where $p$ is the pore water pressure, $c_v$ is the consolidation coefficient, $t$ is the elapsed time and $y$ is the height of the column. Further background is provided by this docume... |
I'm looking for an image filter that does the following operation:
In my first image, I have two spheres. After applying the filter, I'd like to have them "glued together" which something that kind of resembles surface tension.
Remarks:
The image will be 2D/3D, with the signed distance to the surface of the spheres en... |
I am given the data about nodes and elements of a tetrahedral mesh. What algorithm do I use to find the boundary faces of the mesh?
|
Has anybody ever managed to simulate even the simplest form of life by merely simulating the interactions of the molecules of the organisms body?
What would be the theoretical minimum number of molecules to build such a numerical simulation?
|
Using NumPy and attempting to multiply matrices together sometimes doesn't work. For example
import numpy as np
x = np.matrix('1, 2; 3, 8; 2, 9')
y = np.matrix('5, 4; 8, 2')
print(np.multiply(x, y))
can return
Traceback (most recent call last):
File "vector-practice.py", line 6, in <module>
print(np.multiply(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.