12-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 g12(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(6),parameter :: a = [ 0.12523340851146891547244136946385312998339691630&
&544427321292175474846205624138968874286829846949&
&135959410459879132051097315159969664463407959720&
&578930281363427149751877364610797786290401085851&
&749803458163536009061915338533985792224380950454&
&5097342064247739686883799517760948964137522919201_wp,&
0.36783149899818019375269153664371756125636014133&
&540962131179987950408992951678787387873442850054&
&657723463312639597714521513515217932743935324199&
&163774275382871320389664162274303718284470963188&
&934547884841822611461227526979609371629600504639&
&62319787423676668046033025242558536362617894366679_wp,&
0.58731795428661744729670241894053428036909851404&
&805248151027087966734069937589526243571076498874&
&820190960155999292889267723106959108867175142499&
&189843704151965799654931521792486834699342245746&
&542270556959107871794349154143635139191674285545&
&96877940491139756923177447689738849120865435563147_wp,&
0.76990267419430468703689383321281807598492575001&
&893163766441906424911654310847122401642499922342&
&191061761754045422185620704016285265354759491942&
&035158754711514435184626896570143367857869960707&
&068262822102488760216156789235759062543109515384&
&10899341797549230707021382467596975621464477134163_wp,&
0.90411725637047485667846586611909619253759670921&
&329754655407576068123479572923579048696942782373&
&326781186038289641042234889971981954299601063524&
&901258268291998347354448614206140899100247009682&
&576258221693446448698746167580757842398074380920&
&64065954540171679180850205196702894963912359448494_wp,&
0.98156063424671925069054909014928082296015519981&
&373151046268212180779324431825398222525726789045&
&223578555649237284127318524545703044707716708276&
&967488752886112565550184482662910041202137201539&
&996961235882788466302337187351583920530374414763&
&9383170419389543470920618543180673569225988370568_wp]
!> weights:
real(wp),dimension(6),parameter :: w = [ 0.24914704581340278500056243604295121083046090256&
&961883139535100311627942745728804303115680061804&
&235306483347611787718583305851107360364968803964&
&210377008542941502737221091728257019684301646591&
&924021619820796255207324340857766137885796625403&
&29347837170742904111565650371846972323325015720931_wp,&
0.23349253653835480876084989892487805625940997219&
&975487473052349782149200007941167528067902650856&
&369046673875643970886883389854278840891609661975&
&038847380753533248145179488750388812162792803042&
&489598308782293577290791644231030018795306547073&
&15375809270840669989018891281956753131165193423269_wp,&
0.20316742672306592174906445580979837650651814727&
&459014639859456579764563251047284379514439506460&
&523243116042933686325996496137135190210132907910&
&420189599423685656890245260738280276852445703846&
&681240064758134063899875305215261728059344541572&
&2327927963339557545261423500783899286052850767594_wp,&
0.16007832854334622633465252954335907187201173049&
&086417790989954415795422517329115068165655263705&
&773052707487709681280262724376386088264904467503&
&100243409511213679869020659979278560098046375913&
&998387244938872586336059061667742863824552984448&
&70458396283884610940466728874776625823124924247387_wp,&
0.10693932599531843096025471819399622421457017347&
&032488000512604210281899362749757654053731809631&
&645741357635933314114416117033051696355084484800&
&865232691960050114390447649204829355515358576079&
&107052492180710337954704248957128309309678064675&
&98358517298903536137451828089012822811396588037254_wp,&
0.04717533638651182719461596148501706031702907399&
&484708956050534700380972115203871067082590707541&
&453609661610167559673857966748040823913299673846&
&365109909808575797967885849598965975687054894525&
&799700269519193179311245399071070942125321236826&
&63180160342232703368882666374567833050364187887189_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) ) )
end function g12