Skip to content

Commit

Permalink
Merge pull request #18 from WISDEM/develop
Browse files Browse the repository at this point in the history
This should be more robust of a build across architectures
  • Loading branch information
gbarter authored Jan 19, 2024
2 parents e6a9485 + 0f6d463 commit 68c341a
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 319 deletions.
65 changes: 32 additions & 33 deletions pyhams/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,42 @@ fortranobject_c = incdir_f2py / 'fortranobject.c'

inc_np = include_directories(incdir_numpy, incdir_f2py)

#hams_connect = custom_target('_hamsmodule.c',
# input : ['src/HAMS_Prog.f90'],
# output : ['_hamsmodule.c', '_hams-f2pywrappers2.f90'],
# command: [py3, '-m', 'numpy.f2py',
# '@INPUT@', '-m', '_hams', '--lower',
# '--build-dir', 'pyhams']
# )
hams_connect = custom_target('_hamsmodule.c',
input : ['src/_hams.pyf'],
output : ['_hamsmodule.c', '_hams-f2pywrappers2.f90'],
command: [py3, '-m', 'numpy.f2py',
'@INPUT@', '--lower', '--build-dir', 'pyhams']
)

hams_sources = ['src/WavDynMods.f90',
'src/PatclVelct.f90',
'src/BodyIntgr.f90',
'src/BodyIntgr_irr.f90',
'src/AssbMatx.f90',
'src/AssbMatx_irr.f90',
'src/SingularIntgr.f90',
'src/InfGreen_Appr.f90',
'src/FinGrnExtSubs.f90',
'src/FinGreen3D.f90',
'src/CalGreenFunc.f90',
'src/HydroStatic.f90',
'src/ImplementSubs.f90',
'src/InputFiles.f90',
'src/NormalProcess.f90',
'src/ReadPanelMesh.f90',
'src/PotentWavForce.f90',
'src/PressureElevation.f90',
'src/PrintOutput.f90',
'src/SolveMotion.f90',
'src/WavDynSubs.f90',
'src/HAMS_Prog.f90',
]

# Source order is important for dependencies
py3.extension_module('_hams',
['src/WavDynMods.f90',
'src/PatclVelct.f90',
'src/BodyIntgr.f90',
'src/BodyIntgr_irr.f90',
'src/AssbMatx.f90',
'src/AssbMatx_irr.f90',
'src/SingularIntgr.f90',
'src/InfGreen_Appr.f90',
'src/FinGrnExtSubs.f90',
'src/FinGreen3D.f90',
'src/CalGreenFunc.f90',
'src/HydroStatic.f90',
'src/ImplementSubs.f90',
'src/InputFiles.f90',
'src/NormalProcess.f90',
'src/ReadPanelMesh.f90',
'src/PotentWavForce.f90',
'src/PressureElevation.f90',
'src/PrintOutput.f90',
'src/SolveMotion.f90',
'src/WavDynSubs.f90',
'src/HAMS_Prog.f90',
'src/_hams-f2pywrappers2.f90',
'src/_hamsmodule.c',
hams_sources,
hams_connect,
fortranobject_c,
],
#hams_connect,
include_directories: inc_np,
dependencies : [py3_dep, lapack, omp],
subdir: 'pyhams',
Expand Down
12 changes: 0 additions & 12 deletions pyhams/src/_hams-f2pywrappers2.f90

This file was deleted.

28 changes: 28 additions & 0 deletions pyhams/src/_hams.pyf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
! -*- f90 -*-
! Note: the context of this file is case sensitive.

python module _hams ! in
interface ! in :_hams
module hams_full ! in :_hams:HAMS_Prog.f90
use assbmatx
use assbmatx_irr
use calgreenfunc
use readpanelmesh
use linearmatrix_mod
use hydrostatic
use implementsubs
use potentwavforce
use printoutput
use potentials_mod
use pressureelevation
use fieldoutput_mod
use omp_lib
subroutine exec ! in :_hams:HAMS_Prog.f90:hams_full
end subroutine exec
end module hams_full
end interface
end python module _hams

! This file was auto-generated with f2py (version:1.26.2).
! See:
! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e
273 changes: 0 additions & 273 deletions pyhams/src/_hamsmodule.c

This file was deleted.

Loading

0 comments on commit 68c341a

Please sign in to comment.