1. 31 Oct, 2017 1 commit
  2. 24 Oct, 2017 1 commit
  3. 18 Oct, 2017 2 commits
  4. 17 Oct, 2017 1 commit
  5. 16 Oct, 2017 2 commits
  6. 04 Oct, 2017 2 commits
  7. 25 Aug, 2017 2 commits
    • David Deepwell's avatar
      Allow BPE calculation to handle dimensional density fields · 9c3c6367
      David Deepwell authored
      The BPE calculation had assumed that the density field was
      non-dimensionalized as the density anomaly. An optional argument
      allows the user to set the density field as dimensional.
      9c3c6367
    • David Deepwell's avatar
      Clean up BPE code · 2621238f
      David Deepwell authored
      The main while loop in the triple loop has been better optimized to
      remember the location from the previous loop step. This results in
      only one Nx loop over the entire triple loop. Reducing the loop
      from O(Nx^2*Ny*Nz) to O(Nx*Ny*Nz).
      
      Now tracking the partial sums of dx, and the volume of the hill.
      This makes comparisons for finding depths easier later on.
      
      And other minor coding changes.
      2621238f
  8. 23 Aug, 2017 1 commit
  9. 04 Aug, 2017 1 commit
  10. 08 May, 2017 1 commit
  11. 05 May, 2017 1 commit
    • David Deepwell's avatar
      Create BPE calculator · 8701eded
      David Deepwell authored
      The background Potential Energy (BPE) is calculated in
      compute_Background_PE in Science.cpp. The APE can
      be calculated afterwards from the BPE and PE from the
      diagnostic file.
      8701eded
  12. 04 May, 2017 5 commits
  13. 25 Apr, 2017 1 commit
    • David Deepwell's avatar
      Add case for computing derivatives and vorticity · 92b79931
      David Deepwell authored
      A new case file, derivatives.cpp, gives a means to compute
      derivatives of any field or to compute vorticity components.
      The vorticity calculation in Science is completely re-written
      so-as to also work for mapped grids.
      
      The derivatives file is built to compute secondary variables
      after a run has already been completed. This uses spins' built-in
      derivative toolkit allowing multiple variables to be calculated
      in parallel. A derivative field (one that is the derivative of
      another) is denoted by an underscore followed by the direction
      the derivative was taken in (ie. u_x is the x derivative of u).
      92b79931
  14. 22 Mar, 2017 1 commit
    • Christopher Subich's avatar
      Make default get_dt_max error on invocation · 075caad6
      Christopher Subich authored
      The method get_dt_max inside BaseCase was added in a
      previous commit as part of the effort to include the
      'default' timestep-checking code inside BaseCase.
      
      The intent is for user code to override this method with a
      problem-specific maximum timestep, but if the user code did
      not do this the previous implementation would return '0'.
      
      This would cause SPINS to error, as a timestep of <= 0 is
      obviously invalid.  However, the error message would be
      unintuivie, referring to the <=0 timestep rather than the
      root cause of the user not implementing get_dt_max().
      
      This change replaces the previous default method with one
      that immediately aborts, with an assertion failure if
      assert() is enabled at compile time.
      075caad6
  15. 05 Mar, 2017 1 commit
    • David Deepwell's avatar
      Add case for computing derivatives and vorticity · f290151b
      David Deepwell authored
      A new case file, derivatives.cpp, gives a means to compute
      derivatives of any field or to compute vorticity components.
      The vorticity calculation in Science is completely re-written
      so-as to also work for mapped grids.
      
      The derivatives file is built to compute secondary variables
      after a run has already been completed. This uses spins' built-in
      derivative toolkit allowing multiple variables to be calculated
      in parallel. A derivative field (one that is the derivative of
      another) is denoted by an underscore followed by the direction
      the derivative was taken in (ie. u_x is the x derivative of u).
      f290151b
  16. 04 Feb, 2017 3 commits
    • David Deepwell's avatar
      Move time step checker to BaseCase · 428b5399
      David Deepwell authored
      The empty shell of check_timestep in BaseCase has been filled
      with what was essentially the same thing in each case file.
      Again, this is just more case file house cleaning.
      
      A few ancillary functions have also been written to help.
      The most important might be get_dt_max() which returns dt_max.
      dt_max can either be specified in spins.conf or defined in the
      case file based on the buoyancy frequency. Currently, if
      dt_max > 0 and in spins.conf, then that value is used. Otherwise,
      0.5/sqrt(N2_max) is used.
      
      The re-definition of check_timestep in each case file can now be
      removed so long as the associated ancillary functions and
      parameters are included.
      428b5399
    • David Deepwell's avatar
      Move restart sequence checking into Options.cpp · 25b5d62f
      David Deepwell authored
      The generic code block to check the restart sequence is not needed
      in the case file and has been moved into Options.cpp. This
      streamlines the case file and makes a single copy for all other
      case files to use.
      25b5d62f
    • David Deepwell's avatar
      Properly initialize get_restart_sequence() in case file · a1a18e74
      David Deepwell authored
      The re-definition of get_restart_sequence() was missing in
      gravity_current.cpp. This resulted in all restarts to read output
      zero (*.0). Restarting will now properly read the output number
      specified by restart_sequence.
      a1a18e74
  17. 02 Feb, 2017 1 commit
    • Christopher Subich's avatar
      Move BC-parsing helper to BaseCase · e3adc1f9
      Christopher Subich authored
      This commit moves the helper function that process
      expansion/boundary conditions ("FOURIER" -> PERIODIC, etc)
      to BaseCase.cpp, from Options.
      
      This change should be invisible to most case files, which
      habitually include BaseCase for helper functions as-is, but
      it allows Options to once again be independent of
      NSIntegrator.  This improves modularity for other uses of
      the code, such as a hypothetical SPINSoff (get it?  it's a
      pun) that would like to do some spectral voodoo with an
      option file but doesn't need the full Navier-Stokes
      machinery.
      e3adc1f9
  18. 27 Jan, 2017 2 commits
    • David Deepwell's avatar
      Add filter parameters to case options · b5470525
      David Deepwell authored
      gravity_current.cpp accepts filter parameters (f_cutoff, f_order,
      f_strength) as optional input arguments. Easy adjustment of the
      filter is useful when the flow become suddenly becomes too chaotic.
      b5470525
    • David Deepwell's avatar
      Move expansion parsing into Options.cpp · 3035b35a
      David Deepwell authored
      Parsing of expansion types in gravity_current.cpp moved to
      Options.cpp. This is a general procedure that other case files
      will and should make use of. It also simplifies the case file
      to the specific set-up of that case.
      3035b35a
  19. 26 Jan, 2017 1 commit
    • Christopher Subich's avatar
      Update maximum-precision float format to .17g · 46ca2c72
      Christopher Subich authored
      See http://stackoverflow.com/questions/16839658 -- although
      in most cases 16 decimal digits suffices for a double
      precision value, in a handful of instances 17 are necessary.
      At the command line, see the difference between:
      
      $ printf %.17g 1.0000000000000001
      
      and
      
      $ printf %.16g 1.0000000000000001
      
      Since SPINS does not provide bit-for-bit compatibility when
      restarting (because of the startup timestepping approach),
      this change is unlikely to make any significant difference
      to existing or future cases.
      46ca2c72
  20. 24 Jan, 2017 3 commits
    • David Deepwell's avatar
      Increase accuracy of dump time. · 0208ed34
      David Deepwell authored
      The accuracy of the time used in dump_time.txt (the dump time)
      just before writing dump fields was increased from 12 significant
      figures to 16. 12 was probably fine, but since a double is used
      we might as well save all digits of accuracy.
      0208ed34
    • David Deepwell's avatar
      Moved parameter adjustment for restarting from dump from case file into Options.cpp · 577a2a1d
      David Deepwell authored
      Moved the section of gravity_current.cpp regarding the adjustment
      of temporal values (restarting, initial_time, etc.) when restarting
      from dump into Options.cpp as it is a standard piece of code and
      should be in a centralized location.
      577a2a1d
    • Christopher Subich's avatar
      Modification of gravity_current to support subdir build · f73b2120
      Christopher Subich authored
      The gravity_current case was located in a subdirectory, but
      its #include directives had only one ".." in the path.  This
      updates those directive to properly refer to the grandparent
      subdirectory (src/), allowing the case to be built as:
      
      make -j# cases/gravity_current/gravity_current.x
      f73b2120
  21. 16 Jan, 2017 1 commit
    • David Deepwell's avatar
      Creation of a new case file and associated configuration file. · 4a8d478c
      David Deepwell authored
      This case file is restartable and will dump all variables at the end of the requested computation time (stated in spins.conf) when run on SCINET or SHARCNET. The spins.conf enables the quick set-up of a parameter sweep as parameters are set within it and not within the case file which would need to be re-compiled.
      This file will be used as a basis for the upcoming additions and changes to BaseCase.cpp and Science.cpp.
      4a8d478c
  22. 21 Sep, 2016 1 commit
    • Christopher Subich's avatar
      Environment-sensitive MPI for hood.math · aeb4966e
      Christopher Subich authored
      This commit amends the 'hood' system-sepcific makefile to use the MPI
      libraries loaded from the user's shell profile.  This is handy because
      hood.math supports multiple versions of OpenMPI, which need to be used
      consistently.
      
      Now, the makefile generation process on hood locks in the MPI version
      **when the makefile is generated**.  This should carry through in using
      the makefile-specified MPI version at compile time, but if the user's
      environment is inconsistent they'll encounter a runtime error.
      aeb4966e
  23. 20 Sep, 2016 1 commit
    • Christopher Subich's avatar
      Add support for hood.math · 63750d11
      Christopher Subich authored
      This commit adds support for hood.math at the University of Waterloo
      using the ICC compiler.  Before compiling and running, the user's
      environment should be set up with:
      
      . /opt/intel/bin/iccvars.sh intel64
      
      and
      
      . /opt/intel/composer_xe_2013_sp1.1.106/mkl/bin/mklvars.sh intel64
      63750d11
  24. 09 Sep, 2016 2 commits
    • Christopher Subich's avatar
      Add vector-valued options to the config file · 9e8fc9c6
      Christopher Subich authored
      This change modifeis Options.hpp to add the possibility of
      vector-valued options to the config file and command line.
      From the 'case' code, this option is used by (for example)
      
      std::vector<int> intvec;
      add_option("Name",&intvec,"Description);
      
      When run, options of the form --Name 1 2 3 4 (at the command
      line) or Name = 1 2 3 4 (in the config file) will be added
      to the vector 'intvec' as separate entries.
      
      Because add_option is a template function, this works
      identically for double (floating point)-valued options.  It
      has not been tested with string options.
      
      Since an empty vector is a perfectly cromulent and
      unambiguous possibility, vector-valued options do *not*
      permit the specification of defaults.
      9e8fc9c6
    • Christopher Subich's avatar
      Merge branch 'performance' · 8a2979cf
      Christopher Subich authored
      8a2979cf
  25. 21 Jun, 2016 2 commits