All Questions

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

How to implement a frequency domain filter in python [closed]

Im trying to implement a frequency-domain filter in python using an specific response function. The idea is to perform the Fourier transform of an image multiply it by the filter response function and ...
1
vote
2answers
41 views

Weak form of the Navier-Cauchy equation

I am trying to obtain the weak form of the Navier-Cauchy equation, which is $$- \rho \omega ^2 \textbf{U} - \mu \nabla ^2 \textbf{U} - (\mu + \lambda) \nabla (\nabla \cdot \textbf{U}) = \textbf{F}$$ ...
0
votes
0answers
16 views

Python Environment Carrying Over to Jobs

I am trying to run a software package developed that has some dependencies such as numpy on a cluster. My issue seems to be with the python environment. I have set up the environment correctly for ...
1
vote
0answers
16 views

FEM with elastic inhomogeneous properties leads to mesh-induced anisotropy

I'm solving an elastic homogenization problem and I'm having problems with mesh artifacts. I would like to first give a brief summary of what I do: I have a system with inhomogeneous (but isotropic) ...
0
votes
1answer
43 views

Issue solving nonlinear equation containing a quotient

I have a coupled set of PDEs that need to be solved as part of a larger problem. I am currently approaching this by computing spatial derivatives with finite differences and using PETSc's nonlinear ...
0
votes
0answers
35 views

Efficient way to solve a set of linear equations Ax=b when A is sparse and some elements of b are equal to zero

I have a set of linear equations, Ax=b. And about half of the elements in the right hand side (vector 'b') are equal to zero. My system matrix 'A' is a sparse complex matrix. And 'A' is in the size ...
1
vote
1answer
39 views

Effect on methods like Crank-Nicolson of adding a potential term, changing heat equation to Schrodinger equation

I'm studying up on methods for numerically solving the Schrodinger equation. The Schrodinger equation with a zero potential is formally identical to the heat equation in the sense that we just make ...
1
vote
0answers
16 views

Euler Explict Method for solving the PDE for option prices under the Schwartz mean reverting model. Numerical Finance

I have to solve the following PDE for a Call option : $\partial_tV + \{ \alpha - (\mu - \lambda/ \alpha -log(S))\}S\partial_SV + 1/2 \sigma^{2}S^{2}\partial_{S}^{2}V - rV = 0$ Where V(S,t) is the ...
0
votes
0answers
7 views

Accelerating convergence of a generalized continued fraction

I wish to compute $$ \frac{1}{1 + \frac{1^3}{1 + \frac{2^3}{1 + \frac{3^3}{1+\cdots} } } } $$ to high accuracy. To start, I tried computing $$ \frac{1}{1 + \frac{1^2}{1 + \frac{2^2}{1 + \frac{3^2}{1+\...
1
vote
2answers
46 views

Methods for solving discrete PDEs using algorithmic differentiation results

I'm looking for a method to solve a 20000 variable, 20000 residual non-linear PDE with a Galerkin method. I have Fortran subroutines for: The residuals: $\vec{r}(\vec{x})$; Their Jacobian multiplied ...
0
votes
0answers
28 views

Numerically solving an equation with uniform random variable

I'm trying to replicate a paper which has the following equation: $$nB(w_{m}^{t})^{-\sigma}\int\limits_{(w_{m}^{t})^{1/\alpha}}^{w^{t}} (\delta^{\alpha})^{\sigma-1}dF(\delta)= L_{m}^{t}\, .$$ I need ...
1
vote
0answers
34 views

Is Romberg integration method implemented as weighted function values numerically correct?

I have to integrate expression f(x) * g(x) for many different functions f but just one g. I ...
-1
votes
0answers
21 views

Are superluminal computers possible? [closed]

I have no idea how a computer works on the lowest voltage moving through tiny circuit chips level, but if you wanna travel space from one star to another, don't you need a faster than light ...
6
votes
2answers
216 views

Is there an iterative solver for dense matrices with possible zero diagonal entries?

Is there an iterative solver that can handle potentially zero entries on the central diagonal? I am implementing a polynomial fitting algorithm (up to $10^{th}$-order) and my matrix is a "...
1
vote
1answer
75 views

$P0$ elements for $H1$

Are there $P0$ (zero degree/constant element) nonconforming methods for approximating solutions in $H1$? More specifically, I have the equation: $$u-f - T\Delta u = 0$$ Which can be interpreted as ...
-1
votes
0answers
27 views

How to derive the corrector step for the eq $\frac{\partial u}{\partial t}+\frac{\partial f}{\partial x}=0$

Let define a predictor step for the equation $\frac{\partial u}{\partial t}+\frac{\partial f}{\partial x}=0$, by: $$U_{i+\beta}^{n+\alpha} \equiv \bar{U}_{i}=U_{i}^{n}+\beta\left(U_{i+1}^{n}-U_{i}^{n}\...
0
votes
0answers
37 views

Solver for large dense BVP system in python

I have a large system of boundary value problems of the form $$ \frac{d^2 y }{dt^2} = C(t) y + b(t), $$ where the variable $y$ is a vector that has anywhere from 50 to around 500 components, $C$ is a ...
0
votes
1answer
68 views

Method of Lines Runge-Kutta nonlinear stability and behavior

I have a system of 4 nonlinear 1st-order PDEs. I want to solve them numerically by method of lines, first discretizing space. This leads to the system of $N\times 4$ coupled ODEs. $$ \mathbf{u}_{i} =...
0
votes
0answers
14 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 ...
0
votes
1answer
52 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
40 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
151 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}...
0
votes
0answers
25 views

C++: function calling order (inheritnce and methods) [closed]

I was asked to write the output of this code: ...
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
31 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
128 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
45 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
170 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 ...
-1
votes
0answers
11 views

Could someone please provide simple instructions for uploading excel values into gnuplot [closed]

I am new to this. Please be nice. I have already completed half of this assignment: Using excel, you will need to generate at least 500 values for x, 500 for y, and 500 for z, using the random ...
0
votes
0answers
20 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
87 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
42 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
45 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
25 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
49 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
22 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
63 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,$$ $$\...
2
votes
0answers
73 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
87 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
47 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
35 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
33 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
81 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
22 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
14 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 ...
-1
votes
0answers
15 views

Problem with physical groups to label surface in GMSH

I'm having some troubles setting the ID for the physical group of the boundary and then extract them later in Python. Here's my main.geo file: ...
2
votes
0answers
41 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
84 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}$$ ...

15 30 50 per page
1
2 3 4 5
177