All Questions

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

Franco Brezzi's didactic paper on the Inf-Sup condition

I am trying to recover the title of a very didactic paper by Franco Brezzi in which he explains the Inf-Sup condition with a very simple case. As I recall, it was a simple Laplacian equation in 1D ...
Nicolas Tardieu's user avatar
0 votes
0 answers
32 views

Stock Trading algorithm with constraints

Suppose you have an array called prices, where prices[i] denotes the price of a specific stock on the i-th day. Additionally, there are two arrays, ...
Kadanz's user avatar
  • 1
1 vote
0 answers
56 views

Iterative PDE solver for 1D Burgers equation

I am looking for an Iterative Numerical PDE solver for 1D Burgers equation. I need to have access to the intermediate solutions of the Numerical Solver. By iterative methods, I mean techniques which ...
rajoy99's user avatar
  • 11
0 votes
1 answer
46 views

BSplines from scipy not defined on whole range of the knots

I am looking at the construction of BSplines out of curiosity. I created a small code that uses scipy.interpolate.BSpline to create basic splines. I get the following basic splines for order 0, 1 and ...
edamondo's user avatar
  • 171
0 votes
1 answer
89 views

Auto differentiation with JAX in python and ForwardDiff.jl in Julia give matrices with different values but same structure. Are the results right?

Using ForwardDiff in Julia gives me the following values for 2 matrices I have tried to use JAX to auto differentiate the same function in Python but I am getting the following results for A and B ...
user693129's user avatar
2 votes
0 answers
54 views

How to solve this nonconvex problem in python

I have the following problem to solve minimize $$\sum_{i=1}^I\sum_{k=1}^Kx_{i,k}.$$ The constraints are as follows: $$\sum_{i=1}^I\sum_{j=1}^J\ln(c+x_{i,k}A_{i,j,k})\geqslant B_k,\forall k,$$ and $$\...
zdm's user avatar
  • 121
1 vote
0 answers
54 views

Are there necessary conditions for SOR algorithm to converge when used for 2D discrete Poisson problem, with PBC, besides solvability condition?

I am trying to solve a 2D poisson problem that is supposed to represent diffusion of chemicals on a grid: $\nabla^2 R_{ij}=f_{ij}$. I am discretizing the problem with the standard central ...
Federica Sibilla's user avatar
0 votes
0 answers
20 views

Cuda not found when using virtualenv python, windows11 [closed]

Cuda version: 12.4 Driver Version: 551.61 NVIDIA GeForce RTX 4070 Windows 11 When I open command prompt I get, ...
AskedSuperior's user avatar
0 votes
0 answers
33 views

Using multiple bounds constraints parameters for a convolved gaussian fit

I'm currently analyzing XRF spectra, specifically focusing on the spectrum of (Pb). In XRF spectroscopy, the lines in the spectrum can often be effectively modeled by Gaussian distributions. Here, ...
Manuel Borra's user avatar
0 votes
1 answer
88 views

Constructing metric terms for high order elements

Given 27 $(x,y,z)$ coordinates in 3D space which describe a generally curved quadratic hexahedron, which correspond to the HEXA_27 reference element figure with planar faces in $(\xi, \eta, \zeta)$ ...
Aurelius's user avatar
  • 2,365
0 votes
1 answer
40 views

Standard deviation for online scenarios

Let's suppose you have to create an online algorithm $f(x_i)$ that will return the average ($\mu$); And the standard deviation ($\sigma$); Of numbers $x_0, \dots, x_i$. A straightforward approach ...
Matheus Diógenes Andrade's user avatar
0 votes
0 answers
18 views

Finding the Minimum-Step Path from (0,0) to (x,y) with a Cumulative Sum of P [closed]

Imagine a 2D plane, where each point represents a position. Your mission is to trace a path from the origin (0,0) to an end point ...
Moix's user avatar
  • 1
1 vote
1 answer
94 views

Boundary conditions of a 2D explosion case

