# All Questions

8,455 questions
Filter by
Sorted by
Tagged with
1k views

### How to measure the overall performance of a PETSc program using the -log_summary flag?

When I run a PETSc example in parallel with the flag "-log_summary", the first two tables of information look something like this: ...
279 views

### Approximately “solving” a linear system of equations without a feasible solution

A linear system of equations has the form $Ax = b$, where a matrix $A$ and a vector $b$ are given, and I wish to find a solution vector $x$. Suppose that the system $Ax = b$ has no feasible solution. ...
464 views

### How effective is the 'tendrils of knowledge' approach to Comp. Sci?

I was reading this on Math SE. The basic question is : Assume that someone wishes to study something advanced; one way to do this would be to start off from basics and build up. But the "bigger ...
1k views

### Problems running a PETSc example in parallel

After configuring and building PETSc, I have successfully been able to run several examples. In particular, I am working with this example. I have been able to run the program using the following ...
2k views

### precision vs matrix condition number

I have an application in which I am computing a quantity which is approximated by an average over $M$ points. In theory, the average converges to the correct quantity when $M$ is infinite. In practice,...
544 views

### What is the probabilistic model behind sudoku grids?

I'm talking about the vanilla sudoku game, with 9x9 grids equally split into 9 regions. I've tried a few approaches to estimate the probability that a specific number is in a specific location, but I ...
6k views

### Are there any heuristics for optimizing the successive over-relaxation (SOR) method?

As I understand it, successive over relaxation works by choosing a parameter $0\leq\omega\leq2$ and using a linear combination of a (quasi) Gauss-Seidel iteration and the value at the previous ...
2k views

### How to efficiently determine the intersection of a vertical cutting plane with a mesh

