All Questions

-1
votes
0answers
6 views

How to simulate 2D mass diffusion equation in python?

It is similar to the heat transfer of 2D diffusion.
0
votes
0answers
14 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 ...
0
votes
0answers
34 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 ...
0
votes
0answers
15 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 ...
0
votes
1answer
18 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 ...
0
votes
0answers
27 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 ...
0
votes
0answers
22 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) = \...
3
votes
2answers
35 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 ...
1
vote
0answers
29 views

How to the determine the initial conditions of the following coupled non-linear ODEs

I am trying to determine the roots (initial conditions) of θ' and f'' in the set of ODEs below so I can solve as an initial value problem using the Runge-Kutta method. I tried using newton-raphson but ...
0
votes
0answers
31 views

FEniCS: problem evaluating the error

I am new to FEniCS and I have solved a variational problem using finite elements and a time-discretisation. Some of the code is below: ...
0
votes
0answers
33 views

How to study scientific programing [on hold]

I am an undergraduate in computer science and engineering from India. I have 2 years experience in machine learning and I now want to study scientific programming specifically in computational physics....
3
votes
1answer
45 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 ...
14
votes
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 ...
0
votes
0answers
79 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 ...
2
votes
0answers
25 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 ...
0
votes
0answers
37 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 ...
2
votes
0answers
27 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 ...
3
votes
1answer
82 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 = ...
0
votes
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 ...
3
votes
1answer
70 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, ...
-1
votes
0answers
18 views

How to find the points in ANSYS modelling having a specific stress state (SX = A, SY = B, SXY = C)?

I want to generate a contour on a 2-D surface on a surface model such that the contour is generated by points having a particular stress state (i.e. SX = A, SY = B, SXY = C) where A, B and C are ...
6
votes
1answer
78 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 ...
1
vote
1answer
89 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 ...
1
vote
0answers
65 views

Solved : Damped spring-mass system, wrong position, correct speed and acceleration

I am modulating a spring-mass system with gravitation and aero drag, with python programming. The spring is hanging vertically and attached a weight. The user then selects a length to drag it down ...
0
votes
0answers
40 views

Numerical integration(principal value) [closed]

I need to solve this integral numerically, as you can see, the first term of this integral reduces to a principal value two dimensional integral and a one dimensional integral (due to dirac delta). In ...
3
votes
1answer
66 views

How to show the stability of $L^2$ projection?

If $\mathcal{T}_h$ is a regular and quasi-uniform triangulation of $\Omega$, and $V_h$ is the $H^1$-conforming linear finite element space. Moreover, let $P_h$ be the $L^2$ projection to $V_h\subset H^...
2
votes
1answer
77 views

BLAS operation question

I want to perform the following operation: $$ A = A + U B^T $$ where $A$ is $m \times n$ dense, $U$ is $m \times m$ upper triangular, and $B$ is $n \times m$ dense. The BLAS function ...
-1
votes
0answers
49 views

How to create Delaunay triangulation in C++?

I need some idea for create Delaunay triangulation in C++, without library.
0
votes
0answers
39 views

Monte-Carlo method for action (Solved) [closed]

What I want to do is during Monte Carlo iteration, minimize the action ( or cost function ) which is defined as the sum of 'sum' and print the corresponding zeta and theta array elements which shows ...
0
votes
0answers
34 views

Is it more efficient to capture many constraints in one constraint?

I have a number of variables that need to be set to 0. They are positive real numbers so the way I see it I can do this by setting each one to 0 by separate constraints, or I can set their sum to zero....
4
votes
2answers
135 views

Numerical evaluation of a Gaussian Integral in Python?

Goal I'm trying to write code to compute the normalized Gaussian in the following, $$ \begin{equation} \int_{-\infty}^{\infty} \frac{1}{ \sigma \sqrt{2 \pi}} \exp\bigg( - \frac{(x - \mu)^{2}}{2 \...
3
votes
2answers
60 views

Good references for dual-weighted residual (DWR) method for goal-oriented adaptive mesh refinement (AMR)

Can anyone help me with good references (books or papers) where I can learn about dual-weighted residual (DWR) method for goal-oriented adaptive mesh refinement (AMR)?
2
votes
1answer
95 views

In iterative methods, are matrix decompositions considered useful for implementation?

When we study an iterative method from textbooks, for example, see the Gauss-Seidel Method, the given matrix is decomposed with suitable splittings. In the example, $A = L+U$. So we can proceed with ...
1
vote
0answers
38 views

How to use Wolfe-Powell step-size control in quasi-Newton method?

