1. 15 Nov, 2018 1 commit
  2. 17 Jul, 2018 1 commit
  3. 05 Jul, 2018 1 commit
    • Benjamin Storer's avatar
      Refactor Science.cpp to split functions into separate files. · dffa6f21
      Benjamin Storer authored
      === Science ===
      The directory Science/ now contains files corresponding to
      the various functions in the now-removed Science.cpp.
      
      Filenames correspond directly with the function name, and each
      file contains only one functions, with a few notable exceptions.
       - Science/get_quads.cpp contains get_quads_x, get_quads_y, and get_quads_z
       - Science/compute_background_PE contains the helper function
      compare_pairs
      
      The global variables _quadw_x, _quadw_y, and _quadw_z are declared as
      extern in Science.hpp and declared in Science/compute_quadweights.cpp
      
      === Makefile ===
      The Makefile has been modified accordingly. It now automatically detects
      all Science/*.cpp files and includes them in the compile recipe.
      
      The Makefile has also been tidied up a little bit by defining a variable
      SPINS_BASE which points to the core files.
      dffa6f21
  4. 26 Apr, 2018 1 commit
  5. 25 Apr, 2018 2 commits
    • David Deepwell's avatar
      Update cases with mode-2 ISW · 0963fd7c
      David Deepwell authored
      Combined the mapped and unmapped cases for this into a single
      case file.
      0963fd7c
    • Christopher Subich's avatar
      Modify make_deps to check out libraries from UWGit · a55e544e
      Christopher Subich authored
      With the retirement of belize, which formerly hosted a fixed
      copy of the dependency libraries, make_deps.sh would no
      longer download and build said libraries.
      
      These libraries are now instead hosted in a dedicated
      repository at UWGit, so make_deps.sh has been changed to
      clone this repository.
      a55e544e
  6. 18 Apr, 2018 2 commits
  7. 05 Apr, 2018 1 commit
    • David Deepwell's avatar
      Update map_iwave case to use new diagnostics · e6b803fd
      David Deepwell authored
      This case has uncovered that the BPE calculation returns
      incorrect values when a Chebyshev grid is used on a field scale.
      The BPE calculation uses the quadrature weights as the volumes
      of each cell. This is true when the grid is regular, but incorrect
      for Chebyshev grids.
      
      To first approximation the Cheb quadrature weights are close to
      the volumes of the cells. This leads to the BPE calculation
      being accurate to 8 significant figures. 8 sig figs is not enough
      on fields scales since the magnitude of the PE can be very, very
      large. The difference of the BPE from the PE can thus be smaller
      than these 8 sig figs.
      e6b803fd
  8. 23 Mar, 2018 1 commit
  9. 22 Mar, 2018 1 commit
  10. 16 Mar, 2018 2 commits
  11. 13 Mar, 2018 1 commit
    • David Deepwell's avatar
      Update gravity_current to only use full zgrid · e938e1be
      David Deepwell authored
      The full xgrid and ygrid are unnecessary since x and y only
      depend on a single variable (or index - ii for x, and jj for y).
      The variables xx and yy can be used instead of xgrid and ygrid,
      respectively. Creating the full grids for these fields is a
      waste of memory.
      e938e1be
  12. 15 Feb, 2018 1 commit
  13. 09 Feb, 2018 1 commit
  14. 07 Feb, 2018 1 commit
    • Christopher Subich's avatar
      Simplify GMRES dot products; fix convergence errors · 8ae27fe5
      Christopher Subich authored
      This commit amends Cheb_2dmg::resid_dot (dot-product of
      residual vectors in the context of the 2D GMRES/multigrid
      iteration) to perform the dot-product in the simplest way,
      as a sum over grid elements.
      
      Before this, the code (which is left in the file but
      disabled by #if 1 / #else) tried to be clever and
      evenly-weight contributions from the interior, the boundary
      conditions, and the mean-pressure error (if the problem was
      indeterminate).  This evidently caused the long-standing
      problem of the GMRES inner iteration being far more
      optimistic about error (as reported by LAPACK) than would be
      computed by directly measuring the residual error.
      
      This problem was ultimately discovered when the
      doc_map_iwave case broke.  Even though this broken residual
      code has been in SPINS since before it was
      version-controlled via GIT, the map_iwave case would still
      converge (and relatively quickly) when the multigrid
      iteration had a relatively large coarse-solve size.
      
      Git bisect pinned the broken documentation case on the
      change that reduced the coase-grid size, which reduced the
      GMRES convergence rates enough that the errors caused by
      *this* problem broke convergence.
      
      Since this change replaces the error norm calculations used
      by GMRES, it should be treated with caution and mapped-grid
      cases should have a mark-1-eyeball inspection of results for
      a while.
      
      --
      
      Additionally, for debugging utility this change also
      includes crude residual/basis output for the 2D GMRES
      solver.  All current uses are commented out.
      8ae27fe5
  15. 30 Jan, 2018 1 commit
  16. 28 Jan, 2018 3 commits
  17. 25 Jan, 2018 1 commit
  18. 24 Jan, 2018 1 commit
  19. 10 Jan, 2018 2 commits
  20. 27 Dec, 2017 1 commit
  21. 06 Nov, 2017 2 commits
  22. 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.
      ba41b112
    • 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.
      edf41beb
    • 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.
      f69389d7
  23. 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.
      c2b83a9b
    • Christopher Subich's avatar
      Merge branch 'instrument' · 05c9bd53
      Christopher Subich authored
      Conflict in Makefile, fixed with formatting corrections
      05c9bd53
    • 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
      message.
      
      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.)
      d68f6d2b
    • 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
      0.
      ae19aedf
    • Christopher Subich's avatar
      Fix typo that led to compiler warning · 6948b663
      Christopher Subich authored
      6948b663
    • Christopher Subich's avatar
      Sanitize template instantiation for add_diagnostic · 9d36be1d
      Christopher Subich authored
      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
      BaseCase_impl.cc
      *) 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
      double-definition.
      9d36be1d
  24. 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.
      90c67e3c
    • David Deepwell's avatar
      Add system file for Graham · d365395b
      David Deepwell authored
      d365395b
  25. 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%.
      3581d1c1