6-point method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integration_class_1d), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | x | |||
real(kind=wp), | intent(in) | :: | h |
function g6(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(3),parameter :: a = [ 0.6612093864662645136613995950199053470064485643&
&951700708145267058521834966071431009442864037464&
&614564298883716392751466795573467722253804381723&
&198010093367423918538864300079016299442625145884&
&9024557188219703863032236201173523213570221879361&
&8906974301231555871064213101639896769013566165126&
&1150514997832_wp,&
&0.2386191860831969086305017216807119354186106301&
&400213501813951645742749342756398422492244272573&
&491316090722230970106872029554530350772051352628&
&872175189982985139866216812636229030578298770859&
&440976999298617585739469216136216592222334626416&
&400139367778945327871453246721518889993399000945&
&408150514997832_wp,&
&0.9324695142031520278123015544939946091347657377&
&122898248725496165266135008442001962762887399219&
&259850478636797265728341065879713795116384041921&
&786180750210169211578452038930846310372961174632&
&524612619760497437974074226320896716211721783852&
&305051047442772222093863676553669179038880252326&
&771150514997832_wp ]
!> weights:
real(wp),dimension(3),parameter :: w = [ 0.36076157304813860756983351383771611166152189274&
&674548228973924023714003783726171832096220198881&
&934794311720914037079858987989027836432107077678&
&721140858189221145027225257577711260007323688285&
&916316028951118005174081368554707448247248610118&
&325993144981721640242558677752676819993095031068&
&73150514997832_wp,&
0.46791393457269104738987034398955099481165560576&
&921053531162531996391420162039812703111009258479&
&198230476626878975479710092836255417350295459356&
&355927338665933648259263825590180302812735635025&
&362417046193182590009975698709590053347408007463&
&437682443180817320636917410341626176534629278889&
&17150514997832_wp,&
0.17132449237917034504029614217273289352682250148&
&404398239863543979894576054234015464792770542638&
&866975211652206987440430919174716746217597462964&
&922931803144845206713510916832108437179940676688&
&721266924855699404815942932735702498405343382418&
&236324411837461039120523911904421970357029774978&
&12150514997832_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) ) )
end function g6