Skip to content

Commit

Permalink
Multipole: add more comments to Surface
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Jun 27, 2024
1 parent a7728ba commit 85f1160
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Multipole/src/surface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Multipole {

// Interpolate both the real and imag part of a complext field to the surface
void Surface::interpolate(CCTK_ARGUMENTS, int realFieldIndex,
int imagFieldIndex) {
DECLARE_CCTK_PARAMETERS;
Expand Down Expand Up @@ -108,6 +109,8 @@ void Surface::integrate(const std::vector<CCTK_REAL> &array1r,
}
}

// 1D output of the real/imag part of the complex field on the surface along
// theta/phi
void Surface::output1DSingle(CCTK_ARGUMENTS, const std::string &fileName,
MpCoord coord,
const std::vector<CCTK_REAL> &data) const {
Expand All @@ -129,6 +132,7 @@ void Surface::output1DSingle(CCTK_ARGUMENTS, const std::string &fileName,
}
}

// 1D output of the complex field on the surface along theta and phi
void Surface::output1D(CCTK_ARGUMENTS, const VariableParse &var,
CCTK_REAL rad) const {
DECLARE_CCTK_ARGUMENTS;
Expand Down
5 changes: 5 additions & 0 deletions Multipole/src/surface.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,22 @@ public:

inline int index2D(int it, int ip) const { return it + (nTheta_ + 1) * ip; }

// Interpolate both the real and imag part of a complext field to the surface
void interpolate(CCTK_ARGUMENTS, int realFieldIndex, int imagFieldIndex);

// Take the integral of conj(array1)*array2*sin(th)
void integrate(const std::vector<CCTK_REAL> &array1r,
const std::vector<CCTK_REAL> &array1i,
const std::vector<CCTK_REAL> &array2r,
const std::vector<CCTK_REAL> &array2i, CCTK_REAL *outre,
CCTK_REAL *outim);

// 1D output of the real/imag part of the complex field on the surface along
// theta/phi
void output1DSingle(CCTK_ARGUMENTS, const std::string &fileName,
MpCoord coord, const std::vector<CCTK_REAL> &data) const;

// 1D output of the complex field on the surface along theta and phi
void output1D(CCTK_ARGUMENTS, const VariableParse &var, CCTK_REAL rad) const;

protected:
Expand Down

0 comments on commit 85f1160

Please sign in to comment.