Changes: 3.20#
General:
Add
PetscOptionsBegin(),PetscOptionsEnd(),PetscOptionsInt(),PetscOptionsBool(),PetscOptionsIntArray(),PetscOptionsReal(),PetscOptionsRealArray(), andPetscOptionsScalar()for FortranAdd
PetscAssertPointer()as a replacement forPetscValidPointer(),PetscValidCharPointer(),PetscValidIntPointer(),PetscValidInt64Pointer(),PetscValidCountPointer(),PetscValidBoolPointer(),PetscvalidScalarPointer(), andPetscValidRealPointer()Convert standard header-guards in PETSc header-files to
#pragma once. Users relying on specific preprocessor definitions to determine whether particular PETSc headers (e.g.petscdm.hused to be guarded byPETSCDM_H) have been included will find that this no longer works. While header-guards are technically “public” (insofar that they appear in public header-files), their name and value are considered implementation details
Configure/Build:
Add support for external-packages to prefer tarball download for regular use - as currently all packages prefer git clones. MPICH is a package using this feature. Here MPICH tarball will be downloaded for regular use. However on providing
--download-mpich-commit=mainoption - configure download and builds from MPICH git repositoryAdd support for external package SLATE, optional dependency for STRUMPACK
Add support for external package ZFP, optional dependency for STRUMPACK
Add support for external package ButterflyPACK, optional dependency for STRUMPACK
Sys:
Add
PetscDeviceContextGetStreamHandle()to return a handle to the stream the current device context is usingAdd utility functions
PetscGetCurrentCUDAStream()andPetscGetCurrentHIPStream()to return the GPU stream the current device context is usingAdd
PetscStrcmpAny()to compare against multiple non-empty stringsChange arguments 4 and 5 of
PetscViewerBinaryReadAll()andPetscViewerBinaryWriteAll()toPetscInt64Add
PetscIsCloseAtTolScalar()Remove
PetscTellMyCell()and related runtime optionRemove
PetscTextBelt()and related runtime optionRemove deprecated
-malloc [no]startup optionRemove deprecated
-malloc_infostartup optionRemove deprecated
-log_summaryoptionRemove
PetscURLShorten(), it has not worked since 2019Move
PetscIntStackCreate(),PetscIntStackDestroy(),PetscIntStackPush(),PetscIntStackPop(), andPetscIntStackEmpty()declarations to public API in petsclog.hAdd
-on_error_malloc_dumpoption
Event Logging:
Add
PetscLogStateinterface for describing profiling events and stagesAdd
PetscLogHandlerinterface that interprets the profiling events of aPetscLogStateAdd
PETSCLOGHANDLERDEFAULTimplementation ofPetscLogHandlerAdd
PETSCLOGHANDLERNESTEDimplementation ofPetscLogHandlerAdd
PETSCLOGHANDLERTRACEimplementation ofPetscLogHandlerAdd
PETSCLOGHANDLERMPEimplementation ofPetscLogHandlerAdd
PETSCLOGHANDLERPERFSTUBSimplementation ofPetscLogHandlerAdd
PETSCLOGHANDLERLEGACYimplementation ofPetscLogHandlerAdd
PetscLogPerfstubsBegin()for log handling with PerfStubs/TAUAdd
PetscLogLegacyCallbacksBegin()to transition old log handler callbacks to thePetscLogHandler-based approachAdd
PetscLogHandlerStart()to connect aPetscLogHandlerto PETSc’s global logging eventsAdd
PetscLogStageGetName()Add
PetscLogEventGetName()Add
PetscLogEventsPause()andPetscLogEventsResume()to isolate a logging event from unrelated in-process eventsAdd
PetscLogClassGetClassId()Add
PetscLogClassIdGetName()Deprecate
PetscLogClassPerfInfoClear()` , ``PetscLogClassPerfLogCreate(), andPetscLogClassPerfLogDestroy()Deprecate
PetscClassPerfLogEnsureSize(),PetscClassRegInfoDestroy(),PetscClassRegLogCreate(),PetscClassRegLogDestroy(),PetscClassRegLogGetClass(), andPetscClassRegLogRegister()Deprecate
PetscEventPerfInfoClear()andPetscEventPerfInfoCopy()Deprecate
PetscEventPerfLogActivate(),PetscEventPerfLogActivateClass(),PetscEventPerfLogCreate(),PetscEventPerfLogDeactivate(),PetscEventPerfLogDeactivateClass(),PetscEventPerfLogDeactivatePop(),PetscEventPerfLogDeactivatePush(),PetscEventPerfLogDestroy(),PetscEventPerfLogEnsureSize(),PetscEventPerfLogGetVisible(), andPetscEventPerfLogSetVisible()Deprecate
PetscEventRegLogCreate(),PetscEventRegLogDestroy(),PetscEventRegLogGetEvent(), andPetscEventRegLogRegister()Deprecate
PetscStageLogCreate(),PetscStageLogDestroy(),PetscStageLogGetActive(),PetscStageLogGetClassPerfLog(),PetscStageLogGetClassRegLog(),PetscStageLogGetEventRegLog(),PetscStageLogGetStage(),PetscStageLogGetVisible(),PetscStageLogPop(),PetscStageLogPush(),PetscStageLogRegister(),PetscStageLogSetActive(),PetscStageLogSetVisible(),PetscStageLogGetCurrent(), andPetscStageLogGetEventPerfLog()Deprecate
PetscLogGetStageLog()Deprecate
PetscLogPushCurrentEvent_Internal()Deprecate
PetscLogPopCurrentEvent_Internal()Deprecate
PetscLogAllBegin()Deprecate
PetscLogSet()Add
PetscLogHandlerDump()Add
PetscLogStageGetPerfInfo()Add
PETSCLOGHANDLERNVTXimplementation ofPetscLogHandler
PetscViewer:
PetscDraw:
AO:
IS:
VecScatter / PetscSF:
PF:
Vec:
Add
VecErrorWeightedNorms()to unify weighted local truncation error norms used inTSAdd CUDA/HIP implementations for
VecAbs(),VecSqrt(),VecExp(),VecLog(),VecPointwiseMax(),VecPointwiseMaxAbs(), andVecPointwiseMin()Add
VecMAXPBY()Deprecate
VecChop()in favor ofVecFilter()Add
VecCreateFromOptions()
PetscSection:
PetscPartitioner:
Mat:
Add support for calling
MatDuplicate()on a matrix preallocated viaMatSetPreallocationCOO(), and thenMatSetValuesCOO()on the new matrixRemove
MATSOLVERSPARSEELEMENTALsince it is no longer functionalAdd
MATSELLCUDA. It supports fastMatMult(),MatMultTranspose(), andMatMultAdd()on GPUsAdd support for
MAT_FACTOR_LUandMAT_FACTOR_CHOLESKYwithMATSOLVERMUMPSforMATNESTMatGetFactor()can now returnNULLfor some combinations of matrices and solvers types. This is to support those combinations that can only be inspected at runtime (i.e. MatNest with AIJ blocks vs MatNest with SHELL blocks)Remove
MatSetValuesDevice(),MatCUSPARSEGetDeviceMatWrite(),MatKokkosGetDeviceMatWriteAdd
MatDenseCUDASetPreallocation()andMatDenseHIPSetPreallocation()Add support for KOKKOS in
MATH2OPUSAdd
-pc_precision singleoption for use withMATSOLVERSUPERLU_DISTAdd
MATDIAGONALwhich can be created withMatCreateDiagonal()Add
MatDiagonalGetDiagonal(),MatDiagonalRestoreDiagonal(),MatDiagonalGetInverseDiagonal(), andMatDiagonalRestoreInverseDiagonal()Add support for
MatLoad()andMatView()to load and storeMATMPIAIJmatrices that have more thanPETSC_INT_MAXnonzeros, so long as each rank has fewer thanPETSC_INT_MAXAdd
MatLRCSetMats()and register creation routine forMatLRCAdd CUDA/HIP implementation for
MatGetDiagonal()Add a Boolean parameter to
MatEliminateZeros()to force the removal of zero diagonal coefficientsExpose
MatComputeVariableBlockEnvelope()in public headersAdd
MatEliminateZeros()implementations forMatBAIJandMatSBAIJDeprecate
MatChop()in favor ofMatFilter(), with two additional Boolean parameters to compress the underlying storage and keep or discard near-zero diagonal coefficientsAdd
MatCreateFromOptions()Add
MatSTRUMPACKGetReordering(),MatSTRUMPACKSetGeometricNxyz(),MatSTRUMPACKSetGeometricComponents(),MatSTRUMPACKSetGeometricWidth(),MatSTRUMPACKGetColPerm(),MatSTRUMPACKSetGPU(),MatSTRUMPACKGetGPU(),MatSTRUMPACKSetCompression(),MatSTRUMPACKGetCompression(),MatSTRUMPACKSetCompRelTol(),MatSTRUMPACKGetCompRelTol(),MatSTRUMPACKSetCompAbsTol(),MatSTRUMPACKGetCompAbsTol(),MatSTRUMPACKSetCompMinSepSize(),MatSTRUMPACKGetCompMinSepSize(),MatSTRUMPACKSetCompLeafSize(),MatSTRUMPACKGetCompLeafSize(),MatSTRUMPACKSetCompLossyPrecision(),MatSTRUMPACKGetCompLossyPrecision(),MatSTRUMPACKSetCompButterflyLevels(),MatSTRUMPACKGetCompButterflyLevels()Add
MAT_STRUMPACK_GEOMETRIC,MAT_STRUMPACK_AMD,MAT_STRUMPACK_MMD,MAT_STRUMPACK_AND,MAT_STRUMPACK_MLF,MAT_STRUMPACK_SPECTRALtoMatSTRUMPACKReorderingRemove
MatSTRUMPACKSetHSSLeafSize(),MatSTRUMPACKSetHSSMaxRank(),MatSTRUMPACKSetHSSMinSize(),MatSTRUMPACKSetHSSMinSepSize(),MatSTRUMPACKSetHSSAbsTol(),MatSTRUMPACKSetHSSRelCompTol(),MatSTRUMPACKSetHSSRelTol()
MatCoarsen:
PC:
Add
PCMatGetApplyOperation()andPCMatSetApplyOperation()Add
PCReduceFailedReason()Add
PCSetKSPNestLevel()andPCSetKSPNestLevel()Refactor
PCMPIto be a private system used automatically when-mpi_linear_solver_serveris used. TheKSPandPCobjects that solve the system now inherit any prefix provided initially withKSPSetPrefix()and do not require the previously requiredmpi_prefixAdd option
-fieldsplit_1_pc_hpddm_schur_preconditionto usePCHPDDMon the Schur complements fromPCFIELDSPLITAdd
PCGAMGSetAggressiveSquareGraph()to use square graph method for aggressive coarsening that was the previous default coarsening approach before release 3.19Add
PCGAMGSetAggressiveMISk()to set the number of levels (k) of aggressive MIS-k coarsening (2 is very common)Add
PCGAMGSetMinDegreeOrderingMISk()to use a minimum degree ordering for the (greedy) MIS-k algorithmChange
PCGAMGSetUseParallelCoarseGridSolve()toPCGAMGSetParallelCoarseGridSolve()Add
PCGAMGSetRecomputeEstEig()to set flag to have Chebyshev recompute its eigen estimates (default set to true)
KSP:
Add
KSPSetMinimumIterations()andKSPGetMinimumIterations()Add
KSPSetNestLevel()andKSPGetNestLevel()Support
KSPSetInitialGuessNonzero()withKSPPREONLYandPCDISTRIBUTEwhen it is called on both the outer and innerKSP
SNES:
Add a convenient, developer-level
SNESConverged()function that runs the convergence test and updates the internal converged reasonSwap the order of monitor and convergence test. Now monitors are always called after a convergence test
Deprecate option
-snes_ms_normsin favor of-snes_norm_schedule always
SNESLineSearch:
TS:
Remove
TSErrorWeightedNormInfinity(),TSErrorWeightedNorm2(),TSErrorWeightedENormInfinity(),TSErrorWeightedENorm2()since the same functionality can be obtained withVecErrorWeightedNorms()Add support for time-dependent solvers with varying solution size using
TSSetResize()Add support for Diagonally Implicit Runge-Kutta methods with the new
TSDIRKtype
TAO:
Add
TAOBNCG,TaoBNCGGetType()andTaoBNCGSetType()
DM/DA:
Add support for
DMDAGetElements()for FortranAdd support for clearing named vectors with
DMClearNamedGlobalVectors()andDMClearNamedLocalVectors()Add
DMPrintCellIndices()for debuggingAdd
DMUseTensorOrder()Add
DMCeedCreate(),DMCeedComputeGeometry(), andDMCeedDestroy()
DMSwarm:
Add scatter mode to
DMSwarmProjectFields()and no longer create vectorsPromote
DMSwarmDataFieldGetEntries(),DMSwarmDataFieldRestoreEntries(),DMSwarmDataBucketGetDMSwarmDataFieldByName(),DMSwarmDataBucketGetDMSwarmDataFieldIdByName(), andDMSwarmDataBucketQueryDMSwarmDataFieldByName()to public interface
DMPlex:
Add
DMPlexTransformExtrudeGetPeriodic()andDMPlexTransformExtrudeSetPeriodic()Replace
DMPlexGetGhostCellStratum()withDMPlexGetCellTypeStratum()Add
DMPlexSetUseMatClosurePermutation()andDMPlexGetUseMatClosurePermutation()Add
DMPlexGetUseCeed(),DMPlexSetUseCeed(), andDMPlexSNESComputeResidualCEED()
FE/FV:
Add
PLEXFE_QFUNCTIONmacro to create CEED QFunctions from Plex pointwise functions
DMNetwork:
Add
DMNetworkViewSetShowRanks(),DMNetworkViewSetViewRanks(),DMNetworkViewSetShowGlobal(),DMNetworkViewSetShowVertices(),DMNetworkViewSetShowNumbering()Add
-dmnetwork_view_all_ranks-dmnetwork_view_rank_range-dmnetwork_view_no_vertices-dmnetwork_view_no_numberingfor viewing DMNetworks with the Matplotlib viewerAdd
-dmnetwork_view_zoomin_vertices-dmnetwork_view_zoomin_vertices_paddingfor viewing DMNetworks with the Matplotlib viewer
DMStag:
DT:
Add
PETSCFEVECTORfor making a finite element that is a vector of copies of another finite elementAdd
PetscFECreateVector()Add
PETSCDUALSPACESUMfor a finite element dual basis that is the sum of other dual basesAdd
PetscDualSpaceCreateSum()
Fortran:
Add
PetscCheck()andPetscCheckA()for FortranChange
PETSC_HAVE_FORTRANtoPETSC_USE_FORTRAN_BINDINGSto indicate if PETSc is built with Fortran bindings