Skip to content
Snippets Groups Projects
Commit 7b81d072 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'master' into mark_tasks_in_drift

parents 6edfe372 44194d4e
Branches
Tags
1 merge request!267Mark tasks in drift2
Showing
with 61 additions and 53 deletions
......@@ -10,3 +10,4 @@ Tom Theuns tom.theuns@durham.ac.uk
Richard G. Bower r.g.bower@durham.ac.uk
Stefan Arridge stefan.arridge@durham.ac.uk
Massimiliano Culpo massimiliano.culpo@googlemail.com
Yves Revaz yves.revaz@epfl.ch
......@@ -763,7 +763,8 @@ INPUT = @top_srcdir@ @top_srcdir@/src @top_srcdir@/tests @top_
INPUT += @top_srcdir@/src/hydro/Minimal
INPUT += @top_srcdir@/src/gravity/Default
INPUT += @top_srcdir@/src/riemann
INPUT += @top_srcdir@/src/cooling/const_lambda
INPUT += @top_srcdir@/src/potential/point_mass
INPUT += @top_srcdir@/src/cooling/const_du
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......
......@@ -19,7 +19,7 @@ Statistics:
# Parameters governing the snapshots
Snapshots:
basename: Disk-Patch # Common part of the name of output files
basename: Disc-Patch # Common part of the name of output files
time_first: 0. # Time of the first output (in internal units)
delta_time: 8. # Time difference between consecutive outputs (in internal units)
......@@ -33,11 +33,11 @@ SPH:
# Parameters related to the initial conditions
InitialConditions:
file_name: Disk-Patch.hdf5 # The file to read
file_name: Disc-Patch.hdf5 # The file to read
# External potential parameters
Disk-PatchPotential:
DiscPatchPotential:
surface_density: 10.
scale_height: 100.
z_disk: 300.
z_disc: 300.
timestep_mult: 0.03
......@@ -26,7 +26,7 @@ import random
# Generates N particles in a box of [0:BoxSize,0:BoxSize,-2scale_height:2scale_height]
# see Creasey, Theuns & Bower, 2013, for the equations:
# disk parameters are: surface density sigma
# disc parameters are: surface density sigma
# scale height b
# density: rho(z) = (sigma/2b) sech^2(z/b)
# isothermal velocity dispersion = <v_z^2? = b pi G sigma
......@@ -79,7 +79,7 @@ N = int(sys.argv[1]) # Number of particles
rho = 2. # Density
P = 1. # Pressure
gamma = 5./3. # Gas adiabatic index
fileName = "Disk-Patch.hdf5"
fileName = "Disc-Patch.hdf5"
#---------------------------------------------------
......
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e Isothermal.hdf5 ]
if [ ! -e Disc-Patch.hdf5 ]
then
echo "Generating initial conditions for the disk-patch example..."
echo "Generating initial conditions for the disc-patch example..."
python makeIC.py 1000
fi
../../swift -g -t 2 disk-patch.yml
../../swift -g -t 2 disc-patch.yml
......@@ -8,7 +8,7 @@ iplot = 1 ; if iplot = 1, make plot of E/Lz conservation, else, simply compare f
@physunits
indir = './'
basefile = 'Disk-Patch_'
basefile = 'Disc-Patch_'
; set properties of potential
uL = phys.pc ; unit of length
......
Generates and evolves a disk-patch, where gas is in hydrostatic
Generates and evolves a disc-patch, where gas is in hydrostatic
equilibrium with an imposed external gravitational force, using the
equations from Creasey, Theuns & Bower, 2013, MNRAS, Volume 429,
Issue 3, p.1922-1948.
......@@ -10,11 +10,11 @@ To generate ICs ready for a scientific run:
2) Generate pre-ICs by running the 'makeIC.py' script.
3) Run SWIFT with an isothermal EoS, no cooling nor feedback, and the
disk-patch potential switched on and using the parameters from
'disk-patch-icc.yml'
disc-patch potential switched on and using the parameters from
'disc-patch-icc.yml'
4) The ICs are then ready to be run for a science problem. Rename the last
output to 'Disk-Patch-dynamic.hdf5'. These are now the ICs for the actual test.
output to 'Disc-Patch-dynamic.hdf5'. These are now the ICs for the actual test.
When running SWIFT with the parameters from 'disk-patch.yml' and an
ideal gas EoS on these ICs the disk should stay in equilibrium.
When running SWIFT with the parameters from 'disc-patch.yml' and an
ideal gas EoS on these ICs the disc should stay in equilibrium.
......@@ -19,7 +19,7 @@ Statistics:
# Parameters governing the snapshots
Snapshots:
basename: Disk-Patch # Common part of the name of output files
basename: Disc-Patch # Common part of the name of output files
time_first: 0. # Time of the first output (in internal units)
delta_time: 12. # Time difference between consecutive outputs (in internal units)
......@@ -33,12 +33,12 @@ SPH:
# Parameters related to the initial conditions
InitialConditions:
file_name: Disk-Patch.hdf5 # The file to read
file_name: Disc-Patch.hdf5 # The file to read
# External potential parameters
Disk-PatchPotential:
DiscPatchPotential:
surface_density: 10.
scale_height: 100.
z_disk: 200.
z_disc: 200.
timestep_mult: 0.03
growth_time: 5.
......@@ -19,7 +19,7 @@ Statistics:
# Parameters governing the snapshots
Snapshots:
basename: Disk-Patch-dynamic # Common part of the name of output files
basename: Disc-Patch-dynamic # Common part of the name of output files
time_first: 968. # Time of the first output (in internal units)
delta_time: 24. # Time difference between consecutive outputs (in internal units)
......@@ -33,11 +33,11 @@ SPH:
# Parameters related to the initial conditions
InitialConditions:
file_name: Disk-Patch-dynamic.hdf5 # The file to read
file_name: Disc-Patch-dynamic.hdf5 # The file to read
# External potential parameters
Disk-PatchPotential:
DiscPatchPotential:
surface_density: 10.
scale_height: 100.
z_disk: 200.
z_disc: 200.
timestep_mult: 0.03
......@@ -25,9 +25,9 @@ import math
import random
import matplotlib.pyplot as plt
# Generates a disk-patch in hydrostatic equilibrium
# Generates a disc-patch in hydrostatic equilibrium
# see Creasey, Theuns & Bower, 2013, for the equations:
# disk parameters are: surface density sigma
# disc parameters are: surface density sigma
# scale height b
# density: rho(z) = (sigma/2b) sech^2(z/b)
# isothermal velocity dispersion = <v_z^2? = b pi G sigma
......@@ -79,7 +79,7 @@ Radius = 100. # maximum radius of particles [kpc]
G = const_G
# File
fileName = "Disk-Patch.hdf5"
fileName = "Disc-Patch.hdf5"
#---------------------------------------------------
mass = 1
......@@ -145,7 +145,7 @@ mass = 0.*h + pmass
entropy_flag = 0
vel = 0 + 0 * pos
# move centre of disk to middle of box
# move centre of disc to middle of box
pos[:,:] += boxSize/2
......
......@@ -8,7 +8,7 @@ iplot = 1 ; if iplot = 1, make plot of E/Lz conservation, else, simply compare f
@physunits
indir = './'
basefile = 'Disk-Patch_'
basefile = 'Disc-Patch_'
; set properties of potential
uL = phys.pc ; unit of length
......
......@@ -38,7 +38,7 @@ InitialConditions:
shift_z: 50.
# External potential parameters
PointMass:
PointMassPotential:
position_x: 50. # location of external point mass in internal units
position_y: 50.
position_z: 50.
......
......@@ -35,7 +35,7 @@ InitialConditions:
file_name: ./multiTypes.hdf5 # The file to read
# External potential parameters
PointMass:
PointMassPotential:
position_x: 50. # location of external point mass in internal units
position_y: 50.
position_z: 50.
......
......@@ -33,11 +33,3 @@ SPH:
# Parameters related to the initial conditions
InitialConditions:
file_name: ./uniformBox.hdf5 # The file to read
# External potential parameters
PointMass:
position_x: 50. # location of external point mass in internal units
position_y: 50.
position_z: 50.
mass: 1e10 # mass of external point mass in internal units
......@@ -439,9 +439,9 @@ int main(int argc, char *argv[]) {
if (with_external_gravity && myrank == 0) potential_print(&potential);
/* Initialise the cooling function properties */
struct cooling_data cooling;
if (with_cooling) cooling_init(params, &us, &prog_const, &cooling);
if (with_cooling && myrank == 0) cooling_print(&cooling);
struct cooling_function_data cooling_func;
if (with_cooling) cooling_init(params, &us, &prog_const, &cooling_func);
if (with_cooling && myrank == 0) cooling_print(&cooling_func);
/* Construct the engine policy */
int engine_policies = ENGINE_POLICY | engine_policy_steal;
......@@ -457,7 +457,7 @@ int main(int argc, char *argv[]) {
struct engine e;
engine_init(&e, &s, params, nr_nodes, myrank, nr_threads, with_aff,
engine_policies, talking, &us, &prog_const, &hydro_properties,
&potential, &cooling);
&potential, &cooling_func);
if (myrank == 0) {
clocks_gettime(&toc);
message("engine_init took %.3f %s.", clocks_diff(&tic, &toc),
......
......@@ -66,7 +66,7 @@ DomainDecomposition:
# Parameters related to external potentials --------------------------------------------
# Point mass external potentials
PointMass:
PointMassPotential:
position_x: 50. # location of external point mass (internal units)
position_y: 50.
position_z: 50.
......@@ -82,12 +82,12 @@ IsothermalPotential:
timestep_mult: 0.03 # Dimensionless pre-factor for the time-step condition
# Disk-patch potential parameters
Disk-PatchPotential:
surface_density: 10. # Surface density of the disk (internal units)
scale_height: 100. # Scale height of the disk (internal units)
z_disk: 200. # Disk height (internal units)
DiscPatchPotential:
surface_density: 10. # Surface density of the disc (internal units)
scale_height: 100. # Scale height of the disc (internal units)
z_disc: 200. # Position of the disc along the z-axis (internal units)
timestep_mult: 0.03 # Dimensionless pre-factor for the time-step condition
growth_time: 5. # (Optional) Time for the disk to grow to its final size (multiple of the dynamical time)
growth_time: 5. # (Optional) Time for the disc to grow to its final size (multiple of the dynamical time)
# Parameters related to cooling function ----------------------------------------------
......
......@@ -42,8 +42,8 @@ endif
include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \
engine.h swift.h serial_io.h timers.h debug.h scheduler.h proxy.h parallel_io.h \
common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h \
physical_constants.h physical_constants_cgs.h potentials.h version.h \
hydro_properties.h threadpool.h cooling.h
physical_constants.h physical_constants_cgs.h potential.h version.h \
hydro_properties.h riemann.h threadpool.h cooling.h cooling_struct.h
# Common source files
......@@ -51,11 +51,11 @@ AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \
serial_io.c timers.c debug.c scheduler.c proxy.c parallel_io.c \
units.c common_io.c single_io.c multipole.c version.c map.c \
kernel_hydro.c tools.c part.c partition.c clocks.c parser.c \
physical_constants.c potentials.c hydro_properties.c \
physical_constants.c potential.c hydro_properties.c \
runner_doiact_fft.c threadpool.c cooling.c
# Include files for distribution, not installation.
nobase_noinst_HEADERS = approx_math.h atomic.h cycle.h error.h inline.h kernel_hydro.h kernel_gravity.h \
nobase_noinst_HEADERS = align.h approx_math.h atomic.h cycle.h error.h inline.h kernel_hydro.h kernel_gravity.h \
kernel_long_gravity.h vector.h runner_doiact.h runner_doiact_grav.h runner_doiact_fft.h \
units.h intrinsics.h minmax.h kick.h timestep.h drift.h adiabatic_index.h io_properties.h \
dimension.h equation_of_state.h \
......@@ -71,9 +71,13 @@ nobase_noinst_HEADERS = approx_math.h atomic.h cycle.h error.h inline.h kernel_h
hydro/Gadget2/hydro_debug.h hydro/Gadget2/hydro_part.h \
hydro/Gizmo/hydro.h hydro/Gizmo/hydro_iact.h hydro/Gizmo/hydro_io.h \
hydro/Gizmo/hydro_debug.h hydro/Gizmo/hydro_part.h \
riemann.h riemann/riemann_hllc.h riemann/riemann_trrs.h \
riemann/riemann_hllc.h riemann/riemann_trrs.h \
riemann/riemann_exact.h riemann/riemann_vacuum.h \
cooling/const_du/cooling.h cooling/const_lambda/cooling.h
potential/none/potential.h potential/point_mass/potential.h \
potential/isothermal/potential.h potential/disc_patch/potential.h \
cooling/none/cooling.h cooling/none/cooling_struct.h \
cooling/const_du/cooling.h cooling/const_du/cooling_struct.h \
cooling/const_lambda/cooling.h cooling/const_lambda/cooling_struct.h
# Sources and flags for regular library
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment