Skip to content

Commit

Permalink
Merge pull request #451 from danieljprice/setup-test
Browse files Browse the repository at this point in the history
Automated test that ./phantom blah.in succeeds after running phantomsetup
  • Loading branch information
danieljprice committed Jul 14, 2023
2 parents 8e68923 + 8f20d17 commit 4df45e5
Show file tree
Hide file tree
Showing 89 changed files with 1,507 additions and 1,870 deletions.
6 changes: 3 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ Giulia Ballabio <giulia.ballabio2@studenti.unimi.it>
s-neilson <36410751+s-neilson@users.noreply.github.com>
Megha Sharma <megha@dyn-49-127-43-125.its.monash.edu.au>
Maxime Lombart <maxime.lombart@ens-lyon.fr>
Terrence Tricco <tstricco@mun.ca>
Benoit Commercon <benoit.commercon@gmail.com>
Zachary Pellow <zpel1@student.monash.edu>
Stéven Toupin <steven.toupin@gmail.com>
Cox, Samuel <sc676@leicester.ac.uk>
mats esseldeurs <matse@naos.ster.kuleuven.be>
Nicolás Cuello <cuello.nicolas@gmail.com>
Jorge Cuadra <jcuadra@astro.puc.cl>
Alison Young <ayoung@astro.ex.ac.uk>
Steven Rieder <steven@rieder.nl>
Terrence Tricco <tstricco@mun.ca>
Stéven Toupin <steven.toupin@gmail.com>
Alison Young <ayoung@astro.ex.ac.uk>
41 changes: 20 additions & 21 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ CCFLAGS = -O5
LIBCXX = -lstdc++
#FPPFLAGS=
LDFLAGS=
SRCPHOTO=
LIBTOOL=ar rcs

#----------------------------------------------------------------
Expand All @@ -86,7 +85,6 @@ LIBTOOL=ar rcs
# -DDRIVING ! use turbulence driving
# -DMHD ! magnetic fields
# -DNONIDEALMHD ! non-ideal magnetic fields including ionisation; uses NICIL
# -DPHOTO ! turn on the photoevaporation
# -DLIGHTCURVE ! lightcurve estimation

include Makefile_setups
Expand All @@ -107,6 +105,14 @@ ifdef SMOL
SRCDUST+= growth_smol.f90
endif

ifdef SRCINJECT
INJECT_PARTICLES=yes
else
# compile with default wind injection modules but INJECT_PARTICLES=yes or no
# is still optional in the setup block
SRCINJECT=utils_binary.f90 set_binary.f90 inject_wind.f90
endif

#ifndef SRCGROWTH
# SRCGROWTH = growth.F90
#endif
Expand Down Expand Up @@ -270,22 +276,18 @@ ifeq ($(STS_TIMESTEPS), yes)
FPPFLAGS += -DSTS_TIMESTEPS
endif

ifeq ($(DEBUG), yes)
FFLAGS += -DDEBUG
endif

ifeq ($(RADIATION), yes)
FPPFLAGS += -DRADIATION
endif

ifeq ($(DUST_NUCLEATION), yes)
FPPFLAGS += -DDUST_NUCLEATION
endif

ifeq ($(SINK_RADIATION), yes)
FPPFLAGS += -DSINK_RADIATION
endif

ifeq ($(DUST_NUCLEATION), yes)
FPPFLAGS += -DDUST_NUCLEATION
endif

ifdef SRCTURB
FPPFLAGS += -DDRIVING
endif
Expand Down Expand Up @@ -320,13 +322,9 @@ endif
# on command line. Otherwise on
# if injection module selected
#
ifeq ($(INJECT_PARTICLES), no)
SRCINJECT=
else
ifdef SRCINJECT
ifeq ($(INJECT_PARTICLES), yes)
FPPFLAGS += -DINJECT_PARTICLES
endif
endif

