All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
4 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'...
0
votes
0answers
4 views

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

Is the 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 a simulation not a ...
1
vote
0answers
23 views

Solving Lotka-Volterra Equations on Python [closed]

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
80 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, ...
3
votes
1answer
83 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 ...
2
votes
5answers
198 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,...
0
votes
0answers
67 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 ...
-1
votes
0answers
32 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
2answers
104 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 ...
2
votes
1answer
68 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'...
1
vote
1answer
21 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
2answers
39 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 ...
4
votes
4answers
136 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 "...
1
vote
0answers
34 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 ...
0
votes
0answers
49 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(...
1
vote
0answers
35 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 ...
4
votes
0answers
72 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} $$ ...
2
votes
1answer
67 views

Computing Series of $ke^{-(x - h)^2}$

I asked this question on the Computer Science stack exchange (https://cs.stackexchange.com/questions/128710/faster-computation-of-ke-x-h2), but it appears that it is more appropriate in Computational ...
2
votes
1answer
88 views

Why is $1/r^2$ force law giving spiral trajectory?

I have written a program to solve for Newton's 2nd Law of motion for a given force law, in 2D polar coordinates. It is known that if the force law is of the form $k/r^2$,we get conic sections as ...
0
votes
0answers
49 views

FEM Meshing artifact at nodes with fewer neighbors

I wrote a 2D-FEM solver to solve some diffusion process and wanted to verify my code with a test problem. The input was $f(x,y) = x^2+y^2$ and I applied the stiffness matrix on it to get $\Delta f = 4$...
1
vote
0answers
30 views

What is the generalization of the resource allocation problem I'm dealing with here?

I'm dealing with a problem as follows: I have a finite set of money 𝑚 to spend over 𝑟 different raffles, and I need to spend approximately to my budget, with the goal of maximizing my probability ...
1
vote
1answer
47 views

Implementation of sparse matrix SVD for GPU

I have a sparse matrix $W$ which is almost-squared ($N+1 \times N$) and I would like to know the eigenvalues of $A = W^T W$. $A$ is Hermitian so the eigenvalues are real-positive valued. The usual ...
2
votes
3answers
190 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
votes
0answers
29 views

Image segmentation network to extract questions from an image of a test paper?

This is the sample document -> I want to extract questions along with the options. There are other question papers as which have questions with diagrams in them. I want to be able to extract them ...
0
votes
0answers
29 views

Numerical simulation for a bounded process. Is slight deviation a “normal” fact?

Suppose I have to numerically simulate a process $\{y_t\}$ such that $y_t\geq0$ $\forall t\in\mathbb{N}$, with $t$ denoting time-step. Let's suppose I use MonteCarlo with $\mathscr{N}$ simulation ...
6
votes
1answer
334 views

When and when not to use automatic differentiation

I am just learning (more) about automatic differentiation (AD) and at this stage it kind of seems like black magic to me. The second paragraph of its Wikipedia article makes it sound too good to be ...
3
votes
1answer
68 views

Solve two-player game - minimize the l-infinity norm of a matrix-vector product

I have a matrix $M$ with non-negative real entries, and I would like to minimize the objective function $$\Phi(v) = \|Mv\|_\infty,$$ where $v$ is constrained to be a probability vector, i.e., $v_1+\...
1
vote
2answers
63 views

How do I speed up this function evaluation in matlab?

Half the run time of my code right now is evaluating a big function over many, many points, it takes maybe about 20 seconds per evaluation The function consists of a bunch of simple operations that ...
1
vote
2answers
227 views

Jacobians with automatic differentiation

I have an objective function F: Nx1 -> Nx1, where N>30000. There are many sparse matrix/tensor multiplications in this function, so taking an analytic Jacobian by paper and pen is cumbersome. ...
2
votes
1answer
30 views

How do you construct a self-similar binary structured-tree?

Please excuse me if this question somehow looks trivial or not really interesting, but I recently have a hard time to convince someone else that my algorithm for constructing a self-similar binary ...
2
votes
0answers
56 views

OpenMP inconsistently segfaulting

I parallelized my code with openMP, and now have this bug in my code that's really odd. If it's the first time I run on a computer, it segfaults, but if I run the program again it runs fine. I've ...
0
votes
0answers
19 views

Scale of x-axis for Fourier transform

Consider a function $f(t)$ and its Fourier transform $F(\omega)$. The amplitude of the Fourier transform $F(\omega)$ depends on the frequency $\omega$ and thus also depends on the scale of the $t$-...
-1
votes
0answers
32 views

Matrix Calculation Different between Python and Matlab

I am transferring a finite element code from Matlab to Python. A problem occurs at the last step when I try to solve the displacement $U = F/K$. I have checked that the calculated $F$ and $K$ are same ...
0
votes
3answers
66 views

How to determine global stiffness matrix is constrained or not

Background In solid fem, we often solve $$\mathbf{Ku}=\mathbf{p}$$ where $\mathbf{K}$ is global stiffness matrix, $\mathbf{u}$ is displacement, $\mathbf{p}$ is global load vector. If displacement not ...
0
votes
1answer
75 views

How to use 8-cores CPU as a single-core more (8x) powerful CPU?

I use python for my algorithm which uses only one core and I need more processing speed. I have i7 6700K CPU with 8 cores. How to convert them to one core to have a total performance of 8 cores? ...
3
votes
1answer
46 views

4th order tensor rotation - sources to refer

I am trying to model a linear elastic material in Abaqus using UMAT. For my application, I need to rotate the 6x6 compliance matrix for a given set of eigenvectors (or a rotation matrix). I came ...
1
vote
0answers
29 views

Discretization formula for a system of two differential equations. “Solution to one of these is the initial condition of the other”. In which sense?

Consider the following stochastic differential equation \begin{equation} dy=\left(A-\left(A+B\right)y\right)dt+C\sqrt{y\left(1-y\right)}dW\tag{1} \end{equation} where $A$, $B$ and $C$ are parameters ...
3
votes
1answer
63 views

How avoid square shape with Laplacian operator in reaction diffusion calculations?

I have used different variants of the Laplacian operator (div grad) using 4, 8, 12, 20 and 24 of the closest points. I get problems due to the chosen coordinate system and the discretization of the ...
2
votes
0answers
30 views

Convergence of Truncated Newton for non-convex Hessian

I was wondering if anyone could enlighten me about the convergence properties of the truncated newton method in case of a non-positive definite hessian $\nabla^2 f = H$. From the Book 'Numerical ...
0
votes
1answer
34 views

traction boundary conditions in elasticity

I have a question about implementing traction boundary conditions in 2D and 3D linear elasticity. Consider the picture above. I want to apply traction boundary conditions on the boundary in red. My ...
-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 ...
1
vote
1answer
63 views

How is the final result calculated in RK-Dopri(4,5)?

I have found a toy implementation of RK-Dopri(4,5), written in Python. I am concerned however, about line 118: y = y + h * (b1*K1+b3*K3+b4*K4+b5*K5+b6*K6) Has the ...
3
votes
2answers
82 views

Optimization of expensive model with many parameters

I have a physical model which takes $\sim50$ parameters and gives $\sim2000$ outputs taking tens of minutes to run. I need to optimize these parameters to give outputs as close as possible to data. ...
0
votes
1answer
31 views

Why is Time evolving block decimation so efficient?

I have a short question about Time evolving block decimation (TEBD). During a lecture I was told that this method is very efficient in evolving 1D quantum spin systems with only nearest neighbor ...
3
votes
1answer
67 views

Pros of Fourier-Galerkin spectral methods

What are the pros of Fourier-Galerkin spectral methods while solving PDEs? Here's the one that came in my mind first: Easy implementation: using this method, differentiation operator computation is ...
2
votes
0answers
69 views

Numerical linear algebra paper - Confusion about $LDL^T$ factorization for preconditioning

I came across this paper by Simoncini and Popolizio that deals with acceleration techniques in the context of rational Chebychev approximation for the exponential. The problem is to solve efficiently ...
2
votes
0answers
83 views
+50

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 ...
1
vote
1answer
59 views

Reading VTK file into C++ for analysis

I apologize in advance if this post is at all ignorant or elementary, I am a pure mathematician who is newly getting into the world of scientific computing. For my research, my advisor would like me ...
2
votes
1answer
44 views

Project to nearest point on convex polyhedron

I have a point $y \in \mathbb{R}^d$ and a convex polyhedron $\mathcal{P}$ given as the intersection of half-spaces: $$\mathcal{P} = \{x \in \mathbb{R}^d \mid a_1 \cdot x \le b_1, \dots, a_n \cdot x \...

15 30 50 per page
1
2 3 4 5
179