g14 Function

private function g14(me, x, h) result(f)

14-point method.

See also

  • Coefficients from: http://processingjs.nihongoresources.com/bezierinfo/legendre-gauss-values.php

Arguments

TypeIntentOptionalAttributesName
class(integration_class_1d), intent(inout) :: me
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: h

Return Value real(kind=wp)


Contents

Source Code

g14

Source Code

    function g14(me, x, h) result(f)

    implicit none

    class(integration_class_1d),intent(inout)  :: me
    real(wp), intent(in) :: x
    real(wp), intent(in) :: h
    real(wp)             :: f

    !> abscissae:
    real(wp),dimension(7),parameter ::  a = [  0.10805494870734366206624465021983474761195160547&
                                               &4237557040821061308013529011730007130100688176689&
                                               &3672374502026424466474638099232632258191427567218&
                                               &1973150409752806137273842265069487944308775321508&
                                               &8445556391329819060204836416480024319739665907101&
                                               &2506161702814425014635643221773541001328892761_wp,&
                                               &0.31911236892788976043567182416847546683426120353&
                                               &3843956596650187257333440512792783164933705421346&
                                               &4131802793151826090394496145640578710017716508863&
                                               &2222396245608012120993128542172348808287716458637&
                                               &8479374239121304478425121768114783511643536777896&
                                               &2949997448460558214759676525644841351801594858_wp,&
                                               &0.51524863635815409196529071855118866230888528256&
                                               &9306036951504769092784951832055660452072020350772&
                                               &8923922907932905090138695274035571340047593918260&
                                               &5653057211011637652073200342580823038532041784020&
                                               &3436173906624491224801618641571038235567674745455&
                                               &3979637438627635490786064892912451481973721288_wp,&
                                               &0.68729290481168547014801980301933413753840121274&
                                               &7170675619266488628184896183133256947373070505211&
                                               &8384106603630216790054729627432715418501010682124&
                                               &6881727389082952662885443589912839338608106959371&
                                               &4595904926885388784713769175169784875289055161406&
                                               &7877996475717650653147982694804026342351254071_wp,&
                                               &0.82720131506976499318979474265039496103970110147&
                                               &5081181560709054241479830810028873570426390137889&
                                               &5453991241406273986535333275661226737816179582645&
                                               &1069907936808669317564778014567859855078251147291&
                                               &5830426696849656086721489336979443959282673643228&
                                               &6425172143208924251106624044295037127737490111_wp,&
                                               &0.92843488366357351733639113937787426447703921040&
                                               &9837618717962447482131093544359853111413905683657&
                                               &5176363551261559882603607008578010786539258018984&
                                               &5400440650494157888098179531161147719130825235345&
                                               &8596605653673043686690855550898698329741248613224&
                                               &5749388483890945436457404705549484348178721002_wp,&
                                               &0.98628380869681233884159726670405280167609140723&
                                               &9225881644070811777749554132491637910646239665151&
                                               &7527602612562941358578689852603067447974494119727&
                                               &0324710898207170072955675048180261687970555989447&
                                               &5396929426197069500447181272675429908986256542893&
                                               &3676463914802477677291745002965827767360741735_wp ]

    !> weights:
    real(wp),dimension(7),parameter ::  w = [   0.21526385346315779019587644331626003527499755805&
                                               &4128800219776392543618787353994604001024441410819&
                                               &5782372566723324367709929481659764649301890356019&
                                               &0805098142804175780269156508228762641736544919294&
                                               &6281203662033345376460522564310634412912654698349&
                                               &487266562730897512393716549425155133887783267_wp,&
                                               &0.20519846372129560396592406566121805571033906130&
                                               &9419451716897290283367144825249720339431839991890&
                                               &8957243692694424494287284534856133850644865918702&
                                               &3021403166714178733299347482783913811132568481282&
                                               &5439676020905052976535424973123755325146919285189&
                                               &8072394707049964721031773292256965337005468577_wp,&
                                               &0.18553839747793781374171659012515703624892260293&
                                               &7331659020034925069098350263525444425552731146712&
                                               &2229825611215057289188990778964974252160895085525&
                                               &2415283643607286404060027232379697141385075345609&
                                               &3331227890449938852384485366393922617921879824760&
                                               &6150274514935557012909889503067356410067833406_wp,&
                                               &0.15720316715819353456960193862384215660566803733&
                                               &7323374969317043874768176369608298513958093362418&
                                               &0762768531519990811885018854374920646576267489242&
                                               &9103726460198700102219564745910784232280561068611&
                                               &6907713218466935160138377442838502265889923868443&
                                               &9084685022864905124096570215866733146092008329_wp,&
                                               &0.12151857068790318468941480907247662595666934569&
                                               &0074672291075392543159743892526492318819906270375&
                                               &0071489155506530592569942811574313408868548096421&
                                               &2571445460802891854106154207862005646754562932960&
                                               &2540610239636717985405900755004972904989241013019&
                                               &1072357341821083329663867464821867539341968434_wp,&
                                               &0.08015808715976020980563327706285430958369778539&
                                               &4594765201399065489571474457287169863536190819137&
                                               &7559686225015908038847487953091382572604434376755&
                                               &1198447409477973877237005366105771785226539545491&
                                               &2313554662497115946457665357652160093748935412771&
                                               &0937535198838649279475628473516378736712929573_wp,&
                                               &0.03511946033175186303183287613819178061970560927&
                                               &7127276581499890196416322837808270537676796998646&
                                               &4636614217324764405511345585478510619843098677334&
                                               &0884595716394793248808744456729064741484147706750&
                                               &3186014306010893702617623540676052379390445897465&
                                               &9810087587180865408885105556219147609526200925_wp ]

    f = h * ( w(1)*(  me%fun(x-a(1)*h)   +  me%fun(x+a(1)*h) ) + &
              w(2)*(  me%fun(x-a(2)*h)   +  me%fun(x+a(2)*h) ) + &
              w(3)*(  me%fun(x-a(3)*h)   +  me%fun(x+a(3)*h) ) + &
              w(4)*(  me%fun(x-a(4)*h)   +  me%fun(x+a(4)*h) ) + &
              w(5)*(  me%fun(x-a(5)*h)   +  me%fun(x+a(5)*h) ) + &
              w(6)*(  me%fun(x-a(6)*h)   +  me%fun(x+a(6)*h) ) + &
              w(7)*(  me%fun(x-a(7)*h)   +  me%fun(x+a(7)*h) ) )

    end function g14