Top new questions this week:
|
Given two floating point numbers $a,b$ with $a > b$ and an integer $n$, what is the most accurate way to compute $$ a^n – b^n $$ ? We can assume both $a,b$ are between 1 and 2. Lets assume both $a^…
|
I have the following expression $$ \frac{a^{(k)}}{k!} $$ where $a^{(k)}$ is the rising factorial. Is it better to evaluate it using floating-point arithmetic separately, that is, call a function that …
|
I’ve seen that many people are using matrix-free fem codes in my community (mechanical engineering). I have to admit that I googled a bit and I didn’t manage to find a good reference for the subject. …
|
I am solving a large system of equations using scalapack. Some systems that should run with no problem failed, apparently due to lack of memory in an mpi call. After investigating with …
|
I am trying to solve the Heat equation with Robin Boundary condition: $$ u_t(x,t) = u_{xx}(x,t), \\ u(x,0) = g(x), \\ u(0,t) + u_x(0,t) = h_0(t), \\ u(1,t) + u_x(1,t) = h_1(t)$$ for $ 0\leq x\leq1$ …
|
Problem Background I’m trying to find a solution to the following passenger matching problem: The network is represented by graph $G=(V,E)$. $V$ is the set of nodes/stations. $p_{ij}$ is the profit of …
|
Greatest hits from previous weeks:
|
I need to write some data from a computation, that will be read later by Paraview (.vtu or vtk file). When it comes to file size , should I go for the ASCII format or the Binary format ?
|
What is the best way to get a visual appealing plot of a singular vector field (if you want to visualize also the field strength). As an example I am playing with the electric fields of two point …
|
Are there any tools in Python that are like Matlab’s parfor? I found this thread, but it’s four years old. I thought maybe someone here might have more recent experience. Here’s an example of the …
|
I am trying to calculate the energy, magnetization and specific heat of a two dimensional lattice using the metropolis monte carlo algorithm. …
|
In my computational science PhD program, we are working almost exclusively in C++ and Fortran. It seems like some professors prefer one over the other. I am wondering which one is ‘better’ or if one …
|
Suppose $$\begin{align*} \min A &\mathrm{vec}(U) \\ &\text{subject to } U_{i,j} \leq \max\{U_{i,k}, U_{k,j}\}, \quad i,j,k = 1, \ldots, n \end{align*}$$ where $U$ is a symmetric $n\times …
|
I have several challenging non-convex global optimization problems to solve. Currently I use MATLAB’s Optimization Toolbox (specifically, fmincon() with algorithm=<...
|