PETSc for Partial Differential Equations Numerical Solutions in C and Python.pdf
《PETSc for Partial Differential Equations Numerical Solutions in C and Python.pdf》由会员分享,可在线阅读,更多相关《PETSc for Partial Differential Equations Numerical Solutions in C and Python.pdf(399页珍藏版)》请在冰豆网上搜索。
PETScforPartialDifferentialEquationsSOFTWAREENVIRONMENTSTOOLSTheSIAMseriesonSoftware,Environments,andToolsfocusesonthepracticalimplementationofcomputationalmethodsandthehighperformanceaspectsofscientificcomputationbyemphasizingin-demandsoftware,computingenvironments,andtoolsforcomputing.Softwaretechnologydevelopmentissuessuchascurrentstatus,applicationsandalgorithms,mathematicalsoftware,softwaretools,languagesandcompilers,computingenvironments,andvisualizationarepresented.Editor-in-ChiefJackJ.DongarraUniversityofTennesseeandOakRidgeNationalLaboratoryTimothyA.DavisTexasA&MUniversityJamesW.DemmelUniversityofCalifornia,BerkeleySoftware,Environments,andToolsSeriesEditorsLauraGrigoriINRIAMichaelA.HerouxSandiaNationalLaboratoriesEdBueler,PETScforPartialDifferentialEquations:
NumericalSolutionsinCandPythonD.L.Chopp,IntroductiontoHighPerformanceScientificComputingPadmaRaghavanPennsylvaniaStateUniversityYvesRobertENSLyonThomasHuckleandTobiasNeckel,BitsandBugs:
AScientificandHistoricalReviewofSoftwareFailuresinComputationalScienceThomasF.ColemanandWeiXu,AutomaticDifferentiationinMATLABUsingADMATwithApplicationsWalterGautschi,OrthogonalPolynomialsinMATLAB:
ExercisesandSolutionsDanielJ.Bates,JonathanD.Hauenstein,AndrewJ.Sommese,andCharlesW.Wampler,NumericallySolvingPolynomialSystemswithBertiniUweNaumann,TheArtofDifferentiatingComputerPrograms:
AnIntroductiontoAlgorithmicDifferentiationC.T.Kelley,ImplicitFilteringJeremyKepnerandJohnGilbert,editors,GraphAlgorithmsintheLanguageofLinearAlgebraJeremyKepner,ParallelMATLABforMulticoreandMultinodeComputersMichaelA.Heroux,PadmaRaghavan,andHorstD.Simon,editors,ParallelProcessingforScientificComputingGerardMeurant,TheLanczosandConjugateGradientAlgorithms:
FromTheorytoFinitePrecisionComputationsBoEinarsson,editor,AccuracyandReliabilityinScientificComputingMichaelW.BerryandMurrayBrowne,UnderstandingSearchEngines:
MathematicalModelingandTextRetrieval,SecondEditionCraigC.Douglas,GundolfHaase,andUlrichLanger,ATutorialonEllipticPOESolversandTheirParallelizationLouisKomzsik,TheLanczosMethod:
EvolutionandApplicationBardErmentrout,Simulating,Analyzing,andAnimatingDynamicalSystems:
AGuidetoXPPAUTforResearchersandStudentsV.A.Barker,L.S.Blackford,J.Dongarra,J.DuCroz,S.Hammarling,M.Marinova,J.Wasniewski,andP.Yalamov,LAPACK95UsersGuideStefanGoedeckerandAdolfyHoisie,PerformanceOptimizationofNumericallyIntensiveCodesZhaojunBai,JamesDemmel,JackDongarra,AxelRuhe,andHenkvanderVorst,TemplatesfortheSolutionofAlgebraicEigenvalueProblems:
APracticalGuideLloydN.Trefethen,SpectralMethodsinMATLABE.Anderson,Z.Bai,C.Bischof,S.Blackford,J.Demmel,J.Dongarra,J.DuCroz,A.Greenbaum,S.Hammarling,A.McKenney,andD.Sorensen,LAPACKUsersGuide,ThirdEditionMichaelW.BerryandMurrayBrowne,UnderstandingSearchEngines:
MathematicalModelingandTextRetrievalJackJ.Dongarra,lainS.Duff,DannyC.Sorensen,andHenkA.vanderVorst,NumericalLinearAlgebraforHigh-PerformanceComputersR.B.Lehoucq,D.C.Sorensen,andC.Yang,ARPACKUsersGuide:
SolutionofLarge-ScaleEigenvalueProblemswithImplicitlyRestartedArnoldiMethodsRandolphE.Bank,PLTMG:
ASoftwarePackageforSolvingEllipticPartialDifferentialEquations,UsersGuide8.0L.S.Blackford,J.Choi,A.Cleary,E.DAzevedo,J.Demmel,I.Dhillon,J.Dongarra,S.Hammarling,G.Henry,A.Petitet,K.Stanley,D.Walker,andR.C.Whaley,ScaLAPACKUsersGuideGregAstfalk,editor,ApplicationsonAdvancedArchitectureComputersRogerW.Hockney,TheScienceofComputerBenchmarkingFranc;:
oiseChaitin-ChatelinandValerieFraysse,LecturesonFinitePrecisionComputationsPETScforPartialDifferentialEquationsNumericalSolutionsinCandPythonEdBuelerUniversityofAlaskaFairbanksFairbanks,Alaska51aJ11.SocietyforIndustrialandAppliedMathematicsPhiladelphiaCopyright2021bytheSocietyforIndustrialandAppliedMathematics10987654321Allrightsreserved.PrintedintheUnitedStatesofAmerica.Nopartofthisbookmaybereproduced,stored,ortransmittedinanymannerwithoutthewrittenpermissionofthepublisher.Forinformation,writetotheSocietyforIndustrialandAppliedMathematics,3600MarketStreet,6thFloor,Philadelphia,PA19104-2688USA.Nowarranties,expressorimplied,aremadebythepublisher,authors,andtheiremployersthattheprogramscontainedinthisvolumearefreeoferror.Theyshouldnotbereliedonasthesolebasistosolveaproblemwhoseincorrectsolutioncouldresultininjurytopersonorproperty.Iftheprogramsareemployedinsuchamanner,itisattheusersownriskandthepublisher,authors,andtheiremployersdisclaimallliabilityforsuchmisuse.Trademarkednamesmaybeusedinthisbookwithouttheinclusionofatrademarksymbol.Thesenamesareusedinaneditorialcontextonly;noinfringementoftrademarkisintended.MATLABisaregisteredtrademarkofTheMathWorks,Inc.ForMATLABproductinformation,pleasecontactTheMathWorks,Inc.,3AppleHillDrive,Natick,MA01760-2098USA,508-647-7000,Fax:
508-647-7001,,.PythonisaregisteredtrademarkofPythonSoftwareFoundation.ParaViewisaregisteredtrademarkofKitwareInc.MPIisaregisteredtrademarkofArgonneNationalLaboratory.PETScisaregisteredcopyright1991-2014ofUChicagoArgonne,LLCandthePETScDevelopmentTeam.Gmshisaregisteredcopyright1997-2020ofC.GeuzaineandJ.-F.Remade.FiredrakeisaregisteredcopyrightofImperialCollegeLondon.PublicationsDirectorAcquisitionsEditorDevelopmentalEditorManagingEditorProductionEditorCopyEditorProductionManagerProductionCoordinatorCompositorGraphicDesignerKivmarsH.BowlingElizabethGreenspanMellisaPascaleKellyThomasLisaBriggemanMatthewBernardDonnaWitzlebenCallyA.ShraderCherylHufnagleDougSmockLibraryofCongressCataloging-in-PublicationDataNames:
Bueler,EdwardL.(EdwardLee),author.Title:
PETScforpartialdifferentialequations:
numericalsolutionsinCandPython/EdBueler,UniversityofAlaska,Fairbanks,Alaska.Description:
Philadelphia:
SocietyforIndustrialandAppliedMathematics,2020ISeries:
Software,environments,andtools;31IIncludesbibliographicalreferencesandindex.ISummary:
PETScforPartialDifferentialEquationsisthefirsttextbooktocoverPETScprogrammingfornonlinearPDEs-Providedbypublisher.Identifiers:
LCCN2020027102(print)ILCCN2020027103(ebook)IISBN9781611976304(paperback)IISBN9781611976311(ebook)Subjects:
LCSH:
Differentialequations,Partial-Computerprograms.INumericalanalysis.IParallelprogramming(Computerscience)IC(Computerprogramlanguage)IPython(Computerprogramlanguage)Classification:
LCCQA377.B842020(print)ILCCQA377(ebook)IDDC515/.353028553-dc23LCrecordavailableathttps:
j/lccn.loc.gov/2020027102LCebookrecordavailableathttps:
j/lccn.loc.gov/20200271035.laJ11.isaregisteredtrademark.ContentsPrefaceI123EssentialsGettingstartedwithPETScAcodethatdoesalmostnothing,butinparallelCompilingandrunningthefirstcodeEveryPETScprogram.Exploringtheexamplecodes.Exercises.Finite-dimensionallinearsystemsVectors,matrices,andnorms.Linearsystems,andsomefactsof(numerical)lifeResidualsanderrors.Richardsoniteration.AfirstlookatpreconditioningKrylovspacemethodsChebysheviterationPETScobjects.ParallellayoutofVeeandMatobjectsAssembleandviewaMat.Asmalllinearsystem.Revealingsolversatruntime.Atridiagonallinearsystem.SavingandloadinglinearsystemsfromfilesParallelpreconditioningExercises.PoissonequationonastructuredgridPoissonproblemonasquaredomain.Creatingstructuredgrids.Afinitedifferencemethod.Structured-gridmatrixassemblyAparticularproblemSolvingthePDE.Run-timevisualizationVix1334678991012121417212324252729313538384343444750525354vi456Convergenceinpracticeandtheory.Afirstlookatperformance.ScalingofpreconditionedCGiterationsKrylovisnotenough:
Betterpreconditioningisneeded!
Exercises.NonlinearequationsbyNewtonsmethodNewtonsmethod.InsidethefirstSNEScode.ConvergenceoftheNewtoniteration.User-suppliedJacobians.Anonlineardiffusion-reactionequationAnumericalmethodanditsconvergenceFinite-differencedJacobiansbycoloring.Jacobian-freeNewton-Krylov(JFNK)TestingJacobiancasesLine-searchmethodsExercises.Time-steppingSystemsofordinarydifferentialequations(ODEs)NumericalmethodsforODEinitialvalueproblemsHigher-orderandadaptivemethodsAfirstTSexample.ControllingTS.ImplicitmethodsandstiffnessAbsolutestability.JacobiansforimplicitmethodsAtime-dependentheatequationproblemMethodoflines.Visualizationandperformance.Coupledreaction-diffusionequationsGeneratingpatterns.Exercises.PreconditionersforPDEsPreconditionersinPETScClassicaliterations.SmoothersRestrictingtosubgridsSubgridcorrectionsandtheircompositionsAbetterPoissoncode.Single-leveldomaindecompositionCoarsegrids.Geometricmultigrid.Multigridcycletypesandcosts.Controllingmultigrid.Exercises.Contents555960636567676872747878838688909295959698100102103105109111112117120125127129130131135137141143147152156159160165ContentsInterlude:
QuadratureExercises.78II9OptimalsolversforellipticPDEsSolvercomplexity.AnoptimalsolverforthePoissonequation.Parallelmultigridandthecoarse-gridproblemTheminimalsurfaceequation.Gridsequencing.ASNESmonitorfortheminimalsurfaceequationThebiharmonicequationasacoupledsystemBlock-structuredpreconditioningExercises.ParallelscalingConsumableresourcesonclustersThestrearnsbenchmark.TheclassiclanguageofspeedupWeakandstaticscaling.Towardidealscaling.Caveats.Parallelmult