QMCPACK
TWFdispatcher.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2021 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #ifndef QMCPLUSPLUS_TWFDISPATCH_H
14 #define QMCPLUSPLUS_TWFDISPATCH_H
15 
16 #include "TrialWaveFunction.h"
17 #include "TWFGrads.hpp"
18 
19 namespace qmcplusplus
20 {
21 /** Wrappers for dispatching to TrialWaveFunction single walker APIs or mw_ APIs.
22  * This should be only used by QMC drivers.
23  * member function names must match mw_ APIs in TrialWaveFunction
24  */
26 {
27 public:
33 
34  TWFdispatcher(bool use_batch);
35 
37  const RefVectorWithLeader<ParticleSet>& p_list) const;
38 
41  const std::vector<bool>& recompute) const;
42 
45  int iat,
46  std::vector<PsiValue>& ratios,
47  ComputeType ct = ComputeType::ALL) const;
48 
51  int ig) const;
52 
53  template<CoordsType CT>
56  int iat,
57  TWFGrads<CT>& grads) const;
58 
59  template<CoordsType CT>
62  int iat,
63  std::vector<PsiValue>& ratios,
64  TWFGrads<CT>& grads) const;
65 
68  int iat,
69  const std::vector<bool>& isAccepted,
70  bool safe_to_delay) const;
71 
73 
76  bool fromscratch) const;
77 
80  const RefVector<std::vector<ValueType>>& ratios_list,
81  ComputeType ct) const;
82 
83 private:
84  bool use_batch_;
85 };
86 } // namespace qmcplusplus
87 
88 #endif
WaveFunctionComponent::PsiValue PsiValue
void flex_evalGrad(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, TWFGrads< CT > &grads) const
void flex_accept_rejectMove(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, const std::vector< bool > &isAccepted, bool safe_to_delay) const
Fixed-size array.
Definition: OhmmsTinyMeta.h:30
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
WaveFunctionComponent::GradType GradType
void flex_evaluateGL(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, bool fromscratch) const
TWFdispatcher(bool use_batch)
WaveFunctionComponent::ValueType ValueType
void flex_evaluateLog(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const
void flex_prepareGroup(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, int ig) const
WaveFunctionComponent::ComplexType ComplexType
Wrappers for dispatching to TrialWaveFunction single walker APIs or mw_ APIs.
Definition: TWFdispatcher.h:25
TrialWaveFunction::PsiValue PsiValue
Definition: TWFdispatcher.h:28
void flex_recompute(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< bool > &recompute) const
void flex_completeUpdates(const RefVectorWithLeader< TrialWaveFunction > &wf_list) const
void flex_evaluateRatios(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, const RefVector< std::vector< ValueType >> &ratios_list, ComputeType ct) const
void flex_calcRatio(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, ComputeType ct=ComputeType::ALL) const
ComputeType
enum type for computing partial WaveFunctionComponents
void flex_calcRatioGrad(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, int iat, std::vector< PsiValue > &ratios, TWFGrads< CT > &grads) const
Declaration of a TrialWaveFunction.
std::vector< std::reference_wrapper< T > > RefVector
TrialWaveFunction::ComplexType Complex
Definition: TWFdispatcher.h:32
TrialWaveFunction::ValueType ValueType
Definition: TWFdispatcher.h:30