From 9dbc4e3430675696de88ec26e39f17ef7431f817 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Thu, 6 Aug 2020 21:39:10 -0300 Subject: [PATCH] INTERPOLATIONS, REFINEMENT: Convert real precision correctly. Signed-off-by: Grzegorz Kowal --- CMakeLists.txt | 2 +- sources/interpolations.F90 | 4 ++-- sources/refinement.F90 | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5163403..8130a8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") - add_compile_options("$<$:-march=native;-pipe;-pedantic;-ftree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always;-Wunused-variable>") + add_compile_options("$<$:-march=native;-pipe;-pedantic;-ftree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>") add_compile_options("$<$:-Og;-pedantic;-W;-Wall>") endif() diff --git a/sources/interpolations.F90 b/sources/interpolations.F90 index 85df8de..f329792 100644 --- a/sources/interpolations.F90 +++ b/sources/interpolations.F90 @@ -775,7 +775,7 @@ module interpolations ! do j = 1, NDIMS do i = 1, 2 - ugp(1:dgp,i,j) = matmul(xgp(1:dgp,i,j), inv(1:dgp,1:dgp)) + ugp(1:dgp,i,j) = real(matmul(xgp(1:dgp,i,j), inv(1:dgp,1:dgp)), kind=8) end do end do @@ -4791,7 +4791,7 @@ module interpolations ! prepare the interpolation coefficients vector ! - cgp(1:ngp) = matmul(xgp(1:ngp), agp(1:ngp,1:ngp)) + cgp(1:ngp) = real(matmul(xgp(1:ngp), agp(1:ngp,1:ngp)), kind=8) end if diff --git a/sources/refinement.F90 b/sources/refinement.F90 index d2c4e31..aa46166 100644 --- a/sources/refinement.F90 +++ b/sources/refinement.F90 @@ -398,7 +398,7 @@ module refinement ! local variables ! integer :: p - real(kind=4) :: cref + real(kind=8) :: cref ! !------------------------------------------------------------------------------- ! @@ -496,14 +496,14 @@ module refinement ! return variable ! - real(kind=4) :: error + real(kind=8) :: error ! local variables ! integer :: i, im1, ip1 integer :: j, jm1, jp1 integer :: k = 1, km1, kp1 - real(kind=4) :: fl, fr, fc, fx, fy, fz + real(kind=8) :: fl, fr, fc, fx, fy, fz ! local parameters !