All Questions

Filter by
Sorted by
Tagged with
21
votes
1answer
15k views

What is the preferred and efficient approach for interpolating multidimensional data?

What is the preferred and efficient approach for interpolating multidimensional data? Things I'm worried about: performance and memory for construction, single/batch evaluation handling dimensions ...
39
votes
3answers
3k views

What's the state of the art in parallel ODE methods?

I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or ...
26
votes
5answers
16k views

Fastest Delaunay triangulation libraries for sets of 3D points

Which is the fastest library for performing delaunay triangulation of sets with millions if 3D points? Are there also GPU versions available? From the other side, having the voronoi tessellation of ...
24
votes
2answers
2k views

What does “symplectic” mean in reference to numerical integrators, and does SciPy's odeint use them?

In this comment I wrote: ...default SciPy integrator, which I'm assuming only uses symplectic methods. in which I am refering to SciPy's odeint, which uses ...
16
votes
1answer
2k views

BDF vs implicit Runge Kutta time stepping

Are there any reasons for why one should choose high order implicit Runge Kutta (IMRK) over BDF time stepping? BDF seems much easier to me as $q$ stage IMRK needs $q$ linear solves per time step. ...
20
votes
3answers
12k views

Recommendation for Finite Difference Method in Scientific Python

For a project I am working on (in hyperbolic PDEs) I would like to get some rough handle on the behavior by looking at some numerics. I am, however, not a very good programmer. Can you recommend ...
29
votes
9answers
1k views

What is a good way to run parameter studies in C++

The problem I'm currently working on a Finite Element Navier Stokes simulation and I would like to investigate the effects of a variety of parameters. Some parameters are specified in an input file ...
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 ...
17
votes
2answers
3k views

Discontinuous Galerkin: Nodal vs Modal advantages and disadvantages

There are two general approaches to representing solutions in the discontinuous galerkin method: nodal and modal. Modal: Solutions are represented by sums of modal coefficients multiplied by a set of ...
15
votes
5answers
4k views

Parallel optimization algorithms for a problem with very expensive objective function

I am optimizing a function of 10-20 variables. The bad news is that each function evaluation is expensive, approx 30 min of serial computation. The good news is that I have a cluster with a few dozen ...
15
votes
2answers
1k views

(how to) write simulations that run faster?

I have started using python as the programming language for doing all my assignments in CFD. I have a very little experience in programming. I am from mechanical engineering background and am pursuing ...
11
votes
1answer
3k views

Strong vs. weak solutions of PDEs

The strong form of a PDE requires that the unknown solution belongs in $H^2$. But the weak form requires only that the unknown solution belongs in $H^1$. How do you reconcile this?
19
votes
3answers
691 views

Is it well known that some optimization problems are equivalent to time-stepping?

Given a desired state $y_0$ and a regularization parameter $\beta \in \mathbb R$, consider the problem of finding a state $y$ and a control $u$ to minimize a functional \begin{equation} \frac{1}{2} \...
17
votes
2answers
3k views

Disadvantages of common discretization schemes for CFD simulations

The other day, my computational fluid dynamics instructor was absent and he sent in his PhD candidate to substitute for him. In the lecture he gave, he seemed to indicate several disadvantages ...
16
votes
1answer
1k views

When should implicit methods be used in the integration of hyperbolic PDEs?

Numerical methods for solving PDEs (or ODEs) fall into two broad categories: explicit and implicit methods. Implicit methods allow larger stable timesteps but require more work per step. For ...
15
votes
5answers
3k views

What is the advantage of multigrid over domain decomposition preconditioners, and vice versa?

This is mostly aimed for elliptic PDEs over convex domains, so that I can get a good overview of the two methods.
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 ...
30
votes
2answers
7k views

When should log1p and expm1 be used?

I have a simple question that is really hard to Google (besides the canonical What Every Computer Scientist Should Know About Floating-Point Arithmetic paper). When should functions such as ...
24
votes
4answers
2k views

When should I use C++ expression templates in computational science, and when should I *not* use them?

