All Questions

Filter by
Sorted by
Tagged with
15
votes
1answer
639 views

What is the current state of polynomial preconditioners?

I wonder what has happened to polynomial preconditioners. I am interested in them, because they appear to be comparatively elegant from a mathematical perspective, but as far as I have read in surveys ...
15
votes
1answer
4k views

How can I estimate the condition number of a large sparse matrix using PETSc?

I have a PETSc Mat and would like to estimate its condition number.
15
votes
1answer
1k views

can I trust this numerical triple integral from Matlab?

Computational Science people: I originally posted this question at Math Stack Exchange and someone commented that I might get "much better" answers here: I am a novice at numerical methods and ...
15
votes
3answers
720 views

Fitting Implicit Surfaces to Oriented Point Sets

I have a question regarding quadric fit to a set of points and corresponding normals (or equivalently, tangents). Fitting quadric surfaces to point data is well explored. Some works are as follows: ...
15
votes
2answers
18k views

Writing the Poisson equation finite-difference matrix with Neumann boundary conditions

I am interested in solving the Poisson equation using the finite-difference approach. I would like to better understand how to write the matrix equation with Neumann boundary conditions. Would someone ...
15
votes
1answer
478 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
1answer
2k views

Visualizing discontinuous Galerkin/finite element data

I would like to visualize simulation results, obtained using the discontinuous Galerkin (DG) approach, within ParaView. Similarly to finite volume methods, the problem domain is divided into cube-...
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 ...
15
votes
1answer
297 views

How to to easily reproduce published results in my own articles using my own code

