Commits

Lisandro Dalcin committed 657dbcd

Fortran: fix all implicit integer->real conversions

Comments (0)

Files changed (6)

src/petigabsp.f90

   forall (m=0:p) X(m) = U(kk) + m * (U(kk+1) - U(kk)) / p
 
   do m = 0, p
-     Lp = 1
+     Lp = 1.0
      do i = 0, p
         if (i == m) cycle
         Lp = Lp * (uu-X(i))/(X(m)-X(i))
 
   if (d < 1) return
   do m = 0, p
-     Ls1 = 0
+     Ls1 = 0.0
      do j = 0, p
         if (j == m) cycle
-        Lp = 1
+        Lp = 1.0
         do i = 0, p
            if (i == m .or. i == j) cycle
            Lp = Lp * (uu-X(i))/(X(m)-X(i))
 
   if (d < 2) return
   do m = 0, p
-     Ls2 = 0
+     Ls2 = 0.0
      do k = 0, p
         if (k == m) cycle
-        Ls1 = 0
+        Ls1 = 0.0
         do j = 0, p
            if (j == m .or. j == k) cycle
-           Lp = 1
+           Lp = 1.0
            do i = 0, p
               if (i == m .or. i == k .or. i == j) cycle
               Lp = Lp * (uu-X(i))/(X(m)-X(i))
 
   if (d < 3) return
   do m = 0, p
-     Ls3 = 0
+     Ls3 = 0.0
      do l = 0, p
         if (l == m) cycle
-        Ls2 = 0
+        Ls2 = 0.0
         do k = 0, p
            if (k == m .or. k == l) cycle
-           Ls1 = 0
+           Ls1 = 0.0
            do j = 0, p
               if (j == m .or. j == l .or. j == k) cycle
-              Lp = 1
+              Lp = 1.0
               do i = 0, p
                  if (i == m .or. i == l .or. i == k .or. i == j) cycle
                  Lp = Lp * (uu-X(i))/(X(m)-X(i))

src/petigaftn.F90

       scalar (kind=IGA_SCALAR_KIND)  :: V
       ! V = dot_product(N,U)
       integer a
-      V = 0
+      V = 0.0
       do a = 1, size(U,1) ! nen
          V = V + N(a) * U(a)
       end do
       scalar (kind=IGA_SCALAR_KIND)  :: V(DOF)            ! dof
       ! V = matmul(N,transpose(U))
       integer a
-      V = 0
+      V = 0.0
       do a = 1, size(U,2) ! nen
          V = V + N(a) * U(:,a)
       end do
       scalar (kind=IGA_SCALAR_KIND)  :: V(DIM)            ! dim
       !V = matmul(N,U)
       integer a
-      V = 0
+      V = 0.0
       do a = 1, size(U,1) ! nen
          V(:) = V(:) + N(:,a) * U(a)
       end do
       scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DOF)        ! dim,dof
       ! V = matmul(N,transpose(U))
       integer a, c
-      V = 0
+      V = 0.0
       do a = 1, size(U,2) ! nen
          do c = 1, size(U,1) ! dof
             V(:,c) = V(:,c) + N(:,a) * U(c,a)
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)     ! nen
       scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM)          ! dim,dim
       integer a
-      V = 0
+      V = 0.0
       do a = 1, size(U,1) ! nen
          V(:,:) = V(:,:) + N(:,:,a) * U(a)
       end do
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)   ! dof,nen
       scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DOF)      ! dim,dim,dof
       integer a, c
-      V = 0
+      V = 0.0
       do a = 1, size(U,2) ! nen
          do c = 1, size(U,1) ! dof
             V(:,:,c) = V(:,:,c) + N(:,:,a) * U(c,a)
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)       ! nen
       scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DIM)        ! dim,dim,dim
       integer a
-      V = 0
+      V = 0.0
       do a = 1, size(U,1) ! nen
          V(:,:,:) = V(:,:,:) + N(:,:,:,a) * U(a)
       end do
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)     ! dof,nen
       scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DIM,DOF)    ! dim,dim,dim,dof
       integer a, c
-      V = 0
+      V = 0.0
       do a = 1, size(U,2) ! nen
          do c = 1, size(U,1) ! dof
             V(:,:,:,c) = V(:,:,:,c) + N(:,:,:,a) * U(c,a)
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dim,nen
       scalar (kind=IGA_SCALAR_KIND)  :: V
       integer a, c, i
-      V = 0
+      V = 0.0
       do a = 1, size(U,2) ! nen
          do i = 1, size(N,1) ! dim
             V = V + N(i,a) * U(i,a)
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)     ! nen
       scalar (kind=IGA_SCALAR_KIND)  :: V
       integer a, c, i
