From 7a2cd08fae003e9e7462396e8e538bc7a6d641ca Mon Sep 17 00:00:00 2001 From: Steven Hahn Date: Fri, 8 Sep 2023 10:08:05 -0400 Subject: [PATCH] Add SplineC2RT Signed-off-by: Steven Hahn --- .../BsplineFactory/SplineC2RT.cpp | 56 +++++++++---------- .../BsplineFactory/SplineC2RT.h | 17 +++--- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.cpp b/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.cpp index a1e1649b638..0896027210e 100644 --- a/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.cpp +++ b/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.cpp @@ -22,11 +22,11 @@ namespace qmcplusplus { -template -SplineC2R::SplineC2R(const SplineC2R& in) = default; +template +SplineC2RT::SplineC2RT(const SplineC2R& in) = default; -template -inline void SplineC2R::set_spline(SingleSplineType* spline_r, +template +inline void SplineC2RT::set_spline(SingleSplineType* spline_r, SingleSplineType* spline_i, int twist, int ispline, @@ -36,8 +36,8 @@ inline void SplineC2R::set_spline(SingleSplineType* spline_r, SplineInst->copy_spline(spline_i, 2 * ispline + 1); } -template -bool SplineC2R::read_splines(hdf_archive& h5f) +template +bool SplineC2RT::read_splines(hdf_archive& h5f) { std::ostringstream o; o << "spline_" << MyIndex; @@ -45,8 +45,8 @@ bool SplineC2R::read_splines(hdf_archive& h5f) return h5f.readEntry(bigtable, o.str().c_str()); //"spline_0"); } -template -bool SplineC2R::write_splines(hdf_archive& h5f) +template +bool SplineC2RT::write_splines(hdf_archive& h5f) { std::ostringstream o; o << "spline_" << MyIndex; @@ -54,8 +54,8 @@ bool SplineC2R::write_splines(hdf_archive& h5f) return h5f.writeEntry(bigtable, o.str().c_str()); //"spline_0"); } -template -inline void SplineC2R::assign_v(const PointType& r, +template +inline void SplineC2RT::assign_v(const PointType& r, const vContainer_type& myV, ValueVector& psi, int first, @@ -99,8 +99,8 @@ inline void SplineC2R::assign_v(const PointType& r, } } -template -void SplineC2R::evaluateValue(const ParticleSet& P, const int iat, ValueVector& psi) +template +void SplineC2RT::evaluateValue(const ParticleSet& P, const int iat, ValueVector& psi) { const PointType& r = P.activeR(iat); PointType ru(PrimLattice.toUnit_floor(r)); @@ -115,8 +115,8 @@ void SplineC2R::evaluateValue(const ParticleSet& P, const int iat, ValueVect } } -template -void SplineC2R::evaluateDetRatios(const VirtualParticleSet& VP, +template +void SplineC2RT::evaluateDetRatios(const VirtualParticleSet& VP, ValueVector& psi, const ValueVector& psiinv, std::vector& ratios) @@ -163,8 +163,8 @@ void SplineC2R::evaluateDetRatios(const VirtualParticleSet& VP, /** assign_vgl */ -template -inline void SplineC2R::assign_vgl(const PointType& r, +template +inline void SplineC2RT::assign_vgl(const PointType& r, ValueVector& psi, GradVector& dpsi, ValueVector& d2psi, @@ -316,8 +316,8 @@ inline void SplineC2R::assign_vgl(const PointType& r, /** assign_vgl_from_l can be used when myL is precomputed and myV,myG,myL in cartesian */ -template -inline void SplineC2R::assign_vgl_from_l(const PointType& r, ValueVector& psi, GradVector& dpsi, ValueVector& d2psi) +template +inline void SplineC2RT::assign_vgl_from_l(const PointType& r, ValueVector& psi, GradVector& dpsi, ValueVector& d2psi) { constexpr ST two(2); const ST x = r[0], y = r[1], z = r[2]; @@ -431,8 +431,8 @@ inline void SplineC2R::assign_vgl_from_l(const PointType& r, ValueVector& ps } } -template -void SplineC2R::evaluateVGL(const ParticleSet& P, +template +void SplineC2RT::evaluateVGL(const ParticleSet& P, const int iat, ValueVector& psi, GradVector& dpsi, @@ -451,8 +451,8 @@ void SplineC2R::evaluateVGL(const ParticleSet& P, } } -template -void SplineC2R::assign_vgh(const PointType& r, +template +void SplineC2RT::assign_vgh(const PointType& r, ValueVector& psi, GradVector& dpsi, HessVector& grad_grad_psi, @@ -675,8 +675,8 @@ void SplineC2R::assign_vgh(const PointType& r, } } -template -void SplineC2R::evaluateVGH(const ParticleSet& P, +template +void SplineC2RT::evaluateVGH(const ParticleSet& P, const int iat, ValueVector& psi, GradVector& dpsi, @@ -694,8 +694,8 @@ void SplineC2R::evaluateVGH(const ParticleSet& P, } } -template -void SplineC2R::assign_vghgh(const PointType& r, +template +void SplineC2RT::assign_vghgh(const PointType& r, ValueVector& psi, GradVector& dpsi, HessVector& grad_grad_psi, @@ -1182,7 +1182,7 @@ void SplineC2R::evaluateVGHGH(const ParticleSet& P, } } -template class SplineC2R; -template class SplineC2R; +template class SplineC2R>; +template class SplineC2R>; } // namespace qmcplusplus diff --git a/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.h b/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.h index 05b8c4a0b34..296748ad2ad 100644 --- a/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.h +++ b/src/QMCWaveFunctions/BsplineFactory/SplineC2RT.h @@ -38,17 +38,18 @@ namespace qmcplusplus * The rest complex splines produce 1 real orbital. * All the output orbitals are real (C2R). The maximal number of output orbitals is OrbitalSetSize. */ -template -class SplineC2R : public BsplineSet +template +class SplineC2RT : public BsplineSetT { public: using SplineType = typename bspline_traits::SplineType; using BCType = typename bspline_traits::BCType; - using DataType = ST; + using DataType = T::value_type; using PointType = TinyVector; using SingleSplineType = UBspline_3d_d; // types for evaluation results - using TT = typename BsplineSet::ValueType; + using ST = T::value_type; + using TT = typename BsplineSetT::ValueType; using BsplineSet::GGGVector; using BsplineSet::GradVector; using BsplineSet::HessVector; @@ -84,9 +85,9 @@ class SplineC2R : public BsplineSet ghContainer_type mygH; public: - SplineC2R(const std::string& my_name) : BsplineSet(my_name), nComplexBands(0) {} + SplineC2RT(const std::string& my_name) : BsplineSet(my_name), nComplexBands(0) {} - SplineC2R(const SplineC2R& in); + SplineC2RT(const SplineC2R& in); virtual std::string getClassName() const override { return "SplineC2R"; } virtual std::string getKeyword() const override { return "SplineC2R"; } bool isComplex() const override { return true; }; @@ -210,8 +211,8 @@ class SplineC2R : public BsplineSet friend struct BsplineReaderBase; }; -extern template class SplineC2R; -extern template class SplineC2R; +extern template class SplineC2R>; +extern template class SplineC2R>; } // namespace qmcplusplus #endif