Questions tagged [testing]

Questions on the testing and verification of computational methods.

Filter by
Sorted by
Tagged with
1 vote
2 answers
109 views

Nonlinear Hyperbolic PDEs: Known solutions

I would like to collect some test-problems for nonlinear hyperbolic PDEs (Euler Equations, Shallow Water Equations, Ideal MHD, Acoustic Perturbation, ...) for which analytical solutions are known. A ...
  • 829
0 votes
2 answers
112 views

Where can I find matrices and it's preconditioner for testing?

I want to find some kinds of matrices for testing my code such as GMRES , MINRES and so on. But I can't find some testing matrices and corresponding preconditioner to verify my program. I know some ...
  • 3
17 votes
4 answers
3k views

What are some good strategies to test a floating point arithmetic implementation for double numbers?

For IEEE, the single representation is 1-bit sign, 8-bit exponent and 23-bit mantissa. This means that at each exponent value, you can test all 2^23-1 (roughly 9mil cases) possible combination of ...
1 vote
1 answer
52 views

Verification of coupled system of equations for light propagation

I am trying to simulate the propagation of light in material using the non-linear schrödinger equation (NLSE): $$\partial_zE=\frac{i}{2k_0}\nabla^2_\perp E+\frac{ik_0n_2}{n_0}\vert E\vert^2E-0.5\beta^{...
  • 543
5 votes
1 answer
511 views

Causes for different results for different number of nodes in MPI

I am trying to develop what might be called legacy Fortran code from my group. Upon testing, I found that the program (which takes about a day to run on 20 processes) works when run on a single node (...
  • 327
1 vote
1 answer
127 views

Which 2D PDE with an exact solution can I use to test/verify my FEM-PDE code?

I have created a program to solve 2D, time-dependent PDEs with the finite element method and get reasonable looking results for the 2D acoustic wave equation. Now I would like to go further and solve ...
  • 231
10 votes
1 answer
292 views

Are there testing frameworks for numerical software development

I found that a lot of my computational science programming has testing requirements that are not covered by standard test frameworks: Computation time testing To make sure that algorithms don't get ...
  • 777
2 votes
1 answer
190 views

Poorly conditioned, easily evaluated sum for unit testing

I am looking for examples of poorly conditioned sums which can rapidly be evaluated, for the purposes of unit testing. I'm currently using the series representation for $\ln(2)$: $$ \sum_{n=1}^{\...
  • 2,055
3 votes
1 answer
65 views

Testing Wiener process splitting in adaptive-step SDE integrators

I am investigating various methods for adaptive-step integration of stochastic differential equations and trying to implement them. All of the papers that I've seen (e.g. H. Lamba, J. Comp. App. Math. ...
  • 133
1 vote
0 answers
49 views

2D Test cases for overset meshes

I developed a parallel 2D overset mesh (chimera) assembler and I would like to test a large scale problem. I don't want to make up a test case myself but rather want something standard. Would you ...
  • 293
5 votes
3 answers
139 views

Naming scientific output files

What's the best practice for naming output files from scripts that you're experimenting with? I'm trying different parameters in my data generation script and I'd like to keep track of which files ...
  • 51
7 votes
1 answer
126 views

testing derivative approximations

I'm writing a library that involves some approximations of variational calculus problems. Whenever I implement routines to evaluate the derivative or Hessian of an action functional $A$, I write a ...
4 votes
1 answer
389 views

Test matrices for large sparse overdetermined system of linear equations

I'm working on some c++ code to solve (conjugate gradient, least squares conjugate gradient, LSQR,..) large sparse overdetermined systems of linear equations. There is a twist to my matrices and the ...
2 votes
0 answers
126 views

Strange convergence behavior of WENO5 for Hamilton--Jacobi equations

I have the following question. I have a code function that computes right-biased and left-biased approximations of the derivative of a function using WENO5 for Hamilton--Jacobi equations as described ...
0 votes
2 answers
462 views

How to choose a simple manufactured solution for Euler equation?

In order to verify a two-phase subsonic compressible isothermal Euler code, I am trying to implement a manufactured solution following what is discussed here and references therein. Also, as an ...
  • 659
1 vote
1 answer
258 views

1D uniform flow test case for compressible flow

Are there any one dimensional hyperbolic test cases for a 1D uniform flow? (I need the test case for the purpose of showing the satisfaction of geometric conservation law on a moving mesh).
  • 169
1 vote
0 answers
48 views

Coriolis test problem

I have a eulerian hydrodynamic code, which I have recently implemented the Coriolis force in the integrator. Is there a standard test problem for the Coriolis force? Since this isn't a Lagrangian ...
  • 135
3 votes
1 answer
266 views

How close observed order of accuracy should be to theoretical order of accuracy?

I try to write tests to the implementations of numerical methods. The best way to do this is to study the observed order of accuracy and check that it matches with the theoretical order of accuracy. ...
4 votes
1 answer
96 views

How can I compare errors in PDE solvers with non-uniform grids?

Is there a standard approach to testing codes with refined regions? Specifically, I am interested in testing whether the refinement is working correctly. For the sake of simplicity, let's consider a (...
1 vote
1 answer
112 views

What are the good testing problems for hyperbolic equation?

I read the whole list of this question: Where can one obtain good data sets/test problems for testing algorithms/routines? But the answers are in different areas and I want to ask a specific area. I ...
6 votes
3 answers
1k views

Test Case with Known Solution for 3D Navier Stokes Equations

Is there a test case for 3D incompressible Navier Stokes Equations like the Taylor vortex in two dimensions? I know, I can easily construct 3D manufactured solutions but I would like to have ...
  • 3,398
12 votes
3 answers
407 views

How to write integration tests for numeric simulation software?

Just to be more precise, I'll put a worthy example of my typical use case. Let's say I'm developing a FEM software that produces several temporal solutions and inserts them in an HDF5 file, along with ...
3 votes
1 answer
346 views

Testing 1D root-finding procedures for robustness

How can I test whether a given 1D root-finding procedure is robust? I know that there are data sets and resources online for different kinds of optimization, but I have yet to find anything with ...
2 votes
3 answers
1k views

Test set for linear solvers

Lets assume I have a iterative linear system solver, e. g. this one. Whats the typical approach on verifying and testing this kind of solvers? Is there a standard test set of linear systems one ...
  • 23
4 votes
2 answers
118 views

Local versus remote development

I know there are similar questions asked on other StackExchange sites, but I think development in Computational Science may work differently because of the computing environments that are common. I ...
  • 163
6 votes
1 answer
451 views

Guidelines for choosing manufactured solutions for numerical PDE schemes

When testing a numerical method for a PDE, I know that it's often useful to compare it to a known analytical solution. If none is available, one can always 'manufacture' a solution, substitute it ...
  • 11.9k
3 votes
4 answers
452 views

Looking for analytic solutions to time dependent fluid flow problems

I'm looking for analytic solutions to time dependent fluid flow problems (can be compressible or incompressible, Euler or Navier-Stokes equations). The main thing though is that I'd like there to be '...
  • 456
14 votes
4 answers
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 ...
19 votes
3 answers
903 views

Strategies for unit testing and test-driven development

I'm a huge advocate of test-driven development in scientific computing. It's utility in practice is just staggering, and really alleviates the classic troubles that code developers know. However, ...
  • 2,273
3 votes
3 answers
152 views

Test case suggestion for incompressible flow with ALE method on deforming grids

I'm working on a finite-volume discretization method with implicit time-integration for the incompressible Navier-Stokes equations in Arbitrary Lagrangian-Eularian (ALE) form. So far I've tested the ...
  • 1,055
13 votes
4 answers
439 views

Testing suites for numerical applications in C++?

Recently, I've been pushing my group to include more testing when writing their code. There were several major bugs that took a lot longer to catch than probably speaking was necessary, because we ...
  • 3,503
1 vote
2 answers
548 views

Is there any 1-D test case for incompressible flow codes?

There is quasi 1-D C-D nozzle test case for compressible flow codes, like that "is there any 1-D test case for incompressible flow codes?"
  • 489
3 votes
1 answer
67 views

How to obtain the minimum set of variables required in a model to produce accurate estimation?

I have a system which I assume is linear. I have a matrix $A$ of which each row is a coefficient of a unknown variables in vector $x$. I have vector $B$ which contains the result of each $Ax$. ...
  • 143
8 votes
1 answer
152 views

Testing and visualizing large index arrays

I will be implementing nodal discontinuous Galerkin method soon, and having done this before I know the basic indexing arrays I will need to compute, given a mesh and polynomial data. The problem I ...
11 votes
3 answers
567 views

Regression testing of chaotic numerical models

When we have a numerical model that represents a real physical system, and that exhibits chaos (e.g. fluid dynamics models, climate models), how can we know that the model is performing as it should? ...
  • 373
1 vote
1 answer
225 views

Test set non linear solver

what is your preferred test set to test quality of non linear solver? this could be set of data, model and results obtained with some benchmark solver, or simply a panel of test functions that could ...
  • 343
17 votes
5 answers
397 views

Databases of results for numerical codes

In the numerical methods literature, many research papers consist of a description of a new algorithmic variation, followed by a few test problems comparing the new method with one or two existing ...
102 votes
14 answers
11k views

Is it worthwhile to write unit tests for scientific research codes?

I am strongly convinced of the value of using tests that verify a complete program (e.g. convergence tests), including an automated set of regression tests. After reading some programming books, I've ...
18 votes
3 answers
388 views

What programming strategies can I take for easily modifying algorithm parameters?

Developing scientific algorithms is a highly iterative process often involving changing lots of parameters that I will want to vary either as part of my experimental design or as part of tweaking ...
  • 289
43 votes
18 answers
3k views

Where can one obtain good data sets/test problems for testing algorithms/routines?

In evaluating the quality of a piece of software you are about to use (whether it's something you wrote or a canned package) in computational work, it is often a good idea to see how well it works on ...