I'm trying to find the minimum of a function using the quasi-Newton method with the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm. But I want to change the following implementation, so that: 1) ...
3
votes
0answers
39 views

Constraint solver vs Bayesian optimizer for fast discontinuous processes

I have a complex domain-specific process that accepts inputs: 10-500 inputs, where each input is of type: enum: choice between multiple string or numeric values int: integers float: floating point ...
5
votes
1answer
75 views

What are systematic ways of approximating a non-smooth (non-continuously differentiable) system dynamic to be n-smooth?

I have a system dynamic that is non-smooth because it has several signum and absolute value functions in it (three-tank level control). I can obviously choose different sigmoid functions to ...
0
votes
0answers
84 views

Super Computer cluster service for students [duplicate]

I would like to ask whether there is a free of charge supercomputer for students, in my current institution they don't have a supercomputer, I am running MD simulations, I would be grateful for ...
-1
votes
0answers
23 views

Alternative to Fabric Mechanics DFMA

I would like to ask if there an alternative to DFMA fabric mechanics software for FEM modelling and maybe this software using MD as well, but I am not sure. For more details: DFMA stands for Design ...
2
votes
1answer
39 views

Computing face fluxes in FVM

In FVM, we have to compute fluxes at some face of a cell. There are many ways to compute this face flux value, but the most common and easiest way involves some simple averaging at the face. However, ...
7
votes
0answers
67 views

How to construct an effective preconditioner for this particular problem

A quick introduction to my problem I am currently developing a method for simulation of water waves in three dimensions based on potential flow theory. The computational bottleneck of the method is ...
1
vote
0answers
58 views

Best optimizer for unconnstrained non-convex nonlinear least-square optimization problem?

I am looking for a very good optimizer to the following problem: $$\min_{P,\Theta}\lVert APD(\Theta)P^{-1} -B \rVert_F$$ where $A,B \in \mathbb{R}^{n\times m}$, $P \in \mathbb{R}^{m\times m}$, $D\in \...
7
votes
1answer
163 views

Spectral Element vs Finite Element

I am trying to understand the difference between SEM and FEM. If I go by this paper, spectral element methods are a subset of FEM methods and the only difference lies in the choice of basis functions. ...
5
votes
2answers
320 views

Python: vectorizing a structured linear system solve

Overview I am looking for a way to solve a structured linear system in Python without using a for loop (preferably using vectorization, if possible). Background Consider the following linear system:...
3
votes
1answer
79 views

Doubt about Python code for calculation of Energy Conditions in General Relativity

In General Relativity, one possible way to decide if a space-time [i.e. a Lorentzian Manifold $(\mathcal{M}, \textbf{g})$ where $\textbf{g}$ is an arbitrary metric tensor.] is a "resonable physical" $[...
4
votes
2answers
95 views

Inverting a matrix from LU decomposition

The LAPACK routines xGETRI compute the inverse of a matrix $A = PLU$ in its LU decomposed form by first computing $U^{-1}$, and then solving the system: $$ (A^{-1} P) L = U^{-1} $$ My question is: ...
-2
votes
0answers
55 views

How to find the roots for this equation [on hold]

I am new using Matlab. I am trying to find the roots for an effective permittivity equation in two forms: Quadratic and Nonlinear and it Should have the same solution. Any suggestion on how to solve ...
4
votes
1answer
121 views

Fast and free server for computing

I have to calculate a huge differential equation. With my laptop, it's going to be computed for several days. Is there a free (I need just for 3 days) fast server for scientific calculations? My ...
5
votes
2answers
75 views

Computing a ratio of exponential functions without overflow issues

I'm interested in computing pointwise values of the function $u(x) = \sinh(k-kx)/\sinh(k)$ for $x \in (0,1)$, where $k = 10^{4}$. A direct computation of course results in overflow issues due to the $\...
3
votes
2answers
106 views

Electromagnetism FEM (FEniCS) interpolation - leakage effect

As for the background of what is going on: I'm using FEniCS that is dedicated FEM solver The problem I'm solving is magnetostatic problem where the governing PDE is $$ \bf{\nabla} \times \frac{1}{\mu}...
4
votes
1answer
80 views

$L^\infty$ stability property of an ODE

Suppose we have the initial-value problem on $(0,L)$: $$ \frac{d u(x)}{d x} = f(x) u(x),\, \qquad x\in\Omega,\,~~ u(0) = u_0, $$ I am reading a claim that says if we multiply the ODE by $u$ and ...

15 30 50 per page