All Questions

Filter by
Sorted by
Tagged with
11
votes
1answer
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 ...
10
votes
2answers
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....
5
votes
2answers
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!
12
votes
2answers
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 ...
22
votes
3answers
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 ...
10
votes
1answer
250 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 ...
16
votes
4answers
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, ...
31
votes
9answers
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....
4
votes
1answer
602 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 ...
6
votes
4answers
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 ...
5
votes
4answers
364 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....
4
votes
1answer
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}$...
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
265 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
565 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
341 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
293 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
671 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
556 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
900 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 ...
28
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
278 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
558 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
423 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
886 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
434 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
570 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
852 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-...

15 30 50 per page