# All Questions

7,938 questions
Filter by
Sorted by
Tagged with
556 views

### How can I reduce the error of the sample average?

I want to use the sample average $(X_1 + .... X_n)/n$ as a substitute for the expectation $\mathbb{E}(X)$. As claimed by the weak law of large numbers, as n increases the sample average should ...
57 views

### What does PetscBagSetFromOptions() do?

I'm writing a program that uses PETSc and SLEPc, and I was looking for a convienient way to read in options from the command line. The description of ...
732 views

### Modern Computer Efficiency vs Modern Nervous Systems

I am currently working on an evolutionary system and most of what I have heard is that a computer like mine at the moment would be able to simulate a bee sized brain (not taking into account the time ...
105 views

I am wondering if you can answer a math question that I require answered for an evolutionary program that I am writing. With regards to the phenomenon known as the "space-time tradeoff" (wiki it) - ...
1k views

### IPOPT solver auto-converts my binary variables to continuous

I hope this is the right stackexchange for this question; if not, please direct me there! I'm on Linux. I've installed IPOPT and AMPL, and all the third-party stuff required: ASL, HSL, Lapack, Metis, ...
218 views

### Condition number of (A + cI) matrix

For given matrix $A \in R^{n\times n}$, identity matrix $I$ and constant $c > 0$ is this possible to express $cond(A + cI)$ knowing $cond(A)$ and $c$?
281 views

### float128 in linear algebra

Is there any paper or research concerning float128 arithmetics applied to linear algebra problems(e.g. iterative solvers, decompositions etc.)? How much benefit is really there in comparison with ...
289 views

### changing from global to local coordinate structure

I am going to put this question on math exchange and stack exchange as well (since it doesn't really fit in any of the specific fields, I don't know which it should go in), but here is the question: ...
924 views

### Solve log equations problem [SageMath]

Input var('x') solve((log((x**2 - x), 6) - log((6*x - 10), 6) == 0), x) Output [log(x^2 - x) == log(6*x - 10)] But real ...
400 views

### Computing the characteristic polynomial of real sparse matrix

Given a generic sparse matrix $A \in \mathbb{R}^{n\times n}$ with m << n (correction: $m \ll n^2$) non-zero elements (typically $m \in {\cal O}(n)$). $A$ is generic in the sense that it has no ...
421 views

### What numerical methods are recommendable for simulating two phase immiscible fluid flow through a pipe with high capillary pressure?

I'm simulating two phase immiscible drainage (air displacing water) in a rectangular domain of size .6mm x 2.4mm (2 dimensions) using Ansys FLUENT software. I am using an implicit Volume of Fluid ...
4k views

### Is there an MPI All Gather operation for matrices?

I have a distributed matrix, in block column format. I know that I can reshape the matrix into one long vector and use an all_gatherv operation. I just wanted to avoid the trouble of having to ...
2k views

### An efficient way to numerically compute Stirling numbers of the second kind?

Is there an efficient way to numerically compute Stirling numbers of the second kind? An approximate (not exact) method would suffice. Something similar to the connection between factorials and gamma ...
69 views

### 2D Jacobi line maintenance?

Suppose a linear system is given $$AX=B,$$ where $A\in\mathbb{R}^{n\times n}$ is a symmetric strictly diagonal matrix, and $X, B\in\mathbb{R}^{n\times 2}$. Therefore, the 2D Jacobi iterative solver is ...
733 views

### Some good reading on polygon algorithms

What are some good resources (books, articles, sites) about polygon intersection and union algorithms?
9k views

### How do I plot a transparent cylinder in matlab? [closed]

I know that I can use the following commands to create an opaque cylinder in matlab: N=100; [X,Y,Z]=cylinder(R,N); surf(X,Y,Z); I want to plot an arrow inside ...
844 views

### How can we evaluate performance of students in computational science courses?

As someone who has to teach courses in computational science, I am confronted with the age-old question: how do I evaluate the ability of the students to learn a subject that depends on applications ...
672 views

### Trace An Isoline of an Expensive 2D Function

I have a problem similar in formulation to this post, with a few notable differences: What simple methods are there for adaptively sampling a 2D function? Like in that post: I have a $f(x,y)$ and ...
8k views

### What is the difference between O(n) and o(n)? [closed]

I was studying Big-Oh notation, and there is apparently a difference between $O(n)$ and $o(n)$. What is it? I think $f(n)$ is $o(n)$ means that $$\lim_{n \to \infty} \frac{f(n)}{g(n)} = 0$$ but what ...
3k views

### How does LAPACK solve tridiagonal systems and why?

In my project I have to solve a couple of tridiagonal matrices at every time step, so it is crucial to have a good solver for those. I did my own implementation, just the classical way to do it ...
3k views

### The Remez Algorithm

The Remez algorithm is a well-known iterative routine to approximate a function by a polynomial in the minimax norm. But, as Nick Trefethen [1] says about it: Most of these [implementations] go ...
2k views

### Condition number of A'A and AA' formulations

It's shown (Yousef Saad, Iterative methods for sparse linear systems, p. 260) that $cond(A'A) \approx cond(A)^2$ Is this true for $AA'$ as well? In case $A$ is $N\times M$ with $N \ll M$, I observe ...
128 views