-      V = 0
+      V = 0.0
       do a = 1, size(U,1) ! nen
          do i = 1, size(N,1) ! dim
             V = V + N(i,i,a) * U(a)
       scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)   ! dof,nen
       scalar (kind=IGA_SCALAR_KIND)  :: V(DOF)
       integer a, c, i
-      V = 0
+      V = 0.0
       do a = 1, size(U,2) ! nen
          do c = 1, size(U,1) ! dof
             do i = 1, size(N,1) ! dim

src/petigageo.f90.in

   ! 1st derivatives
   X1 = transpose(Grad)
   E1 = transpose(InvG)
-  R1 = 0
+  R1 = 0.0
   do idx = 1,nen
      do i = 1,dim
         do a = 1,dim
 
   ! 2nd derivatives
   if (order < 2) return
-  X2 = 0
+  X2 = 0.0
   do b = 1,dim
      do a = 1,dim
         do i = 1,dim
         end do
      end do
   end do
-  E2 = 0
+  E2 = 0.0
   do j = 1,dim
      do i = 1,dim
         do c = 1,dim
         end do
      end do
   end do
-  R2 = 0
+  R2 = 0.0
   do idx = 1,nen
      do j = 1,dim
         do i = 1,dim
 
   ! 3rd derivatives
   if (order < 3) return
-  X3 = 0
+  X3 = 0.0
   do c = 1,dim
      do b = 1,dim
         do a = 1,dim
         end do
      end do
   end do
-  E3 = 0
+  E3 = 0.0
   do k = 1,dim
      do j = 1,dim
         do i = 1,dim
         end do
      end do
   end do
-  R3 = 0
+  R3 = 0.0
   do idx = 1,nen
      do k = 1,dim
         do j = 1,dim

src/petigainv.f90.in

             - A(2,1) * ( A(1,2)*A(3,3) - A(3,2)*A(1,3) ) &
             + A(3,1) * ( A(1,2)*A(2,3) - A(2,2)*A(1,3) )
   case default
-     detA = 0
+     detA = 0.0
   end select
 end function Determinant
 
      invA(3,3) = + A(1,1)*A(2,2) - A(1,2)*A(2,1)
      invA = invA/detA
   case default
-     invA = 0
+     invA = 0.0
   end select
 end function Inverse

src/petigaqdr.f90

      W(2) =  W(1)
      W(3) =  W(0)
   case (5) ! p <= 7
-     X(0) = -1
+     X(0) = -1.0
      X(1) = -0.65465367070797714379829245624685835 ! sqrt(3/7)
      X(2) =  0.0
      X(3) = -X(1)

src/petigaval.F90

   scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dof)
   integer(kind=IGA_INTEGER_KIND)  :: a, i
   ! V = matmul(N,transpose(U))
-  V = 0
+  V = 0.0
   do a = 1, nen
      V = V + N(a) * U(:,a)
   end do
   scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dim,dof)
   integer(kind=IGA_INTEGER_KIND)  :: a, c
   ! V = matmul(N,transpose(U))
-  V = 0
+  V = 0.0
   do a = 1, nen
      do c = 1, dof
         V(:,c) = V(:,c) + N(:,a) * U(c,a)
   scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dim*dim,dof)
   integer(kind=IGA_INTEGER_KIND)  :: a, i
   ! V = matmul(N,transpose(U))
-  V = 0
+  V = 0.0
   do a = 1, nen
      do i = 1, dof
         V(:,i) = V(:,i) + N(:,a) * U(i,a)
   scalar (kind=IGA_SCALAR_KIND ), intent(in)       :: U(dof,nen)
   scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dof)
   integer(kind=IGA_INTEGER_KIND)  :: a, c, i
-  V = 0
+  V = 0.0
   do a = 1, nen
      do c = 1, dof
         do i = 1, dim
   scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dim*dim*dim,dof)
   integer(kind=IGA_INTEGER_KIND)  :: a, i
   ! V = matmul(N,transpose(U))
-  V = 0
+  V = 0.0
   do a = 1, nen
      do i = 1, dof
         V(:,i) = V(:,i) + N(:,a) * U(i,a)
 !  scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dim**der,dof)
 !  integer(kind=IGA_INTEGER_KIND)  :: a, i
 !  ! V = matmul(N,transpose(U))
-!  V = 0
+!  V = 0.0
 !  do a = 1, nen
 !     do i = 1, dof
 !        V(:,i) = V(:,i) + N(:,a) * U(i,a)
   scalar (kind=IGA_SCALAR_KIND ), intent(out)      :: V(dim**der,dof)
   integer(kind=IGA_INTEGER_KIND)  :: a, i
   ! V = matmul(N,transpose(U))
-  V = 0
+  V = 0.0
   do a = 1, nen
      do i = 1, dof
         V(:,i) = V(:,i) + N(:,a) * U(i,a)