PetIGA / src / petigaqdr.f90

! -*- f90 -*-

subroutine IGA_Rule_GaussLegendre(q,X,W) &
  bind(C, name="IGA_Rule_GaussLegendre")
  use PetIGA
  implicit none
  integer(kind=IGA_INTEGER_KIND), intent(in)  :: q
  real   (kind=IGA_REAL_KIND   ), intent(out) :: X(0:q-1)
  real   (kind=IGA_REAL_KIND   ), intent(out) :: W(0:q-1)
  integer, parameter :: rk = IGA_REAL_KIND
  select case (q)
  case (1) ! p <= 1
     X(0) = 0.0_rk
     W(0) = 2.0_rk
  case (2) ! p <= 3
     X(0) = -0.577350269189625764509148780501957455_rk ! 1/sqrt(3)
     X(1) = -X(0)
     W(0) =  1.0_rk                                    ! 1
     W(1) =  W(0)
  case (3) ! p <= 5
     X(0) = -0.774596669241483377035853079956479922_rk ! sqrt(3/5)
     X(1) =  0.0_rk                                    ! 0
     X(2) = -X(0)
     W(0) =  0.555555555555555555555555555555555556_rk ! 5/9
     W(1) =  0.888888888888888888888888888888888889_rk ! 8/9
     W(2) =  W(0)
  case (4) ! p <= 7
     X(0) = -0.861136311594052575223946488892809506_rk ! sqrt((3+2*sqrt(6/5))/7)
     X(1) = -0.339981043584856264802665759103244686_rk ! sqrt((3-2*sqrt(6/5))/7)
     X(2) = -X(1)
     X(3) = -X(0)
     W(0) =  0.347854845137453857373063949221999408_rk ! (18-sqrt(30))/36
     W(1) =  0.652145154862546142626936050778000592_rk ! (18+sqrt(30))/36
     W(2) =  W(1)
     W(3) =  W(0)
  case (5) ! p <= 9
     X(0) = -0.906179845938663992797626878299392962_rk ! 1/3*sqrt(5+2*sqrt(10/7))
     X(1) = -0.538469310105683091036314420700208806_rk ! 1/3*sqrt(5-2*sqrt(10/7))
     X(2) =  0.0_rk                                    ! 0
     X(3) = -X(1)
     X(4) = -X(0)
     W(0) =  0.236926885056189087514264040719917362_rk ! (322-13*sqrt(70))/900
     W(1) =  0.478628670499366468041291514835638193_rk ! (322+13*sqrt(70))/900
     W(2) =  0.568888888888888888888888888888888889_rk ! 128/225
     W(3) =  W(1)
     W(4) =  W(0)
  case (6) ! p <= 11
     X(0) = -0.9324695142031520278123015544939946_rk ! << NumericalDifferentialEquationAnalysis`
     X(1) = -0.6612093864662645136613995950199053_rk ! GaussianQuadratureWeights(6, -1, 1, 37)
     X(2) = -0.2386191860831969086305017216807119_rk
     X(3) = -X(2)
     X(4) = -X(1)
     X(5) = -X(0)
     W(0) =  0.171324492379170345040296142172732894_rk
     W(1) =  0.360761573048138607569833513837716112_rk
     W(2) =  0.467913934572691047389870343989550995_rk
     W(3) =  W(2)
     W(4) =  W(1)
     W(5) =  W(0)
  case (7) ! p <= 13
     X(0) = -0.9491079123427585245261896840478513_rk ! << NumericalDifferentialEquationAnalysis`
     X(1) = -0.7415311855993944398638647732807884_rk ! GaussianQuadratureWeights(7, -1, 1, 37)
     X(2) = -0.4058451513773971669066064120769615_rk
     X(3) =  0.0_rk
     X(4) = -X(2)
     X(5) = -X(1)
     X(6) = -X(0)
     W(0) =  0.129484966168869693270611432679082018_rk
     W(1) =  0.279705391489276667901467771423779582_rk
     W(2) =  0.381830050505118944950369775488975134_rk
     W(3) =  0.417959183673469387755102040816326531_rk
     W(4) =  W(2)
     W(5) =  W(1)
     W(6) =  W(0)
  case (8) ! p <= 15
     X(0) = -0.9602898564975362316835608685694730_rk ! << NumericalDifferentialEquationAnalysis`
     X(1) = -0.7966664774136267395915539364758304_rk ! GaussianQuadratureWeights(8, -1, 1, 37)
     X(2) = -0.5255324099163289858177390491892463_rk
     X(3) = -0.1834346424956498049394761423601840_rk
     X(4) = -X(3)
     X(5) = -X(2)
     X(6) = -X(1)
     X(7) = -X(0)
     W(0) =  0.101228536290376259152531354309962190_rk
     W(1) =  0.222381034453374470544355994426240884_rk
     W(2) =  0.313706645877887287337962201986601313_rk
     W(3) =  0.362683783378361982965150449277195612_rk
     W(4) =  W(3)
     W(5) =  W(2)
     W(6) =  W(1)
     W(7) =  W(0)
  case (9) ! p <= 17
     X(0) = -0.9681602395076260898355762029036729_rk ! << NumericalDifferentialEquationAnalysis`
     X(1) = -0.8360311073266357942994297880697349_rk ! GaussianQuadratureWeights(9, -1, 1, 37)
     X(2) = -0.6133714327005903973087020393414742_rk
     X(3) = -0.3242534234038089290385380146433366_rk
     X(4) =  0.0_rk
     X(5) = -X(3)
     X(6) = -X(2)
     X(7) = -X(1)
     X(8) = -X(0)
     W(0) =  0.081274388361574411971892158110523651_rk
     W(1) =  0.180648160694857404058472031242912810_rk
     W(2) =  0.260610696402935462318742869418632850_rk
     W(3) =  0.312347077040002840068630406584443666_rk
     W(4) =  0.330239355001259763164525069286974049_rk
     W(5) =  W(3)
     W(6) =  W(2)
     W(7) =  W(1)
     W(8) =  W(0)
  case default
     X = 0.0_rk
     W = 0.0_rk
  end select
