Skip to content
Snippets Groups Projects
Commit 25a57cc3 authored by Franck Pérignon's avatar Franck Pérignon
Browse files

update Parmes for the new version of scales interface

parent 1bed72e7
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
# - parmesscales (fortran library) particular solver from scales, (libparmesscales...)
#
# parmes depends (optionally) on :
# - parmesscales (USE_SCALES=ON, default)
# - parmesscales (WITH_SCALES=ON, default)
# - ppm-core (USE_PPM=ON, default=OFF)
# - ppm-numerics (USE_PPMNumerics, default=OFF)
#
......
......@@ -74,17 +74,16 @@ contains
topocoords = coord
end subroutine getTopoCoords
subroutine advecStep(timeStep,Vx,Vy,Vz,scal,dim_split)
subroutine advecStep(timeStep,Vx,Vy,Vz,scal)
real(pk), intent(in) :: timeStep
real(pk), dimension(:,:,:), intent(in) :: Vx, Vy, Vz
real(pk), dimension(:,:,:), intent(inout) :: scal
character(len=*), optional, intent(in) :: dim_split
real(pk) :: t0
t0 = MPI_Wtime()
call advec_step(timeStep,Vx,Vy,Vz,scal,dim_split)
call advec_step(timeStep,Vx,Vy,Vz,scal)
print *, "inside ...", cart_rank, ":", MPI_Wtime()-t0
end subroutine advecStep
......
......@@ -26,7 +26,8 @@ packages = ['parmepy',
# Enable this to get debug info
# DISTUTILS_DEBUG=1
inc_dir = '@MPI_Fortran_INCLUDE_PATH@'.split(';')
inc_dir.remove('') # To avoid -I -I in compiler call. Result in a bug.
while inc_dir.count('') >0:
inc_dir.remove('') # To avoid -I -I in compiler call. Result in a bug.
parmes_dir = '@CMAKE_BINARY_DIR@/Modules'
inc_dir.append(parmes_dir)
parmes_libdir = ['@CMAKE_BINARY_DIR@/src']
......@@ -45,19 +46,28 @@ f2py_options = ['--no-lower']
## ext_modules=[scalesModule]
ext_modules =[]
fortran_dir = '@CMAKE_SOURCE_DIR@/parmepy/f2py/'
enable_fortran = False
withfftw = "@WITH_FFTW@"
if(withfftw is "ON"):
#fortran_src = glob.glob('@CMAKE_SOURCE_DIR@/parmepy/f2py/*.f90')
fortran_dir = '@CMAKE_SOURCE_DIR@/parmepy/f2py/'
fortran_src = [fortran_dir+'parameters.f90',fortran_dir+'fftw2py.f90',fortran_dir+'scales2py.f90']
# rep = '@CMAKE_SOURCE_DIR@/parmepy/f2py/'
# fortran_src.insert(0,rep+'/parameters.f90')
fortran_src = [fortran_dir+'parameters.f90',fortran_dir+'fftw2py.f90']
enable_fortran = True
fftwdir = '@FFTWLIB@'
fftwdir = os.path.split(fftwdir)[0]
parmeslib.append('fftw3')
parmeslib.append('fftw3_mpi')
parmes_libdir.append(fftwdir)
withscales = '@WITH_SCALES@'
if(withscales is "ON"):
fortran_src.append(fortran_dir+'scales2py.f90')
enable_fortran = True
if(enable_fortran):
# rep = '@CMAKE_SOURCE_DIR@/parmepy/f2py/'
# fortran_src.insert(0,rep+'/parameters.f90')
parpyModule = Extension(name='parmepy.f2py',
f2py_options=f2py_options,
sources=fortran_src,
......
......@@ -24,6 +24,7 @@ if(WITH_SCALES)
scalesInterface/
scalesInterface/layout
scalesInterface/particles
scalesInterface/particles/advec_line
scalesInterface/output
)
endif()
......
......@@ -323,10 +323,12 @@ subroutine ac_remesh_lambda2corrected_array(direction, p_pos_adim, scal1d, bl_ty
! XXX Debug - end
if (bl_type(bl_ind)) then
! tagged, the first particle belong to a centered block and the last to left block.
call AC_remesh_tag_CL(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), scal1D(p_ind+1), remesh_buffer)
call AC_remesh_tag_CL(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), &
scal1D(p_ind+1), remesh_buffer)
else
! tagged, the first particle belong to a left block and the last to centered block.
call AC_remesh_tag_LC(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), scal1D(p_ind+1), remesh_buffer)
call AC_remesh_tag_LC(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), &
scal1D(p_ind+1), remesh_buffer)
end if
else
if (bl_type(bl_ind)) then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment