From ce2cfb6f3574ccc0881fd4b19c55a328fe431771 Mon Sep 17 00:00:00 2001 From: guzman Date: Fri, 3 May 2002 14:12:08 +0000 Subject: New file for these, the goal is to check the consistency of parameters in Einstein 2 git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDAxiOddBrillBH/trunk@42 b6f3ac56-194f-0410-8878-cdf6079d7f1b --- src/ParamCheck.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 src/ParamCheck.c diff --git a/src/ParamCheck.c b/src/ParamCheck.c new file mode 100644 index 0000000..93b9f97 --- /dev/null +++ b/src/ParamCheck.c @@ -0,0 +1,107 @@ + /*@@ + @file ParamCheck.c + @date Fri Apr 26 18:03:09 2002 + @author Tom Goodale + @desc + Check the parameters for IDAxiOddBrillBH + @enddesc + @version $Header: /arrangements/PerturbedBH2/IDAxiOddBrillBH/src/ParamCheck.c,v 1.1 2002/04/30 guzman + @@*/ + +#include "cctk.h" + +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +static const char *rcsid = "$Header$"; + +CCTK_FILEVERSION(IDAxiOddBrillBH_ParamCheck_c) + +/******************************************************************** + ********************* Local Data Types *********************** + ********************************************************************/ + +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ***************** Scheduled Routine Prototypes ********************* + ********************************************************************/ + +void IDAxiOddBrillBH_ParamCheck(CCTK_ARGUMENTS); +void IDAxiOddBrillBH_ConformalCheck(CCTK_ARGUMENTS); + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + +/******************************************************************** + ********************* External Routines ********************** + ********************************************************************/ + +void IDAxiOddBrillBH_ParamCheck(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + /* Do we know how to deal with this type of metric ? */ + if(! CCTK_EQUALS(metric_type, "physical") && + ! CCTK_EQUALS(metric_type, "static conformal")) + { + CCTK_PARAMWARN("Unknown ADMBase::metric_type - known types are \"physical\" and \"static conformal\""); + } + + if(CCTK_EQUALS(metric_type, "static conformal") && + ! CCTK_EQUALS(conformal_storage, "factor+derivs+2nd derivs")) + { + CCTK_PARAMWARN("ADMConstraints can currently only work with a physical metric or a static conf"); + } + +} + +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ + + /*@@ + @routine IDAxiOddBrillBH_ConformalCheck + @date Tu Apr 30 2002 + @author Goodale-Guzman + @desc + Check that the initial data has setup enough derivatives. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void IDAxiOddBrillBH_ConformalCheck(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + if(CCTK_EQUALS(metric_type, "physical")) + { + /* Use this internally so we don't need to check the parameter again. */ + *conformal_state = 0; + } + else if(CCTK_EQUALS(metric_type, "static conformal")) + { + if(*conformal_state < 3) + { + CCTK_WARN(0, "IDAxiOddBrillBH needs second derivatives of the conformal factor when running with a static conformal metric"); + } + } + +} +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ + -- cgit v1.2.3