Problem Solving Environments and the Solution of P

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ProblemSolvingEnvironmentsandtheSolutionofPartialDierentialEquationsVersion#1RobertL.AkersElaineKantCurtisJ.RandallStanlySteinbergRobertL.YoungSciCompInc.5806MesaDrive,Suite250Austin,TX78731Phone:512-451-1050,FAX:512-451-1622email:info@scicomp.com://scicomp/July10,1997Keywords:knowledge-basedproblemsolvingenvironment,highlevelspecication,pro-gramsynthesis,codegeneration,programtransformation,codesynthesisAbstractSciNapsecisaproblemsolvingenvironmentthattransformshigh-leveldescriptionsofinitialboundaryvalueproblemsforsystemsofpartialdierentialequationstoe-cient,documentedandexecutablecode,typicallyCorFortran.Modelerscanconciselyspecifyproblemsatalevelthatmirrorsthemathematicaldescriptionoftheproblem.Also,modelerscanoptionallyspecifyfeaturesofthesolutionalgorithmandcanspecifytheoutputdesiredfromthecodeandformatsthatwillallowtheresultingcodestobeembeddedsmoothlyinotherenvironments.ThispaperprovidesanoverviewofSciNapseandthengivesmoredetaileddiscus-sionsofthespecicationlanguageanditsrenementintocode,includingreportingandhelpsystems,customizationoftheenvironment,andtheuseoftemplatesforrepresentingalgorithms.Also,DepartmentofMathematicsandStatisticsUniversityofNewMexicoAlbuquerqueNM87131-1141USA1ProblemSolvingEnvironmentsandtheSolutionofPDEs,Version1,July10,199711IntroductionManypeoplehaveenvisionedaproblemsolvingenvironment(PSE)fornumericallysolvingsystemsofpartialdierentialequations(PDEs),ascanbeseenin[1]andtheintroductiontothisspecialissue.Thereasonforthisinterestisthatmanyengineering,science,andtechnicalproblemshaveattheirheartPDEproblemssuitableforattackinaPSE.WehaveworkedonsuchPSEsfornearlytenyears,usingapplicationsrangingfromwavepropagation([2,3])andcomputationaluiddynamicstonancialmodeling([4]).Inparticular,ourcurrentPSE,SciNapsechasgeneratedcodesthatsolve:theunsteadyMaxwell’sequationsin3Ddispersive,anisotropicmedia;theBlack-Scholesequationforvaluationofmultipleassetderivativesecurities,in-cludingtheeectsofstochasticassetpricevolatilityandinterestrates,anddiscretesamplingofspotprices;non-linear,multi-dimensional,multi-species,reactiondiusionequationsforchemicalandnuclearapplications;andtimedomainsolutionofvisco-elastodynamicequationsin3D,anisotropicmedia.SciNapsecurrentlycangeneratecodesthatsolveawiderangeofinitialboundaryvalueproblems(IBVPs)forsystemsofPDEsinaregionthatcanbemappedtoarectangleinanynumberofdimensions(althoughcodesusinghigherdimensionsmayrequireexcessivecomputationalpowertoexecute).Thecodesgeneratedfortheseapplicationsincludefeaturessuchasgeneralcoordinatetransformationsandgridgenerators,variouslinearsolversandpreconditioners,higher-orderdierencingtechniques,automaticinterpolationofequationparametersfrommulti-dimensionaltabularinputdata,jumpconditionsinbothspaceandtimedimensions,freeboundaries,andimpositionofsolutionconstraintssuchaspositivity.Problemspecicationstypicallyrangefromseverallinestoahalfpage,andthespecica-tionisusuallyaboutafactorof25timeslessthanthesynthesizedcode.Onastate-of-the-artpersonalcomputer,codeisgeneratedattherateofabout50linesperminute.Intheremainderofthispaper,wedescribeourPSEtechnology,focusingonsomecrucialissuesforitspracticalapplication:thespecicationlanguage,renementofspecicationtocode,reportingandhelpsystems,customizationoftheenvironment,andtheuseoftemplatesforrepresentingalgorithms.1.1AnOverviewofSciNapseAcriticalfeatureofanyPSEfornumericallysolvingIBVPsishavinganeasily-understoodhigh-levelspecicationlanguagethatsupportsnaturaldescriptionsofthegeometryandmathematicsoftheproblem.TheSciNapsespecicationlanguage,describedinSection2,allowsproblemsandsolutionstrategiestobestatedconciselyandabstractly,muchasoneProblemSolvingEnvironmentsandtheSolutionofPDEs,Version1,July10,19972mightdescribetheproblemtoacolleague.Thelanguageisexibleenoughtoalloweasymodicationofexistingspecications,thespecicationofinputandoutputformats,andtheoptionalspecicationofsolutionalgorithmsandinterfacestonumericallibraries.Becausethespecicationsareatsuchahighlevel,thesynthesissystemmustbridgethegapfromcoordinate-freemathematicstotargetlanguagecode.Itconvertsequationsintodiscretized,scalarcomponents,andweavesthemintoalgorithmtemplatesthatcanbespeciedbyname.Thesystemchoosesappropriatedatastructuresandgeneratesapseudo-codesolutionthatisthentranslatedintothedesiredtargetlanguage.Alongtheway,itoptimizesthemathematicalproblem,theabstractalgorithmsanddatastructures,andtheresultingcode.TheuserinterfaceinSciNapseconsistsoftheproblemspecicationlanguageasdescribedabove,levelsummaries(Section3.1)thattracktheprogressofthecodegenerationprocess,aninformationsystemorhelpsystemthatcontainsahyper-linkedglossaryandspeci-cationlanguagedescriptions(Section4.7),andagraphicsdisplaysystembuiltontopofMathematicac([5])graphicspackages.SciNapseisconstructedontopofageneral-purposeknowledge-basedsystem(Section4)thatincludesobjects,rules,andtheuseofcomputeralgebra.Muchofthealgorithmicinformationisstoredastransformationrulesorinextensiblelibrariesintheformoftemplates(S

1 / 23
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功