Skip to content
Snippets Groups Projects
  1. Dec 01, 2023
  2. Nov 08, 2023
  3. Nov 03, 2023
  4. Sep 26, 2023
  5. Jul 29, 2023
  6. Jul 22, 2023
  7. Jul 14, 2023
  8. Feb 02, 2023
  9. Nov 28, 2022
  10. Sep 21, 2022
  11. Sep 19, 2022
  12. Aug 22, 2022
  13. Aug 17, 2022
  14. Jun 23, 2022
    • Barry Smith's avatar
      Change if () { PetscCall() } three liner and friends to one liners · 1baa6e33
      Barry Smith authored and Satish Balay's avatar Satish Balay committed
      for i in `git ls-files | grep "\.[ch]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ ]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\$[ ]*PetscCall(\([- ._+=a-z0-9A-Z>*,()]*);\)\$[ ]*}\$?\1if (\2) PetscCall(\3$?g' | tr '$' '\n' | sed 's?ZZZ?$?g' > $i.joe ; mv $i.joe $i  ; done
      
       for i in `git ls-files | grep "\.[hc]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ }else]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\$[ ]*PetscCall(\([- ._+=a-z0-9A-Z>*,()]*);\)\$\([ ]*\)} \([- ._+=a-z0-9A-Z>*,()]*);\)\$?\1if (\2) PetscCall(\3$\4\5$?g' | tr '$' '\n' | sed 's?ZZZ?$?g' > $i.joe ; mv $i.joe $i  ; done
      
      Yes, really ugly but Barry still cannot master awk
      
      Commit-type: housekeeping
      1baa6e33
  15. Apr 29, 2022
    • Patrick Sanan's avatar
      Docs: bulk add backticks to .seealso man page fields · db781477
      Patrick Sanan authored
      ```python
      import os
      import re
      import fileinput
      
      def _process_word(word):
          comma = "," if word.endswith(",") else ""
          return "`%s`%s" % (word.rstrip(","), comma)
      
      def _process_stripped_line(line):
          return " ".join(map(_process_word, line.split()))
      
      start_pattern = re.compile(r"^( *\.seealso:? )(.*$)")
      
      def process_file(filename_full):
          with fileinput.FileInput(filename_full, inplace=True) as f:
              in_block = False
              for line in f:
                  line_stripped = line.strip()
                  # end ".seealso blocks" on a blank line or C-style comment close
                  line_modified = None
                  if not line_stripped:
                      in_block = False
                  elif line_stripped.endswith("*/"):
                      in_block = False
                  else:
                      match = re.match(start_pattern,
                                       line)  # not stripped line
                      if match:
                          indent = " " * len(match.group(1))
                          in_block = True
                          line_modified = match.group(
                              1) + _process_stripped_line(
                                  match.group(2).strip())
                      elif in_block:
                          line_modified = indent + _process_stripped_line(
                              line_stripped)
                  if line_modified:
                      print(line_modified)  # prints to the file
                  else:
                      print(line, end="")  # prints to the file
      
      BASE_DIRS = ["src", "include"]
      EXT = [".c", ".cxx", ".cpp", ".cu", ".h", ".hpp", ".hxx"]
      EXCLUDE_DIRS = ["tests", "tutorials", "ftn-auto", "ftn-custom", "benchmarks"]
      
      def main():
          """ Process everything """
          for base in BASE_DIRS:
              for root, dirs, files in os.walk(base):
                  for filename in files:
                      if os.path.splitext(filename)[1] in EXT:
                          filename_full = os.path.join(root, filename)
                          print("FILE ---", filename_full)
                          process_file(filename_full)
                  for exclude_dir in EXCLUDE_DIRS:
                      if exclude_dir in dirs:
                          dirs.remove(exclude_dir)
      
      if __name__ == "__main__":
          main()
      ```
      db781477
  16. Apr 10, 2022
    • Barry Smith's avatar
      Cleanup of introduction of PetscCall() · d0609ced
      Barry Smith authored and Satish Balay's avatar Satish Balay committed
      * remove bogus error flags from XXXBegin()/End() macros such as PetscOptionsBegin()/End()
      
      * rename for consistency certain XXXBegin()/End() macros such as MatPreallocateInitialize()/Finalize()
      
      * fix many lingering ierr = XXX that arose from multiline function calls
      
      * sync slepc/hpddm - to use snapshots with the same changes
      
      Commit-type: error-checking, style-fix
      /spend 8h
      d0609ced
  17. Mar 26, 2022
    • Jacob Faibussowitsch's avatar
      The great renaming: · 9566063d
      Jacob Faibussowitsch authored
      - CHKERRQ() -> PetscCall()
      - CHKERRV() -> PetscCallVoid()
      - CHKERRMPI() -> PetscCallMPI()
      - CHKERRABORT() -> PetscCallAbort()
      - CHKERRCONTINUE() -> PetscCallContinue()
      - CHKERRXX() -> PetscCallThrow()
      - CHKERRCXX() -> PetscCallCXX()
      - CHKERRCUDA() -> PetscCallCUDA()
      - CHKERRCUBLAS() -> PetscCallCUBLAS()
      - CHKERRCUSPARSE() -> PetscCallCUSPARSE()
      - CHKERRCUSOLVER() -> PetscCallCUSOLVER()
      - CHKERRCUFFT() -> PetscCallCUFFT()
      - CHKERRCURAND() -> PetscCallCURAND()
      - CHKERRHIP() -> PetscCallHIP()
      - CHKERRHIPBLAS() -> PetscCallHIPBLAS()
      - CHKERRHIPSOLVER() -> PetscCallHIPSOLVER()
      - CHKERRQ_CEED() -> PetscCallCEED()
      - CHKERR_FORTRAN_VOID_FUNCTION() -> PetscCallFortranVoidFunction()
      - CHKERRMKL() -> PetscCallMKL()
      - CHKERRMMG() -> PetscCallMMG()
      - CHKERRMMG_NONSTANDARD() -> PetscCallMMG_NONSTANDARD()
      - CHKERRCGNS() -> PetscCallCGNS()
      - CHKERRPTSCOTCH() -> PetscCallPTSCOTCH()
      - CHKERRSTR() -> PetscCallSTR()
      - CHKERRTC() -> PetscCallTC()
      9566063d
  18. Mar 25, 2022
  19. Mar 17, 2022
  20. Feb 13, 2022
  21. Sep 12, 2021
  22. May 24, 2021
  23. Aug 25, 2020
    • Matthew Knepley's avatar
      PCMG: Added adaptive interpolation · f3b08a26
      Matthew Knepley authored
      - Added coarse vectors to resolve at each level
      - Added adaptation flag and API
      - Added option -pc_mg_adapt_interp to turn on adaptation
      - Use  -dm_interpolator_adapt_k  to set subspace size and -dm_interpolator_adapt_use_poly to select type of functions
      - Doc fixes for functions
      - Fix options for construction of a vanilla coarse space
      - Require Galerkin matrices for adaptive interpolation
      - Fixed problem with composed eigenvalue
      - Normalize eigenvector in smoothing loop
      - Added option to use generalized eigenvector basis (For some reason, this is worse on test problems)
      - Make adaptive allocation happen only initially, protect adaptive functions from invalid levels
      f3b08a26
  24. May 14, 2020
  25. Dec 18, 2019
  26. May 28, 2019
  27. Apr 16, 2018
    • Patrick Sanan's avatar
      Man pages: add newlines after "Notes:" · 95452b02
      Patrick Sanan authored
      This allows for proper formatting from sowing.
      
      On OS X (using gsed, not the default BSD sed), from the PETSc root directory:
      
          find src include -type f \( -name "*.c" -or -name "*.h" -or -name "*.cxx" \) | xargs gsed -i 's/Notes\s*:\s*\(\w.*\)/Notes:\n    \1/'
      
      This adds a newline and 4 spaces whenever "Notes:" is followed by any "word" character, in any .c, .h, or .cxx file in src/ or include/
      95452b02
  28. Dec 21, 2016
  29. May 09, 2016
  30. Aug 08, 2015
  31. Apr 11, 2015
  32. Jan 13, 2015
  33. Dec 13, 2014
  34. Jun 18, 2014
  35. Sep 10, 2013
  36. Jun 01, 2013
  37. Apr 08, 2013
Loading