From 05daf480983476ac9d8fd45aed64a54f5b6d1aca Mon Sep 17 00:00:00 2001 From: knarf Date: Tue, 12 Jan 2010 05:11:15 +0000 Subject: Implement primitive maximum density search ala Whisky. This should be fine most of the time, but might break without notice if unlucky. Ideas of a safer neutron star tracking exist, but are not implemented here. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Hydro_Analysis/trunk@26 b6729ddc-ac74-4bd1-908c-9dc7244c52a1 --- configuration.ccl | 2 ++ interface.ccl | 5 +++++ param.ccl | 7 +++++++ schedule.ccl | 22 ++++++++++++++++++++++ src/make.code.defn | 2 +- 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/configuration.ccl b/configuration.ccl index a67d518..6909099 100644 --- a/configuration.ccl +++ b/configuration.ccl @@ -1,2 +1,4 @@ # Configuration definitions for thorn Hydro_Analysis +REQUIRES LoopControl + diff --git a/interface.ccl b/interface.ccl index 53b88d0..a5b27b7 100644 --- a/interface.ccl +++ b/interface.ccl @@ -2,3 +2,8 @@ implements: Hydro_Analysis +inherits: Grid, HydroBase + +CCTK_REAL Hydro_Analysis_rho_max type = SCALAR tags='checkpoint="no"' "value of the maximum of rho" + +CCTK_REAL Hydro_Analysis_rho_max_loc[3] type = SCALAR tags='checkpoint="no"' "coordinate location of the maximum of rho" diff --git a/param.ccl b/param.ccl index 68b7b91..0445a5f 100644 --- a/param.ccl +++ b/param.ccl @@ -1,2 +1,9 @@ # Parameter definitions for thorn Hydro_Analysis +BOOLEAN Hydro_Analysis_rho_max_search "Look for the value and location of the maximum of rho" +{ +} "false" + +BOOLEAN Hydro_Analysis_rho_max_loc_only_positive_x "Restrict location search for density maximum to positive values of x" +{ +} "false" diff --git a/schedule.ccl b/schedule.ccl index 7046d33..764a822 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,2 +1,24 @@ # Schedule definitions for thorn HydroAnalysis +STORAGE: Hydro_Analysis_rho_max +STORAGE: Hydro_Analysis_rho_max_loc + +schedule group Hydro_Analysis AT POSTSTEP +{ +} "Group for Hydro_Analysis routines" + +schedule Hydro_Analysis_GlobalReduction IN Hydro_Analysis +{ + LANG: C + OPTIONS: global +} "Compute the global reduction results" + +if (Hydro_Analysis_rho_max_search) +{ + schedule Hydro_Analysis_LocationSearch IN Hydro_Analysis AFTER Hydro_Analysis_GlobalReduction + { + LANG: C + OPTIONS: global loop-local + } "Look for the location of the maximum density" +} + diff --git a/src/make.code.defn b/src/make.code.defn index d31ca86..a030faf 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -1,7 +1,7 @@ # Main make.code.defn file for thorn Hydro_Analysis # Source files in this directory -SRCS = +SRCS = Hydro_Analysis_Maxima.c # Subdirectories containing source files SUBDIRS = -- cgit v1.2.3