source code format changes due to .clang-format changes
makefile: fix typo - petsckdir.mk -> petscdir.mk
Fix/update/improve manual pages in snes directoryMinor changes to source codeCommit-type: housekeeping, documentation/spend 8h
clang-format: convert PETSc sources to comply with clang-format
Add -include */petscdir.mk to makefile that lacked itfor i in `git ls-files | grep makefile | xargs grep -L petscdir.mk`; do echo $i ; str=`echo $i |sed -e 's?[-a-zA-Z0-9]*/?../?g' -e 's?makef
Add -include */petscdir.mk to makefile that lacked itfor i in `git ls-files | grep makefile | xargs grep -L petscdir.mk`; do echo $i ; str=`echo $i |sed -e 's?[-a-zA-Z0-9]*/?../?g' -e 's?makefile?petsckdir.mk?g'` ; cp $i tmp echo "-include $str" > $i cat tmp >> $idoneCommit-type: makefile, housekeeping/spend 15m
show more ...
remove garbage from makefilesIncluding * unused FLAGS variables * All: lib that did not work * stray blank lines etcCommit-type: housekeeping/spend 1h
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()```
Do not wrap PetscTryMethod() PetscUseMethod() in PetscCallIt produces shadow declarations and also serves no purpose since these macros do the appropriate error checking alreadyThere may be addit
Do not wrap PetscTryMethod() PetscUseMethod() in PetscCallIt produces shadow declarations and also serves no purpose since these macros do the appropriate error checking alreadyThere may be additions needed for running with a static error checkerCommit-type: error-checking/spend 15mReported-by:Lisandro Dalcin <dalcinl@gmail.com>
The great renaming:- CHKERRQ() -> PetscCall()- CHKERRV() -> PetscCallVoid()- CHKERRMPI() -> PetscCallMPI()- CHKERRABORT() -> PetscCallAbort()- CHKERRCONTINUE() -> PetscCallContinue()- CHKERRXX
The great renaming:- 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()
chkerr and friends wrapped
Fix spelling errors in manpages and comments
Merge branch 'barry/2021-05-06/add-snes-picard-mf' into 'main'Add support for using -snes_mf_operator with SNESSetPicard()See merge request petsc/petsc!3962
Remove all double blank lines from sourceCommit-type: petsc-style/2h
Add support for using -snes_mf_operator with SNESSetPicard()Applies Newton's method using matrix-free application of the true Jacobian, preconditioned by user provided Picard matrixThis involved
Add support for using -snes_mf_operator with SNESSetPicard()Applies Newton's method using matrix-free application of the true Jacobian, preconditioned by user provided Picard matrixThis involved adding (*computemffunction)(SNES,Vec,Vec,void*); to be used by the MatCreateSNESMF() operator when it is set and routines to work with the new function.The implementation requires maintaining a copy of the matrix that is filled by the users routine that computes the matrix at each matrix-vector product. The original matrix is used for constructing the preconditioner and therefor cannot be overwritten.Also dropped the requirement that the user provide a right hand side function to SNESSetPicard()Commit-type: feature, example/spend 8hThanks-to: Saransh Saxena <saransh.saxena5571@gmail.com>
Turn on checkbadSource test to generate an error when found; fix all source code that causes errorsCommit-type: portability-fix, testing-fix, style-fix, feature, maintainability/spend 1.5h
Fix bugs in MATMFFD related to scaling and shifting1) refactored MATMFFD to use MATSHELL and inherit all of its tested handling of shifting and scaling2) added example testing MATHSHELL handling o
Fix bugs in MATMFFD related to scaling and shifting1) refactored MATMFFD to use MATSHELL and inherit all of its tested handling of shifting and scaling2) added example testing MATHSHELL handling of multiple shifts and scales3) added test of MATMFFD for non-square matrix; from Stefano Zampini <stefano.zampini@gmail.com>4) refactor MATMFFD and MATSHELL to properly use PetscUseMethod() instead of type comparisons5) changed handling of -snes_mf so preconditioning is not automatically turned off if -snes_mf is used6) fixed test cases that now need -pc_type none due to change 57) added test case for MatGetDiagonal() for MATMFFD8) added error checking of use of several MATSHELL operations for non-congruent matrices9) SNESView now prints additional information about how the Jacobian is computedCommit-type: bug-fix, testing-fix, style-fix, featureReported-by: Stefano Zampini <stefano.zampini@gmail.com>
Update the use of Collective on in the manual pages to reflect the new styleCommit-type: style-fix, documentationThanks-to: Patrick Sanan <patrick.sanan@gmail.com>
doc fixes
derived LMVM types added and moved into the KSP package
Man pages: add newlines after "Notes:"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 \(
Man pages: add newlines after "Notes:"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/
Merge branch 'maint'
Added MatSNESMFSetReuseBase() at request of MOOSE teamCommit-type: feature
Provide a way to access the SNES from a MatCreateSNESMF() matrixCommit-type: featureThanks-to: Fande Kong <fande.kong@inl.gov>, Alexander Lindsay <alexlindsay239@gmail.com>
MATMFFD: added MatSetUp_MFFDmove layouts setup to MatSetUp_MFFDAdded missing checks for public API callsSNES: added missing checks for collective logical booleans in SNESSetUseMatrixFree()
Make ASCII PC/KSP/SNES/TSView() code and output in a standard styleThe code that prints the ASCII view for solvers was occasionally inconsistent:1) TSView printed the type specific information aft
Make ASCII PC/KSP/SNES/TSView() code and output in a standard styleThe code that prints the ASCII view for solvers was occasionally inconsistent:1) TSView printed the type specific information after the general info while all other solvers printed it before (right after the name of the type is printed)2) KSPView consistently printed the name of the subtype on EACH line of the subtypes output as did a few of the PC and SNES viewers. Since they are all printed indented directly below the subtype name there is no reason to print this information on each line3) TSView printed output about number of linear solvers and SNES even for explicit methods, which is goofy.4) a few other minor formatting and consistency issues where fix.Commit-type: style-fix, featureTime: 16 hours
12345678910>>...14