wiki:TestScripts

Version 5 (modified by trac, 12 years ago) ( diff )

Sample Scripts for Running Test Problems

  • contrib/astro/testsuite/subst.s - Changes values of variables in namelist type formatted files.
    • Example:
       subst.s iDivB 3 physics.data
      
      will set iDivB to 3 in the physics.data file
    • For array data, there can be no white space between values. If your data file has an entry like
      qTolerance    =   1e-3 1e-3 1e-3 1e-3 1e-3
      
      and you call
      subst.s qTolerance 1e-2 1e-2 1e-2 1e-2 domain.data
      
      you will get an error message because there are two many arguments. If instead you call
      subst.s qTolerance 1e-2,1e-2,1e-2,1e-2 domain.data
      
      then it will modify qTolerance in domain.data but only the first entry
      qTolerance    =   1e-2,1e-2,1e-2,1e-2 1e-3 1e-3 1e-3 1e-3
      
      The solution is to remove white space in array lists in your data files that you want to swap.
      qTolerance    =   1e-3,1e-3,1e-3,1e-3,1e-3
      
  • contrib/astro/testsuite/FieldLoop2D/runtests.s - Sample script using subst.s to run a set of field loop advection problems
Note: See TracWiki for help on using the wiki.