All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
520 views

Exploring feasible points in a linearly defined space

What is the quickest way to find a point inside a linear feasible space? (Defined by the intersection of several hyperplanes and halfspaces). I want to be able to choose an initial point in the ...
13
votes
3answers
1k views

Best practice for storing hierarchical simulation data

TL,DR What is the accepted best practice in scientific computing circles for storing large quantities of hierarchically structured data? For example, SQL does not play nicely with large sparse ...
5
votes
2answers
229 views

CFD for high-detailed turbulence and non-linear waves

What are typical (or promising) techniques and methods in CFD to achieve high-detailed turbulence and non-linear waves interaction? And with "active" geometry (when bodies interacts with fluid in both ...
8
votes
1answer
1k views

What are the strategies for local Adaptive Mesh Refinement (local AMR) on unstructured meshes?

I am interested in local AMR on unstructured meshes. Currently, I'm working with the OpenFOAM library - it supports completely unstructured local AMR: cell refinement criteria determine a list of ...
14
votes
6answers
978 views

Approximate spectrum of a large matrix

I want to compute the spectrum (all the eigenvalues) of a large sparse matrix (hundreds of thousands of rows). This is hard. I am willing to settle for an approximation. Are there approximation ...
5
votes
1answer
1k views

eigenvalues (and determinant) of a hadamard product of matrices

I need to compute the determinant of a matrix that is calculated as $B \circ A$, with $B$ and $A$ being square matrices and $\circ$ representing their Hadamard product. One way of doing this is ...
13
votes
3answers
1k views

SVD for finding the largest eigenvalue of a 50x50 matrix — am I wasting significant amounts of time?

I've got a program that computes the largest eigenvalue of many real symmetric 50x50 matrices by performing singular-value decompositions on all of them. The SVD is a bottleneck in the program. Are ...
2
votes
1answer
1k views

f2py: error f90 not supported by GnuFCompiler needed for source_file.f90

I'm trying to install a Python package that relies on extensions built from Fortran 90 using f2py, but I get the following error: ...
3
votes
2answers
307 views

Computing Permanents of $64 \times 64$ Matrices

I need to compute the Matrix Permanents of several $64 \times 64$, zero-one matrices. I have tried using the built in functions in both Sage and Maple, but both programs return out of memory errors. I ...
7
votes
5answers
569 views

What algorithm for solving a set of stiff ODEs would be easiest to port to high precision floating point arithmetic?

I want to solve a relatively small system of stiff ODEs (< 10 first-order equations) using high precision floating point arithmetic (using MPFR or alike). What would be the easiest algorithm to ...
17
votes
1answer
3k views

Drawbacks of Newton-Raphson approximation with approximate numerical derivative

Suppose I have some function $f$ and I want to find $x$ such that $f(x)\approx 0$. I might use the Newton-Raphson method. But this requires that I know the derivative function $f'(x)$. An analytic ...
6
votes
3answers
261 views

efficiently solving a low rank linear parametric systems?

I have a large number of systems of the form: $Ax=b_i$ To solve for a large numbers of such $b_i\;1\leq i \leq k$ but where $A$ is fixed (A is a rank $p$ general --i.e. non sparse, non PSD-- ...
3
votes
1answer
212 views

Different kinds of Integral Equation Methods

I am relatively new to integral equations for solving time-harmonic EM scattering problems. I have read a decent number of papers on the subject, and it seems that for formulations that can support 3D ...
3
votes
2answers
386 views

Get equation for a curve which intersects x at seemingly randomly distributed points?

Is there any type of function that when graphed would show a curve which intersects the x axis multiple times, with each point being an arbitrary distance from the last? I mean, not like a trig ...
7
votes
5answers
9k views

Interpolate 2D data

I generated a cartesian grid in Python using NumPy's linspace and meshgrid, and I obtained some data over this 2D grid from an ...
8
votes
4answers
8k views

Is there an in practice limit on the number of constraints on a linear programming problem?

I am new to linear programming and have formulated a linear program (LP) with order of $10^{13}$ variables and $10^{13}$ constraints, although the constraint matrix is extremely sparse. I wanted to ...
15
votes
1answer
1k views

How to numerically calculate residues?

I need to calculate the following integral: $$ {1\over 2\pi i} \int_C f(E) \, d E $$ $$ f(E) = {\rm Tr}\,\left(({\bf h} + E)\,{\bf G}(E) \right) $$ Where $\bf h$ is a matrix (one particle kinetic and ...
7
votes
3answers
786 views

How to handle large numbers of output data sets from a simulation/sensitivity analysis?

Somewhat related, but I think the question is distinct enough to justify a separate question. As a bit of background, I come from a observational/statistical Epidemiology background, working with ...
34
votes
8answers
855 views

How do I make sure that the results of my simulations and the results in my paper are always in sync?

In one of my papers, I list some numerical results in addition to some figures. What I'd like to do is make sure that the numerical results in my paper always agree with the code. Right now, I just ...
5
votes
2answers
4k views

Specifying boundary conditions for imported mesh in OpenFOAM

I have a mesh produced from scanning a real 3D object (I don't have a geometry). What is the most convenient way to specify inlets, outlets, etc. for CFD in OpenFOAM? The mesh consists of thousands of ...
9
votes
3answers
3k views

How do I know if my code is being vectorized by the compiler?

As exemplified by Jed Brown's answer to Costs of lookups versus calculations, using vectorized vs non-vectorized floating point operations results in much faster code. Many modern compilers claim ...
3
votes
1answer
794 views

Where can I find coded examples of stochastic collocation applied to an elliptical PDE using smolyak sampling?

I'm having some troubles implementing a collocation method to solve a stochastic partial differential equation of the form: $\nabla (a(x,w)\nabla u(x,w))=f(x,w)$ in $D$, $u=g$ in $\partial D$ where $...
2
votes
1answer
77 views

Computing a sequence of row interchanges that realizes a given permutation matrix?

This question is aimed at cleaning up an implementation detail of an in-house sparse direct solver. It uses METIS to reorder $A$ into $PAP^{T}$ for reduced fill-in. Inside the $Lx=b$ and $L^{T}x=b$ ...
16
votes
2answers
7k views

Null-space of a rectangular dense matrix

Given a dense matrix $$A \in R^{m \times n}, m >> n; max(m) \approx 100000 $$ what is the best way to find its null-space basis within some tolerance $\epsilon$? Based on that basis can I then ...
4
votes
1answer
289 views

Should I include integral constraints in a integer linear program with a totally unimodular constaint matrix?

I have formulated an integer linear program (ILP). The constraint matrix for the ILP is totally unimodular. Should I solve it as an LP without the integral constraints, or should I keep the integral ...
3
votes
2answers
899 views

How to detect key turning points on a driven road?

I am looking for a description of algorithm which allows me to detect key turning points on the road amongs a set of all given points. I've ilustrated my problem on the below image: Green spots: ...
4
votes
1answer
252 views

Defining electric current source excitations for surface integral equation formulations

In a finite difference (FD) based electromagnetic formulation based on a Yee cell grid, one can define electric current source excitations ($J$) on the $E$ field grid points. At a distance, the fields ...
9
votes
2answers
158 views

Predict runtimes for dense linear algebra

I would like to predict runtimes for dense linear algebra operations on a specific architecture using a specific library. I would like to learn a model that approximates the function $F_{op} \;::\; $...
3
votes
1answer
568 views

Quality open source AMR libraries [duplicate]

Possible Duplicate: Is there a general-purpose library for structured grid adaptive mesh refinement? I'm looking for a quality, open source, maintained, scalable automated mesh refinement library ...
29
votes
4answers
2k views

What tools or approaches are available to speed up code written in Python?

Background: I think I might want to port some code that calculates matrix exponential-vector products using a Krylov subspace method from MATLAB to Python. (Specifically, Jitse Niesen's expmvp ...
4
votes
2answers
1k views

Line search for Newton method

If we want to solve nonlinear minimization problem $$\min_{x} f(x),$$ making least-squares assumption and using Gauss-Newton method so that at k$th$ iteration we have: $$J_k^T J_k p_k = - J_k^T ...
18
votes
5answers
2k views

Parallel Scientific Computation Software Development Language?

I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy ...
4
votes
1answer
346 views

Memory footprint for DMDA objects in PETSc

Why does DMDA objects require so much memory on PETSc 3.2-p7. When running the code: ...
5
votes
1answer
375 views

Intersection of hyperplanes

A very basic question but i couldn't find another post about it: Given $p$ non parallel hyper-plane in $\mathbb{R}^p$: $\left(\begin{array}{cccc} c_{11} & a_{11} & .... & a_{1p} \\ ... &...
2
votes
2answers
337 views

I don't understand how to correctly calculate truncation error

I am looking at the finite difference methods to solve simple $u_t=a(x,t)u_{xx}$. There are explicit, implicit, Crank Nicolson. The latter is said to be more accurate since the local truncation ...
3
votes
2answers
470 views

When fitting a Gaussian-like function, how does the amount of baseline datapoints affect the fit?

I am fitting a curve to some instrument data. The data is a pulse with a particular functional form, which starts from and returns to a constant (with noise) baseline level before and after the pulse. ...
25
votes
3answers
49k views

How should I install a Fortran compiler on a Mac? (OS X 10.x, x >= 4)

Related question: State of the Mac OS in Scientific Computing and HPC A significant number of software packages in computational science are written in Fortran, and Fortran isn't going away. A ...
12
votes
1answer
375 views

Costs of lookups versus calculations

I am interested in setting up calculations to check if a distance criterion is satisfied: that is, the distance between a vector ${\bf x}_i$ and anther vector ${\bf x}_j$ should be less than some ...
13
votes
3answers
4k views

Single versus double floating-point precision

Single precision floating point numbers take up half the memory and on modern machines (even on GPUs it seems) operations can be done with them at almost twice the speed compared to double precision. ...
10
votes
3answers
3k views

How to build a recursive spline function in C++

At the moment I am working on a differential equation solving method called basis-spline collocation. What I am having trouble with is building a method to build an arbitrary order spline, with the ...
7
votes
3answers
245 views

Wanting to learn about matrix solvers

Edit: I was advised to replace the question with a more specific one. Coming from a very theoretical background, I'm pretty ignorant about what practical matrix solvers exist. (I have been, and will ...
8
votes
1answer
823 views

How to calculate the maximal ellipsoid in a given polyhedron

I am faced with the problem of finding the ellipsoid $B$ ($B$ is a symmetric positive definite matrix) of maximal volume within a convex set $C$ given as a set of linear inequalities $C=\{x| a_i^T x \...
11
votes
1answer
4k views

Algorithms for community detection for bipartite graphs?

Are there any algorithms for community detection for bipartite graphs (2-mode networks) implemented in igraph, networkX, R or Python etc.? In particular, is there such an implementation in which one ...
3
votes
1answer
1k views

Can gsl be compiled with the intel C compiler?

The library itself compiles just fine with icc, but when I try to link to it (using icc for both the driver code and the linker), I get the same error that this question on stackoverflow is asking ...
8
votes
1answer
338 views

Is the sparsity pattern of a linear system important for iterative (KSP) solvers?

Pretty much the question. Given a general sparse, non-symmetric (both numerically and structurally) matrix, how important is the sparsity pattern (i.e. row/column permutation of matrix/vector) for ...
4
votes
1answer
73 views

Migdal Recursion and Mathematica

I am studying $SU(2)$ lattice field theory, and I am attempting to use migdal recursion for renormalization. The main equation for Migdal recursion for my case is $$e^{-S_p(U,\lambda a)}=\left[ \...
12
votes
2answers
2k views

Newton-based methods in optimization vs. solving systems of nonlinear equations

I asked for clarification about a recent question about minpack, and got the following comment: Any system of equations is equivalent to an optimization problem, which is why Newton-based methods ...
2
votes
3answers
389 views

How to add back integral constraints to linear program solution

I am implementing a machine learning algorithm for which I need to solve an integer linear program. To get the solution in polynomial time, the authors of the algorithm have dropped the integral ...
0
votes
1answer
2k views

1d shock tube problem, and the solution [closed]

I have solved 1d shock tube problem. (Euler's equations). Using following steps: 1) Define Riemann problem over the domain 2) Carry out local linearisation 3) Based on linearisation, write eigen ...
8
votes
2answers
4k views

structured grid and unstructured grid

I am new to the field of CFD. When should one go for structured grid and when should one go for unstructured? (Yes, it depends a lot on the geometry of the problem) More specifically, I want to know ...

15 30 50 per page