Changes: 3.26#
General#
Increase the minimum required CUDA Toolkit version to 11.4
Change the policy so that documentation changes/fixes/additions are added to the
mainbranch, not thereleasebranchChange
petscdiffto treat<in expected output as text that must match instead of suppressing differences from numerical outputChange the
make branch-reviewrule to[PETSC_LLM_CLI=command] [PETSC_LLM_MODEL=modelname] make branch-review. Add support for Gemini, Codex, OpenCode, and other LLM CLIs. Replace the use ofCLAUDE_OPTSwithPETSC_LLM_CLI_OPTSandPETSC_LLM_MODELAdd a CodeGraph skill and repository guidance so LLM coding tools automatically use an existing local PETSc CodeGraph index when navigating or reviewing source
Add
commandprefixas initial arguments toPetscOptionsDeprecatedNoObject()Change the macros
PetscCallHDF5(),PetscCallHDF5ReturnNoCheck(),PetscCallHDF5Return(),PetscCallEGADS(),PetscCallSAWs(),PetscCallP4est(), andPetscCallP4estReturn()to be variadic and take the function arguments directly without requiring the parentheses that previously wrapped the function arguments. For functions that take no arguments, a trailing comma after the function name is required per previous C standardsChange all use of Metis in the PETSc API to use METIS
Change
make clang-tidyto require--with-mpi=0; addPETSC_CLANG_TIDY_FIX=--fixto apply fixits
Configure/Build#
Increase the minimum required Python version for
./configureto 3.6Add
providesDocsanddocsDirspackage attributes so that an external package’s sources can be cloned and scanned to generate PETSc manual pages when the documentation is builtAdd interface to LIBXSMM
Add package-version comparisons to test harness
requires, such assuperlu_dist_version_ge(9,0,0)orPETSC_PKG_SUPERLU_DIST_VERSION_GE(9,0,0), using the versions recorded by configureAdd
--with-cuda-nvml, off by default, so a CUDA build no longer depends at runtime on the driver-provided libnvidia-ml and its libraries run on machines without an NVIDIA driver; configure with--with-cuda-nvml=1(requires CUDA 12.2 or later) for GPU power and energy monitoring (-log_view_gpu_energy,-log_view_gpu_energy_meter)Add detection of NVIDIA NVPL BLAS/LAPACK (for
aarch64) so--with-blaslapack-dirpointing at an NVPL library directory works without listing the libraries by handAdd OpenMP target offload support for CUDA/HIP with
--with-openmpwhen compilers support it, and define macrosPETSC_HAVE_OPENMP_TARGET_OFFLOAD_{CC, CXX, FC}accordingly
Sys#
Add
PetscGetConfiguration()Deprecate
PETSC_MPI_THREAD_REQUIREDAdd support for running PETSc applications as MCP servers that can be accessed by LLMs
Add
PetscRandomAppendOptionsPrefix()andPetscRandomGetOptionsPrefix()Add
PetscCallLAPACKInfo()for calling LAPACK routines with aninfoargument where the caller requires aninfovalue of 0 for the program to continueAdd
PetscIntCSRView()to inspect CSR graphChange
-help 0,-help no,-help falseand-help offto turn the help output off; they previously turned it onAdd
-help mansecto restrict the options help output to the options blocks in the given manual section; a comma-separated list may be given, for example-help ksp,snesAdd
ViewerandBagas the manual sections of, respectively, the viewer options an object creates, such as-ksp_monitorand-ksp_view, and the options registered byPetscBagRegisterInt()and the otherPetscBagRegisterroutines; these are listed by-help viewerand-help bag, and not by the section of the object that creates them, so-help kspdoes not list-ksp_monitorDeprecate
PetscVoidFunctionandPetscVoidStarFunctionin favor ofPetscVoidFn *andPetscVoidFn **
Event Logging#
Change
-logand-log_allto only take optional filename arguments. They no longer take optional boolean argument
PetscViewer#
Add support for writing CGNS descriptors on the base node:
PetscViewerCGNSGetDescriptors(),PetscViewerCGNSRestoreDescriptors(),PetscViewerCGNSSetDescriptor()Add
PetscViewerVTKWriteFnas the typedef prototype for thewrite()function passed toPetscViewerVTKAddField(). This addition requires no changes to user source code
PetscDraw#
Deprecate
PetscXIOErrorHandlerin favor ofPetscXIOErrorHandlerFn *
AO#
IS#
Add
PetscLayoutGetComm()to obtain the MPI communicator of aPetscLayout
VecScatter / PetscSF#
PF#
Vec#
Add
VecCreateSeqWithArrayAndMemType()andVecCreateMPIWithArrayAndMemType()to create array-style standard, CUDA, or HIP vectors from memory of a specifiedPetscMemTypeAdd
VecSetStdBasis()API to set a vector to the i-th standard basis vectorAdd Fortran bindings for
VecCUDAGetArray(),VecCUDARestoreArray(),VecHIPGetArray(),VecHIPRestoreArray(), and theirReadandWritevariants; the returned pointer addresses device memoryChange the behavior of
VecPointwiseDivide()implementing w = x / y: if a particulary[i]is zero andx[i]is also zero,w[i]is set to one (before it was set to zero).Deprecate
-vec_view_stashin favor of-vec_stash_viewFix
VecKokkosPlaceArray()andVecKokkosResetArray()so thatVecGetArray()returns the placed array when the Kokkos host and device memory spaces are the sameChange
VecCreateSeqKokkosWithArray()andVecCreateMPIKokkosWithArray()to create an array-less vector when passed a NULL array, as documented and asVecCreateSeqWithArrayAndMemType()does; previously the sequential variant allocated its own array and the parallel variant aborted on GPU backends
PetscSection#
PetscPartitioner#
Mat#
Fix cleanup of additive
MATCOMPOSITEmatrices whenMatCompositeAddMat()followsMatMult()Fix an invalid free in
MatColoringDestroy()for weights supplied withMatColoringSetWeights()Speed up single-index-set
MatCreateSubMatrices()reuse forMATMPIAIJwith sorted column subsets and unchanged structureAdd
MATPRODUCT_PtAPsupport forMATDIAGONALandMATCONSTANTDIAGONALAdd
MATPRODUCT_ABsupport forMATDIAGONALandMATCONSTANTDIAGONALwith any matrix typeAdd
MatSeqAIJGetKokkosView(),MatSeqAIJRestoreKokkosView(),MatSeqAIJGetKokkosViewWrite()andMatSeqAIJRestoreKokkosViewWrite()to the public APIChange
MatSeqAIJCUSPARSEGetIJ(),MatSeqAIJCUSPARSERestoreIJ(),MatSeqAIJHIPSPARSEGetIJ()andMatSeqAIJHIPSPARSERestoreIJ()to returnPetscIntindices instead ofintAdd
MatNormApproximate()to compute matrix norms approximatelyAdd
MatGetMultPetscSF()to access thePetscSFused to communicate off-process vector entries inMatMult()forMATMPIAIJ,MATMPIBAIJ,MATMPISBAIJ,MATMPIDENSE, andMATMPISELLChange
MATSEQSBAIJbehavior inMatPermute()andMatDiagonalScale()to useMATSEQBAIJwhen the result is not necessarily symmetricChange
MatGetValues()to respect the row or column orientation set withMatSetOption(mat, MAT_ROW_ORIENTED, ...). This will break current code that callsMatSetOption(mat, MAT_ROW_ORIENTED, PETSC_FALSE)and usesMatGetValues()Add new
MatTypeMATSEQBAIJLIBXSMMandMATMPIBAIJLIBXSMMAdd
MatFlag(), theMatcounterpart ofVecFlag(), implemented forMATSEQDENSEandMATMPIDENSE, and deprecateMatSetInf(), which noMatTypeimplemented beforeFix
MatDenseGetColumnVec(),MatDenseGetColumnVecRead()andMatDenseGetColumnVecWrite()onMATDENSECUDAandMATDENSEHIPmatrices whoseVecTypeisVECKOKKOS; the columnVecwas placed as if it were a CUDA/HIPVec, so the column data never reached itAdd device SpMM support for
MATPRODUCT_ABandMATPRODUCT_AtBwith aMATAIJKOKKOSmatrix and dense matrices; previously these products loopedMatMult()over the columns of the dense matrixChange
MatCreateMAIJ()to convert its result toMATAIJKOKKOSwhen the input matrix has that type, as is already done forMATAIJCUSPARSE; theMATMAIJkernels read the host arrays of the input matrix directly and so miss values last updated on deviceChange
MatDiagonalScale()forMATSEQDENSECUDAandMATSEQDENSEHIPto check the memory type of the scalingVecinstead of itsVecType, so device-resident vectors such asVECKOKKOSare consumed directly on the GPU instead of being copied through the hostAdd
MatDenseUpdateColumnLayout()to change the layout of input vectors of the matrix vector productChange
MatGetState()to return aMatStateand addMatStateCompare(),MatStateCompareUpdate(), andMatStateInvalidate()Fix
MatNorm()forMATMPIDENSEto respect the leading dimension of the local matrix, which was previously ignored in parallel forNORM_1andNORM_FROBENIUSand gave wrong results, for example on matrices obtained withMatDenseGetSubMatrix()Add device implementations of
MatNorm()withNORM_1,NORM_FROBENIUS, andNORM_INFINITYforMATDENSECUDAandMATDENSEHIP; previously all norms copied the matrix to the hostChange
MatNorm()forMATMPIDENSEto computeNORM_FROBENIUSandNORM_INFINITYvia the local matrix norm, soMATMPIDENSECUDAandMATMPIDENSEHIPno longer copy to the host for those normsChange
MatDiagonalScale()forMATMPIDENSEto delegate to the local matrix, soMATMPIDENSECUDAandMATMPIDENSEHIPscale on the device instead of copying the local block through the hostChange
MATSELLto honorMatSetOption(mat, MAT_IGNORE_ZERO_ENTRIES, PETSC_TRUE); the option was previously accepted but silently ignored, so a matrix that sets it now gets a sparser nonzero structureFix
MatSetValues()forMATMPISELLto ignore a new nonzero location whenMatSetOption(mat, MAT_NEW_NONZERO_LOCATIONS, PETSC_FALSE)was called; the value was previously inserted anyway, and written past the end of the row when its slice had no spare slotChange
MatSetValues()forMATMPISELLto skip, rather than error on, a new off-diagonal location whenMatSetOption(mat, MAT_NEW_NONZERO_LOCATIONS, PETSC_FALSE)was called, matchingMATMPIAIJFix
MatSetValues()forMATMPIAIJto decide theMAT_IGNORE_ZERO_ENTRIESdiagonal exemption from the global row and column, not from the indices local to the diagonal block. The two differ only when the row and column layouts differ, where a zero off the diagonal could wrongly create a location and a zero on the diagonal could wrongly be droppedAdd device support for
MATPRODUCT_ABwith aMATMPIAIJCUSPARSE,MATMPIAIJHIPSPARSE, orMATMPIAIJKOKKOSmatrix and aMATMPIDENSECUDAorMATMPIDENSEHIPmatrix; the off-process rows of the dense matrix are communicated with aPetscSFdirectly from device memory and the off-diagonal contribution uses the device sparse-dense product, also with-matproduct_batch_sizeDeprecate
MatPartitioningParmetisSetRepartition(),MatPartitioningParmetisSetCoarseSequential(), andMatPartitioningParmetisGetEdgeCut()in favor ofMatPartitioningParMETISSetRepartition(),MatPartitioningParMETISSetCoarseSequential(), andMatPartitioningParMETISGetEdgeCut()Deprecate
MatSolverFunction,MatHtoolKernelandMatH2OpusKernelin favor ofMatSolverFn *,MatHtoolKernelFn *andMatH2OpusKernelFn *Change the application context argument of
MatCreateH2OpusFromKernel()and of theMatH2OpusKernelFncallback fromvoid *toPetscCtx; no user source changes are requiredAdd
MatNullSpaceLoad()to load aMatNullSpaceobject dump in binary withMatNullSpaceView()Fix the symbolic phase of a
MatProductwith a dense result to propagate theVecTypeof the dense operand to theMatit createsFix
MatDenseGetSubMatrix()to propagate theVecTypeto the submatrixAdd
MatCreateNestFromMultipleShifts()to create aMATNESTthat represents a family of shifted matrices, andMatCreateVecNestFromMultipleShifts()to create a compatibleVECNESTvectorChange
MatMatSolve(),MatMatSolveTranspose()andMatMatTransposeSolve()to flag every entry ofXwithMatFlag()and skip the solve when the factorization failed, asMatSolve()already did forx
MatCoarsen#
PC#
Add
PC_ASM_WEIGHTED,PCASMWeightedSetScaling(),PCASMWeightedGetScaling(), andPCASMWeightedSetComputeScaling()for user-supplied diagonal interpolation weights on overlapping subdomainsAdd
PCGAMGSetProlongatorFilter()andPCGAMGGetProlongatorFilter()to set/get the threshold for filtering the prolongator inPCGAMG. The threshold is relative, applies to whole fine-node/coarse-node coupling blocks while preserving the near-null space, and must be in [0,1)Add
PCGAMGSetProlongatorFilterScale()andPCGAMGGetProlongatorFilterScale()to set/get the per-level scaling of the prolongator filter threshold inPCGAMG; the scale must be in [0,1]PCGAMGSetThresholdScale()now requires its argument to be in [0,1]PCGAMGSetThreshold()now requires each threshold value to be less than 1; negative values still mean keeping even zero entries in the graph. It is also nowLogically Collective(checked in debug builds), matchingPCGAMGSetThresholdScale()Add
PC_HPDDM_COARSE_CORRECTION_DEFLATED_REVERSEDfor applying the coarse correction after the fine correction inPCHPDDMAdd
PCAIRandPCPFLAREINVmanual pages, generated from the PFLARE sources when the documentation is builtFix
PCMGto honorPCSetUseAmat(pc, PETSC_FALSE)at all levelsAdd
PCMatApplyRichardson(),PCMatApplyRichardsonExists(), andPCShellSetMatApplyRichardson(), the block analogs ofPCApplyRichardson(),PCApplyRichardsonExists(), andPCShellSetApplyRichardson()Add the missing Fortran binding for
PCShellSetMatApply()Remove
PCSetDiagonalScale(),PCGetDiagonalScale(),PCDiagonalScaleLeft(), andPCDiagonalScaleRight()Add
PCBDDCLoadCustomization()andPCBDDCSaveCustomization()to ease debugging ofPCBDDC
KSP#
Add
KSPCheckMatSolve(), the matrix counterpart ofKSPCheckSolve(), to flag block solutions and propagate inner solver failures to the outer preconditionerFix for
KSPpre- and post-solve callbacks, that can now be used together with Eisenstat and Walker trick forSNESAdd
KSPPreSolve()andKSPPostSolve()to run the registeredKSPpre- and post-solve callbacksChange
KSPSolve()to run theKSPSetPreSolve()callback afterKSPSetUp()andKSPSetUpOnBlocks()instead of beforeAdd
KSPIDR— IDR(s) Induced Dimension Reduction Krylov solver (biorthogonal variant)Add
KSPIDRSetS(),KSPIDRGetS(),KSPIDRSetRandom(),KSPIDRGetRandom(),KSPIDRSetCosine(), andKSPIDRGetCosine()Deprecate
KSPMonitorResidualShort()and-ksp_monitor_short, remove thepreconditioned_residual_shortmonitor registry nameRemove
-ksp_plot_eigenvalues,-ksp_plot_eigenvalues_explicitly,-ksp_plot_eigencontoursthat have been deprecated since version 3.9Remove
KSPSetDiagonalScale(),KSPGetDiagonalScale(),KSPSetDiagonalScaleFix(), andKSPGetDiagonalScaleFix(), along with the-ksp_diagonal_scale,-ksp_diagonal_scale_fix, and-ksp_view_diagonal_scaleoptionsRemove
KSPAGMRES(Wakam and Erhel, 2011), which was never registered as a usableKSPTypeAdd native support for
KSPMatSolve()andKSPMatSolveTranspose()withKSPRICHARDSON, which iterates on batches of or the entire block of right-hand sides instead of solving them one at a timeAdd delegation of the
KSPRICHARDSONblock iteration toPCMatApplyRichardson()when thePCprovides it, falling back toPCApplyRichardson()on one right-hand side at a time so that the result matchesKSPSolve()Change
KSPConvergedDefault()to base the relative tolerance on the Frobenius norm of the batch of (preconditioned) right-hand sides during aKSPMatSolve()with a nonzero initial guess, matchingKSPSolve()Change
KSPMatSolve()andKSPMatSolveTranspose()to reset the residual history at the start of each solve, and of each batch when-ksp_matsolve_batch_sizeis used, asKSPSolve()does, unlessKSPSetResidualHistory()was called withresetset toPETSC_FALSEChange
KSPRichardsonSetSelfScale()to trigger aKSPSetUp()re-run when the flag changes, fixing an out-of-bounds work vector access when it was set afterKSPSetUp()GMRES orthogonalization routines have been promoted to the main
KSPlevel, and GMRES has been dropped from the name. The new names areKSPOrthogonalizationSet(),KSPOrthogonalizationGet(),KSPOrthogonalizationModifiedGramSchmidt(),KSPOrthogonalizationClassicalGramSchmidt(),KSPOrthogonalizationSetCGSRefinementType(),KSPOrthogonalizationGetCGSRefinementType(). Note that the signature of orthogonalization functions has changed, seeKSPOrthogonalizationFn. The related enumeration is nowKSP_ORTHOGONALIZATION_CGS_REFINE_*and command-line options are now-ksp_orthogonalization (cgs|mgs)and-ksp_orthogonalization_cgs_refinement_type (refine_never|refine_ifneeded|refine_always)Add new
KSPConvergedReasonKSP_DIVERGED_INNER_SOLVE_FAILEDfor solvers such asKSPEKSMthat have an innerKSPobjectAdd
KSPEKSM- the Extended Krylov Subspace Method for multiple shifted linear systems which can be defined viaMatCreateNestFromMultipleShifts()Add
KSPEKSMSetHapTol(),KSPEKSMGetHapTol(),KSPEKSMSetKSP(),KSPEKSMGetKSP(),KSPEKSMSetShift(), andKSPEKSMGetShift()
SNES#
Change
SNESSetUp()to not overwrite the NPC application context if one has previously been set on the NPCChange
SNESComputeJacobian()to call the user-provided Jacobian function when a left NPC is active and the solver is notSNESASPINAdd support for nonlinear preconditioners with a
DMdifferent from the parentSNESDM. CallingSNESSetNPC()will no longer enforce default parameters on the NPCChange
-snes_mfto respect an explicitly setPCtype instead of silently overriding it withPCNONE; an explicitly requestedPCthat requires an assembled matrix now errorsDeprecate
SNESMonitorDefaultShort()and-snes_monitor_shortAdd
SNESFASSetUseCoarseCorrectionLineSearch()and-snes_fas_use_coarse_correction_linesearchto implement the algorithm in [Nas00].Change default linesearch for
SNESFASwithSNESFASTypeofSNES_FAS_ADDITIVEtoSNESLINESEARCHSECANT
SNESLineSearch#
Deprecate
SNESLINESEARCHBASICin favor ofSNESLINESEARCHNONE
TS#
Add
DMTSSetIFunctionPre()Expose
TSDiscGradGetX0AndXdot()andTSDiscGradRestoreX0AndXdot()Add
TSIsImplicit()that indicates if theTSTypeis implicit and usesSNESorKSPDeprecate
TSRHSFunction,TSRHSJacobian,TSRHSJacobianP,TSSolutionFunction,TSForcingFunction,TSIFunction,TSIJacobian,TSI2Function,TSI2Jacobian,TSTransientVariable,TSGLLEAcceptFunctionandTSAlpha2Predictorin favor of a pointer to the correspondingFntypedef, for exampleTSRHSFunctionFn *Deprecate
DMDATSRHSFunctionLocal,DMDATSRHSJacobianLocal,DMDATSIFunctionLocalandDMDATSIJacobianLocalin favor ofDMDATSRHSFunctionLocalFn *,DMDATSRHSJacobianLocalFn *,DMDATSIFunctionLocalFn *andDMDATSIJacobianLocalFn *
TAO#
Deprecate
TaoMonitorDefaultShort(),-tao_monitor_short, and-tao_monitor_short_intervalChange the deprecated
TaoSMonitor()and-tao_smonitorto use the full-precision default monitorAdd
TaoGetConvergedReasonString()to retrieve a human readable string describing theTaoConvergedReason
TaoTerm#
PetscRegressor#
PetscDA#
Add the
PetscDALETKFLocalizationTypeenum (PETSCDA_LETKF_LOC_NONE,PETSCDA_LETKF_LOC_GASPARI_COHN,PETSCDA_LETKF_LOC_GAUSSIAN,PETSCDA_LETKF_LOC_BOXCAR) selecting the LETKF localization kernelAdd
PetscDALETKFSetLocalizationType(),PetscDALETKFGetLocalizationType(),PetscDALETKFSetLocalizationRadius(),PetscDALETKFGetLocalizationRadius(), andPetscDALETKFSetLocalizationCoordinates(); the localization matrix is built lazily from these distance-based kernel parametersAdd
PetscDALETKFResetLocalization()to drop the cached localization matrix so the next analysis rebuilds it from the current kernel parametersRemove
PETSCDAETKF; usePETSCDALETKFwithPetscDALETKFSetLocalizationType(da, PETSCDA_LETKF_LOC_NONE)for identical behaviorRemove
PetscDAEnsembleSetSqrtType(),PetscDAEnsembleGetSqrtType(), thePetscDASqrtTypeenum (PETSCDA_SQRT_CHOLESKY,PETSCDA_SQRT_EIGEN), and the-petscda_ensemble_sqrt_typeoption; the symmetric-eigendecomposition square root is now the only pathRemove
PetscDALETKFSetLocalization(); use the distance-based APIPetscDALETKFSetLocalizationType(),PetscDALETKFSetLocalizationRadius(), andPetscDALETKFSetLocalizationCoordinates()insteadRemove
PetscDALETKFSetObsPerVertex()andPetscDALETKFGetObsPerVertex(); per-vertex observation counts are now derived from the distance-based localization kernelRemove
PetscDALETKFGetLocalizationMatrix(); the localization matrix is an internal cached object built lazily on the first analysis. Callers that previously supplied this matrix should switch toPetscDALETKFSetLocalizationCoordinates()and let the implementation build the matrix from the chosen kernelChange the LETKF distance-based periodicity convention: per-axis periodicity is now activated by
bd[d] > 0.0(the period), and negativebd[d]now raisesPETSC_ERR_ARG_OUTOFRANGE; previously any non-zerobd[d](including negative values) enabled periodicityAdd
PetscDAEnsembleForecastFntypedef for thePetscDAEnsembleForecast()model callbackChange the
PetscDAEnsembleForecast()model callback signature from(Vec, Vec, PetscCtx)to(Mat, PetscCtx); the model now receives the entire ensemble matrix and advances all members in place. Existing per-member callbacks should iterate over the columns withMatDenseGetColumnVec()/MatDenseRestoreColumnVec()(seeShallowWaterStep2D()insrc/ml/da/tutorials/ex4.c)Change
-petscda_viewto fire at the tail of everyPetscDAEnsembleAnalysis()call (mirroringKSPSolve()/SNESSolve()), so it now emits once per analysis cycle rather than once per run; code that wants a single end-of-run snapshot should callPetscDAView()explicitly after the assimilation loop
DM#
Fix
DMLabelGetValueISGlobal()to return an empty index set when no rank contributes label values, avoiding integer overflow in the allocation sizeChange
DMLabelPropagatePush()to take a reduce operatorAdd
DMKSPSetCreateOperators()to let theDMprovide a pair of application specificMatobjects to innerKSPsolvers.Fix
DMGetLocalToGlobalMapping()for a local section carrying a chart permutation (seeDMReorderSectionSetDefault()); the map is now indexed by the local section offsets. The local section must now be set up withPetscSectionSetUp()before the mapping is built, otherwise an error is raisedFix
DMSetLocalSection()andDMSetGlobalSection()to invalidate a previously built section-derived local-to-global mapping, which was computed from the old sections; a mapping built by theDMimplementation itself, such as byDMDAinDMSetUp(), is kept.DMFORESTwithp4estshares its sections into its cachedDMPLEXwithout going through those setters, and now invalidates the mapping there as well
DMSwarm#
Add
DMSwarmProjectFields()andDMSwarmProjectGradientFields()Add
DMSwarmSortclassAdd
DMSwarmSortDestroy()andDMSwarmSortView()Allow
DMSwarmCellDMSetSort()to take inNULLand clear the sortAdd
DMSwarmPreallocateMassMatrix()andDMSwarmFillMassMatrix()Change
DMSwarmCreateGlobalVectorFromField()andDMSwarmCreateLocalVectorFromField()to require fields of typePETSC_SCALARinstead ofPETSC_REAL; complex scalar builds now rejectPETSC_REALfieldsChange
DMSwarmVectorDefineField()andDMSwarmVectorDefineFields()to validate that every field has typePETSC_REALorPETSC_SCALARAdd support for
PETSC_SCALARfields alongsidePETSC_REALfields inDMSwarmCreateGlobalVectorFromFields(),DMSwarmDestroyGlobalVectorFromFields(),DMSwarmCreateLocalVectorFromFields(), andDMSwarmDestroyLocalVectorFromFields()Change
DMSwarmAddCellDM()to register coordinate fields asPETSC_REALand require existing coordinate fields to have typePETSC_REALinstead ofPETSC_DOUBLE; coordinate fields now follow the configured real precision, including single and__float128precisionAdd support for
PETSC_SCALARweight fields inDMSwarmComputeMoments(), using the real part of each weight
DMPlex#
Add
DMPlexDrawCell()Add
DMPlexLabelCompleteStar()Add
DMPlexTransformCreateSplitCellLabel()to mark the cells of a transformed mesh whose source cell was genuinely splitAdd
DMPlexCreateColoringLabel()to color a labeled subset of a stratumAdd
-dm_plex_coloring_ordering_typeto order the points withMatGetOrdering()before coloring themAdd
-dm_plex_coloring_localto color the points each process owns by themselves, without communicatingChange the
distanceargument ofDMPlexCreateColoring()to count applications of the adjacency through the mesh rather than hops in the graph of the stratum; the two agree at depth zero but differ elsewhere, most visibly at the cell stratum with finite-element adjacencyChange
DMPlexCreateColoring()to weight the points lexically rather than randomly, which uses the optimal four colors for the vertices of a structured quadrilateral grid instead of sevenAdd an extra communicator argument to
DMPlexFilter()to allow extracting local meshesAdd
DMPlexCopyFlags()Add
DMPlexCheckLabel()andDMPlexReconcileLabel()Change CGNS viewer to use multi-component read/write interface for better performance
Add
DMPlexLabelCohesiveCheck()Change
DMPlexLabelCohesiveComplete()to remove split argumentAdd
DM_SHAPE_DIIIDAdd
DMPlexTriangleSetAngleBound(),DMPlexTriangleGetAngleBound(),DMPlexTetgenSetRadiusEdgeBound(),DMPlexTetgenGetRadiusEdgeBound(),DMPlexTetgenSetDihedralBound(),DMPlexTetgenGetDihedralBound()Remove
DMPlex_Surface_Grad(), superseded byDMPlexGeomDataAndGrads()Fix quadrature component indexing in
DMPlexComputeGradientClementInterpolant()for multi-component fieldsAdd
DMPlexReorderCellListByCurve()andDMPlexReorderCellListByCurveFromCentroids()to sort and equidistribute a cell list along a space-filling curve beforeDMPlexCreateFromCellListParallelPetsc(); addDMPlexCurveTypeandDMPLEXCURVEMORTONAdd
DMPLEXCURVEMORTONas an accepted ordering inDMPlexGetOrdering(), which orders cells along a space-filling curve without building an adjacency graph
FE/FV#
DMNetwork#
DMStag#
DT#
Add
PetscWeakFormGetKeys()
Fortran#
Remove the
PetscOffsetdatatype and the undocumentedPetscOffsetFortran()routine; both were needed by the removed Fortran bindings that returned an array together with a separate index offsetPCASMGetLocalSubdomains()andPCASMGetLocalSubmatrices()now fill disassociated pointer outputs and return arrays that are absent in C as disassociated pointers. PassPETSC_NULL_IS_POINTERorPETSC_NULL_MAT_POINTERto omit an arrayFix
PCASMCreateSubdomains(), which misread the number of blocks. It now errors if givenPETSC_NULL_IS_POINTERPCASMDestroySubdomains()acceptsPETSC_NULL_IS_POINTERforis_local, andPCASMGetSubKSP()andPCASMGetLocalSubmatrices()now return their errors instead of discarding themPCASMGetSubKSP()andPCASMRestoreSubKSP()acceptPETSC_NULL_KSP_POINTERto omit theKSParray.PCASMGetSubKSP()is no longer collective whenfirst_localisPETSC_NULL_INTEGER.PCASMCreateSubdomains2D()now errors if givenPETSC_NULL_IS_POINTER