Suppose that I'm working on a scientific code in C++. In a recent discussion with a colleague, it was argued that expression templates could be a really bad thing, potentially making software ...
12
votes
1answer
3k views

PDE solvers for Drift-diffusion and related models

I'm trying to simulate basic semiconductor models for pedagogical purposes--starting from the Drift-diffusion model. Although I don't want to use an off-the-shelf semiconductor simulator--I'll be ...
8
votes
4answers
32k views

Why are Runge-Kutta and Euler's method so different?

I am solving a system of linear equations, $\underline {\dot x}=\underline A\cdot \underline x$, numerically. I have done this using the popular of methods of Euler and Runge-Kutta (RK). I have ...
17
votes
5answers
2k views

Is there a good, easy-to-use, high quality open source CFD solver out there?

My thesis is on developing numerical methods for model reduction in combustion. I run my methods purely on the chemistry part of combustion simulations, and I have plenty of case studies for 0-D ...
17
votes
4answers
2k views

For which statistical methods are GPUs faster than CPUs?

I have just installed a Nvidia GT660 graphic card on my desktop and, after some struggle, I manage to interface it with R. I have been playing with several R packages that use GPUs, especially ...
14
votes
5answers
531 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
4answers
6k 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 ...
13
votes
4answers
12k views

How do I calculate the numerical difference between two fields stored in two different VTK files with the same structure?

Suppose I have two VTK files, both in structured grid format. The structured grids are the same (they have the same list of points, in the same order), and there is a field, call it "Phi", in each VTK ...
12
votes
1answer
6k views

Understanding the Wolfe Conditions for an Inexact line search

According to Nocedal & Wright's Book Numerical Optimization (2006), the Wolfe's conditions for an inexact line search are, for a descent direction $p$, Sufficient Decrease: $f(x+\alpha p)\le f(x)+...
5
votes
5answers
4k views

Recommendation for an introductory level book in computational physics?