I want to solve this problem explosion test case. I was wondering about what are usual the boundary conditions for this type of problems. I want the wave to bounce of the boundary of the domain (let's ...
mle's user avatar
  • 125
0 votes
0 answers
18 views

What are the most important evaluation metrics for anomaly segmentation?

When people talk about anomaly segmentation models, they often mention evaluation metrics like F1 score, AP, AUROC, and AUPRO. But which one really matters most when comparing models, and why? I'm ...
Mosh Geb's user avatar
1 vote
1 answer
171 views

ODEs solved by physics-informed neural networks

Is it possible that an ODE (with an IC) solution by physics informed neural networks (PINNs) turns out to be a mixture of several branch solutions of the same bulk ODE but with different ICs, even ...
feynman's user avatar
  • 287
0 votes
1 answer
41 views

Converting large .tif files to zarr arrays

I have multiple .tif files which range from 500MB - 5GB. I need to convert them to zarr arrays and preferably write them to my disk. I have an aws ec2 linux instance with 32GB RAM. I have searched ...
PotterHead's user avatar
0 votes
1 answer
65 views

Volume change of a deformable cylinder with a uniform spinning angular velocity

Consider a deformable cylinder without gravity with a uniform spinning angular velocity and the cylinder is not in contact with anything. In theory this cylinder shouldn't change its cross sectional ...
feynman's user avatar
  • 287
0 votes
1 answer
34 views

Second-order quadrangle mesh of a curved surface using Gmsh

Why am I obtaining a "two flat element" element instead of a one flat element, when using second-order mesh? That is the .geo file ...
Riobaldo Tatarana's user avatar
0 votes
0 answers
27 views

How to derive the deformation matrix $F$ of axisymmetric problem?

I am working on a 2D axisymmetric problem and am wondering how to derive the gradient operation matrix for an element and the deformation matrix, I have no clue how to do it and after searching on the ...
YuerWu's user avatar
  • 101
0 votes
0 answers
94 views

Is there a fast matrix-free inverse power iteration?

Problem: I want to solve the eigenvalue problem $$x=Ax$$ to the eigenvalue $1$ for a large matrix (roughly $N^3\times N^3$ and $N$ ranges from 10 to 100) where $A$ is stochastic (i.e. all entries are ...
Diplodokus's user avatar
0 votes
0 answers
31 views

How to express the inner product of a tensor function using matrix Frobenius inner product

Let $\{ \phi_i(x)\}_{i=1}^{M}$ and $\{ \psi_j(y)\}_{i=1}^{N}$ be bases for the finite elements spaces for $x$- ($V_{x,h}$)and $y$- direction($V_{y,h}$), respectively. Given a function $w_h \in V_h = ...
Owen Jun's user avatar
  • 141
0 votes
0 answers
16 views

Resampling an irregular time series in scilab

(Almost a total newbie with matlab/scilab so don't hit me too hard) I need to process a signal coming from a SPICE simulation; I exported it a a text file and I have no issues in loading it up; ...
Lorenzo Marcantonio's user avatar
0 votes
0 answers
83 views

First and second component of fft for circle approximation to periodic curve

I wanted to understand how the fast fourier transform work in numpy and for this I tried apply it on $n$ points of an ellipse $t_k = \frac{2\pi}{n-1}k$ with $k=1...n$ $$f_k = f(t_k) = (acos(t_k), bsin(...
edamondo's user avatar
  • 171
0 votes
1 answer
43 views

solve_ivp method=ODE23 time step not decreasing in order

My time step with the function scipy.integrate.solve_ivp is not decreasing in t_span fluctuating (reaching values below or ...
louis gouders's user avatar
0 votes
0 answers
45 views

Parallel vs Serial computing using Python Qutip. Why is serial faster?

I am trying to learn parallel computing using qutip's parallel_map function. I've tried to write a basic and simple code to understand the differences between parallel and serial calculation of ...
muzbi's user avatar
  • 1
0 votes
0 answers
28 views

Numerically computing time delay between two functions

Wikipedia claims that the argmax of the cross correlation can be thought of as the time-delay between two functions. Using scipy.signal.correlate and randomly ...
user14717's user avatar
  • 2,155
1 vote
0 answers
28 views

How to implement the following SDP with python

I'm confused about how one can implement a semi-definite programming routine with python. Apologies if similar questions have already been asked! What I could like is to optimize over probabilities $...
Kryptic89's user avatar
1 vote
2 answers
113 views

Monotonicity of Errors with Respect to Step Sizes in Numerical Methods for PDEs

Consider a non-linear partial differential equation (PDE) (e.g., Burgers' equation) that is solved numerically using a finite difference method (or a similar approach). Suppose a grid search is ...
user572780's user avatar
3 votes
0 answers
62 views

Iterative Solvers for Linear Least Squares with Integer Constraints

The classical linear least squares problem reads $\min_{x\in\mathbb{R}^n}\|Ax-b\|^2_2$ and its solutions satisfy the normal equations $A^{\top}Ax = A^{\top}b$. A standard approach to solve the latter ...
lightxbulb's user avatar
  • 2,122
2 votes
1 answer
169 views

Galerkin projection in AMG

In the context of Classical AMG for elliptic problems discretised with finite elements (DG or CG), one has the (fine) matrix of the problem, say $A_0$, and the coarser operators of the hierarchy $\{...
FEGirl's user avatar
  • 333
0 votes
0 answers
34 views

Extending Matlab's pchip to 2D

In The Matlab Guide, chapter 3, section 4, Moler describes a piecewise cubic Hermite interpolator $i$ which Never leaves the data bounds on each subinterval, e.g. $t \in [t_k, t_{k+1}] \implies i(t) \...
user14717's user avatar
  • 2,155
0 votes
0 answers
20 views

Find clusters with threshold for number of members

I need to find clusterization of some daily weather data, and the number of days in any cluster should be more than some threshold (e.g. 30). So if some cluster has less members, it has to be merged ...
lesobrod's user avatar
  • 101
1 vote
1 answer
64 views

How to Implement Analytical Magnetic Field Equations into a Physics-Informed Neural Network (PINN) in PyTorch?

I'm working on a project that involves modeling the magnetic field around Europa, one of Jupiter's moons, using a Physics-Informed Neural Network (PINN) in PyTorch. My goal is to implement analytical ...
sbjartmar's user avatar
0 votes
1 answer
49 views

Would a Co-simulation orchestrator work when a model uses a variable step size integrator

In every paper i was able to find, detailling the process of writing a co-simulation orchestrator (either Jacobi or Gauss-siedel), the paper assumed that both models were to compute their outputs on ...
J.M's user avatar
  • 131
1 vote
1 answer
55 views

Is there a number base where pi is a rational number? [closed]

For example, 0.10 (decimal) is a rational number in base 10 but is irrational (a repeating fraction) in binary (base 2). Is there a number base where PI (3.14159... decimal) is a rational number. That ...
TeasingDart's user avatar
0 votes
0 answers
77 views

Convolution in Fourier space with Python

I am trying to implement following step into the my cosmological particle mesh code. From the PM code, I obtained the 3D array for density and used the following code in python, but I'm not sure, if ...
FunThom's user avatar
0 votes
0 answers
24 views

Finding neighboring cells using Gmsh API

I am creating a simple mesh on a square domain, $[-5,5]\times[-5,5]$ using the following .geo file ...
Mainak's user avatar
  • 181
0 votes
0 answers
33 views

Synchronous integration vs asynchronous integration in simulations with complex problems

Lets say i want to create a detailed simulation of a complex system. For instance a drone. This simulation will have to contain a few models, each one with it's own requirements, for instance A 6Dof ...
J.M's user avatar
  • 131
2 votes
0 answers
128 views

Plasma charge conservation for a multi-Euler system - looking for quasi-linear Riemann solver that also resolves slow contact discontinuity

I am solving a multi-species plasma problem by assigning a set of ideal gas Euler equations to each species, e.g. protons and electrons. I.e. I am solving the system $$ \partial_tU_s + \partial_x(F_s) ...
AtmosphericPrisonEscape's user avatar
15 votes
5 answers
2k views

Ensuring IEEE 754 Compliance and Numerical Precision in C++ HPC Projects

I'm currently engaged in a large-scale C++ HPC project focused on numerical simulation, particularly Finite Element Method (FEM) simulations. Our project spans various Linux-based platforms and ...
René Chenard's user avatar
0 votes
0 answers
48 views

Need help with adaptive meshing code

I am trying to understand adaptive meshing and is using this code (https://github.com/esquivas/amr1d) as a reference. However, there is no documentation for it and thus, it is hard for me to ...
newbie125's user avatar
  • 101
1 vote
0 answers
38 views

Using of elastic tangent for structural nonlinear solver

I noticed that some finite element programs, such as Plaxis, do not require the constitutive law to return the consistent tangent, but elastic tangent seems to be sufficient. In my experience, using ...
kstn's user avatar
  • 241
3 votes
0 answers
86 views

Eliminate variables from a large system of equations

I have a large system of equations $Ax=0$. For context, the equations are invariants of some model. $A$ is sparse and typically has more columns than rows ($m < n$). The $x$ vector can be divided ...
io6nZ's user avatar
  • 31
0 votes
1 answer
52 views

How to modify adaptive step size Runge-Kutta cash karp algorithm for higher accuracy?

I'm following a paper on making your own cosmic microwave background perturbation solver code by Peter Callin https://arxiv.org/pdf/astro-ph/0606683.pdf In the programming techniques section V, the ...
hidenori's user avatar
4 votes
1 answer
120 views

Isolating bugs with convergence testing

Let's say that I have a numerical code and I'm doing convergence testing on the code. The code fails the convergence test, that is, the order of convergence is not as expected. Checking the order of ...
Ben Trettel's user avatar
1 vote
1 answer
58 views

Segmentation fault when broadcasting FFTW wisdom with MPI

I tried to use the wisdom gather / broadcast feature of FFTW with MPI, but can't get it to work. The following program is a combination of the MPI example from Section 6.3 of the FFTW manual and the ...
Hannes's user avatar
  • 111
0 votes
0 answers
47 views

Calculating a 2D Ewald sum for a multipolar expansion

I am attempting to calculate the potential of a particle at the center of an infinite two-dimensional lattice as per the following reference: Reference: Lambin, PH & Senet, P. Ewald Summation of ...
JasonC's user avatar
  • 33
6 votes
2 answers
293 views

Difficult because non-convex, or some other reason?

In my github project, I have come up with a very simple function that seems to cause problems for all the optimizers I have thrown it at, and I am wondering why. There is an obvious downhill ...
m4r35n357's user avatar
  • 245
1 vote
0 answers
38 views

Best way to find the meshing with lowest number of elements allowing a max error of 1%?

So, I have a reference simulation meshing that's 100% reliable but it's costly in terms of time so I'm looking for optimizing it by finding the minimum mesh allowing at most 1% of error with respect ...
Harold Morgan's user avatar
1 vote
1 answer
114 views

Is it possible to run a Metropolis Monte Carlo simulation in parallel?

Is it possible to run a Metropolis Monte Carlo simulation in parallel? Suppose I perform a Metropolis Monte Carlo simulation using four threads. Suppose, the programming source code divides a ...
user366312's user avatar

15 30 50 per page
1
2 3 4 5
228