g10 Function

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

10-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

g10

Source Code

    function g10(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(5),parameter ::  a = [   0.14887433898163121088482600112971998461756485942&
                                                &069169570798925351590361735566852137117762979946&
                                                &369123003116080525533882610289018186437654023167&
                                                &619699680909130507378277203710590709424758594227&
                                                &432498371771742473462169148529029429290031934666&
                                                &590824338380943550759968335702300050038372806343&
                                                &51_wp,&
                                                0.43339539412924719079926594316578416220007183765&
                                                &624649650270151314376698907770350122510275795011&
                                                &772122368293504099893794727422475772324920512677&
                                                &410328220862009523192709334620320113283203876915&
                                                &840634111498011298231414887874432043247664144215&
                                                &76788807708483879452488118549797039287926964254222_wp,&
                                                0.67940956829902440623432736511487357576929471183&
                                                &480946766481718895255857539507492461507857357048&
                                                &037949983390204739931506083674084257663009076827&
                                                &417182029235431978528469774097183691437120135529&
                                                &628377331531086791269325449548547293413247272116&
                                                &80274268486617121011712030227181051010718804444161_wp,&
                                                0.86506336668898451073209668842349304852754301496&
                                                &533045252195973184537475513805556135679072894604&
                                                &577069440463108641176516867830016149345356373927&
                                                &293968909500115713496898930516120724357604809009&
                                                &797259233179237955357392905958797769568324277022&
                                                &36942765911483643714816923781701572597289139322313_wp,&
                                                0.97390652851717172007796401208445205342826994669&
                                                &238211923121206669659520323463615962572356495626&
                                                &855625823304251877421121502216860143447777992054&
                                                &095872599424367044136957648812587991466331435107&
                                                &587371198778752105670674524353687136830338609093&
                                                &88311646653581707125686970668737259229449284383797_wp ]

    !> weights:
    real(wp),dimension(5),parameter ::  w = [   0.29552422471475287017389299465133832942104671702&
                                                &685360135430802975599593821715232927035659579375&
                                                &421672271716440125255838681849078955200582600193&
                                                &634249418696660956271864888416804323130506153586&
                                                &740908305127066386528748390174687472659751595445&
                                                &0775158914556548308329986393605934912382356670244_wp,&
                                                0.26926671930999635509122692156946935285975993846&
                                                &088379580056327624215343231917927676422663670925&
                                                &276075559581145036869830869292346938114524155646&
                                                &588466344237116560144322599601417290445280303444&
                                                &112979029770671425375348062846083992765750069116&
                                                &86749842814086288868533208042150419508881916391898_wp,&
                                                0.21908636251598204399553493422816319245877187052&
                                                &267708988095654363519991065295128124268399317720&
                                                &219278659121687281288763476662690806694756883092&
                                                &118433166566771052699153220775367726528266710278&
                                                &782468510102088321733200642734832547562506684158&
                                                &85349420711613410227291565477768928313300688702802_wp,&
                                                0.14945134915058059314577633965769733240255663966&
                                                &942736783547726875323865472663001094594726463473&
                                                &195191400575256104543633823445170674549760147137&
                                                &160119371095287981348288651187709535664396393337&
                                                &739399092016902046490838156187791575225783003434&
                                                &27785361756927642128792412282970150172590842897331_wp,&
                                                0.06667134430868813759356880989333179285786483432&
                                                &015814512869488161341206408408710177678550968505&
                                                &887782109005471452041933148750712625440376213930&
                                                &498731699404163449536370640018701124231550439352&
                                                &624245062983271819871864748056604411786208647844&
                                                &9236378557180717569208295026105115288152794421677_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) )   )

    end function g10