All Questions

Filter by
Sorted by
Tagged with
4
votes
1answer
381 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}$...
8
votes
2answers
7k views

Dictionaries in pseudocode

What is a good, common way to express dictionaries (= maps) in pseudocode? I.e. datastructures that basically allow to store values for keys, iterate over all key/value pairs, test for inclusion of a ...
14
votes
3answers
6k views

How to impose boundary conditions in finite difference methods

I have a problem when I want to use the high order center difference approximation: $$\left(\frac{-u_{i+2,j}+16u_{i+1,j}-30u_{i,j}+16u_{i-1,j}-u_{i-2,j}}{12}\right)$$ for the Poisson equation $$(...
12
votes
2answers
10k views

Octave: calculate distance between two matrices of vectors

Suppose I have two matrices Nx2, Mx2 representing N, M 2d vectors respectively. Is there a simple and good way to calculate distances between each vector pair (n, m)? The easy but inefficient way is ...
6
votes
1answer
263 views

Question about the smoothing operators in multigrid methods for nonlinear PDEs

Suppose we are dealing with a nonlinear problem, say $$ A u := L u + G(u) = f $$ the nonlinearity of the operator $A$ is the polynomial type, ie, $L$ is a linear operator, and $G(u) = u^k$, or ...
3
votes
1answer
558 views

Computing a rolling quantile

An algorithm I'm writing needs to compute rolling quantiles of a time series. Currently I do this in the naive way: for a window of size W and a vector ...
4
votes
3answers
313 views

Overlapping communication and computation in PETSc and/or Trilinos?

I am just learning about these packages, so forgive me if this is a trivial/silly question. Our group is working re-developing our code from the ground up using modern software practices. Currently ...
4
votes
3answers
218 views

Efficiently computing a few localized eigenvectors

Let $H = \triangle + V(x) : \mathbb{R}^2 \rightarrow \mathbb{R}^2$. I am interested in domain decomposition for an eigenproblem involving $H$. The lowest 1000 eigenfunctions of $H$, $ \psi_i $, can ...
5
votes
5answers
339 views

Will MPI continue to be a popular basis writing scalable massively parallel solvers on future many-core CPUs? [duplicate]

Possible Duplicate: What programming paradigms should I be investing in if I want my code to run on petascale machines in the future? Having entered the multi-core era (som already refers to as ...
15
votes
6answers
18k views

Constraints involving $\max$ in a linear program?

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 ...
7
votes
5answers
292 views

External hardware resources for running long and computationally intensive simulations

I've written code for an obstructed random walker simulation and I want to run long simulations (6 hours or more on my computer). I don't want to run this simulation on my computer because I will want ...
10
votes
2answers
1k views

Selection of linear solver for GPGPU computation (OpenCL)

I have already developed a working solution of the Finite Element Method to solve heat transfer problems using GPU and OpenCL using the Conjugate Gradient method. The main disadvantage of this method ...
11
votes
1answer
565 views

Computing standard errors for linear regression problems without calculating inverse

Is there a speedier way to calculate standard errors for linear regression problems, than by inverting $X'X$? Here I assume we have regression: $$y=X\beta+\varepsilon,$$ where $X$ is $n\times k$ ...
2
votes
1answer
1k views

Error calculation in trapezoidal rule

If we use the composite trapezoidal rule, then what is the least number of divisions $N$ for which the error of the integral $\int^1_0{e^{-x}}dx$ doesn't exceed $\frac{1}{12}\times10^{-2}$. My guess ...
11
votes
1answer
421 views

How to establish that an iterative method for large linear systems is convergent in practice?

In computational science we often encounter large linear systems which we are required to solve by some (efficient) means, e.g. by either direct or iterative methods. If we focus on the latter, how ...
9
votes
1answer
259 views

Given values on a mesh, what algorithm can I use to construct efficiently level set contours?

I have a mesh, faces $F$, edges $E$, and vertices $V$, and I have a list of predefined level set contours. What algorithm can I use to construct contours in the most efficient manner? A plot of the ...
20
votes
4answers
2k views

How to incorporate the boundary conditions with the Galerkin method?

I've been reading some resources on the web about Galerkin methods to solve PDEs, but I'm not clear about something. The following is my own account of what I have understood. Consider the following ...
7
votes
2answers
1k views

Understanding OpenCL performance

I'm using ViennaCL's interface to Eigen as a way to leverage OpenCL. Specifically, I'm using the ::viennacl::linalg::bicgstab_tag with an Eigen sparse matrix. ...
8
votes
1answer
669 views

C++ library for graphs with maximum common subgraph solver

I'm looking for a convenient, free C++ library for graphs that include a solver for the maximum common subgraph (MCS) problem. I'm aware of the Boost Graph Library and LEMON , but neither includes an ...
4
votes
2answers
321 views

Tools/solutions for visualization of molecular simulation trajectories?

I have so far been using VMD to create visualizations of molecular trajectories. However, I find myself not entirely satisfied with the quality of the resulting animations—when you want to do snapshot-...
3
votes
2answers
555 views

Unimodular Matrix calculation

I know for a given matrix $M$, there exists a matrix $U$ over the integers with determinant $+1$ or $-1$ such that $UM=E$. I know $E$, but $M$ is not a square matrix. Is there any easy way to get $...
6
votes
2answers
896 views

Is there any 2D shape repository?

As far as I see, there are many repositories for 3D shapes. But in FEM and many other applications, a planar mesh domain is also very common. However, I did not find a mesh repository specially ...
27
votes
2answers
8k views

Does a tiny determinant imply ill-conditioning of a matrix?

If I have a square invertible matrix and I take its determinant, and I find that $\det(A) \approx 0$, does this imply that the matrix is poorly conditioned? Is the converse also true? Does an ill-...
27
votes
5answers
3k views

Are there any famous problems/algorithms in scientific computing that cannot be sped up by parallelisation

Are there any famous problems/algorithms in scientific computing that cannot be sped up by parallelisation? It seems to me whilst reading books on CUDA that most things can be.
5
votes
0answers
117 views

Wavelets frame for $L^2[0,\infty)$

I need a wavelet frame for $L^2[0,\infty)$. Moreover, the wavelet should be twice differentiable and with continuous second order derivatives. Hopefully, the wavelet should have compact support (...
4
votes
2answers
276 views

Is it possible to prove that the off-diagonal blocks of the Cauchy matrix have numerical rank $O(\log n)$?

Suppose we have a $n\times n$ Cauchy matrix of which the $ij$-th entry is given by: $$ A_{ij} = \frac{1}{a_i - b_j} $$ the assumption is that the distance between $\{a_i\}$ and $\{b_j\}$ is greater ...
7
votes
1answer
554 views

Heuristic for Gibbs sampler annealing schedule

Suppose one is performing Gibbs sampling with a Boltzmann distribution (or if you prefer, simulated annealing) at finite temperature. In general we would want to anneal: as the sampler converges to ...
4
votes
3answers
422 views

How to obtain finite difference, which is continuous

I want to calculate a finite difference (something like this SO Post). My data is as follows: I have x-values that are powers of two (4, 8, 16, 32 and 64). Corresponding to them are y-values, such ...
10
votes
3answers
2k views

Matrix exponential of a real asymmetric matrix with Fortran 95 and LAPACK

I recently asked a question along the same lines for skew-Hermitian matrices. Inspired by the success of that question, and after banging my head against a wall for a couple of hours, I'm looking at ...
2
votes
2answers
245 views

Algorithm to compute the intersection of meshlines with a boundary

I need a program or an algorithm that computes the intersection of a mesh and a boundary. The mesh is structured orthogonal in nature and the boundary is a circle (for example). This will be used ...
9
votes
4answers
3k views

Algebraic Multigrid Code

I would like to understand more details about the implementation of Algebraic Multigrid Methods (AMG). I have been reading "A Multigrid Tutorial", which is quite good and explain all the details of ...
10
votes
3answers
884 views

Why does iteratively solving the Hartree-Fock equations result in convergence?

In the Hartree-Fock self-consistent field method of solving the time-independent electronic Schroedinger equation, we seek to minimize the ground state energy, $E_{0}$, of a system of electrons in an ...
5
votes
1answer
431 views

Does ADI/Split-operator change the stability properties of the Crank-Nicholson method?

I'm using the Crank-Nicholson method to solve the time-dependent Schrödinger equation with the split-operator method. I'm getting some weird results that are probably the result of a bug somewhere in ...
3
votes
1answer
65 views

Adding deliberate imperfection to RNG output - toolkits?

Are there any existing software toolkits, libraries, frameworks or whatever for studying the quality of pseudorandom number generators that allow one to add a known amount of imperfection - e.g ...
10
votes
1answer
566 views

How to assemble and solve a matrix system in parallel from values generated in different processors?

I am solving a multiscale problem using the Heterogeneous Multiscale Method (HMM). Essentially, my particular procedure uses the following iterative process: Solve many local matrix systems. ...
3
votes
3answers
2k views

How do I read a binary file into PETSc as a matrix?

I created a binary matrix using the following loop in c ...
7
votes
1answer
850 views

Sparse hermitian eigensystems: are there better techniques than Arpack or TRLan?

As a part of other work I need to solve relatively large (~1E5x1E5) and sparse (~100 non-zero elements in each raw in few blocks) hermitian eigensystems. Usually only few eigenvalues+vectors are ...
8
votes
4answers
2k views

How can I seed a parallel linear congruential pseudo-random number generator for maximal period?

Normally when I seed a sequential random number generator in C, I use the call srand(time(NULL)) then use rand() mod N ...
8
votes
1answer
216 views

Suggestions for numerical integral over Pólya Distribution

This problem arises from a Bayesian statistical modeling project. In order to compute with my model, I need to perform an integration in which part of the integrand is the "Pólya" or "Dirichlet-...
2
votes
2answers
5k views

Can't understand a simple wave equation matlab code

I'm trying to figure out how to draw a wave equation progress in a 2D graph with Matlab. I found this piece of code which effectively draw a 2D wave placing a droplet in the middle of the graph (I ...
8
votes
1answer
590 views

Where to find data sets for testing minimum vertex cover algorithm for bipartite graphs?

I'm playing with simple implementations of algorithms to find minimum vertex cover/maximum cardinality matching in bipartite graphs. However, I seem to have trouble googling for some test data sets ...
8
votes
4answers
3k views

High Order derivatives of splines using SciPy

I have created a spline to fit my data in python using: spline=scipy.interpolate.UnivariateSpline(energy, fpp, k=4) The equation I want to use involves a ...
13
votes
5answers
528 views

How much should scientific software be optimized?

For applications requiring significant computational resources, high performance can be a critical factor when it comes to delivering scientific results or achieving "break-throughs" in reasonable ...
5
votes
1answer
141 views

complexity constants in median computations same as that of general quantiles?

I would like to know whether the constant in the time complexity of computing the median is different from that of computing general quantiles. In R for example: ...
7
votes
2answers
358 views

Open-access journals in Computational Science

In light of the recent petition to boycott Elsevier, I was wondering what options we have in Computational Science for Journals which are completely open-access, Journals which allow/support open-...
11
votes
4answers
1k views

Matrix exponential of a skew-Hermitian matrix with fortran 95 and LAPACK

I'm just getting tucked into fortran 95 for some quantum mechanics simulations. Honestly, I've been spoiled by Octave so I've taken matrix exponentiation for granted. Given a (small, $n\leq 36$) skew-...
-5
votes
1answer
815 views

Successive over-relaxation formation of heat equation?

What is the form of SOR iterative equation for the heat equation $u_{xx}=u_{t}-1$ using centered differences both in time and spatial derivatives and using Crank-Nicolson method? $$(u(x,0)=u(L,t)=u(0,...
0
votes
1answer
151 views

LP infeasibility

Consider the following original LP: $\mathit{min}$ c'$x$ s.t: $Ax=0 \wedge 0\le x\le 1$ . This is my original LP which has to be solved. Now, using some reductions, I reduced the original LP to the ...
5
votes
1answer
125 views

Using an approximation algorithm to adapt parameter values of a given algorithm

Problem: I have an incremental online clustering algorithm which need 4 parameters that should be specified by the user before execution. The algorithm will gives "good results" if "a good parameter ...
15
votes
4answers
1k views

Can the solution of a linear system of equations be approximated for only the first few variables?

I have a linear system of equations of size mxm, where m is large. However, the variables that I'm interested in are just the first n variables (n is small compared to m). Is there a way I can ...

15 30 50 per page