1. 28 Jan, 2018 2 commits
    • David Deepwell's avatar
      Shift iter counter to use 0 at initial time · f8e85580
      David Deepwell authored
      The addition of an analysis call on the initial data resulted
      in the Nth time step to correspond with iteration N+1. This isn't
      a problem, just dissatisfying.
    • David Deepwell's avatar
      Implement surface stress calculation · 42803c3b
      David Deepwell authored
      The stress along the bottom and top surfaces are calculated
      and written to a file (stresses_(top/bottom).txt) using the function
      stresses_top and stresses_bottom in BaseCase. These functions are
      especially useful with mapped cases.
  2. 24 Jan, 2018 1 commit
  3. 10 Jan, 2018 2 commits
  4. 27 Dec, 2017 1 commit
  5. 06 Nov, 2017 2 commits
  6. 02 Nov, 2017 3 commits
    • David Deepwell's avatar
      Make BPE_from_internal an optional argument · ba41b112
      David Deepwell authored
      Also reorganize how some diagnostics are added to the file.
      This is now a little clearer to read since similar diagnostics
      are placed near each other.
    • David Deepwell's avatar
      Change order of compute_Background_PE optional arguments · edf41beb
      David Deepwell authored
      The dimensional rho option should not be after the mapping options
      since the mapping options will need to be specified for an
      unmapped dimensional density case. This now makes the optional
      argument ordering more logical.
    • Christopher Subich's avatar
      Small fixes for broken build · f69389d7
      Christopher Subich authored
      In the previous merge, compilation of Sorter.o went missing from the
      Makefile, and a typo was introduced in the gravity_current case file;
      each would prevent a build from finishing.  These are fixed.
  7. 01 Nov, 2017 6 commits
    • Christopher Subich's avatar
      Keep checks consistent between compute/write diagnostic · c2b83a9b
      Christopher Subich authored
      In certain cases, diagnostic computation required Nx/y/z > 1, but this
      check was not repeated for adding the diagnostic output to the
      respective file; this could result in unexpectedly writing 0 or
      meaningless data to the file.
    • Christopher Subich's avatar
      Merge branch 'instrument' · 05c9bd53
      Christopher Subich authored
      Conflict in Makefile, fixed with formatting corrections
    • Christopher Subich's avatar
      Make timing code compile-time optional (TIMINGS=true) · d68f6d2b
      Christopher Subich authored
      This changeset adds a compile-time option on whether to include the
      timing code.  If SPINS is compiled without TIMINGS=true, the timing code
      is #defined to a no-op and should not otherwise affect the performance
      of the software; timing_stack_report will instead print a short error
      Because this affects #defines in header files, changing from
      TIMINGS=true to false (or vice versa) should only be done with a 'make
      clean'.  Not doing so could leave the timing code in an inconsistent
      state and result in either link-time errors (if older code calls timing
      code that is #defined away) or a corrupted/growing timing stack (if for
      example a timing_push() is compiled in but the corresponding
      timing_pop() is removed.)
    • Christopher Subich's avatar
      Gravity_current: compute v^2 KE if f != 0 · ae19aedf
      Christopher Subich authored
      This change allows the gravity_current case to compute the v^2 component
      of the kinetic energy term even if NY=1 when rot_f != 0; in that case
      the solution can still develop a 2D geostrophic balance where v-velocity
      balances a pressure gradient.
      Additionally, the respective component sums are explicitly initialized to
    • Christopher Subich's avatar
      Fix typo that led to compiler warning · 6948b663
      Christopher Subich authored
    • Christopher Subich's avatar
      Sanitize template instantiation for add_diagnostic · 9d36be1d
      Christopher Subich authored and Christopher Subich's avatar Christopher Subich committed
      The template form of add_diagnostic<x> is attractive, but to
      be properly used the template implementation must be visible
      at the same time as the header file itself.  The
      instantiations formerly in BaseCase.cpp were not likely to
      be visible to a program, increasing compile time (if they
      were re-instantiated) or causing an error (if the
      implementation was not visible).  This change:
      *) Moves the implementation of add_diagnostic to a new
      *) Includes this impementation file from BaseCase.hpp, with
      a double-inclusion guard
      *) Preserves instantiations of <double> and <int>, with new
      'extern' declarations in BaseCase.hpp to prevent
  8. 31 Oct, 2017 2 commits
    • David Deepwell's avatar
      Make derivatives.x not overwrite spinscase.cpp · 90c67e3c
      David Deepwell authored
      The spinscase.cpp file is the case file showing what was run in
      a given simulation. If derivatives are calculated afterwards
      (using derivatives.x) then this file gets over-written and case
      specific parameters/instructions will be lost. Rather than be
      over-written, a different file (derivatives.cpp) will be created
      when derivatives.x is run.
    • David Deepwell's avatar
      Add system file for Graham · d365395b
      David Deepwell authored
  9. 26 Oct, 2017 1 commit
    • Christopher Subich's avatar
      Simplified tridiangonal solve algorithm; timing extensions · 3581d1c1
      Christopher Subich authored
      First and most trivially, this change adds a few more timing push/pop
      invocations relating to multigrid and especially to some of the MPI
      synchronization steps that might cause processors to wait on each other.
      More substantively, this change also adds a new tridiangonal solver
      based on the bog-standard forwards/backwards elimination Thompson
      algorithm (see Wikipedia).  This should be acceptable because the 1D
      problems being solved themselves come from a 2D problem, so we don't
      expect ill-conditioning; calling out to the GMRES banded solver was
      surprisingly a computational bottleneck perhaps because of pivoting.
      This change seems to decrease the line-solve time by about 80%, which in
      turn decreases the overall runtime (tank_rho test case) by 40%.
  10. 24 Oct, 2017 1 commit
  11. 18 Oct, 2017 2 commits
  12. 17 Oct, 2017 1 commit
  13. 16 Oct, 2017 2 commits
  14. 04 Oct, 2017 2 commits
  15. 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.
    • 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.
  16. 23 Aug, 2017 1 commit
  17. 04 Aug, 2017 1 commit
  18. 29 Jun, 2017 2 commits
  19. 26 Jun, 2017 1 commit
    • Christopher Subich's avatar
      Stack-structured timing code · 0a4781c9
      Christopher Subich authored
      This commit adds stack-structured timing code, such that bits of SPINS
      can be instrumented with
      >  timing_push("short name")
      >  [... work goes here]
      >  timing_pop()
      This is recursive, such that already-timed portions of the code can call
      the timing code to further instrument subroutines or discrete code
      segments, and the resulting structure follows the -dynamic- call stack.
      This does have the odd result that portions of the code that are re-used
      (namely spectral derivatives) can show up as several 'leaf' nodes in the
      To print out the report to standard error, call
      >  timing_stack_report()
      The exact format of the report should be considered tentative.
  20. 15 Jun, 2017 1 commit
  21. 08 May, 2017 1 commit
  22. 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.
  23. 04 May, 2017 2 commits