@@ -68,15 +68,21 @@ class CurlCurlMLMGPC : public Preconditioner<T,Ops>
6868 */
6969 ~CurlCurlMLMGPC () override = default ;
7070
71+ // Default move and copy operations
72+ CurlCurlMLMGPC (const CurlCurlMLMGPC&) = default ;
73+ CurlCurlMLMGPC& operator =(const CurlCurlMLMGPC&) = default ;
74+ CurlCurlMLMGPC (CurlCurlMLMGPC&&) noexcept = default ;
75+ CurlCurlMLMGPC& operator =(CurlCurlMLMGPC&&) noexcept = default ;
76+
7177 /* *
7278 * \brief Define the preconditioner
7379 */
74- virtual void Define (const T&, Ops* const ) override ;
80+ void Define (const T&, Ops*) override ;
7581
7682 /* *
7783 * \brief Update the preconditioner
7884 */
79- virtual void Update (const T&) override ;
85+ void Update (const T&) override ;
8086
8187 /* *
8288 * \brief Apply (solve) the preconditioner given a RHS
@@ -86,12 +92,12 @@ class CurlCurlMLMGPC : public Preconditioner<T,Ops>
8692 * where A is the linear operator, in this case, the curl-curl operator:
8793 * A x = curl (alpha * curl (x) ) + beta * x
8894 */
89- virtual void Apply (T&, const T&) override ;
95+ void Apply (T&, const T&) override ;
9096
9197 /* *
9298 * \brief Print parameters
9399 */
94- virtual void printParameters () const override ;
100+ void printParameters () const override ;
95101
96102 /* *
97103 * \brief Check if the nonlinear solver has been defined.
@@ -189,7 +195,7 @@ void CurlCurlMLMGPC<T,Ops>::printParameters() const
189195template <class T , class Ops >
190196void CurlCurlMLMGPC<T,Ops>::readParameters()
191197{
192- amrex::ParmParse pp (PreconditionerTypes::curl_curl_mlmg);
198+ const amrex::ParmParse pp (PreconditionerTypes::curl_curl_mlmg);
193199 pp.query (" verbose" , m_verbose);
194200 pp.query (" bottom_verbose" , m_bottom_verbose);
195201 pp.query (" max_iter" , m_max_iter);
@@ -200,8 +206,6 @@ void CurlCurlMLMGPC<T,Ops>::readParameters()
200206 pp.query (" relative_tolerance" , m_rtol);
201207 pp.query (" use_gmres" , m_use_gmres);
202208 pp.query (" use_gmres_pc" , m_use_gmres_pc);
203-
204- return ;
205209}
206210
207211template <class T , class Ops >
@@ -274,7 +278,6 @@ void CurlCurlMLMGPC<T,Ops>::Define ( const T& a_U,
274278#endif
275279
276280 m_is_defined = true ;
277- return ;
278281}
279282
280283template <class T , class Ops >
@@ -288,8 +291,8 @@ void CurlCurlMLMGPC<T,Ops>::Update (const T& a_U)
288291 amrex::ignore_unused (a_U);
289292
290293 // set the coefficients alpha and beta for curl-curl op
291- RT alpha = (m_ops->theta ()*this ->m_dt *PhysConst::c) * (m_ops->theta ()*this ->m_dt *PhysConst::c);
292- RT beta = RT (1.0 );
294+ const RT alpha = (m_ops->theta ()*this ->m_dt *PhysConst::c) * (m_ops->theta ()*this ->m_dt *PhysConst::c);
295+ const RT beta = RT (1.0 );
293296
294297// currently not implemented in 1D
295298#ifndef WARPX_DIM_1D_Z
@@ -303,8 +306,6 @@ void CurlCurlMLMGPC<T,Ops>::Update (const T& a_U)
303306 << " alpha = " << alpha << " , "
304307 << " beta = " << beta << " \n " ;
305308 }
306-
307- return ;
308309}
309310
310311template <class T , class Ops >
@@ -445,8 +446,6 @@ void CurlCurlMLMGPC<T,Ops>::Apply (T& a_x, const T& a_b)
445446 copyWarpXAMFFromMLCCAMF (x_mfarrvec[n], solution, IntVect::TheZeroVector ());
446447
447448 }
448-
449- return ;
450449}
451450
452451#endif
0 commit comments