All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
4 views

Jacobis iterative method

I'm using Jacobi iterative method for finding eigenvalue and eigenvector for hermitian or symmetric matrix. Eigenvectors corresponding to eigenvalues are not exact. Third eigenvector is totally off. ...
1
vote
1answer
43 views

Adaptive Lagrangian-Eulerian methods and practical benchmark results

Does anyone know of any published study that talks about the practical aspects of running Adaptive Lagrangian-Eulerian techniques for solid and/or fluid mechanics problems? I'm looking for things ...
2
votes
1answer
84 views

Fast Multipole Method (FMM) 3D (Laplace)

While implementing the Multipole-to-Multipole translation (M2M) with the following equation, $$\phi(P) = \sum_{j=0}^\infty \sum_{k=-j}^j \frac{M_j^k}{r^{j+1}} Y_j^k(\theta,\phi)$$ where, $$M_j^k=\...
0
votes
0answers
44 views

Which library to use in C++ for fast DCT's?

I need to apply a 1D type-II DCT (Discrete Cosine Transform) to each column of a matrix while normalizing the result in C++. Effectively, I want to multiply my matrix with an orthogonal type-II DCT-...
11
votes
0answers
362 views
+50

Sequential approach to solving coupled PDEs

I'm dealing with a coupled system of three transient, non-linear convection-diffusion equations. Let's just say to simplify the problem that they take the following form: $$ -\nabla\cdot(D_{1}(u_{2},...
0
votes
0answers
20 views

How to refine the tetrahedron if exist two longest length edge?

In some algorithms to refine tetrahedron, we need to calculate the longest edge. background If exist a tetrahedron with node ABCD, it has edges ...
2
votes
1answer
135 views

Finite element (1D) for steady state non-linear problem

I need to solve with linear finite elements the equation $$\frac{\partial }{\partial x}\Bigl(\text{sgn}(x) u \Big) +\frac{\partial}{\partial x} \Bigl[ \sqrt{u} \frac{\partial u}{\partial x} \Bigr] =0$...
1
vote
0answers
42 views

Remez algorithm convergence

I have implemented the Remez algorithm in Python where all calculations were done with the Python mpmath library. I have noticed that sometimes the $|E_{max}|$ and $|E_{min}|$ do not monotonically ...
2
votes
1answer
135 views

similarity/distance measurement between two ranked sequence

Is there an efficient way to measure similarity/distance between two sequences of ranked numbers/letters. The two sequences are of different length, and only have some elements in common? For example,...
5
votes
2answers
81 views

What makes a good computational grid?

Most computational methods for solving PDEs are grid-based. What makes a computational grid "good", other than being sufficiently fine to resolve features of numerical solutions? Are grids ...
3
votes
0answers
37 views

Numerical Issues with DDE from SEIRU$\delta$ model

I'm new in this community. I moved this question from Math community. I'm reading the following article Article Here and my target is to replicate the results for a project. SEIRU Model: I obtained ...
0
votes
1answer
139 views

Gmsh for .inp file

How do I get an .inp file from Gmsh? I need to create a simple geometry and mesh it and define the boundary conditions in Gmsh and export it as an ...
4
votes
1answer
67 views

Accuracy of Explicit Euler method (finite difference) decreases as Δx decreases, shouldn't it increase?

The price of a commodity can be described by the Schwartz mean reverting SDE $$dS = \alpha(\mu-\log S)Sdt + \sigma S dW, \qquad \begin{array}.W = \text{ Standard Brownian motion} \\ \alpha = \text{ ...
2
votes
1answer
20 views

How to filter customer voice from customer - agent conversation recordings?

I have a doubt on the project I'm working now. Actually I want only customer voice from the recordings which contains customer-agent conversation.But I have no idea to filter customer voice from ...
0
votes
0answers
38 views

FEM solution becoming wider as number of nodes increase

My FEM scheme uses a 4-node quadrilateral element with bilinear shape functions. The simple problem I'm solving is. $\nabla ^2 f = 5$ But as I increase the number of nodes, the plot of the solution ...
1
vote
1answer
70 views

How to remove sigularities from 3D Vortex Lattice Method

I'm trying to solve aerodynamics of whole aircraft by vortex lattice method (or deeper here). The problem is that sometimes trailing vortex filaments from Horse Shoe Vortexes of main wing hits panels ...
2
votes
0answers
60 views

Inverse problem with uncertain forward operator

Suppose I want to solve a linear inverse problem. In this example we take a convolution with the kernel: $$\frac{1}{(y^2+z^2)^{3/2}}$$ We only take a fixed $z$ for the computation and convolve with ...
1
vote
0answers
22 views

Multiplying by E[xy'] where only some statistics of xy' are known

(cross-posted on crossvalidated) For random variable $(x,y)$ in $\mathbb{R}^{d}\times \mathbb{R}^{d}$ and vector $v \in \mathbb{R}^d$, I need to perform the following matrix vector multiplication. $$T(...
1
vote
1answer
47 views

How is the mixed 2nd partial derivative simplified to a more efficient form?

I'm implementing the Finite Different 2nd and 3rd derivatives in my research and naturally I'm looking for the most efficient approach. From https://en.wikipedia.org/wiki/Finite_difference#cite_ref-...
1
vote
0answers
21 views

Solution of non-linear Poisson equation does not match reference

I'm trying to solve the non-linear Poisson equation as a first step to solve the drift-diffusion equations for semiconductors. For reference, I'm using a preprint from the Weierstrass Institut (which ...
0
votes
1answer
81 views

Would modeling a fluid flow that decreases in magnitude violate conservation of mass?

If I make a quasi-steady assumption in a model such as keeping the fluid density constant and assuming the flow is incompressible, does modeling a flow with decreasing velocity / magnitude, say, as ...
1
vote
2answers
53 views

Coding up a toy model for gradient-descent — what step size to choose?

I'm coding up a simple model for gradient-descent, and using it to minimize some simple, deterministic functions. What step size could I choose that's simple enough for me to get started with? Should ...
1
vote
1answer
53 views

Implicit methods for variable coefficients based on equations of state

For example I have an equation that goes something like $ \partial_t \rho = -\nabla\cdot (\rho u) + \nabla \cdot(D(\rho, T) \nabla \rho) + \rho_s $ ($\rho, \rho_s, u, T$ are coupled with a few other ...
16
votes
1answer
2k views

How can I avoid catastrophic cancellation?

I have the following formula that I need to rewrite in order to avoid catastrophic cancellation. $$y =\sqrt{\frac{1}{2}\left(1-\sqrt{1-x^{2}}\right)}$$ As $x$ becomes smaller, $\sqrt{1-x^{2}}$ ...
4
votes
1answer
99 views

When is it easy to invert a sparse matrix?

(Crossposted on cstheory.SE) When is it easy to invert a sparse matrix? Specifically, I'm wondering about the cases in which matrix inversion has similar cost to sparse matrix multiplication, hence ...
1
vote
1answer
66 views

If analytically, a function is not differentiable at a point, does it make sense to write a finite difference code for the function at that point?

What would happen if I wrote a finite-difference code evaluated at a point where the function isn't differentiable analytically? I'm trying to think analytically vs numerically. Thanks,
1
vote
1answer
116 views

FEM does not match exact solution

I am trying to solve : $$-u''(x) + u(x) = \sin(2\pi x)\, ,\quad 0<x<1\, ,$$ $t>0$, with $u(0) = u(1) = 0$. That has as exact solution $$u(x) = \frac{\sin(2\pi x)}{1 + 4\pi^2}\, .$$ But the ...
0
votes
1answer
58 views

Coding up Newton's method for a mapping from R^2 to R — the Jacobian wouldn't be invertible

I'm trying to code up in Matlab a multivariable Newton's method, for a mapping from R^2 to R, but the Jacobian would be a 2x1 matrix, not square, so it wouldn't be invertible. Does this mean that ...
1
vote
0answers
50 views

How do I apply BDF2 in a STRANG splitting

I have a 3D diffusion equation that I want to solve using a time splitting (2D+1D). Assume that $A$ is the 2D discrete diffusion operator and $B$ is the 1D discrete diffusion operator. I want to use a ...
3
votes
1answer
182 views

Poisson image blending artifacts

I am trying to implement Poisson image blending as in the paper Poisson Image Editing. This is the task of filling in a masked region of an image by minimizing $$\min_f\int_\Omega \left | \nabla f - \...
3
votes
1answer
109 views

How to find a pair of divisors as close as possible to each other?

For a given integer $n\in\mathbb{N}^*$, I want to find a pair $(x,y)\in{\mathbb{N}^*}^2$ such that $x*y=n$ and $|y-x|$ is as small as possible. A naive algorithm I found is : ...
0
votes
0answers
29 views

How to describe function convergence and function tolerance for numerical root-finding?

I'm currently doing some practice problems on root-finding and am writing up some notes / comments on my code. In my solver code, if my function value is below the tolerance that I've set, should I ...
2
votes
2answers
83 views

Petsc Mat object in class

[Relatively new to Petsc] I am writing an object oriented project and my idea is to have parallel objects when the user constructs the object with MPI arguments. So have member data Mat and fill/...
0
votes
0answers
36 views

Am I computing this complex root correctly? [migrated]

I'm playing numerically with root-finding in Matlab but am a bit rusty with complex roots that come in conjugate pairs -- for polynomials with real coefficients. Am I justifying these steps correctly: ...
1
vote
1answer
100 views

Non-Linear advection diffusion with nondifferetiable advection term

I'm looking at Murray's book: Mathematical biology: an introduction , first volume, pag. 404 In particular, I'm interested to solve the following PDE: $$\partial_t u = \partial_x (\text{sign}(x) u) + \...
2
votes
1answer
80 views

Ill-condioned Linear System and Gaussian Elimination

Suppose that I have a linear system $Ax=b$ such that $A$ is ill-conditioned. Can I say that it is dangerous to find a solution with Gaussian Elimination for this system, or does there exist some class ...
2
votes
1answer
40 views

Solving MX=N where M is structured as a Gaussian 4th-moment tensor

I'm looking to solve numerically the following equation for $(d,d)$ variable $X$, in Einstein summation notation $$M_{ijkl}X_{kl}=N_{ij}$$ Where $M$ is a $(d,d,d,d)$ 4th-moment tensor of random ...
0
votes
0answers
22 views

Library/project on python for solving conjugate heat transfer problems

Can someone recommend a python library that can help me solve heat transfer problems between turbulent fluids and solids? Thanks.
2
votes
2answers
57 views

In a dynamical system, what might be a good reason why periodicity in an object's velocities is important?

I'm studying periodic motions in a dynamical system and, as a newbie, I narrowly think of an object's periodicity in its spatial x-y coordinates, but what might be a good reason why the existence of ...
3
votes
2answers
149 views

1D FEM for nonlinear diffusion coefficient

I want to solve with linear finite elements the equation $$\partial_t u = \partial_{x}(a(u)\partial_xu)$$ in the domain $t \in [0,1]$ and $x \in [-L,L]$. Here $a(u)$ is just a function of $u$. ...
0
votes
0answers
45 views

Simple Finite Volume method for Stokes equations

I'm trying to understand how to implement fluid problems using Finite Volume Elements, for example a simple Finite Volume Elements for the Stokes problem: $-\nu\Delta u+\nabla p =f$ in a bounded ...
1
vote
0answers
62 views

How can I practice multivariable root-finding?

Recently, I've been reading up on various root-finding / optimization algorithms such as the Levenberg-Marquardt method, Gauss-Newton, Conjugate Gradient, trust-region and trust-region-dogleg. I've ...
-4
votes
0answers
16 views

Object Oriented Program -Data types [closed]

Give the appropriate data type of the ff. -100 8000 3.78 1.67f 300000 100000000000L 120 300
1
vote
1answer
103 views

How to calculate the number of floating point operations a task/ process requires? (not FLOP/s, but FLOP)

There have been many papers quoting FLOP to quote the performance of a specific approach in machine learning. For example, We trained two models with different capacities: BlazePose Full (6.9 MFlop, ...
84
votes
17answers
97k views

Is there a high quality nonlinear programming solver for Python?

I have several challenging non-convex global optimization problems to solve. Currently I use MATLAB's Optimization Toolbox (specifically, fmincon() with algorithm=<...
0
votes
0answers
34 views

Split of complex parts in weak form

I am working on a numerical model to simulate the acoustic and elastic wave propagation in frequency domain via the Finite Element Method. Basically, the problem is to solve the Helmholtz equation in ...
1
vote
0answers
45 views

Is there any function to calculate condition number of sparse matrix in Eigen libraray?

The function JacobiSVD and BDCSVD can calcuate condtion number of a dense matrix via singular values. However I need to know condition number of a sparese matrix due to slow computation speed using ...
0
votes
0answers
21 views

Hi I am trying to model a 2D Lug angle using Gmsh 4.6. How can I combine transfinite quad and regular full quad meshes in the following geo file?

I need transfinite mesh a small section of the bolt hole to insert a crack. However, The transfinite mesh and regular full quad mesh seem being incompatible and throwing errors. How can I combine ...
3
votes
1answer
84 views

Efficient solution to a structured symmetric linear system with condition number estimation

I have a real-valued linear system $Hx = b$ where $H$ is symmetric matrix** (not necessarily positive/negative definite) with a very particular structure: $$ H = \begin{bmatrix} D && B \\ B^T &...

15 30 50 per page
1
2 3 4 5
181