aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-11-14 15:47:33 +0100
committerThomas White <taw@physics.org>2014-11-14 15:47:33 +0100
commite0a717ebe6981cd14f268056bdcdc7ba53dfe029 (patch)
tree1564a1a9b360a3f888c360950f5f178f7c9e6648 /src/partial_sim.c
parentf98c55524c74647ac999746929b8206f1ab178c0 (diff)
Allow geometry files to not contain photon_energy
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 504abf52..d2229f39 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -697,6 +697,12 @@ int main(int argc, char *argv[])
ERROR("Failed to read geometry from '%s'\n", geomfile);
return 1;
}
+ if ( (beam.photon_energy > 0.0) && (beam.photon_energy_from == NULL) ) {
+ ERROR("WARNING: An explicit photon energy was found in the "
+ "geometry file. It will be ignored!\n");
+ ERROR("The value given on the command line "
+ "(with --photon-energy) will be used instead.\n");
+ }
if ( sym_str == NULL ) sym_str = strdup("1");
sym = get_pointgroup(sym_str);