----------------------------------------------------------------------- -- package pc_2_coeff_22, coefficients for a Predictor-Corrector integrator -- Copyright (C) 2008-2009 Jonathan S. Parker. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- You should have received a copy of the GNU General Public License -- along with this program. If not, see http://www.gnu.org/licenses/ -- -- As a special exception, if other files instantiate generics from -- this unit, or you link this unit with other files to produce an -- executable, this unit does not by itself cause the resulting -- executable to be covered by the GNU General Public License. This -- exception does not however invalidate any other reasons why the -- executable file might be covered by the GNU Public License. ----------------------------------------------------------------------- -- package pc_2_coeff_22 generic type Real is digits <>; package pc_2_coeff_22 is subtype PC_Rule_Range is Integer range 0..31; type Integration_Rule is array(PC_Rule_Range) of Real; Starting_Id_of_First_Deriv_of_Y : constant PC_Rule_Range := 15; -- Center_Integration Rule, applied to (d/dt)**2 Y, takes a dY/dt here, and -- Integrates it one indice forward. Extrap_Factor: constant Real := 1.0 / 24.0; -- val unknown Corrector_33_22 : constant Integration_Rule := ( -8.02130559997354078604776522542254439E-4, 1.24416532870088974691741276214884268E-2, -8.64795984660665687642672166948211787E-2, 3.50230302101274679029708692614152597E-1, -8.91121460953578667337715179019697046E-1, 1.39383153917014648240732079853746142E+0, -1.07121283818712541646971756034689810E+0, -2.97295767060760759428837790575625762E-1, 1.28052482910646884772471445763110385E+0, -3.48796383077358912539756432632846449E-1, -1.18323146225282708847281583111056865E+0, 6.13830360683718379636023405051540400E-1, 1.15669753037498753526808006354467904E+0, -6.94338273293159923319315200784758205E-1, -1.25077139904584256785139807653322816E+0, 7.20794822429374825729635224538098316E-1, 1.77492750390194010614093059728166958E+0, 3.48406301508706280013183366668745917E-1, -3.24702653757985544407247498269540941E-1, 1.55113657266486316345543277158075854E+0, 2.51118592351726418774359026068146849E+0, 3.82957536377735794971423254482703827E-1, -6.54923221588828602513601179436160298E-1, 1.98098310154670126300578248795171698E+0, 2.62677613787930934327036702584321002E+0, -8.86789566789142290186373972323935862E-1, 2.85598769943888482178532669984860663E-1, 4.02778278621156389145728011748586155E+0, -2.15859907174040020406160913348832844E+0, 2.94403131132369272781778743704178050E+0, 2.00939488060088412087622634816136813E-1, 1.13310419806709432866152258587289993E+0 ); Final_Step_Corrector_33_22 : constant Real := 5.28831586172462713631478685086144395E-2; Predictor_31_22 : constant Integration_Rule := ( 0.0, 3.82206142445544963446204148715951607E-2, -6.33908224331091016776700383111987143E-1, 4.77108082172046540302262546600367877E+0, -2.13112230306056104385071748550271682E+1, 6.16394218004587635365556288368891905E+1, -1.16455265845403402132194278236324202E+2, 1.31160078589256480618203936959714671E+2, -4.73620760128097778046470502754138483E+1, -8.61155833650963992491864075194045219E+1, 1.09596202456069853887869187577271935E+2, 2.70006891539818698623550090779730573E+1, -1.23689026778934313461788121734000576E+2, 1.26308792943455875969362146348904466E+1, 1.25351440983592524456909109664479950E+2, -3.90915067214200967699893349056174838E+1, -1.25005696132419709068005825586513917E+2, 6.31400058836348955981727456733231437E+1, 1.25202212204700030730203205988430657E+2, -9.01202664128768808476121572162738365E+1, -1.13346070602251991153852098206722707E+2, 1.35832428576795315596340908178178692E+2, 7.65648954748416679820099605596069319E+1, -1.90778807698391251633999872762198544E+2, 4.29249448929317005301844046601429694E+1, 1.90302308174625292773031958813598645E+2, -2.76219723414219806259983408912758259E+2, 2.10878867270091505775711508404456506E+2, -1.02199587368891636464946651890028622E+2, 3.55597890257171711903655577067406769E+1, -6.79799476949725817083394168801447862E+0, 2.03327116014154443810644155483740520E+0 ); Center_Integration_32_22 : constant Integration_Rule := ( -5.48186298516234652810704051430422655E-6, 9.83867415088779031208187158666710319E-5, -8.07566491514156651234056438130100106E-4, 3.97340757417976466081704231342063697E-3, -1.28356892096129410337836800376618841E-2, 2.76864991077874453604989378001785406E-2, -3.73245825355348862199480292460505598E-2, 2.12653218023217359291463822190892211E-2, 2.13745306335366393296921989209611924E-2, -4.56656788294881115637614729100805322E-2, 3.89437307673685355200946981995831816E-3, 6.22684247056539251232690828593738376E-2, -3.61385003611128933128201417801336908E-2, -9.55657510587708441101932722470146491E-2, 1.33596784912141525960540060966517392E-1, 4.54185521795152227419174766084219910E-1, 4.54185521795152227419174766084219910E-1, 1.33596784912141525960540060966517392E-1, -9.55657510587708441101932722470146491E-2, -3.61385003611128933128201417801336908E-2, 6.22684247056539251232690828593738376E-2, 3.89437307673685355200946981995831816E-3, -4.56656788294881115637614729100805322E-2, 2.13745306335366393296921989209611924E-2, 2.12653218023217359291463822190892211E-2, -3.73245825355348862199480292460505598E-2, 2.76864991077874453604989378001785406E-2, -1.28356892096129410337836800376618841E-2, 3.97340757417976466081704231342063697E-3, -8.07566491514156651234056438130100106E-4, 9.83867415088779031208187158666710319E-5, -5.48186298516234652810704051430422655E-6 ); Center_to_End_Integration_32_22 : constant Integration_Rule := ( -2.46055400745919258120729405349163691E-3, 3.94937734266237896046990985820173913E-2, -2.85924604814419907317339235057302237E-1, 1.21775236041835015679281022068507655E+0, -3.31119345468907190517628700742888269E+0, 5.72250882622795112186390828443613906E+0, -5.45219585821552065525673442095904352E+0, 4.67487319274695445937703915277492695E-1, 5.04181007527642399830645261263436520E+0, -3.55919391785093453217583112024140353E+0, -3.53127580678341307884535450947182606E+0, 4.78039107137706694005293349536141932E+0, 2.58127452529930794024644881912956886E+0, -5.38383054354341648182107088309022155E+0, -2.14665605885624873975943985055075865E+0, 6.20637871667093544879506276387734096E+0, 3.05624946842682355808916099018747109E+0, -5.09128384721184624337245342432563704E+0, -9.81525574395439526528573186007045599E-1, 7.83552753870215262539576158282298399E+0, 2.35174419853373730752706320570413064E+0, -6.89285619244306859389417799474804191E+0, 1.68408438510945988767883644031839272E+0, 9.80602637995232916495184306214695197E+0, -4.76910099297560210294927249411766282E+0, -5.10257080894008187297314868283199883E+0, 1.47380098655089154766482408672545751E+1, -1.15093206885050787659302691253911179E+1, 8.20228332093864178792515819652974703E+0, -1.94051634824961325307374327575866262E+0, 1.97652535686240736364681749381366289E+0, 2.52358069475392838192001455271761107E-1 ); Center_to_End_Integration : Integration_Rule renames Center_to_End_Integration_32_22; Predictor_Rule : Integration_Rule renames Predictor_31_22; Corrector_Rule : Integration_Rule renames Corrector_33_22; Center_Integration : Integration_Rule renames Center_Integration_32_22; Final_Step_Corrector : Real renames Final_Step_Corrector_33_22; end pc_2_coeff_22;