I have a list of vertical cut planes, and I have a polygonal mesh ( it's a 2D+0.5D mesh, something like a 2D mesh with an extra dimension, $z$ attached to each point). One can assume that the mesh ...
828 views

### Which Sparse Matrix Solver Libraries can I run on Android?

The title says most of it. I'm looking for a lightweight and easy-to-use library that I can use for Android (NDK) projects. For dense stuff I like using Eigen but I haven't found many comprehensive (...
97 views

### What is the naming convention used in ScaLAPACK?

I see that there are many files in the ScaLAPACK library without any immediately obvious naming convention... I'm sure that if the first letter is "p", it means parallel. But I'm not sure how to make ...
984 views

### Lanczos solver implementations in MATLAB/C++ give different results

I have transferred my MATLAB Lanczos solver for symmetric eigenvalue solvers to C++ with the help of Intel MKL and MTL4 libraries. I have some wrapper templates for MKL routines. However during the ...
81 views

### Constraint solving over modular domains

I have a set of constraints over modular domains e.g. $\exists a \in A_i : x \equiv a \pmod{n_i}$ for all $i=0,\ldots,k$ The question is, does such an $x$ exist? I've been pointed to method of ...
169 views

### How to print out a network in peersim? [closed]

Peersim is a peer-to-peer network simulator. I'm simply trying to get the program to print out the network (an edge list is fine). Presumably this is possible, since there is an in-built ...
112 views

### Low performance on sge cluster

I'm having an issue with my project. When I run the code of Monte-Carlo simulation, on the local server (the machine in my office) it runs on a rate of roughly 100000 steps per 24 hours. When I run it ...
1k views

### Schrodinger equation with periodic boundary conditions

I have a couple of questions regarding the following: I am trying to solve the Schrodinger equation in 1D using the crank nicolson discretization followed by inverting the resulting tridiagonal ...
2k views

### How to run a PETSc example?

I just installed the PETSc library. This is what I did from the home directory ~ ...
2k views

### Solving a non-symmetric non-diagonally dominant sparse system the best way

I faintly recall from my early "numerics" lectures that iterative linear solvers for $Ax=b$ often require that when $A$ is decomposed as $$A=D + M$$ where D is a diagonal matrix and $M$ has zero ...
205 views

### Finding the fixed point of an operator

What numerical methods are available for finding the fixed point of an operator $A$ that is acting on functions $f : [a,b] \rightarrow [a,b]$? I am looking for the function $f$ for which $Af = f$. ...
467 views

### How to parallelize a banded direct solver?

I have a linear system whose matrix that is diagonally dominant, non-symmetric, but banded. Since the band-radius is 2 (producing only 5 variables per equation), a banded direct solver (gaussian ...
316 views

### What efficient algorithms are there to generate arbitrary dimensional meshes of simplices?

I know that delaunay triangulation can be extended into arbitrary dimensions by solving the convex hull problem in $(p+1)$ dimensions and projecting the lower hull into dimension $p$ to obtain a mesh ...
294 views

### How to fill a 2D set over a cartesian lattice with as few rectangles as possible?

Suppose I have a black and white image (composed of binary pixel values in a 2D cartesian array) that contains an irregular, nonconvex shape. Let's further suppose that the shape is one connected ...
2k views

### Can a Krylov subspace method be used as a smoother for multigrid?

As far as I am aware, multigrid solvers use iterative smoothers such as Jacobi, Gauss-Seidel, and SOR to dampen the error at various frequencies. Could a Krylov subspace method (like conjugate ...
819 views

### Library for Fourier transform on triangle lattice

I am looking for reasonably fast implementations of the discrete Fourier transform (DFT) on a 2D triangular or hexagonal lattice. I would appreciate pointers to such implementations (especially ones ...
408 views

### How can I reduce the communication bottleneck of a parallel explicit finite difference scheme?

Suppose i was trying to solve a parabolic PDE (heat equation) on a rectangular domain using an explicit finite difference scheme. I am storing my solution vector in a matrix form (because it closely ...
2k views

### How can one parallelize a multigrid method for solving a linear system of equations?

As I understand it, the multigrid method solves a linear system by solving a coarser version of the same problem (there by eliminating low frequency error) then projecting back to the fine grid to ...
931 views

### Is there a standard rating system for scientific journal publications?

I have heard that some journals are rated more highly than others. Is this true? And if so, what are the criteria for judging the value of one peer reviewed journal over another? How do I find out ...
640 views

### Surface Mesh Library

I'm thinking a bit about the Front Tracking method used for simulation of Two phase flow with sharp interfaces. The literature tells me that the main issue is the surface mesh representation (...
1k views

### Computational Complexity of Image Segmentation algorithms

I have a question. I need to calculate the computational complexity of image segmentation algorithms. Can anyone please help me? For example, I have a screen-size picture with white background ...
2k views

### How do I compile a program that contains both MPI and OPENMP

I have a fortran 90 code that distributes blocks of computations (from a matrix) to multiple nodes in a cluster using MPI, but in each node, the for loops are executed in parallel using openmp. I ...
2k views

### finite volume method: unstructured mesh vs octree adaptation + cell cutting

I'm working with the OpenFOAM C++ Computational Continuum Mechanics library (it can deal with fluid-solid interaction, MHD flows...) which uses arbitrary unstructured meshes. This was driven by the ...
1k views

### Looking for a library or algorithms to perfom clipping 3D unstructured meshes by a set of surfaces

We have a 3D (volume) unstructured, possibly hybrid, degenerative irregular mesh data structure that we are capable of generating (mostly composed of hexahedra and general polyhedra, using a mix of ...
778 views

### Complex numerical analysis

What numerical analysis situations become more/less stable, have faster/slower convergence, or are otherwise quite different when dealing with functions of complex variable instead of functions of a ...
2k views

### Reference implementation of Nédélec-Elements

Does anybody know of an implementation of Nédélec elements that does not come along with a huge bulk of additional software? Is there a small library written in a language like Python, Matlab, or ...
893 views

### Scalability of Fast Fourier Transform (FFT)

To use the Fast Fourier Transform (FFT) on uniformly sampled data, e.g. in connection with PDE solvers, it is well known that the FFT is an $\mathcal{O}(n\log(n)$) algorithm. How well do the FFT scale ...
395 views

### Which is computed faster, $a^b$, $\log_a c$ or $\sqrt[b]{c}$?

Which is computed faster, $a^b$ or $\log_a c$ or $\sqrt[b]{c}$? $a$, $b$ and $c$ are positive reals with $b>1$. What kinds of algorithms will you use in the comparison? What are their complexities?...
110 views

### Up-/downdating methods for a series of normal equations

In an application I have to solve a series of positive definite linear systems of the form $A^TA x = A^Tb$ (i.e. normal equations). The next system is obtained from the previous one by adding and/or ...
5k views

### How to derive the Weak Formulation of a Partial Differential Equation for Finite Element Method?

I have taken a basic introduction to Finite Element Method, which did not emphasize a sophisticated understanding of a 'weak formulation'. I understand that with the galerkin method, we multiply both ...
704 views

### Is it preferable to concentrate on studying math or computation?

Concurrent to my research on Krylov Subspace Methods, I have the option of exploring mathematics behind HPC a step ahead or the theory of computation (hardware, OS, compilers etc.). Currently, I know ...
524 views

### Fitting a grid to an STM image

Suppose I have a scan from an STM image (very much like the things you see here). Suppose I have a simple square lattice with lattice parameter a. What I'd like to do is to numerically find the ...
4k views

### Efficient solution of mixed integer linear programs

Many important problems can be expressed as a mixed integer linear program. Unfortunately computing the optimal solution to this class of problems is NP-Complete. Luckily there are approximation ...
687 views

### When is automatic differentiation cheap?

Automatic differentiation allows us to numerically evaluate the derivative of a program on a particular input. There is a theorem that this computation can done at a cost less than five times the cost ...
2k views

### Scientific Programming on Mac using Objective-C/Cocoa for MATLAB Users

I want to get started on scientific programming on the Mac using Objective-C. I am very familiar with MATLAB which makes it easy to store complex-valued waveform data in vectors and generating plots. ...
6k views

### State of the Mac OS in Scientific Computing and HPC

Back towards the dawn of OS X, there seemed to be a great deal of hubbub, at least in the Mac world (I was nowhere near scientific computing at the time) about the Mac OS as a platform for scientific ...
3k views

### What is the advantage of multigrid over domain decomposition preconditioners, and vice versa?

This is mostly aimed for elliptic PDEs over convex domains, so that I can get a good overview of the two methods.
134 views

### Probabilistic algorithms for matrix approximation

Considering regular matrix approximation inequality || $A - QQ^TA$|| < e where we try to approximate matrix $A$ by a lower rank orthonormal matrix $Q$. I've read an article on probabilistic ...
3k views

### What is a good stop criterion when using an iterative method to find eigenvalues?

I read this answer, and realized I have been using the difference between sucessive iterates to define a stop criterion for an iterative method of finding eigenvalues/vectors. What are good stop ...
1k views

### Solution oscillations with a small timestep in backward Euler

I am using backward Euler in a FEM scheme for a convection-diffusion problem. On a given mesh, I can take arbitrarily large time steps, as expected. But if I decrease time step, at some point it will ...
287 views

### What are the possible numerical schemes for a diffusion equation with a nonlinear reaction term?

For some simple convex domain $\Omega$ in 2D, we have some $u(x)$ satisfying the following equation: $$-\mathrm{div}(A\nabla u)+cu^n = f$$ with certain Dirichlet and/or Neumann boundary conditions....