ifdef LIGHTCURVE
FPPFLAGS += -DLIGHTCURVE
Expand Down Expand Up @@ -541,7 +539,7 @@ SOURCES= physcon.f90 ${CONFIG} ${SRCKERNEL} io.F90 units.f90 \
mpi_memory.f90 mpi_derivs.F90 mpi_tree.F90 kdtree.F90 linklist_kdtree.F90 utils_healpix.f90 utils_raytracer.f90 \
partinject.F90 utils_inject.f90 dust_formation.f90 ptmass_radiation.f90 ptmass_heating.f90 \
radiation_implicit.f90 ${SRCTURB} \
${SRCPHOTO} ${SRCINJECT_DEPS} ${SRCINJECT} \
${SRCINJECT_DEPS} wind_equations.f90 wind.F90 ${SRCINJECT} \
${SRCKROME} memory.F90 ${SRCREADWRITE_DUMPS} \
quitdump.f90 ptmass.F90 \
readwrite_infile.F90 dens.F90 force.F90 utils_deriv.f90 deriv.F90 energies.F90 sort_particles.f90 \
Expand Down Expand Up @@ -612,15 +610,16 @@ edit: checksetup
#----------------------------------------------------
# these are the sources for anything which uses the readwrite_dumps module
#
SRCDUMP= physcon.f90 ${CONFIG} ${SRCKERNEL} utils_omp.F90 io.F90 units.f90 boundary.f90 boundary_dynamic.f90 mpi_utils.F90 \
utils_timing.f90 utils_infiles.f90 dtype_kdtree.f90 utils_allocate.f90 part.F90 ${DOMAIN} \
mpi_dens.F90 mpi_force.F90 \
SRCDUMP= physcon.f90 ${CONFIG} ${SRCKERNEL} utils_omp.F90 io.F90 units.f90 \
boundary.f90 boundary_dynamic.f90 mpi_utils.F90 \
utils_timing.f90 utils_infiles.f90 dtype_kdtree.f90 utils_allocate.f90 part.F90 \
${DOMAIN} mpi_dens.F90 mpi_force.F90 \
mpi_balance.F90 mpi_memory.f90 mpi_derivs.F90 mpi_tree.F90 kdtree.F90 linklist_kdtree.F90 \
utils_dumpfiles.f90 utils_vectors.f90 utils_mathfunc.f90 \
utils_datafiles.f90 utils_filenames.f90 utils_system.f90 utils_tables.f90 datafiles.f90 gitinfo.f90 \
centreofmass.f90 \
timestep.f90 ${SRCEOS} cullendehnen.f90 dust_formation.F90 \
${SRCGR} ${SRCPOT} ${SRCPHOTO} \
${SRCGR} ${SRCPOT} \
memory.F90 \
utils_sphNG.f90 \
setup_params.f90 ${SRCFASTMATH} checkoptions.F90 \
Expand Down Expand Up @@ -691,7 +690,7 @@ SRCTESTS=utils_testsuite.f90 ${TEST_FASTMATH} test_kernel.f90 \
test_derivs.F90 test_cooling.f90 test_eos_stratified.f90 \
test_eos.f90 test_externf.f90 test_rwdump.f90 \
test_step.F90 test_indtstep.F90 set_disc.F90 test_setdisc.F90 \
test_hierarchical.f90 test_damping.f90 \
test_hierarchical.f90 test_damping.f90 test_wind.f90 \
test_link.F90 test_kdtree.F90 test_part.f90 test_ptmass.f90 test_luminosity.F90\
test_gnewton.f90 test_corotate.f90 test_geometry.f90 \
${SRCTESTMPI} test_sedov.F90 test_poly.f90 test_radiation.F90 \
Expand Down
99 changes: 50 additions & 49 deletions build/Makefile_setups
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,6 @@ ifeq ($(SETUP), wd)
ANALYSIS = analysis_gws.f90
endif

ifeq ($(SETUP), photoevap)
# Mark Hutchison photoevaporating disc
DISC_VISCOSITY=yes
FPPFLAGS= -DPHOTO
SETUPFILE= setup_photoevap.f90
ANALYSIS= analysis_disc.f90
KNOWN_SETUP=yes
IND_TIMESTEPS=yes
SRCPHOTO=photoevap.f90
endif

ifeq ($(SETUP), disc)
# locally isothermal gas disc
DISC_VISCOSITY=yes
Expand Down Expand Up @@ -271,8 +260,9 @@ ifeq ($(SETUP), nshwdisc)
endif

ifeq ($(SETUP), prtest)
# simple test of prdrag
# simple test of Poynting-Robertson drag
SETUPFILE= setup_prtest.f90
ISOTHERMAL=yes
KNOWN_SETUP=yes
endif

Expand Down Expand Up @@ -751,58 +741,79 @@ ifeq ($(SETUP), grstar)
GRAVITY=yes
endif

ifeq ($(SETUP), dustystar)
# import stellar model from 1D stellar evolution code w/dust
FPPFLAGS= -DDUST_NUCLEATION -DSINK_RADIATION -DSTAR
ifeq ($(SETUP), radstar)
# setup a star as in the star setup but with radiation
SETUPFILE= setup_star.f90
MODFILE= utils_binary.f90 set_binary.f90 moddump_binary.f90
ANALYSIS= ${SRCNIMHD} utils_summary.o utils_omp.o ptmass.o energies.o analysis_common_envelope.f90 dust_formation.F90
ANALYSIS= ${SRCNIMHD} utils_summary.o utils_omp.o ptmass.o energies.o analysis_common_envelope.f90
KNOWN_SETUP=yes
MAXP=10000000
GRAVITY=yes
RADIATION=yes
endif