I'm a physics undergrad, looking for a good introductory book on computational science, and numerical methods. Mostly I'm looking for applied books. (Simply because... in a theoretical book, if I can'...
3
votes
4answers
9k views

Estimating the Courant number for the Navier-Stokes Equations under differing Reynolds number regimes

I am familiar with the Courant-Friedrich-Lewy Condition in as far as it applies to the stability of explicit finite difference schemes for standard parabolic and hyperbolic PDEs. However, when ...
17
votes
6answers
3k views

To what extent is generic and meta-programming using C++ templates useful in computational science?

The C++ language provides generic programming and metaprogramming through templates. These techniques have found their way into many large-scale scientific computing packages (e.g., MPQC, LAMMPS, CGAL,...
13
votes
2answers
4k views

What is the purpose of the test function in Finite Element Analysis?

In the wave equation: $$c^2 \nabla \cdot \nabla u(x,t) - \frac{\partial^2 u(x,t)}{\partial t^2} = f(x,t)$$ Why do we first multiply by a test function $v(x,t)$ before integrating?
11
votes
1answer
6k views

How does density functional theory scale with system size?

Theoretically, how does the time to do a density functional theory (DFT) calculation scale with the number of electrons? I'm interested in "typical" DFT implementations such as VASP, ABINIT, etc., not ...
9
votes
1answer
245 views

Easily understandable argument that normal Runge–Kutta methods cannot be generalised to SDEs?

A naïve approach to solving stochastic differential equations (SDEs) would be: take a regular multi-step Runge–Kutta method, use a sufficiently fine discretisation of the underlying Wiener process, ...
6
votes
1answer
3k views

FEniCS: separate boundary conditions in normal and tangential direction of mesh boundary

Given a vector-valued PDE, I'd like to enforce the boundary conditions $$ \vec{n}\cdot u = g\\ \vec{n}\cdot \nabla (\vec{t}\cdot u) = 0 $$ on the solution $\vec{u}$. If the boundary happens to align ...
16
votes
6answers
2k views

Example of a continuous function that is difficult to approximate with polynomials

For teaching purposes I'd need a continuous function of a single variable that is "difficult" to approximate with polynomials, i.e. one would need very high powers in a power series to "fit" this ...
15
votes
4answers
3k views

Selecting most scattered points from a set of points

Is there any (efficient) algorithm to select subset of $M$ points from a set of $N$ points ($M < N$) such that they "cover" most area (over all possible subsets of size $M$)? I assume the points ...
11
votes
2answers
2k views

Efficiency of using petsc4py vs. c/c++/fortran

How much slower is petsc4py vs c/c++/fortran? I realize it will depend significantly on the code being executed, but what about something simple like a matrix-vector product?
10
votes
3answers
1k views

manufactured solutions for incompressible Navier-Stokes — how to find divergence-free velocity fields?

In the method of manufactured solutions (MMS) one postulates an exact solution, substitutes it in the equations and calculates the corresponding source term. The solution is then used for code ...
10
votes
1answer
2k views

Raviart-Thomas elements on reference square

I'd like to learn how the Raviart-Thomas (RT) element works. To that end I'd like to analytically describe how the basis functions look on the reference square. The goal here is not to implement it ...
9
votes
1answer
358 views

$L^2$-convergence of finite element method when right hand side is only in $H^{-1}$ (Poisson eqn)

I know that the piecewise linear finite element approximation $u_h$ of $$ \Delta u(x)=f(x)\quad\text{in }U\\ u(x)=0\quad\text{on }\partial U $$ satisfies $$ \|u-u_h\|_{H^1_0(U)}\leq Ch\|f\|_{L^2(U)} $...
9
votes
5answers
639 views

How can I derive a bound on the spurious oscillations in the numerical solution of the 1D advection equation?

Suppose I had the following periodic 1D advection problem: $\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x} = 0$ in $\Omega=[0,1]$ $u(0,t)=u(1,t)$ $u(x,0)=g(x)$ where $g(x)$ has a ...
7
votes
2answers
6k views

Least Squares and Fourier Series

I have a little bit of problem figuring out the relation between Fourier series and Least Squares. As far as I understand, LS is a way of minimizing the quadratic error between a measured value $y_i$ ...
20
votes
3answers
2k views

Parallel I/O options, in particular parallel HDF5

I have an application that can be trivially parallelized but its performance is to a large extent I/O bound. The application reads a single input array stored in a file that is typically 2-5 GB in ...
20
votes
10answers
12k views

Fast, lightweight C++ tensor library for dimension-agnostic code

I am looking for a C++ tensor library that supports dimension-agnostic code. Specifically, I need to perform operations along each dimension (up to 3), e.g. calculating a weighted sum. The dimensions ...
20
votes
3answers
7k views

Why should non-convexity be a problem in optimization?

I was very surprised when I started to read something about non-convex optimization in general and I saw statements like this: Many practical problems of importance are non-convex, and most non-...
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 ...
12
votes
2answers
2k views

Which preconditioners (and solver) in PETSc for indefinite symmetric systems should I use?

My system is a symmetric FE problem with lagrange multipliers (e.g. incompressible Stokes' flow): \begin{pmatrix}A & B^T \\ B & C\end{pmatrix} where $C = 0$ is the typical case (I have even ...
8
votes
2answers
4k views

simple MHD simulation code for (self) education and play with

I would like some super simple computational code for solving magnetohydrodynamics problems. High accuracy nor performance is not my concern. I wan't it just to visually explore qualitative behavior ...
7
votes
2answers
2k views

How to compute the wavelet approximation of a function?

For the function $f(x)=x$, how to compute the wavelet approximation using Haar basis? I'm new to wavelet, I'm looking for a package which will do something like this ...
7
votes
1answer
381 views

CFL condition in polar coordinates

In this question, I suggested that the Couran-Friedrichs-Lewy (CFL) condition for the wave equation in polar coordinates reads $$C = 2c\frac{\Delta t}{\Delta r \Delta \phi} \leq C_\max \enspace ,$$ ...

15 30 50 per page