### Initial guesses for perturbed linear systems

Suppose you solve a linear system $Au = f$ by an iterative method, e.g. conjugate gradients or Richardson iteration. Then you try to solve a linear system that is slightly perturbed in the matrix and ...
107 views

### Numerically stable algorithms for computing remainder of polynomials

Let $f, g \in \mathbb{R}[x]$ and $\deg f > \deg g$. I am looking for asymptotically fast and numerically stable algorithms for computing $f \bmod g$. In the applications intended, both $f, g$ are ...
11k views

### How can I determine the period of my pseudo-random number generator?

Suppose I'm using a linear congruential pseudo-random number generator (PRNG). Given a seed $x_0$, the multiplying factor (a), the shift factor (c) and the modulus factor (m), how can I determine the ...
386 views

### Why is my lower convex hull extraction algorithm not working?

Recently, I wrote an algorithm to obtain a delaunay triangulation of a random point set in $I=[-10,10]$x$[-10,10] \subset R^2$ by projecting these points onto the 3 dimensional paraboloid $z=x^2+y^2$, ...
2k views

### Non-differentiable global optimization problem

I am trying to solve the following test problem which is well-known in the community in different variants: Place N = 15 points in the 3-dim. unit cube such that the minimal distance between them is ...
1k views

2k views

### Sort a cloud of points with respect to an unstructured mesh of hexahedral cells

Question How would you sort a cloud of points with respect to an unstructured mesh of hexahedral cells? Each cell has a centre and a unique label to represent it. There are two cloud points ...
2k views

### How is geometric programming different from convex programming?

How is (generalized) geometric programming different from general convex programming? A geometric program can be transformed into a convex program, and is typically solved by an interior point method....
527 views

### Recommendation for a good article/book for frontal methods?

Can someone provide an article or book that explains the principle used in frontal solvers? Some examples also may help understand the frontal methods better.Thanks in advance!
753 views

### How can one mathematically describe the “cartoon” type of representation of proteins?

Proteins are typically represented in a cartoon form, with β sheets as arrows and α helices as coils: I'm wondering, is there somewhere a reference that describes the construction of this ...
5k views

### Using unconventional programming languages for scientific computation [closed]

Note: the following post may include controversial opinions, so please note that they are only my opinions, and not intended to offend anyone. I'm being programming in some form or the other since ...
249 views

### Why do we have to rerun the CFD solver for higher Reynolds number?

I started to learn OpenFOAM from the Cavity tutorial which is provided at the web-site. When experimenting with different Reynolds numbers, in section "2.1.8.2 Running the code", tutorial says to ...
7k views

### Profiling CFD code with Callgrind

I'm using Valgrind + Callgrind to profile a solver I have written. As the Valgrind user manual states, I've compiled my code with the debugging options for the compiler: "Without debugging info, ...
4k views

### Modern resources for learning FEM

I need to get started using Finite Element Methods. I am about to start reading Numerical solutions of partial differential equations by the finite element method by Claes Johnson, but it's dated 1987....
601 views

### Petsc not compiling c++ files

I'm having a problem where petsc is complaining about the type of PetscScalar (I get a whole bunch of errors from the c++ standard library that revolve around PetscScalar not defined). I believe it ...
5k views

### Tools for visualizing large 3D volumes

I have a sequence of 2D images (png files) encoding the partitioning (segmentation) of a large biological 3D volume. In these files, each pixel has a color, representing the 3D object the pixel ...
363 views

### Easily accessible scientific code that uses LAPACK

I would like to analyze some well-used scientific codes that make heavy use of LAPACK. I.e. I'm looking for codes that both spend a lot of time within LAPACK functions and use LAPACK non-trivially (i....
387 views

### finite difference methods and global error

I was going through my notes on different finite difference methods and came across something I don't quite understand. I have code that will calculate an approximate solution we can call this $U_{nm}$...

15 30 50 per page