# All Questions

7,954 questions
Filter by
Sorted by
Tagged with
1answer
128 views

### calculation of the right hand side of DG FEM (with code)

I got stuck with Hestaven/Warburton's dG-FEM Matlab code. Starting with the file AdvecRHS1D.m, we see in line 11 ...
0answers
47 views

### Null space for smoothed aggregation algebraic multigrid

I do not really get the point of null space usage for creating the prolongation operator for smoothed aggregation algebraic multigrid. I know what the null space is per definition and I know that the ...
1answer
30 views

### Draw contour line to represent multiple contours

I have 5 data sets, each includes multiple scatter points. If I use the geom_path function in R, I could obtain 5 contours like the following graph shows. Those five contours are annotated outlines ...
1answer
30 views

### How to implement the Impulse Based Dynamics for the rigid body dynamics simulation?

I am having hard time learning the method of impulse based dynamics developed by Mirtich for rigid body dynamics simulation. Please help me out if any body has any example code(algorithm) of it. ...
1answer
89 views

0answers
14 views

### Why I am not able to generate Levy distribution using inverse transform method on MATLAB?

I am trying to generate random numbers using Levy distribution in MATLAB. I am using the inverse transform method to generate random numbers and then plot its histogram for pdf estimation. Then I ...
0answers
66 views

0answers
56 views

### What are the differences between these different forms of equation?

What are the differences between Conservative differential form, Non-conservative differential form, Conservative Integral form and Non-conservative integral form of differential equations? I know ...
0answers
46 views

1answer
127 views

### Why my parallel code using MPI is much slower than the serial one?

I know that is not the first time someone asks this question but I'm really confused.I'm new to MPI, and I tried to implement the Jacobi solver for a linear system $Ax=b$. I want to compare the time ...
1answer
116 views

### Simultaneously maximize and minimize

I am virtually new to optimization (saw it years ago in a very shallow course) and now I came across a problem that I believe would require from it. The problem is I don't know exactly how to proceed. ...
1answer
60 views

### Abaqus, ANSYS, and FVM solver for thermal expansion problem converges to different values

Is it reasonable for a FEM and FVM code to converge to slightly different solutions for the same physical problem (identical BCs, geometry, properties, etc...), provided stability constraints are ...
0answers
48 views

### Reverse automatic differentiation and integration

In Symplectic Runge-Kutta schemes for adjoint equations, automatic differentiation, optimal control and more Sanz Serna writes: It is well known that the reverse mode of differentiation implies ...
2answers
297 views

### (FEM) 1D time-dependent heat equation convergence problem

I'm simulating a simple 3-node bar with convection BCs at the edges to validate my FEM code. The following data was used: Initial temperature = 25 ºC Temperature surrounding the rod = 10 ºC Thermal ...
1answer
85 views

### Optimality of block-Jacobi preconditioner

For a dense $N \times N$ matrix $A$, is the block-Jacobi preconditioner comprising the inverse of the diagonal blocks of $A$ the optimal block-diagonal preconditioner? Could there exist another matrix ...
0answers
47 views

### Kinetic preconditioning

Publication arXiv:0804.2583 describes a method for doing self-consistent iteration without having to diagonalize the Hamiltonian operator at every step. IX. PRECONDITIONING As already ...
2answers
103 views

### Interpolation vs. Neural network

I am seeking knowledge from the community. I am solving a transport PDE (conservation of solute mass) using COMSOL. At each Newton-Raphson iteration, I need to update a constant called $Kd$ for some ...
0answers
26 views

### A preconditioner for self-consistent iteration

I tried to derive a preconditioner for self-consistent iteration similar to section IX in arXiv:0804.2583. For simplicity, consider here only one orbital (one or two electrons) systems. Suppose that ...
0answers
36 views

### maximum eigenvalue across subsamples

I have an $N$-dimensional vector of data, say $X_{t}$, with $1 \leq t \leq T$. Of this vector $X_{t}$, I want to consider vectors, say $X_{t}^{b}$, which are $m$-dimensional combinations of elements ...
0answers
83 views

### Library for Discontinuous Galerkin method: FEniCS vs deal.ii

I am aware that both FEniCS and deal.ii are capable of solving problems with Discontinuous Galerkin (DG) method. I would like to specifically know if any of these two softwares can cater these ...
0answers
28 views

