From 2e141f5ad597bc15e651bafc7f0d54317b00ee8a Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Fri, 14 Jun 2024 16:54:19 -0400 Subject: [PATCH] delete FewModesFT copy constructor --- src/utils/few_modes_ft.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/few_modes_ft.hpp b/src/utils/few_modes_ft.hpp index ce17401c..84bafb9b 100644 --- a/src/utils/few_modes_ft.hpp +++ b/src/utils/few_modes_ft.hpp @@ -47,6 +47,10 @@ class FewModesFT { std::string prefix, int num_modes, ParArray2D k_vec, Real k_peak, Real sol_weight, Real t_corr, uint32_t rseed, bool fill_ghosts = false); + // prevent objects from being copied (this prevents user error) + FewModesFT(FewModesFT const &) = delete; + FewModesFT &operator=(FewModesFT const &) = delete; + ParArray2D GetVarHat() { return var_hat_; } int GetNumModes() { return num_modes_; } void SetPhases(MeshBlock *pmb, ParameterInput *pin);