Skip to content

Commit

Permalink
Multipole: remove deprecated pars
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Jun 22, 2024
1 parent 4195c7e commit 640e7c1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 70 deletions.
28 changes: 0 additions & 28 deletions Multipole/param.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -121,34 +121,6 @@ CCTK_BOOLEAN test_mode_proportional_to_r "whether the test spherical harmonic co
{
} "no"


# This parameter is deprecated and is no longer used
KEYWORD mode_type "Which type of mode extraction do we have" STEERABLE=always
{
"all modes" :: "Extract all modes up to (l_mode, m_mode)."
"specific mode" :: "Select one specific (l_mode, m_mode) mode"
"deprecated" :: "Deprecated"
} "deprecated"

# This parameter is deprecated and is no longer used
CCTK_INT l_min "all modes: above which l mode to calculate/ specific mode: which l mode to extract" STEERABLE=always
{
-1:* :: "Deprecated"
} -1

# This parameter is deprecated and is only used if set to a nondefault
# value, in which case it is a synonym for l_max.
CCTK_INT l_mode "The maximum l mode to extract" STEERABLE=always
{
-1:* :: "Deprecated"
} -1

# This parameter is deprecated and is no longer used
CCTK_INT m_mode "all modes: Up to which m mode to calculate/ specific mode: which m mode to extract " STEERABLE=always
{
-100:* :: "Deprecated"
} -100

CCTK_BOOLEAN output_ascii "Output a simple ASCII file for each mode at each radius"
{
} "yes"
Expand Down
6 changes: 0 additions & 6 deletions Multipole/schedule.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ if (enable_test)
}


SCHEDULE Multipole_ParamCheck AT CCTK_PARAMCHECK
{
LANG: C
OPTIONS: GLOBAL
} "Check Multipole parameters"

SCHEDULE Multipole_Calc AT analysis AFTER WeylScal4_psi4_calc_4th
{
LANG: C
Expand Down
37 changes: 1 addition & 36 deletions Multipole/src/multipole.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ static void get_spin_weights(Multipole::variable_desc vars[], int n_vars,
*n_weights = n_spin_weights;
}

// For backward compatibility we allow the user to set l_mode instead
// of l_max, but if it is left at the default of -1, l_max is used.
static int get_l_max() {
DECLARE_CCTK_PARAMETERS;
return l_mode == -1 ? l_max : l_mode;
}

static void
setup_harmonics(const int spin_weights[max_spin_weights], int n_spin_weights,
int lmax, CCTK_REAL th[], CCTK_REAL ph[], int array_size,
Expand Down Expand Up @@ -219,34 +212,6 @@ setup_harmonics(const int spin_weights[max_spin_weights], int n_spin_weights,
}
}

extern "C" void Multipole_ParamCheck(CCTK_ARGUMENTS) {
DECLARE_CCTK_PARAMETERS;
DECLARE_CCTK_ARGUMENTS;

if (l_mode != -1) {
CCTK_WARN(CCTK_WARN_ALERT,
"The parameter l_mode is deprecated. Use l_max instead. For "
"compatibility, l_max = l_mode is being used.");
}

if (!CCTK_Equals(mode_type, "deprecated")) {
CCTK_WARN(CCTK_WARN_ALERT, "The parameter mode_type is deprecated and is "
"no longer used. All modes will be computed.");
}

if (l_min != -1) {
CCTK_WARN(CCTK_WARN_ALERT,
"The parameter l_min is deprecated and is no longer used. Modes "
"from l = 0 will be computed.");
}

if (m_mode != -100) {
CCTK_WARN(
CCTK_WARN_ALERT,
"The parameter m_mode is deprecated. All m modes will be computed.");
}
}

extern "C" void Multipole_Init(CCTK_ARGUMENTS) {
using namespace Loop;
DECLARE_CCTK_ARGUMENTS_Multipole_Init;
Expand Down Expand Up @@ -290,7 +255,7 @@ extern "C" void Multipole_Calc(CCTK_ARGUMENTS) {
if (out_every == 0 || cctk_iteration % out_every != 0)
return;

int lmax = get_l_max();
int lmax = l_max;

assert(lmax + 1 <= max_l_modes);

Expand Down

0 comments on commit 640e7c1

Please sign in to comment.