I wrote a program/library which I used to obtain results in an article. (Here it is, but my question is general.) I have tests that I run regularly using ctest (it ...
15
votes
1answer
318 views

Does transforming $J_0(x)\to\int\cos(x\sin\theta)$ help with numerical integration?

I've heard anecdotally that when one is trying to numerically do an integral of the form $$\int_0^\infty f(x) J_0(x)\,\mathrm{d}x$$ with $f(x)$ smooth and well-behaved (e.g. not itself highly ...
15
votes
1answer
724 views

Are there any open source inverse-based multilevel ILU implementations?

I am very impressed with the serial performance of multilevel inverse-based ILU preconditioners, particularly for heterogeneous Helmholtz, but I am surprised to not be able to find any open source ...
15
votes
1answer
2k views

How to Run MPI-3.0 in shared memory mode like OpenMP

I am parallelizing code to numerically solve a 5 Dimensional population balance model. Currently I have a very good MPICH2 parallelized code in FORTRAN but as we increase parameter values the arrays ...
14
votes
3answers
2k views

Why would you need frameworks like MPI when you can multi-task using threads?

MPI is an interface which enables us to create multiple processes to be run on a single machine or on a cluster of machines, and enables message passing or in short sorts of communication between ...
14
votes
5answers
804 views

Repeated nearest neighbor calculation for millions of data points too slow

I have a dataset running into millions of data points in 3D. For the calculation I am doing, I need to calculate neighbor (range search) to each data point in a radius, try to fit a function, ...
14
votes
1answer
1k views

Conserving Energy in Physics Simulation with imperfect Numerical Solver

I am creating a C++ Physics Simulation where I need to move an rigid body through an acting force field. Problem: simulation does not conserve energy. Quesiton: abstractly, how is conservation of ...
14
votes
3answers
6k views

What are the symptoms of ill-conditioning when using direct methods?

Suppose we have a linear system and we know nothing about its conditioning and have no preliminary information about the solution. We blindly apply Gaussian elimination and obtain some solution $x$. ...
14
votes
6answers
1k 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 ...
14
votes
6answers
2k views

Are there open-source scientific libraries which use modern Fortran with OOP?

I've spent the last couple of months on coding a Fortran program for solving a particular PDE system (describes fluid flow/combustion). I tryed to use latest-standard Fortran and the new OOP ...
14
votes
4answers
376 views

How to deal with too much data?

Our plasma dynamics simulations often produce too much information. During the simulations we record various physical properties on a grid (x,y,z,t) that is as large as (8192x1024x1024x1500), for at ...
14
votes
3answers
1k views

Why is my parallel solver slower than my sequential solver?

I was playing around with PETSc and noticed that when I run my program with more than one process via MPI it seems to run even slower! How can I check to see what is going on?
14
votes
2answers
1k views

Why would a computational scientist need to implement their own version of std::complex?

Many of the better-known C++ libraries in computational science such as Eigen, Trilinos, and deal.II use the standard C++ template header library object, ...
14
votes
3answers
2k views

How to express this complicated expression using numpy slices

I wish to implement the following expression in Python: $$ x_i = \sum_{j=1}^{i-1}k_{i-j,j}a_{i-j}a_j, $$ where $x$ and $y$ are numpy arrays of size $n$, and $k$ is a numpy array of size $n\times n$. ...
14
votes
4answers
348 views

How to create a random 3D domain representing a plant's root structure?

I would like to model laminar flow of water from roots to the stem of a plant. At the very end of the roots, the tubes vary from millimeter to centimeter scale in diameter and length. As we get closer ...
14
votes
2answers
18k views

What are the advantages/disadvantages of interior point methods over simplex method for linear optimization?

As I understand it, since a solution to a linear program always occurs at a vertex of its polyhedral feasible set (if a solution exists and the optimal objective function value is bounded from below, ...
14
votes
3answers
699 views

PDEs in Many Dimensions

I know that most methods of finding approximate solutions to PDEs scale poorly with the number of dimensions, and that Monte Carlo is used for situations that call for ~100 dimensions. What are good ...
14
votes
4answers
3k views

Any recommendations for unit-testing frameworks compatible with code/libraries that use MPI?

Usually, I write serial code, and when I do, I write unit tests with some xUnit-style testing framework (MATLAB xUnit, PyUnit/nose, or Google's C++ testing framework). Based on a cursory Google ...
14
votes
3answers
2k views

How to deal with curved boundary condition when using finite difference method?

I'm trying to learn about numerically solving PDE by myself. I've been beginning with finite difference method(FDM) for some time because I heard that FDM is the fundament of numerous numerical ...
14
votes
3answers
1k views

Comparison of iteration methods: number of iterations vs. cpu time

I am comparing two iterative methods for inverting random square matrices. Since the matrices are random, every test case takes both different amounts of iterations and different elapsed times. My ...
14
votes
3answers
362 views

Citable references for software best practices

I'm currently writing up my PhD thesis. I spent a significant fraction of my PhD cleaning up and extending existing scientific code, applying software engineering best practices which were previously ...
14
votes
4answers
7k views

Boundary conditions for the advection equation discretized by a finite difference method

I am trying to find some resources to help explain how to choose boundary conditions when using finite difference methods to solve PDEs. The books and notes which I currently have access to all say ...
14
votes
1answer
1k views

Can the advection equation with variable velocity be conservative?

I am trying to understand the advection equation with variable velocity coefficient a bit better. In particular I don't understand how the equation can be conservative. The advection equation, $$ \...
14
votes
5answers
564 views

Examples of PDE computations using parallelism in both space and time

In the numerical solution of initial boundary value PDEs, it is very common to employ parallelism in space. It is much less common to employ some form of parallelism in the time discretization, and ...
14
votes
1answer
774 views

Complexity of MD simulations

I'm new to molecular dynamics (MD) simulations. What is the complexity of a molecular dynamics simulation in terms of simulation time? In other words, if I want increase the simulated time from 10 ...
14
votes
2answers
730 views

Design patterns in writing numerical software in C++

I'm looking for resources on design patterns and principles for numerical software, potentially but not necessarily with a focus on object-oriented approaches to numerical codes. I am aware of the ...
14
votes
4answers
406 views

What would be the most helpful way to write code for a paper so that readers can clearly match the results to the code that generates them?

I'm writing a reproducible paper, and the paper has computational results that are generated by a Python script (a similar MATLAB script generates nearly identical results). I feel that the paper ...
14
votes
1answer
1k views

Why is leapfrog integration symplectic and RK4 not, if the latter is more accurate?

In a system where energy theoretically should be conserved, the most accurate simulation would conserve energy (as well as giving accurate positions, velocities and etc). RK4 is more accurate than ...
14
votes
1answer
14k views

How can I determine the period of my pseudo-random number generator?

Suppose I'm using a linear congruential pseudo-random number generator (PRNG). Given a seed $x_0$, the multiplying factor (a), the shift factor (c) and the modulus factor (m), how can I determine the ...
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 $$(...
14
votes
1answer
2k views

What are the relative benefits of using Adams-Moulton over Adams-Bashforth algorithm?

I am solving a system of two coupled PDE's in two spatial dimensions and in time computationally. Since the function evaluations are expensive, I would like to use a multistep method (initialised ...
14
votes
2answers
2k views

How useful is PETSc for Dense Matrices?

Wherever I have seen, PETSc tutorial/documents etc. say that it is useful for linear algebra and usually specifies that sparse systems will benefit. What about dense matrices? I am concerned about ...
14
votes
1answer
11k views

Universities known for computational physics

I am very interested in computational physics and it is great lot of fun studying these topics. Since I am planning to go one semester abroad, I was wondering what universities are known for ...
14
votes
3answers
469 views

Is Hartree-Fock always a good approximation for molecular geometries and no bond breaking ?

Are there cases where Hartree-Fock is not a good approximation to compute equilibrium geometry when the molecule is in a non bond-breaking condition?
14
votes
2answers
9k views

Periodic boundary condition for the heat equation in ]0,1[

Let us consider a smooth initial condition and the heat equation in one dimension : $$ \partial_t u = \partial_{xx} u$$ in the open interval $]0,1[$, and let us assume that we want to solve it ...
14
votes
1answer
291 views

How do low rank modifications affect Krylov method convergence?

Say I have a linear system $A x = b$, which converges quickly using a suitable Krylov method (such as CG or GMRES) for all $b$. If $B$ is a matrix with low rank $r$, will the same Krylov method on ...
14
votes
4answers
1k views

Illustrative examples of mimetic finite difference methods

As much as I try to find a concise explanation on the internet, I can't seem to grasp the concept of a mimetic finite difference, or how it even relates to standard finite differences. It would be ...
14
votes
3answers
250 views

Best practices for describing agent-based models

I work fairly heavily in mathematical biology/epidemiology, where most of the modeling/computational science work is still dominated by sets of ODEs, admittedly sometimes fairly elaborate sets of them....
14
votes
3answers
943 views

Role of the numerical flux in DG-FEM

I am learning the theory behind DG-FEM methods using the Hesthaven/Warburton book and I am a bit confused about the role of the 'numerical flux.' I apologize if this is a basic question, but I have ...
14
votes
2answers
310 views

Quality of linear congruential generators for random numbers

I'm doing some simulations of the Langevin equation, for various external forces. Being told that C's rand() from stdlib.h can ...
14
votes
1answer
3k views

The Remez Algorithm

The Remez algorithm is a well-known iterative routine to approximate a function by a polynomial in the minimax norm. But, as Nick Trefethen [1] says about it: Most of these [implementations] go ...
14
votes
1answer
870 views

Scientific computing with Python with modern GPUs with double precision

Has anyone here used double precision scientific computing with new generation (e.g. K20) GPUs through Python? I know that this technology is rapidly evolving, but what is the best way to do this ...

15 30 50 per page
1
4 5
6
7 8
183