From b5d03f6dc5ea4dbf8b0e90a2d9d6fd52edcbaff9 Mon Sep 17 00:00:00 2001 From: Liwei Ji Date: Wed, 26 Jun 2024 12:29:51 +0000 Subject: [PATCH] Multipole: add a complex field to surface --- Multipole/src/surface.hxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Multipole/src/surface.hxx b/Multipole/src/surface.hxx index dd06f7cb..96552019 100644 --- a/Multipole/src/surface.hxx +++ b/Multipole/src/surface.hxx @@ -24,6 +24,8 @@ public: x_.resize(arraySize); y_.resize(arraySize); z_.resize(arraySize); + real_.resize(arraySize); + imag_.resize(arraySize); // Add an offset for midpoint integration. const CCTK_REAL is_midpoint = static_cast(isMidPoint); @@ -45,19 +47,22 @@ public: const std::vector &getPhi() const { return phi_; } protected: - inline int index2D(int it, int ip) { return it + (nTheta_ + 1) * ip; } + inline int index2D(int it, int ip) const { return it + (nTheta_ + 1) * ip; } const int nTheta_, nPhi_; std::vector theta_, phi_; std::vector x_, y_, z_; // embedding map + + // a complex field to be integrated on the surface + std::vector real_, imag_; }; // 2D Sphere class Sphere : public Surface { public: - Sphere(int nTheta, int nPhi, bool isMidPoint, std::vector spinWeights, - int lmax) + Sphere(int nTheta, int nPhi, bool isMidPoint, + const std::vector &spinWeights, int lmax) : Surface(nTheta, nPhi, isMidPoint), spin_weights_(spinWeights), lmax_(lmax) { xhat_.resize(theta_.size());