ifeq ($(SETUP), radstar)
# setup a star as in the star setup but with radiation
ifeq ($(SETUP), dustystar)
# import stellar model from 1D stellar evolution code w/dust
FPPFLAGS= -DDUST_NUCLEATION -DSTAR
SETUPFILE= setup_star.f90
MODFILE= utils_binary.f90 set_binary.f90 moddump_binary.f90
ANALYSIS= ${SRCNIMHD} utils_summary.o utils_omp.o ptmass.o energies.o analysis_common_envelope.f90
ANALYSIS= ${SRCNIMHD} utils_summary.o utils_omp.o ptmass.o energies.o analysis_common_envelope.f90 dust_formation.F90
KNOWN_SETUP=yes
MAXP=10000000
GRAVITY=yes
RADIATION=yes
SINK_RADIATION=yes
endif

ifeq ($(SETUP), isowind)
# isothermal spherical wind
FPPFLAGS= -DWIND -DSINK_RADIATION -DDUST_NUCLEATION
SETUPFILE= setup_wind.f90
ISOTHERMAL=yes
WIND=yes
INJECT_PARTICLES=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), wind)
# wind setup with dust nucleation
FPPFLAGS= -DWIND -DSINK_RADIATION -DDUST_NUCLEATION
SETUPFILE= setup_wind.f90
ANALYSIS= analysis_cooling.F90
WIND=yes
SINK_RADIATION=yes
DUST_NUCLEATION=yes
INJECT_PARTICLES=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), ismwind)
# wind setup with dust nucleation and ISM cooling
FPPFLAGS= -DWIND -DSINK_RADIATION -DDUST_NUCLEATION
SETUPFILE= setup_wind.f90
ANALYSIS= analysis_cooling.F90
H2CHEM=yes
WIND=yes
SINK_RADIATION=yes
DUST_NUCLEATION=yes
INJECT_PARTICLES=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), radwind)
# wind setup with dust nucleation
FPPFLAGS= -DWIND -DSINK_RADIATION -DDUST_NUCLEATION
SETUPFILE= setup_wind.f90
ANALYSIS= utils_getneighbours.f90 utils_raytracer_all.f90 analysis_raytracer.f90
WIND=yes
SINK_RADIATION=yes
DUST_NUCLEATION=yes
INJECT_PARTICLES=yes
KNOWN_SETUP=yes
endif

ifeq ($(WIND), yes)
# wind particle injection setup
SETUPFILE= setup_wind.f90
SRCINJECT= utils_binary.f90 set_binary.f90 wind_equations.F90 wind.F90 inject_wind.f90
ifeq ($(SETUP), test)
# default setup for tests
PERIODIC=yes
CONST_ARTRES=yes
CURLV=yes
MHD=yes
DUST=yes
RADIATION=yes
SINK_RADIATION=yes
DUST_NUCLEATION=yes
KERNEL=cubic
KNOWN_SETUP=yes
endif

Expand Down Expand Up @@ -891,23 +902,23 @@ ifeq ($(SETUP), isosgdisc)
# isothermal self-gravitating disc
SETUPFILE= setup_disc.f90
GRAVITY=yes
KNOWN_SETUP=yes
IND_TIMESTEPS=yes
ANALYSIS=analysis_dustydisc.f90
ISOTHERMAL=yes
DISC_VISCOSITY=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), dustyisosgdisc)
# isothermal self-gravitating dustydisc
SETUPFILE= setup_disc.f90
GRAVITY=yes
DUST=yes
KNOWN_SETUP=yes
IND_TIMESTEPS=yes
ANALYSIS=analysis_dustydisc.f90
ISOTHERMAL=yes
DISC_VISCOSITY=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), dustsettle)
Expand All @@ -920,18 +931,6 @@ ifeq ($(SETUP), dustsettle)
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), test)
# default setup for tests
PERIODIC=yes
KNOWN_SETUP=yes
CONST_ARTRES=yes
CURLV=yes
MHD=yes
DUST=yes
RADIATION=yes
KERNEL=cubic
endif

ifeq ($(SETUP), test2)
# default setup for tests
DISC_VISCOSITY=yes
Expand All @@ -941,29 +940,31 @@ endif
ifeq ($(SETUP), testcyl)
# default setup for tests
DISC_VISCOSITY=yes
KNOWN_SETUP=yes
IND_TIMESTEPS=yes
CONST_ARTRES=yes
CURLV=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), testkd)
# default setup for tests
PERIODIC=yes
KNOWN_SETUP=yes
IND_TIMESTEPS=yes
CONST_ARTRES=yes
CURLV=yes
MHD=yes
RADIATION=yes
SINK_RADIATION=yes
DUST_NUCLEATION=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), testgrav)
# self-gravity unit tests
GRAVITY=yes
KNOWN_SETUP=yes
CONST_ARTRES=yes
CURLV=yes
KNOWN_SETUP=yes
endif

ifeq ($(SETUP), testdust)
Expand Down
10 changes: 10 additions & 0 deletions data/forcing/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The forcing data file is too large to be stored in the Phantom git repository
It will be downloaded automatically when you run the code

or can be retrieved manually using wget from the phantom website, e.g.:

wget http://users.monash.edu.au/~dprice/phantom/data/forcing.dat

The files are:

forcing.dat

0 comments on commit 4df45e5

Please sign in to comment.