Cloudy & Associates

  1. 05 Sep, 2022 1 commit
  2. 02 Sep, 2022 1 commit
    • Chatzikos, Marios's avatar
      Simplify 'save line pop' check for lines with pop · 9770ef0d
      Chatzikos, Marios authored
      Previously, a method was defined, LinSv.isSpectralLine(), that
      discriminated against all line types and flags known to the code, except
      for lines that are either transferred, 't', or are designated as
      recombination, 'r', lines.  Then, when the method was needed there was
      an additional check on the TransitionProxy of the line in the stack.
      
      Robin wondered if all that was necessary, so upon a little reflection
      it became apparent that they were not.  Instead of testing against all
      those flags, it is more straightforward to test for the types that the
      method does allow for: 't' and 'r'.
      
      But given that only 't' lines with initialized transitions can ever pass
      the if-statement in 'save lines pop', and produce meaningful output, the
      method becomes superfluous.
      
      It is hereby removed.  The if-statement now checks if the line is type
      't' instead of calling that method to test if it is a genuine spectral
      line.
      
      The check against the transition being initialized (tha...
      9770ef0d
  3. 31 Aug, 2022 1 commit
  4. 30 Aug, 2022 1 commit
  5. 29 Aug, 2022 5 commits
    • Chatzikos, Marios's avatar
      Exercise 'save line pop' in tsuite · e5bb36b4
      Chatzikos, Marios authored
      Add commands for each and every of the command's options to sim
      limit_caseb_he_den2_temp4.in.
      e5bb36b4
    • Chatzikos, Marios's avatar
      Clarify Hazy1 'save line pop' on its results · 40b69890
      Chatzikos, Marios authored
      Inform users that if the requested lines are not associated with an
      atomic model, the command will report zeros.
      40b69890
    • Chatzikos, Marios's avatar
      Improve 'save line pop' logic · d013ec33
      Chatzikos, Marios authored
      The previous implementation of the command rested on the assumption
      that all line stack entries are associated with atomic models, chiefly
      because it had been tested with real spectral lines.
      
      However, a number of entries appear in the stack that are not real lines
      and trying to access their populations leads to a segfault.
      
      Define method LinSv.isSpectralLine() to tell if a line is a genuine
      spectral line, defined here as either a transferred (type 't') or
      recombination (type 'r') line.  Use method to screen against other lines
      (e.g., blends) when producing the command output.
      
      Also use a check on whether the line transition is associated, to screen
      against recombination lines, which are not associated with an atomic
      model either.
      
      Note that some recombination lines are transferred, so a test against
      line type 'r' is not sufficient.
      
      Finally, protect the population ratio in a safe_div() to guard against
      zero populations (e.g., when the relevant ion has zero density).
      d013ec33
    • Chatzikos, Marios's avatar
      Fix Hazy1 sectioning of 'save line populations' · d46fad67
      Chatzikos, Marios authored
      Previously, the 'save line pop' command was described in a section, an
      oversight that occurred  when renaming the old 'save hyperfine pop'
      command to the current 'save line pop'.
      
      Restored description to a subsection of the 'save line' section.
      d46fad67
    • Chatzikos, Marios's avatar
      Remove Hazy1 description of old 'save line pop' · 346b79a4
      Chatzikos, Marios authored
      The previous description of the 'save line populations' command had
      accidentally remained in Hazy 1.  Removed here.
      346b79a4
  6. 24 Aug, 2022 1 commit
    • Chatzikos, Marios's avatar
      Remove tsuite/bugs dir · bfc8d82c
      Chatzikos, Marios authored
      The directory was accidentally added when the ca1_cmesh branch was
      merged.  It was not intended for distribution with master.
      bfc8d82c
  7. 23 Aug, 2022 2 commits
    • Chatzikos, Marios's avatar
      Merge branch 'master' into hfs · 535d3424
      Chatzikos, Marios authored
      535d3424
    • Chatzikos, Marios's avatar
      Merge 'save populations' commands · 7bcc850f
      Chatzikos, Marios authored
      Previously, there existed two commands for saving line populations:
      'save line populations' reported the lower and upper level populations
      for many (but not all) spectral lines known to the code, while
      'save hyperfine populations' saved the populations and derived
      quantities for a list of spectral lines (not necessarily hyperfine)
      supplied by the user.
      
      These are now brought together in a single scheme.  The command retains
      its original name ('save line'), but the code it executes is that of the
      new command ('save hyperfine').
      
      The choice aims to simplify the output of the 'save line' command, which
      produced large output files (several MB) even for single zone models.
      7bcc850f
  8. 22 Aug, 2022 4 commits
  9. 19 Aug, 2022 6 commits
  10. 18 Aug, 2022 1 commit
    • Marios Chatzikos's avatar
      Fix syntax errors in sys_llvm/Makefile.conf · a44179dc
      Marios Chatzikos authored
      The previous implementation contained several errors, which were
      revealed when compiling on older versions of MacOS.
      
      First, the CXX variable used was the one defined in source/Makefile, not
      the one defined (later) in Makefile.conf.  Hoist the definition to the
      top of the file to make sure we use the right compiler when setting the
      system architecture.
      
      Second, there was a space before "shell", i.e., "$( shell" was used
      instead of "$(shell", which caused the command to **not** run in the
      shell, and prevented acquisition of the LLVM target.  The variable was
      never set, the string always evaluated to the empty string, and the M1
      CPU was always picked up.  This caused warnings on older versions of
      MacOS X (Yosemite (10.10), and Monterey (12.0)).  Remove extra space.
      
      Third, there was an extra space at the end of the conditional, which is
      appended to the end of the result of findstring.  On M1/M2 systems, this
      is innocuous because the strings don't match anyway.  But on Intel
      systems, findstring evaluates to an empty string, but the right-hand
      side of the conditional to a single space, which does not match the
      empty string on the left-hand side.  This causes the CPU to be set to
      the unsupported apple-m1.  Compilation aborts with an error.  Rearrange
      the conditional to use quoted strings instead of parentheses -- this
      makes the test robust against spaces.  Also, rearrange the conditional
      to use 'ifeq' instead of 'ifneq', and set the architecture to the
      'native' default in an else clause.
      a44179dc
  11. 16 Aug, 2022 1 commit
    • Chatzikos, Marios's avatar
      Use compilation flag -Wno-deprecated-declarations · 217082f1
      Chatzikos, Marios authored
      FSF GCC complains that std::unary_function and std::binary_function are
      deprecated as of the C++11 standard.  The latter has actually been
      removed as of C++-17.
      
      We'll deal with that later, when we upgrade to a more recent standard.
      For now, silence the warning.
      217082f1
  12. 12 Aug, 2022 2 commits
    • Chatzikos, Marios's avatar
      Fix write to string in grains_mie.cpp · 97fada17
      Chatzikos, Marios authored
      G++ v12.1.0 complains that a long cannot be safely printed in 2 digits;
      the offending code updates grain labels.  Yet, the value printed always
      fits in two digits, so no out-of-bounds memory access can occur at run
      time.
      
      Cast long value to unsigned short to silence the warning.
      97fada17
    • Chatzikos, Marios's avatar
      Initialize variables, as per g++ v12 warnings · 57479d85
      Chatzikos, Marios authored
      Compilation with G++ v12.1.0 on a MacOS X (v12.4) has brought up a few
      new warnings that relate mostly to initialization.
      
      Most of these occur in functions of thirdparty_quadpack.cpp.  Initialize
      the offending floats therein to NaN, and long integers to 0.
      
      Also, the long members of the CollSplinesArray class are now initialized
      to 0.
      57479d85
  13. 11 Aug, 2022 4 commits
  14. 18 Jul, 2022 2 commits
    • Chatzikos, Marios's avatar
      Update capabilities.pl for Apple M1 chip · 06653047
      Chatzikos, Marios authored
      Compilers for the M1 produce position-independent code by default.
      Issuing '-fno-pie' on the command line emits an innocuous warning.
      
      The present implementation checks on the compiler's capabilities only if
      the chip is not arm64.
      
      Clang++ version is:
      
         $  clang++ --version
         Apple clang version 13.0.0 (clang-1300.0.27.3)
         Target: arm64-apple-darwin21.5.0
      06653047
    • Chatzikos, Marios's avatar
      Update Makefile for LLVM on Apple M1 chip · a4b67eed
      Chatzikos, Marios authored
      Clang++ aborts when the '-march=native' compiler option is given.
      Tailoring to the chip requires that '-mcpu=apple-m1' be given instead
      in sys_llvm/Makefile.conf.
      
      Clang++ version is:
      
        $ clang++ --version
        Apple clang version 13.0.0 (clang-1300.0.27.3)
        Target: arm64-apple-darwin21.5.0
      a4b67eed
  15. 17 Jul, 2022 3 commits
  16. 13 Jul, 2022 1 commit
    • Chatzikos, Marios's avatar
      Fix Chianti transitions with AI & swapped levels · 18b44a67
      Chatzikos, Marios authored
      Chianti v10 contains transitions with the level indices swapped, meaning
      that lower index > upper index.
      
      Arrack checked only that the upper index be less than the maximum index
      allowed for our AI cut.  In the case of fe_18, this let a few AI
      transitions in the .wgfa file.
      
      As a result, Cloudy crashed on a bounds-checking run.
      
      Here, we remove fe_18.wgfa transitions with either index referring to AI
      levels.  We also reverse the index order in some .wgfa and .splups files
      so that the lower index appears first.
      18b44a67
  17. 10 Jul, 2022 4 commits
    • Chatzikos, Marios's avatar
      Update tsuite monitors to Chianti v10 · 8c585a6e
      Chatzikos, Marios authored
      8c585a6e
    • Chatzikos, Marios's avatar
      Update Cloudy wavelengths to Chianti v10 · 7771eb9e
      Chatzikos, Marios authored
      The line "Fe 8 270.090A" has been disabled in blr_n09_p22_Z20.in because
      it does not exist in Chianti v10.
      7771eb9e
    • Chatzikos, Marios's avatar
      Increase default number of levels for Fe 8 to 30 · 26d85271
      Chatzikos, Marios authored
      With the current setup, the test suite reports that it could not find
      two Fe 8 lines at 130.941A and 270.090A used in agn_warm_absorber.in
      and blr_n09_p22_Z20.in, respectively.
      
      Inspection of the Chianti v7 fe_8.wgfa file reveals that these lines
      correspond to transitions
        5 - 53   270.090   3s2.3p5.3d2 4D2.5 - 3s2.3p6.4f 2F2.5
        1 - 53   130.941   3s2.3p6.3d 2D1.5 - 3s2.3p6.4f 2F2.5
      
      In Chianti v10, level 53 is indexed 64.
      
      To recover these lines the default number of levels in CloudyChianti.ini
      is here increased to 30 (the discrepancy being due to trimming by the
      parser of levels with no experimental energy; the upper level index may
      be found with the 'save lines labels' command).
      
      Note that this recovers only the line at 130.941A.
      
      The line at 270.090A is missing from the Chianti v10 data (fe_8.wgfa).
      26d85271
    • Chatzikos, Marios's avatar
      Update fix_input_scripts_wl.pl for blends.ini · aafde053
      Chatzikos, Marios authored
      The file data/blends.ini and relevant infrastructure were introduced by
      Peter van Hoof back in 2019 (2019-03-25 to 2019-04-09, according to the
      SVN log).
      
      However, the script fix_input_scripts_wl.pl was not updated to handle
      updates to that file, partly because there had been no need for it.
      
      The upgrade to Chianti v10 has required that the file be updated, and
      the script is here modified to be able to carry such updates out.
      
      It is also modified to handle PROBLEMs reported by Cloudy when, e.g., it
      cannot identify a component to a line blend (a PROBLEM is followed by an
      abort; updates must be done piecemeal).
      aafde053