aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/CarpetParamCheck.cc
blob: ecc96cabe7e066ab66d4877749d55ab2bca5a906 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <assert.h>
#include <stdlib.h>

#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"

#include "carpet.hh"

extern "C" {
  static const char* rcsid = "$Header:$";
  CCTK_FILEVERSION(Carpet_Carpet_CarpetParamCheck_cc);
}



namespace Carpet {
  
  using namespace std;
  
  /** Ensure that the parameters have legal values.
   *
   * Note that this checking happens only after most of Carpet has
   * already been set up.
   */
  void CarpetParamCheck (CCTK_ARGUMENTS)
  {
    DECLARE_CCTK_ARGUMENTS;
    DECLARE_CCTK_PARAMETERS;
    
    if (CCTK_ParameterQueryTimesSet ("periodic", "Carpet")
	|| CCTK_ParameterQueryTimesSet ("periodic_x", "Carpet")
	|| CCTK_ParameterQueryTimesSet ("periodic_y", "Carpet")
	|| CCTK_ParameterQueryTimesSet ("periodic_z", "Carpet")) {
      CCTK_PARAMWARN ("Some of the parameters \"Carpet::periodic*\" have been set.  These parameters are there for compatibility reasons only and must not be used.");
    }
  }
  
} // namespace Carpet