Skip to content

Commit

Permalink
Multipole: rename class ModeArray
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Jun 24, 2024
1 parent 9ac3a73 commit 25f61d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Multipole/src/multipole.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ setup_harmonics(const int spin_weights[max_spin_weights], int n_spin_weights,
}

static void output_modes(CCTK_ARGUMENTS, const variable_desc vars[],
const CCTK_REAL radii[], const mode_array &modes) {
const CCTK_REAL radii[], const ModeArray &modes) {
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;

Expand Down Expand Up @@ -253,7 +253,7 @@ extern "C" void Multipole_Calc(CCTK_ARGUMENTS) {
CCTK_VINFO("initialized arrays");
}

mode_array modes(n_variables, nradii, lmax);
ModeArray modes(n_variables, nradii, lmax);

for (int v = 0; v < n_variables; v++) {
// assert(vars[v].spin_weight == -2);
Expand Down
6 changes: 3 additions & 3 deletions Multipole/src/multipole.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ struct variables_desc {

// a simple array class to hold complex modes abs(m) <= l, l <= lmax, for
// nradii radii for nvars variables
class mode_array {
class ModeArray {
public:
mode_array(int nvars_, int nradii_, int lmax_)
ModeArray(int nvars_, int nradii_, int lmax_)
: nvars(nvars_), nradii(nradii_), lmax(lmax_),
modes(size_t(nvars * nradii * (lmax + 1) * (lmax + 1) * 2)) {}
virtual ~mode_array() {}
virtual ~ModeArray() {}
// default copy and assignment is ok

CCTK_REAL &operator()(int v, int ri, int l, int m, bool is_im) {
Expand Down
2 changes: 1 addition & 1 deletion Multipole/src/utils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void OutputComplexToFile(CCTK_ARGUMENTS, const string &name, CCTK_REAL redata,
}

void OutputComplexToH5File(CCTK_ARGUMENTS, const variable_desc vars[],
const CCTK_REAL radii[], const mode_array &modes) {
const CCTK_REAL radii[], const ModeArray &modes) {

#ifdef HAVE_CAPABILITY_HDF5

Expand Down
2 changes: 1 addition & 1 deletion Multipole/src/utils.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void OutputComplexToFile(CCTK_ARGUMENTS, const string &name, CCTK_REAL redata,
CCTK_REAL imdata);

void OutputComplexToH5File(CCTK_ARGUMENTS, const variable_desc vars[],
const CCTK_REAL radii[], const mode_array &modes);
const CCTK_REAL radii[], const ModeArray &modes);

void CoordSetup(CCTK_REAL xhat[], CCTK_REAL yhat[], CCTK_REAL zhat[],
CCTK_REAL th[], CCTK_REAL ph[]);
Expand Down

0 comments on commit 25f61d0

Please sign in to comment.