From 53958eff2110d1478b1a621f722e00777010ffdc Mon Sep 17 00:00:00 2001 From: knarf Date: Thu, 5 Aug 2010 03:34:36 +0000 Subject: Major cleanup and fixes. The current version is able to read in example Meudon data and converges in both hamiltonian and momentum constraint on the Cactus grid until it hits the spectral residuum git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Meudon_Bin_NS/trunk@9 f2ea251b-07d6-4a45-8f2c-a162b3fa7596 --- README | 11 +-- configuration.ccl | 2 +- interface.ccl | 4 +- param.ccl | 14 +-- schedule.ccl | 21 ++--- src/Bin_NS.cc | 235 +++++++++++++++++++++++------------------------- src/check_parameters.cc | 24 ----- src/make.code.defn | 4 +- 8 files changed, 137 insertions(+), 178 deletions(-) delete mode 100644 src/check_parameters.cc diff --git a/README b/README index 8191c71..e62409b 100644 --- a/README +++ b/README @@ -1,6 +1,7 @@ -Cactus Code Thorn ID_Bin_NS -Author(s) : Erik Schnetter -Maintainer(s): Erik Schnetter +Cactus Code Thorn Meudon_Bin_NS +Author(s) : Erik Schnetter + Frank Löffler +Maintainer(s): Einstein Toolkit Maintainers Licence : GPL -------------------------------------------------------------------------- @@ -8,5 +9,5 @@ Licence : GPL Import LORENE Bin_NS binary neutron star initial data. -This thorn is one of three closely related thorns ID_Bin_BH, -ID_Bin_NS, and ID_Mag_NS which all import LORENE initial data. +This thorn is one of three closely related thorns Meudon_Bin_BH, +Meudon_Bin_NS, and Meudon_Mag_NS which all import LORENE initial data. diff --git a/configuration.ccl b/configuration.ccl index ba8ae64..98a01db 100644 --- a/configuration.ccl +++ b/configuration.ccl @@ -1,3 +1,3 @@ -# Configuration definition for thorn ID_Bin_NS +# Configuration definition for thorn Meudon_Bin_NS REQUIRES LORENE diff --git a/interface.ccl b/interface.ccl index e4ac277..3b75a5a 100644 --- a/interface.ccl +++ b/interface.ccl @@ -1,6 +1,6 @@ -# Interface definition for thorn ID_Bin_NS +# Interface definition for thorn Meudon_Bin_NS -IMPLEMENTS: ID_Bin_NS +IMPLEMENTS: Meudon_Bin_NS INHERITS: grid SummationByParts ADMBase HydroBase diff --git a/param.ccl b/param.ccl index d3c1588..d7ac849 100644 --- a/param.ccl +++ b/param.ccl @@ -1,30 +1,30 @@ -# Parameter definitions for thorn ID_Bin_NS +# Parameter definitions for thorn Meudon_Bin_NS SHARES: ADMBase EXTENDS KEYWORD initial_data { - "ID_Bin_NS" :: "" + "Meudon_Bin_NS" :: "" } EXTENDS KEYWORD initial_lapse { - "ID_Bin_NS" :: "" + "Meudon_Bin_NS" :: "" } EXTENDS KEYWORD initial_shift { - "ID_Bin_NS" :: "" + "Meudon_Bin_NS" :: "" } EXTENDS KEYWORD initial_dtlapse { - "ID_Bin_NS" :: "" + "Meudon_Bin_NS" :: "" } EXTENDS KEYWORD initial_dtshift { - "ID_Bin_NS" :: "" + "Meudon_Bin_NS" :: "" } @@ -33,7 +33,7 @@ SHARES: HydroBase EXTENDS KEYWORD initial_hydro { - "ID_Bin_NS" :: "" + "Meudon_Bin_NS" :: "" } diff --git a/schedule.ccl b/schedule.ccl index a174c93..64164f8 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,18 +1,13 @@ -# Schedule definitions for thorn ID_Bin_NS +# Schedule definitions for thorn Meudon_Bin_NS -if (CCTK_EQUALS (initial_data, "ID_Bin_NS") || - CCTK_EQUALS (initial_lapse, "ID_Bin_NS") || - CCTK_EQUALS (initial_shift, "ID_Bin_NS") || - CCTK_EQUALS (initial_dtlapse, "ID_Bin_NS") || - CCTK_EQUALS (initial_dtshift, "ID_Bin_NS") || - CCTK_EQUALS (initial_hydro, "ID_Bin_NS")) +if (CCTK_EQUALS (initial_data, "Meudon_Bin_NS") || + CCTK_EQUALS (initial_lapse, "Meudon_Bin_NS") || + CCTK_EQUALS (initial_shift, "Meudon_Bin_NS") || + CCTK_EQUALS (initial_dtlapse, "Meudon_Bin_NS") || + CCTK_EQUALS (initial_dtshift, "Meudon_Bin_NS") || + CCTK_EQUALS (initial_hydro, "Meudon_Bin_NS")) { - SCHEDULE ID_Bin_NS_check_parameters AT paramcheck - { - LANG: C - } "Check parameters" - - SCHEDULE ID_Bin_NS_initialise IN HydroBase_Initial + SCHEDULE Meudon_Bin_NS_initialise IN HydroBase_Initial { LANG: C } "Set up binary neutron star initial data" diff --git a/src/Bin_NS.cc b/src/Bin_NS.cc index 66dd9df..64fb2d9 100644 --- a/src/Bin_NS.cc +++ b/src/Bin_NS.cc @@ -1,3 +1,6 @@ +/* (c) 2009 Erik Schnetter + * (c) 2010 Frank Loeffler */ + #include #include #include @@ -7,23 +10,23 @@ #include #include +#include using namespace std; - static void set_dt_from_domega (CCTK_ARGUMENTS, CCTK_REAL const* const var, CCTK_REAL * const dtvar, CCTK_REAL const& omega) { DECLARE_CCTK_ARGUMENTS; - + int const npoints = cctk_lsh[0] * cctk_lsh[1] * cctk_lsh[2]; vector dxvar(npoints), dyvar(npoints); - + Diff_gv (cctkGH, 0, var, &dxvar[0], -1); Diff_gv (cctkGH, 1, var, &dyvar[0], -1); - + #pragma omp parallel for for (int i=0; i xx(npoints), yy(npoints), zz(npoints); - + #pragma omp parallel for for (int i=0; i -#include -#include - - - -extern "C" -void ID_Bin_NS_check_parameters (CCTK_ARGUMENTS) -{ - DECLARE_CCTK_ARGUMENTS; - DECLARE_CCTK_PARAMETERS; - - if (not CCTK_EQUALS (initial_data, "ID_Bin_NS") or - not CCTK_EQUALS (initial_lapse, "ID_Bin_NS") or - not CCTK_EQUALS (initial_shift, "ID_Bin_NS") or - not (CCTK_EQUALS (initial_dtlapse, "ID_Bin_NS") or - CCTK_EQUALS (initial_dtlapse, "none")) or - not (CCTK_EQUALS (initial_dtshift, "ID_Bin_NS") or - CCTK_EQUALS (initial_dtshift, "none")) or - not CCTK_EQUALS (initial_hydro, "ID_Bin_NS")) - { - CCTK_PARAMWARN ("The parameters ADMBase::initial_data, ADMBase::initial_lapse, ADMBase::initial_shift, ADMBase::initial_dtlapse, ADMBase::initial_dtshift, and HydroBase::initial_hydro must all be set to the value \"ID_Bin_NS\" or \"none\""); - } -} diff --git a/src/make.code.defn b/src/make.code.defn index bc238db..8656099 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -1,7 +1,7 @@ -# Main make.code.defn file for thorn ID_Bin_NS +# Main make.code.defn file for thorn Meudon_Bin_NS # Source files in this directory -SRCS = Bin_NS.cc check_parameters.cc +SRCS = Bin_NS.cc # Subdirectories containing source files SUBDIRS = -- cgit v1.2.3