end subroutine IGA_Rule_GaussLegendre

subroutine IGA_Rule_GaussLobatto(q,X,W) &
  bind(C, name="IGA_Rule_GaussLobatto")
  use PetIGA
  implicit none
  integer(kind=IGA_INTEGER_KIND), intent(in)  :: q
  real   (kind=IGA_REAL_KIND   ), intent(out) :: X(0:q-1)
  real   (kind=IGA_REAL_KIND   ), intent(out) :: W(0:q-1)
  integer, parameter :: rk = IGA_REAL_KIND
  select case (q)
  case (2) ! p <= 1
     X(0) = -1.0_rk
     X(1) = -X(0)
     W(0) =  1.0_rk
     W(1) =  W(0)
  case (3) ! p <= 3
     X(0) = -1.0_rk                                    ! -1
     X(1) =  0.0_rk                                    ! 0
     X(2) = -X(0)
     W(0) =  0.333333333333333333333333333333333333_rk ! 1/3
     W(1) =  1.333333333333333333333333333333333333_rk ! 4/3
     W(2) =  W(0)
  case (4) ! p <= 5
     X(0) = -1.0_rk                                    ! -1
     X(1) = -0.447213595499957939281834733746255246_rk ! 1/sqrt(5)
     X(2) = -X(1)
     X(3) = -X(0)
     W(0) =  0.166666666666666666666666666666666667_rk ! 1/6
     W(1) =  0.833333333333333333333333333333333343_rk ! 5/6
     W(2) =  W(1)
     W(3) =  W(0)
  case (5) ! p <= 7
     X(0) = -1.0_rk                                    ! -1
     X(1) = -0.654653670707977143798292456246858356_rk ! sqrt(3/7)
     X(2) =  0.0_rk                                    ! 0
     X(3) = -X(1)
     X(4) = -X(0)
     W(0) =  0.1_rk                                    !  1/10
     W(1) =  0.544444444444444444444444444444444444_rk ! 49/90
     W(2) =  0.711111111111111111111111111111111111_rk ! 32/45
     W(3) =  W(1)
     W(4) =  W(0)
  case default
     X = 0.0_rk
     W = 0.0_rk
  end select
end subroutine IGA_Rule_GaussLobatto
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.