All Questions

Filter by
Sorted by
Tagged with
2
votes
1answer
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: ...
15
votes
1answer
434 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 ...
15
votes
4answers
590 views

What are some applications which require interval arithmetic?

I have a very basic notion about interval arithmetic (IA), but it seems to be a very interesting branch of computational science both theoretically and practically. It is clear that the obvious ...
20
votes
6answers
3k views

Analyzing Numerical Error in C++ Function

Suppose that I have a function that takes as input several floating-point values (single or double), does some computation, and produces output floating-point values (also single or double). I am ...
36
votes
4answers
29k views

How does the MATLAB backslash operator solve $Ax=b$ for square matrices?

I was comparing a few of my codes to "stock" MATLAB codes. I am surprised at the results. I ran a sample code (Sparse Matrix) ...
3
votes
1answer
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 ...
12
votes
1answer
340 views

Enumeration of graphs deriving from Delaunay tessellations in 3D

Is there an algorithm that enumerates the graphs that correspond to some Delaunay tessellation of points in 3D? If so, is there an efficient parameterization of geometries that correspond to any "...
13
votes
4answers
6k views

FLOP counting for library functions

When evaluating the number of FLOPs in a simple function, one can often just go down the expression tallying basic arithmetic operators. However, in the case of mathematical statements involving even ...
2
votes
0answers
183 views

Texture analysis methods modern survey paper

I want to study the methods of analyzing textured images. So i searched google scholor but only found very old papers statistical and structural approaches to texture 1979 haralick Image Texture ...
6
votes
4answers
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. ...
15
votes
4answers
5k views

Linear programming feasibility problem with strict positivity constraints

There is a system of linear constraints ${\bf Ax} \leq {\bf b}$ . I wish to find a strictly positive vector ${\bf x} > 0$ that satisfies these constraints. That means, $x_i > 0$ is required for ...
8
votes
3answers
1k views

Laplacian eigenmodes on a semi-circular region with finite-difference method

The computation of eigenmodes of a semi-circular membrane reduces to the following eigenvalue problem $$\nabla^2u=k^2u\;,$$ where the region of interest is a semi-circle defined by $r\in[0,1]$ and $\...
11
votes
4answers
483 views

Runge-Kutta and Reusing Datapoints

I am trying to implement the fourth order Runge-Kutta method for solving a first order ODE in Python i.e. $\frac{dy}{dx} = f(x,y)$. I understand how the method works, but am trying to write an ...
84
votes
10answers
20k views

What kinds of problems lend themselves well to GPU computing?

So I've got a decent head for what problems I work with are best one in serial, and which can be managed in parallel. But right now, I don't have much of an idea of what's best handled by CPU-based ...
8
votes
2answers
398 views

Filtering a dataset to get a more uniform distribution for neural network training

I'm looking into using artificial neural networks (ANN) to predict the reaction rates in my fluid instead of solving the full system of stiff ODEs. Some people from my lab have already done some work ...
17
votes
5answers
349 views

Databases of results for numerical codes

In the numerical methods literature, many research papers consist of a description of a new algorithmic variation, followed by a few test problems comparing the new method with one or two existing ...
12
votes
2answers
880 views

Automatic generation of integration points and weights for triangles and tetrahedra

Usually one would consult a paper or book to find integration points and weights for unit triangle and tetrahedra. I am looking for a method to automatically compute such points and weights. The ...
23
votes
12answers
19k views

Is it possible to use Octave to learn MATLAB programming?

I want to learn MATLAB programming so that I can conduct some researh/analysis on my own and also, so that I can study/modify some MATLAB scripts that I have found online etc. However, the problem is ...
6
votes
2answers
1k views

Shape regularity in higher dimensions

In Finite Element theory, and other methods in scientific computing for PDEs, one uses meshes which fulfill several regularity criteria, many of them being equivalent. It is of interest to have ...
22
votes
2answers
2k views

What simple methods are there for adaptively sampling a 2D function?

