All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
139 views

Solve wave equation with discontinuous coefficients numerically?

I would like to solve the following equation $$\frac{\partial^2 y}{\partial t^2} - c^2(x,t)\frac{\partial^2 y}{\partial x^2}=0,$$ for $y=y(x,t)$ numerically. The wave speed, $c(x,t)$, is of the form $$...
0
votes
0answers
6 views

The error in SOR algorithm suddenly falls to zero when it reaches 1e-7 range

I am solving Poisson equation for heterojunction using Fortran90. I use SOR algorithm to arrive at the potential profile. a) I see the weird behavior where the error (difference between the (n)th and (...
-3
votes
0answers
17 views

implement an optimal control model with python [closed]

Please help me to implement this model of optimal control (python): $$[\hat{T}_{high},\hat{T}_{low}] = \arg \min_{T_{high},T_{low}} J_{constraint}$$ where: $$J_{constraint} = \frac{t_2+t_3+\alpha_1\...
0
votes
1answer
76 views

Is it possible to resample grid in such a way so that continuous objects remain continuous?

Suppose I rasterize a rectangle of width 2.5 gridpoints and get the values as shown: =============== | 0 | 1 | 1 | 0.5 | 0 | Now I resample that ...
-1
votes
0answers
13 views

Share Folder Missing File [closed]

I have two PCs (let's say PC1 and PC2) connected to each other through the LAN cable. From this connection, I created a share folder which can be accessed from both PCs. However, most of the time when ...
3
votes
1answer
98 views

Compute the function between two images

Take an image $f$ with some characters on it (below, hjFu3). Let's apply a filter $h$ on it to obtain a second image $g$ where the text is not visible. Is there a way to compute what kind of filter $...
10
votes
1answer
155 views

Benchmark problems for eigenvalue reordering algorithms sought

Every real matrix $A$ can be reduce to real Schur form $T = U^T A U$ using an orthogonal similiary transform $U$. Here the matrix $T$ is quasi-triangular form with 1 by 1 or 2 by 2 blocks on the main ...
2
votes
0answers
40 views

Determine the anti-derivative of 2D vector field

I have data on a (x,y) grid with scalar values (time) at each point. I have used the numpy gradient function and linear interpolation to determine the gradient vector Velocity (Vx,Vy) at each point (...
8
votes
1answer
364 views

Increasing V-cycles for constant Coarsest Grid Size and increasing Fine Grid size

Problem statement I implemented geometric multigrid for $-\nabla^{2}=f$ where $f=\frac{3\pi^{2}}{4}sin \frac{\pi x}{2} sin \frac{\pi y}{2} sin \frac{\pi z}{2}$ on $\Omega \in [0,1]$ on a unit cube. ...
0
votes
0answers
18 views

Choosing appropriate timestep for FDTD and PIC algorithms

I'm doing some particle-in-cell (PIC) simulations of propagation of short pulses in plasmas with a widely used code. This code uses Yee's field solver. So, the timestep must be lower than the Courant ...
1
vote
1answer
217 views

DNS simulation in industry

I have this idea in my mind that Direct Numerical Simulation (DNS) is only used in research since the Reynolds numbers of industrial applications are too high and require computer horsepower we don't ...
1
vote
4answers
1k views

Which C++ Multi-objective Optimization libraries allows the addition of custom problems and custom algorithms?

I'm working on a custom discrete and constrained multi-objective optimization problem and I'd like to know which libraries or platforms that implement algorithms like ...
3
votes
1answer
414 views

what is the best theory/model to use for prediction in multivariate data?

I use software for pollutant propagation on rivers that takes as input a set of parameters ($p_1,p_2,\ldots,p_n$) and creates an output file which is basically a matrix where on each row the ...
0
votes
0answers
25 views

Abnormalities when using SOR to solve the Poisson Equation

I am trying to solve the Poisson equation for Heterostructures using SOR. The equation to solve looks lik I have discretized the Poisson equation using finite difference and my code is written in ...
0
votes
1answer
41 views

How to optimize nuclear norm subject to positive semidefinite constraints?

For finite dimensional symmetric positive semidefinite matrices $A$ and $B$, I would like to solve \begin{align}&\min |X - A|_1 \\ &\text{subject to}\\ &X \preceq B \\ &0 \preceq X\...
2
votes
1answer
62 views

Solving Lotka-Volterra Equations on Python

I'm trying to plot Lotka-Volterra Equations using Python. I am a real beginner when it comes to Python. I have these two equations: $$\frac{dR}{dt}=\alpha R-\gamma RF$$ and $$\frac{dF}{dt}=-\beta F+\...
2
votes
3answers
129 views

Flux sign and face normal confusion in finite volume method

I implemented a solver for the 2D steady-state heat equation (without heat generation and homogeneous material) $\nabla. (k\nabla T) = 0$, using finite volume method, however, I am having some ...
0
votes
1answer
85 views

Is it possible to predict solution oscillation before solving the system by looking at coefficient matrix?

Question When it is about solving a system of equations, is it possible to predict that whether high-frequency noise (e.g. checker-boarding) is likely to appear in the converged solution by looking at ...
2
votes
0answers
155 views

Extracting FEM matrices in matlab pde toolbox

I am trying to follow the dynamic linear elasticity in Matlab, link here. My goal is to extract the FE Matrices using the function assembleFEMatrices in matlab and solve the resulting system of second-...
7
votes
5answers
435 views

Checking singularity of a matrix

Suppose that we don't know $n \times n$ matrix $A$ explicitly but we are only able to compute products $Ax$ where $x$ is a column vector with $n$ elements. Is there an algorithm to determine whether $...
1
vote
1answer
34 views

How to effectively find a starting point solving a non-linear equation?

I have the following equation (the Kurz-Giovanola-Trivedi model [1]) $$ v^2 \frac{\pi^2 \Gamma}{P^2 D^2} + v \frac{mC_0(1-k)\xi}{D[1-(1-k)Iv(P)]} + G = 0, $$ where $Iv(P)=P \cdot \exp(P) \cdot E(P)$, $...
0
votes
0answers
29 views

Explanation of Givens rotation in Jacobi Rotation SVD

I'm trying to implement Singular Value Decomposition (homework of sorts) via the Jacobi Rotation method (more info here, pages 11 and 12). I am stuck at the bullet saying (sorry for the picture, but I'...
2
votes
0answers
28 views

How to increase the stability of a DAE solver?

I am trying to solve a set of linear PDEs of the form $$F\left(\vec{y},\frac{\partial \vec{y}}{\partial x},\frac{\partial^2 \vec{y}}{\partial x^2},\frac{\partial \vec{y}}{\partial t}\right)=0.$$ To ...
1
vote
0answers
41 views

Condition number of finite element stiffness matrix

In the FEM, there are certain applications in which the condition number $(\kappa)$ of the overall global stiffness matrix $(A)$ is computed or reduced by some preconditioner $(P)$. Are there any ...
2
votes
1answer
46 views

Is the Immersed Boundary (IB) method a Direct Numerical Simulation?

Is the Immersed Boundary (IB) method considered a Direct Numerical Simulation? A DNS code is the most detailed type of simulation and the most accurate but computationally expensive, right? What makes ...
0
votes
0answers
55 views

Derivative-free ill-conditioned non-linear least squares

I am looking for a package which can solve (non-linear) least squares problems without the use of derivatives (because of an expensive model), but which also deals with ill-conditioning well (such as ...
2
votes
2answers
121 views

What are the best ways to interpolate a vector field inside (convex) polygons?

I want to interpolate a vector field inside convex polygons in a polygonal mesh. For triangular meshes the scheme uses a piecewise constant interpolation in the triangle, discretized at the center of ...
26
votes
11answers
8k views

Robust algorithm for $2 \times 2$ SVD

What is a simple algorithm for computing the SVD of $2 \times 2$ matrices? Ideally, I'd like a numerically robust algorithm, but I'll like to see both simple and not-so-simple implementations. C code ...
2
votes
3answers
103 views

For traditional FEM and FVM, why can't we use mesh to represent geometry and use the mesh which represent the geometry to do the computation directly?

Isogeometric analysis [1] has the advantage of integrating geometric and mesh models using NURBS or Spline. At the same time, I would like to ask a question to my friends: for traditional FEM and FVM, ...
1
vote
0answers
80 views

How to debug segmentation faults in large problems?

I am sorry if this question seems like off topic or opinion based, but I was not sure how to go about it. I am currently working on a 100k x 100k positive definite linear system and trying to solve it ...
2
votes
5answers
242 views

FEM and High Performance Computing

Suppose we want to solve an FEM problem in terms of HPC. What is the most usual way to do it: Using an open-source software like mfem,deal.ii etc.. or, Assembly the system by your own(read mesh file,...
4
votes
4answers
149 views

Can the mesh generation methods in FVM and FEM be totally based on the knowledge of the mesh generation theory in computer graphics?

The main references of mesh generation methods in computer graphics (CG) I found are discrete Differential Geometry [1] and a famous book "Polygon Mesh Processing" [2], while the "...
3
votes
1answer
96 views

Scaling/Performance of Matlab's svds function (Lanczos bidiagonalization)

I have a simple Matlab script which aims to compute $k$ singular values of a matrix $A$. $A$ is a random dense square matrix of size $5000\times5000$, with 100 of its singular values constrained to ...
0
votes
1answer
57 views

Specifying mesh spacing for DFT in numpy

I was testing the .fft package of numpy 1.16.1 in Python 3.7.2. In particular I was trying to verify that the transform resembles the analytical one for: $$f(x) = \mathrm{exp}\left[-\left(\frac{x-5}{2}...
1
vote
1answer
324 views

Suitable finite difference method for a convection-diffusion system?

I am trying to solve a system of PDEs $H_{t} = \frac{0.3}{0.7} - \frac{0.005 B f(h(H))}{\theta} - \frac{0.3 f(h(H))}{0.7} + \frac{500}{0.7} (HH_x)_x + (HH_y)_y$ $N_t = \frac{N_{in} - 0.002 [N] B f(h(...
4
votes
0answers
78 views

Generally quadratic convex problem with one non-convex term

How would you approach a standard convex quadratic problem with convex constraints but one non-convex term ? Say $|x|^{0.4}$. $$\min_x \frac{1}{2} x^{T}Qx + g^Tx + c^T \mathrm{sign}(x) |x|^{0.4} $$ ...
-1
votes
0answers
55 views

Visible Deprecation Warning

Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify <...
2
votes
1answer
73 views

Is there a way to return a substring of a string using Convolutional Neural Networks?

I'm a PhD student in genetics and molecular biology working on an algorithm to identify if a DNA sequence is either a transposable element (TE) or not a TE using convolutional neural networks, and it'...
2
votes
2answers
605 views

Combined translational and rotational meshing in gmsh

For a flow simulation I am trying to reproduce a specific screw element design for an intermeshing co-rotating twin-screw extruder. I am using gmsh (v2.16) where the element is made from a 2D surface ...
1
vote
2answers
40 views

Job Scheduler for Local Machine

I am used to running calculations on a server/cluster, and we have used both PBS and SLURM. However, I am looking to run some calculations on my local machine. I would like to be able to schedule my ...
1
vote
1answer
22 views

Does 'Recombine' work for this geometry in Gmsh?

I am struggling to recombine the remaining triangular cells into unstructured quadrangular ones in this geometry using Gmsh. Do I need to add auxiliary lines somewhere or do some geometries just don't ...
1
vote
0answers
36 views

How to speed up the Mixed-Integer Quadratic Program process?

Currently, I am solving a problem in the format: M is an integer as well. The problem that troubles me is that X is a vector in {0,1} with a size of 7000. I use the solver in https://github.com/...
0
votes
0answers
8 views

Finding the plot of input parameters in COMSOL [closed]

Can anyone help me find out the plot of the input waveform f0 which is present in parameters1 (having a central frequency of 40MHz)? I needed to know the waveform type(sinusoidal, delta, etc.). The ...
2
votes
1answer
76 views

FFTW on subarray with MPI

With the guru interfaces of FFTW, I can apply transforms only to parts of a multidimensional array by modifying the fftw_iodim ...
11
votes
2answers
29k views

What is the fastest algorithm for computing the inverse matrix and its determinant for positive definite symmetric matrices?

Given a positive definite symmetric matrix, what is the fastest algorithm for computing the inverse matrix and its determinant? For problems I am interested in, the matrix dimension is 30 or less. ...
0
votes
0answers
50 views

4th Order Adams-Moulton Method C++

I am trying to solve an ODE using 4th Order Runge Kutta and the 4th Order Adams-Moulton Method. I iterate over a couple of thousand timesteps and it seems to hold fine when the values are constant(...
2
votes
3answers
193 views

Is the imaginary part needed in this problem?

Before jumping into my question, let me contextualize it. I'm doing numerical simulations of a Helmholtz scattering problem $$\Delta p + \kappa^2 p = 0\, .$$ The incident pressure wave $p^{inc}$ will ...
1
vote
0answers
36 views

implementation of shell elements in a topology optimization algorithm

I am working on developing a topology optimization solver based on the finite element method and I want to add a triangular shell element in it. I used the classic finite element method but I didn’t ...
-1
votes
0answers
43 views

python plot exhibiting delta function behaviour but it was not supposed to do it

I'm currently trying to plot the photoionization cross-section in a semiconductor. The photoionization process is an optical transition of an electron in the ground state to higher subbands in a ...
2
votes
1answer
52 views

How to extract connected components from persistence diagram?

From the given point cloud (Fig. 1), I use Scipy-TDA to extract persistence diagram (Fig. 2). What I'm interested in is to extract 3 circles. For example, I'd like to know 3 center points and labels ...

15 30 50 per page
1
2 3 4 5
179