Skip to content
Snippets Groups Projects
Commit 7f9a4c39 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

working build

parent dbe016f4
No related branches found
No related tags found
No related merge requests found
......@@ -345,8 +345,9 @@ if(USE_FORTRAN)
# includes the other required pyf files.
# For example, if WITH_FFTW is ON, then
# add a line 'include fftw2py.py'
set(F_2_HYSOP "f2hysop")
include(fortran_utils)
write_main_pyf_file(f2hysop)
write_main_pyf_file(${F_2_HYSOP})
# f2py failed with:
# real(kind=wp), dimension(:) :: tab
# whit wp = real64 or real32 from iso_fortran_env
......
......@@ -23,7 +23,7 @@ function(write_main_pyf_file filename)
"! -*- f90 -*-\n
! Generated file - Do not edit.\n
! Note: the context of this file is case sensitive.\n
python module f2hysop ! in\n
python module ${F_2_HYSOP} ! in\n
interface\n")
file(APPEND ${_file}
" ! Example
......@@ -47,9 +47,9 @@ python module f2hysop ! in\n
include '@CMAKE_SOURCE_DIR@/hysop/numerics/extras_f/arnoldi.pyf'\n")
endif()
file(APPEND ${_file} " end interface\n
end python module f2hysop")
end python module ${F_2_HYSOP}")
message(STATUS "Generate f2hysop.pyf file ...")
message(STATUS "Generate ${F_2_HYSOP}.pyf file ...")
configure_file(${_file} ${GENERATED_FORTRAN_FILES_DIR}/${filename}.pyf @ONLY)
endfunction()
......
......@@ -37,15 +37,20 @@ class Diffusion(Computational):
"""
assert 'variables' not in kwds, 'variables parameter is useless.'
super(Diffusion, self).__init__(variables=[vorticity], **kwds)
msg = 'Diffusion : unknown method for space discretization'
if self.method is None:
if 'method' not in kwds:
import hysop.default_methods as default
self.method = default.DIFFUSION
else:
self.method = kwds.pop('method')
msg = 'Diffusion : unknown method for space discretization'
assert self.method[SpaceDiscretisation] in self._authorized_methods,\
msg
msg
msg = 'Diffusion : on_gpu resolution is not available on your system.'
if self.method[SpaceDiscretisation] is 'on_gpu':
assert __GPU_ENABLED__, msg
# input/output field, solution of the problem
self.vorticity = vorticity
# viscosity
......
"""Set some functions and variables useful to run tests.
"""
from hysop import __FFTW_ENABLED__, __SCALES_ENABLED__
from hysop import __FFTW_ENABLED__, __SCALES_ENABLED__, __ENABLE_LONG_TESTS__
import pytest
import shutil
from hysop.tools.io_utils import IO
......
......@@ -305,7 +305,8 @@ if enable_fortran is "ON":
# === Draft for future implementation of fortran interface ===
# -- f2py signature file --
pyf_file = os.path.join('@GENERATED_FORTRAN_FILES_DIR@', 'f2hysop.pyf')
f2hysop = "@F_2_HYSOP@"
pyf_file = os.path.join('@GENERATED_FORTRAN_FILES_DIR@', f2hysop+'.pyf')
# change from relative path in subdirs to absolute path in num_dirs
num_dirs = []
for sd in subdirs:
......@@ -316,8 +317,8 @@ if enable_fortran is "ON":
# For the moment, it includes the 'old' interface
# to scales and fftw (in sources) and the new
# interface, in src_dirs
ext['f2hysop'] = create_fortran_extension(
name='hysop.f2hysop',
ext[f2hysop] = create_fortran_extension(
name='hysop.'+f2hysop,
sources=fortran_src,
libdir=hysop_libdir,
libs=hysoplib,
......
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