All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

A way to generate unit lattices from a honeycomb structure

I am looking to make certain computations on the vertices of periodic cubic honeycombs and quasiregular honeycombs like tetrahedral-octahedral honeycomb. Cubic are simple enough and amount to generate ...
1
vote
1answer
86 views

Matlab - Fast Computation of Truncated SVD / PCA

I'm working with a Matlab codebase wherein I'm attempting to solve A*c = b by approximating the (square) matrix A with its ...
0
votes
1answer
42 views

Are there any constraints on eigenvalues that are used in inverse iteration?

What is the result of the method for multiple eigenvalues? Is there any case for which this method will not work altogether?
0
votes
2answers
163 views

Integration by parts with cross derivatives to obtain the weak form [duplicate]

I’m trying to write the weak form of the Navier-Cauchy equation in the component form, where $u_1$ and $u_2$ are the displacement components: $$-(2 \mu +\lambda) \frac{\partial ^2 u_1}{\partial x_1 ^2}...
1
vote
0answers
26 views

How property-invariance is imposed to neural nets?

I was wondering how specific symmetries or constraints such as property-invariance transformation are imposed on any (deep) neural net when they are trained. I'll appreciate it if anyone can aware me ...
1
vote
0answers
34 views

Cell-centered DG extension to the two-point flux approximation scheme

A current problem that I am working on requires me to compute the solution from the heat diffusion evolution on a discontinuous function. More precisely - I have a Delaunay triangulation and within ...
5
votes
1answer
138 views

Accurate computation of Gauss-Kuzmin entropy

The Gauss-Kuzmin distribution gives the probability of an integer appearing as a partial denominator in the continued fraction of a real number $x$ as $$ P(a_k = k) = -\log_2\left(1 - \frac{1}{(k+1)^2}...
0
votes
0answers
46 views

Non-linear differential equation

I have this equation $$y\left(\dot y^2+1\right)=m + \Lambda y^3,$$ where $\Lambda=1.1\cdot 10^{-52} $ (Cosmological constant). I want to get the graph of the solution of this equation (2-parametric ...
2
votes
1answer
183 views

Solution of the linear system using Sherman-Morrison formula for 1000000x1000000 (7450.6GB) matrix using MATLAB

Let $n = 10^6.$ Let $A \in \mathbb{R}^{n\times n} $ be the lower triangular matrix having 1's on and below the main diagonal. We want to solve the following linear system: $$ (A + uv^T)x = b$$ by the ...
0
votes
0answers
22 views

Error analysis of Modified Lentz's method

In Numerical Recipes, the authors state: There is at present no rigorous analysis of error propagation in Lentz’s algorithm. This statement is now ~15 years old, so I wonder has this gap in the ...
2
votes
2answers
94 views

Finite difference method having a discontinuity

I am trying to understand the FDM which is a widely used method solving differential equations by using approximation below. $$\dfrac{\partial u}{\partial x}=\dfrac{u(i+1)-u(i-1)}{2\Delta x}$$ How can ...
3
votes
0answers
46 views

Some formulations of domain coupling lead to saddle point problems. Is this merely an artifact?

Background I wanted to learn how to couple FEM and BEM (for the Poisson equation), because I wanted to better understand how open boundary conditions look like. Therefore I worked through the relevant ...
0
votes
1answer
51 views

How to use cumtrapz correctly?

I have tried to do a trapeze integration with f(x)=x^2, where I know how the antiderivative looks like, so F(x) = (1/3)x^3 Here's my code, just like I tried: ...
0
votes
1answer
31 views

Integrating Matrix Elements TypeError: f() takes 1 positional argument but 3 were given

I'm working on a linear variational problem for a general PIB and I keep encountering the same problem, and I know its a rather simple solution. Any suggestions? ...
0
votes
1answer
68 views

Differences between openfoam and freefem/fenics

I know a little about fenics and freefem. There exists a big difference between those and OpenFoam? They are used in a similar way (editing a file and writing code)? or perhaps it is made for other ...
-1
votes
1answer
23 views

How to connect two cylinders to form a knee in Comsol Multiphysics?

I have this I want it to be single bended wire. How to accomplish?
0
votes
0answers
64 views

Why is my numerical solution to a set of ODEs infinite?

I am trying to solve the following linear PDEs $$\frac{\partial u_x}{\partial x}=-[i\omega b_{||}+\nabla_\perp u_\perp],$$ $$\frac{\partial b_{||}}{\partial x}=-\frac{i}{\omega}\mathcal{L}u_x,$$ $$\...
3
votes
0answers
81 views

Compute Nullspace of Sparse Matrix

I am computing the nullspace of a sparse rectangular $m$ x $n$ matrix $A$, where $m$ << $n$. I do this by computing the QR decomposition of $A^T$ and extract the $n-m$ right-most columns of the ...
0
votes
1answer
88 views

I need help with a variational formulation

For this problem \begin{cases} &\frac{d^2 u}{dx^2}=Log(1+x+y),in \quad\Omega=(0,1)^2\\ &u=0,\qquad on \quad\Gamma_{1}: x=0\\ &u=0,\qquad on \quad\Gamma_{3}: x=1\\ &\frac{du}{d\eta}=0,\...
0
votes
0answers
51 views

Applying the result of Cuthill-McKee in SciPy (followup)

This is a followup to Applying the result of Cuthill-McKee in SciPy , where I'm not sure the answer given is correct. It's also 4 years old, so I'm trying a new question. The question is still ...
0
votes
0answers
37 views

Plotting a Magnetic Field in Spherical Coordinates in Python

I am modeling a Helmholtz Coil as two dipoles from far away and I want to plot the magnetic field. $$\mathbf{B}(\mathbf{r}) = \frac{\mu_0 |\mathbf{m}|}{4\pi r^3}\left(2\cos\theta\,\hat{\mathbf{r}} + \...
3
votes
0answers
35 views

Numerical calculation of the Berry connection

I'm doing some numerical calculations involving Hermitian matrices, and derivatives of the eigenvectors. Essentially, I have an n x n, Hermitian matrix H(x), which is dependent on some continuous ...
3
votes
0answers
82 views

Is the matrix exponential and the Jordan canonical form actually useful for solving differential equations?

All of my yearlong graduate-level Linear Algebra course notes from my professor—an algebraist/representation theorist—shows his love for the exponential map $e^A$ and the Jordan canonical form—and one ...
0
votes
0answers
26 views

Estimating the dimension of a solution space in nonlinear least squares

Suppose I have a nonlinear least squares problem, $$ \min_{\mathbf{x}} || \mathbf{f}(\mathbf{x}) ||^2 $$ with $n$ residuals and $m$ parameters, so that $\mathbf{x} \in \mathbb{R}^m$, and $\mathbf{f} \...
22
votes
9answers
9k views

Are there any embarrassingly parallel tasks that require a CPU rather than GPU?

I am looking for tasks that are unsuitable for GPUs gain significant speedup as more CPU nodes are added don't require large data transfer or inter-thread communication between nodes. Do any ...
0
votes
0answers
15 views

How to multiply 2 decision variables and a matrix using python

So, basically our agenda is to assign tour guides to tour groups based on this equation and that will be done by these 2 decision variables z(u,g) and y(g,p) where z(u,g) will be 1 if tour guide 'u' ...
1
vote
0answers
25 views

Entropy of a spatially and temporally varying fluid system?

I'm trying to analyze the change in system thermodynamic entropy of an ideal gas system. For reference, I'm analyzing solution techniques for solving the 1D compressible Euler equations: $$ \partial_t ...
2
votes
0answers
42 views

Solving Stokes Equations in 3D - Do I need to treat pressure-velocity coupling iteratively?

I need to develop a code to solve Stokes Equations in 3D in cubic geometries (structured grid, uniform mesh spacing). My code needs to take a pressure gradient in one direction as a BC (pinlet=p1, ...
5
votes
1answer
88 views

Accurately Computing a Positive Vector in the Nullspace of a Matrix

I'm sure this question has been asked before yet after many hours of searching I am unable to find a definitive answer. The problem at hand is solving the linear system: $$A \mathbf{x} = \mathbf{0}$$ ...
1
vote
0answers
30 views

Effect of reducing flux consistency order at boundary on convergence order

Consider the 1D nonstationary convection-diffusion PDE $$ \begin{alignat}{2} \partial_t u &= -a \partial_x u + D \partial_{xx}u, &\qquad x \in (0,1), t \in (0,T), \\ f(t) &= \left.\left( a ...
0
votes
1answer
127 views

Red flags for numerical computing?

I've learnt the hard way that you should avoid: computing small numbers as the difference of two large numbers evaluating chaotic functions with imprecise inputs. Are there any other red flags a ...
0
votes
1answer
55 views

Solving a sparse linear system using transpose of lower triangular matrix without copying

I have a sparse lower-triangular matrix $L$, and a right-hand side $b$, and I'd like to solve the linear system $$L^T x = b$$ but without explicitly creating $L^T$. Ideally, I could write something ...
1
vote
1answer
57 views

Simple reference problems for time harmonic Maxwell equations

For Navier-Stokes problems we can often choose a relatively simple verification problem such as the lid driven cavity, flow over a cylinder, or flow over a backward facing step to verify our ...
4
votes
1answer
92 views

Non-negative least squares with very small numbers

(I have asked this question on StackOverflow previously but it has been pointed to me that CSSE or MSE could be more appropriate) I have to solve a constrained optimization problem of the following ...
5
votes
0answers
37 views

Origin of phrase `computational microscope'

I have heard the term 'computational microscope' used to describe the practice of molecular simulation (in the context e.g. computational chemistry, materials science) and its use as a numerical tool ...
0
votes
0answers
67 views

Numerical scheme to calculate the normal mode of a set of hyperbolic PDEs?

I would like to solve the linearised, ideal, MHD equations, where the gas pressure is zero. $$\frac{\partial u_x}{\partial t}=v_A^2(x,z)\left[\nabla_{||}b_x - \frac{\partial b_{||}}{\partial x}\right],...
2
votes
0answers
31 views

Non-negative Least Squares to perform Inverse Laplace with weights

I'm trying to perform the inverse Laplace transform of a (noisy) dataset $y_i$ using Tikhonov regularization: $$\min \sum_{i=1}^{N} \left(\int_0^\infty e^{-s_i t} f(t) \, dt - y_i \right)^2 - \lambda^...
4
votes
0answers
18 views

Optimization for sampling multiple points of maximized minimum distance

I'm trying to find a way to sample new points that have maximum minimum-distance (maximin distance). The current situation is where there are ns number of pre-existing sample points. I want N number ...
1
vote
0answers
22 views

Combining many probabilities, modifying, seeking general formula

CONTEXT I need to combine the probability of occurrence of many thousands of events for millions of individuals (trees) in an agent-based/individual-based simulation model developed in NetLogo (agent-...
4
votes
3answers
83 views

I wrote a 2D Finite Element program for Axial Loaded Plates, but the results are unexpected

TLDR: I used Python to write a 2D Finite Element program using 'Constant Strain Triangles' and my beam keeps pointing slightly upwards instead of straight sideways (like the force). I'm new to FEA and ...
0
votes
0answers
36 views

scipy's solve_ivp returns erroneous results for a stiff differential equation

I'm using scipy's solve_ivp for solving a stiff differential equation. I'm using method BDF for solving the same. I have already used MATLAB's ode23s and I'm getting correct results in MATLAB. However,...
1
vote
1answer
44 views

Bode diagram without bode() function

Is there any way to make a bode plot without using the MATLAB/GNU Octave function bode()? As an example, here is a function I am working on: $$H(s) = \frac{1}{2s^...
0
votes
0answers
22 views

At what l/d ratio will a frame element start to behave as a shell element?

I'm working in ETABS. There are few columns of dimension 300mmx1400mm. The height of building is 36.6 meter above ground level and the dimension of building is 26mx68m. I'm getting the time period of ...
0
votes
0answers
74 views

A parallelized GMRES solver?

My application calls for solving a dense, 40,000 x 40,000, ill-conditioned linear system. The native SciPy GMRES solver with preconditioning has worked well for my application and solving a single ...
0
votes
0answers
60 views

Change one inlet boundary condition

This is a problem in modeling in hydraulic fracturing field. It's quite long so hopefully someone can patiently read and help me. The equation numbers are match those of the reference paper by ...
0
votes
1answer
57 views

Plotting the difference between an exponential and its Taylor expansion as a function of number of terms?

I'm terribly green, please forgive me. I need to plot the difference between a chosen calculated Taylor expansion $e^x=1+x+\frac {x^2}{2!}+\frac {x^3}{3!}+\frac {x^4}{4!}+\frac {x^5}{5!}$... and the ...
0
votes
0answers
161 views

What is the meaning of the Helmholtz wave equation?

I am trying to build understanding on the Helmholtz wave equation $\Delta p + k^2 p = 0$, where $p$ is the deviation from ambient pressure and $k$ the wave number, in order to use it in numerical ...
0
votes
0answers
26 views

Compute the sum of probabilities when they are given as logits

Say I have a set of numerous probabilities given by their logarithm : $\{\ln p_i, 1 \leq i \leq N\}$. I want to compute $\sum p_i$, if possible without exponentiating $\ln p_i$, since some of those ...
2
votes
0answers
65 views

Why is LAPACK (seemingly) suboptimal for packed and banded eigenvalue problems?

Based on this LAPACK routines list, it looks like there is no relatively robust representation (RRR) driver routine for either packed or banded symmetric eigenvalue problems. According to the relevant ...
1
vote
1answer
145 views

Is LAPACK behind the cutting edge of dense linear algebra?

I have been digging into some numerical linear algebra lately, and reading in particular about how LAPACK solves symmetric eigenvalue problems. I noticed that the ...

15 30 50 per page