I have a two-dimensional function $f(x,y)$ whose values I would like to sample. The function is very expensive to compute and it has a complex shape, so I need to find a way to get the most ...
8
votes
2answers
814 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 (...
9
votes
2answers
16k views

How to set double precision values in Fortran

Recently, I've encountered a bizarre problem with FORTRAN95. I initialized variables X and Y as follows: X=1.0 Y=0.1 Later I add them together and print the ...
7
votes
4answers
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,...
2
votes
1answer
6k views

Compiling and running a “hello world” program in PETSc

I'm trying to compile a hello world program using PETSc, based off of this tutorial, slide 33 . How would I compile this? I know that I can't use a simple 'mpicc' command. When running the program, ...
2
votes
0answers
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 ...
2
votes
1answer
106 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 ...
5
votes
5answers
2k views

How do I create an animation from a 2D model or dataset?

I found the following thread in the physics stackexchange where I saw the video called output attached to the main post. The video can be found here. How would I go about creating such an animation?
4
votes
1answer
2k views

How to run a PETSc example?

I just installed the PETSc library. This is what I did from the home directory ~ ...
2
votes
2answers
980 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 ...
17
votes
4answers
4k views

The definition of stiff ODE system

Consider an IVP for ODE system $y'=f(x,y)$, $y(x_0)=y_0$. Most commonly this problem is considered stiff when Jacobi matrix $\frac{\partial f}{\partial y}(x_0,y_0)$ has both eigenvalues with very ...
1
vote
0answers
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 ...
9
votes
1answer
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 ...
3
votes
1answer
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 ...
3
votes
1answer
280 views

How to solve a problem with structure similar to a finite difference discretization of the 2D Poisson equation, but with non-symetric coefficients?

Recently, I've been asking about methods to solve a finite difference discretization of the 2D Poisson equation (see here and here) of the form: $$U_{i-1,j} + U_{i+1,j} -4U_{i,j} + U_{i,j-1} + U_{i,...
9
votes
1answer
1k views

Which fourier series is needed to solve a 2D poisson problem with mixed boundary conditions using Fast Fourier Transform?

I have heard that a fast fourier transform can be used to solve the poisson problem when the boundary conditions are all one type... Sine series for dirichlet, cosine for neumann, and both for ...
3
votes
3answers
911 views

What is the best way to solve Ax = b (with A large, spd, sparse, banded and poorly conditioned)?

I'm trying to solve $Ax = b$ given a vector $b$ and a large, symmetric positive definite, sparse, banded matrix $A$ that has a very poor condition number. I know several iterative methods that ...
8
votes
3answers
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 ...
5
votes
2answers
462 views

What heuristics can be used to minimize the asymptotic matrix bandwidth of a 5-point Laplacian discretization?

I can see that there are multiple heuristics to achieve a matrix with minimum bandwidth. As heuristics, they can't guarantee an optimal solution in polynomial time (after all, the problem is NP-...
4
votes
1answer
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 ...
8
votes
1answer
192 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$. ...
4
votes
1answer
1k views

How to find conditional Lyapunov exponents

For a synchronized ODE system,I wanted to know if there is a program code in MATLAB available for plotting the conditional Lyapunov exponent. For example, synchronization of identical Rossler system ...
15
votes
4answers
1k views

How to reorder variables to produce a banded matrix of minimum bandwidth?

I'm trying to solve a 2D Poisson equation by finite differences. In the process, I obtain a sparse matrix with only $5$ variables in each equation. For example, if the variables were $U$, then the ...
5
votes
2answers
464 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 ...
18
votes
4answers
3k views

Is there a general-purpose library for structured grid adaptive mesh refinement?

Adaptive mesh refinement (AMR) is a common technique for dealing with the problem of widely varying spatial scales in the numerical solution of PDEs. What general-purpose libraries exist for AMR on ...
7
votes
1answer
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 ...
10
votes
1answer
5k 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 ...
11
votes
1answer
777 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 ...
15
votes
1answer
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 ...
-2
votes
1answer
2k views

How do you install a binary R package?

I need instructions on how to install a binary package in R.
5
votes
1answer
1k views

creating a flat surface in python

I'm trying to create a figure of particle distribution from a reference surface in python. I plan to get a distribution in python and then prettify it with tikz. I tried this: ...

15 30 50 per page