Fix manual pages in src/mat directory, very minor source code changeCommit-type: documentation/spend 22h
Remove braces from one-liners w/o PetscCall()
Remove braces from one-liners
clang-format: convert PETSc sources to comply with clang-format
Convert setfromoptions methods over to PetscTryTypeMethod() approachFlipped the order of the arguments for the function pointers (*setfromoptions)(PetscOptionItem*,obj); and friends to make them co
Convert setfromoptions methods over to PetscTryTypeMethod() approachFlipped the order of the arguments for the function pointers (*setfromoptions)(PetscOptionItem*,obj); and friends to make them consistent with PetscTryTypeMethod() and all the other methodsCommit-type: refactorization/spend 4h
show more ...
Mat: remove constness of the i/j args in MatSetPreallocationCOO() to save memory
Refactor handling of setable properties of matrices via MatSetOptions()Introduce PetscBool3 with enum values true, false, and unknownUse PetscBool3 to store matrices properties in a matrix and cl
Refactor handling of setable properties of matrices via MatSetOptions()Introduce PetscBool3 with enum values true, false, and unknownUse PetscBool3 to store matrices properties in a matrix and cleanup interface to check these valuesAdd full support for symmetric, Hermitian, structurally symmetric, and SPD.Commit-type: feature/spend 6h
Change if () { PetscCall() } three liner and friends to one linersfor i in `git ls-files | grep "\.[ch]$"` ; do sed 's?\$?ZZZ?g' $i | tr '\n' '$' | sed 's?\([ ]*\)if (\([-;,.\*+=a-z0-9A-Z_>]*\)) {\
Change if () { PetscCall() } three liner and friends to one linersfor 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 ; doneYes, really ugly but Barry still cannot master awkCommit-type: housekeeping
Change matrix factor database options that occur in KSP/PC to always use KSP/PC options prefixAdd MatSetOptionsPrefixFactor() and MatAppendOptionsPrefixFactor() to allow controlling the options pre
Change matrix factor database options that occur in KSP/PC to always use KSP/PC options prefixAdd MatSetOptionsPrefixFactor() and MatAppendOptionsPrefixFactor() to allow controlling the options prefixused by factors created from this matrixChange MatSetOptionsPrefix() to no longer affect the options prefix used by factors created from this matrixAs part of the above work the handling of the factor matrix options is now done in code in the factor matrixnot in the code that originates the factor matrixUpdate examples output to the new approach where the factored matrix prefix is set from the KSP/PCMuch of this work was performed by Hong ZhangCommit-type: usability/spend 5h
Merge remote-tracking branch 'origin/release'
A few codespell fixes
remove garbage from makefilesIncluding * unused FLAGS variables * All: lib that did not work * stray blank lines etcCommit-type: housekeeping/spend 1h
Doc: revise MatShift manual
Merge branch 'psanan/docs-sphinx-man-pages' into 'main'Integrate Man Pages into Sphinx DocsCloses #1132 and #1015See merge request petsc/petsc!4989
Merge branch 'barry/2022-04-27/add-fortran-example-matsetvaluescoo' into 'main'Use MatSetPreallocationCOO() in Fortran exampleSee merge request petsc/petsc!5182
Need manual Fortran interfaces for MatSetPreallocationCOO and co since they take a PetscCount argumentPetscCount is always 64 bit and Fortran cannot automatically promote integer arguments so need
Need manual Fortran interfaces for MatSetPreallocationCOO and co since they take a PetscCount argumentPetscCount is always 64 bit and Fortran cannot automatically promote integer arguments so need alsointeger4 interface so users don't need to always declare the nz as 64 bit integers. Yes users candeclare it as PetscCount in Fortran but some users don't like PETScisms spewed all over their code/spend 15m
Docs: bulk add backticks to .seealso man page fields```pythonimport osimport reimport fileinputdef _process_word(word): comma = "," if word.endswith(",") else "" return "`%s`%s" % (wor
Docs: bulk add backticks to .seealso man page fields```pythonimport osimport reimport fileinputdef _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 fileBASE_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()```
Remove the rest of the PetscCheckFalse() from the mat directoryCommit-type: housekeeping/spend 45m
Enable PETSC_ATTRIBUTE_FORMAT()
Cleanup of introduction of PetscCall()* remove bogus error flags from XXXBegin()/End() macros such as PetscOptionsBegin()/End()* rename for consistency certain XXXBegin()/End() macros such as Mat
Cleanup of introduction of PetscCall()* 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 changesCommit-type: error-checking, style-fix/spend 8h
Merge branch 'barry/2022-04-04/format-matstash' into 'main'Cleanup code formatting in matstash.cSee merge request petsc/petsc!5081
Merge branch 'barry/2022-04-04/segbuffextract-optional' into 'main'Make the final argument to PetscSegBufferExtractAlloc() be optionalSee merge request petsc/petsc!5082
Remove some PetscCheckFalse()
Make the final argument to PetscSegBufferExtractAlloc() be optionalIt is often a dummy argument that is just discarded anyways and the code is cleanerto just directly support it as optionalCommi
Make the final argument to PetscSegBufferExtractAlloc() be optionalIt is often a dummy argument that is just discarded anyways and the code is cleanerto just directly support it as optionalCommit-type: style/spend 10m
12345678910>>...47