### how to estimate the number of people on a street within an hour?

I tried to use opencv to analyze a video filmed on the street. But the problem is the performance is not enough. I think the number of people must follow the poisson distribution. So I want to ...
1answer
42 views

### Find shift in high resolution noisy signal if only local argmax data are available

Let's say I have a signal which consists several pulses of approximately equal height, and I have to correlate it with the expected positions of the peaks to find the shift of this signal w.r.t. a ...
0answers
68 views

### Algebraic multigrid for coupled equations

As far as I understand is algebraic multigrid(AMG) a method that was intentionally developed to solve linear systems where every grid point or node has a single DOF. When AMG should now be used for ...
0answers
38 views

### Techniques to optimise the integral of a function of known analytical form

I need to compute repeatedly a function that depends on an integral. The integral is not solvable analytically, but it depends on the argument of the function parametrically, like this:  f(x) = \...
2answers
81 views

### GPGPU language for AMD?

Nvidia seems to be dominating the HPC / GPGPU computing landscape with CUDA. If I want to write a scientific application using and AMD GPU, what is the preferred language these days? I believe it used ...
1answer
63 views

### Whitening transformation does NOT return a unit covariance matrix

For this question, I am using the following Wiki definition of Matrix whitening: Suppose $X$ is a random (column) vector with non-singular covariance matrix $\Sigma$ and mean 0. Then the ...
5answers
1k views

### Why does the numerical solution of an ODE move away from an unstable equilibrium?

I wish to simulate the behaviour of a double-pendulum-like system. The system is a 2-degrees-of-freedom robot manipulator that is not actuated and will, therefore, behave mostly like a double-pendulum ...
1answer
107 views

### Calculate amount of FLOPs for an eigenvalue problem solver

I have 2 complex, non-symmetric, matrices $A_{1000\times1000}$, $B_{1000\times1000}$ and I am using Matlab to get it's eigenvalues (functions like eig or eigs). Both matrices are different - one is ...
0answers
35 views

### Derivative of Whittaker-Shannon interpolant

Last time we looked at how to improve the accuracy of Whittaker-Shannon interpolation, where user njuffa demonstrated that judicious use of sin_pi could greatly ...
0answers
44 views

### Need an example Legendre-Gauss-Radau pseudospectral differentiation matrix or Matlab code

I'm trying to implement various kinds of pseudospectral methods for direct optimization in Matlab using IPOPT. I've got some working Legendre-Gauss-Lobatto code, but would like to use the flipped ...
0answers
29 views

### How to solve the Poisson equation with KINK aligned with mesh facet

I have a problem that solving the Poisson equation with kink ( discontinuous gradient but solution is continuous ) in the analytical solution, I want to solve this problem with FEM. To approximate ...
1answer
96 views

### References for the nonlinear reaction-diffusion equation using Finite Element Methods

I want to study how to solve the following PDE \begin{cases} -\nabla \cdot(\ k(x,y) \ \nabla u \ ) + \beta(x,y)\ u^2 = f(x,y), \ (x,y) \in \Omega \subset \mathbb{R^2} \\ \hspace{0.5cm} u = ...
0answers
57 views

### Computing a double Integral using two Riemann sums & graphing multiple isosurfaces

I'm trying to compute the potential and electric field of a uniformly charged spherical shell and plot the results in the space outside the shell using MATLAB. I've tried everything from for loops to ...
1answer
73 views

### Geometric Programming - symbolic version

I am interested in finding minimizers of functionals of the type $\sum x^ay^bz^c$ where the exponents are 1, 0 or -1. I have codes to find such minimizers when they exist up to machine precision, ...
1answer
88 views

### Going back in time in an initial value problem

Consider an initial value problem (IVP) $y'=f(t,y)$ with the initial value given by $y(t=0) = 0$. If I need to find $y(t^*)$, hence finding the path for $y$ in $t \in [0,t^*]$ and $t^*<0$; is the ...
2answers
151 views

### Order of element vs Degrees of freedom of the element

I have read that the order of the element is the order of the polynomial used to approximate/represent the field variable in that element. If we consider a one-dimensional, 2 degrees of freedom ...

15 30 50 per page