QMCPACK
WaveFunctionTypes.hpp
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: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef QMCPLUSPLUS_QMC_WAVEFUNCTION_TYPES_HPP
13 #define QMCPLUSPLUS_QMC_WAVEFUNCTION_TYPES_HPP
14 
16 #include "OhmmsPETE/OhmmsMatrix.h"
17 
18 namespace qmcplusplus
19 {
20 
21 /** Consistent way to get the set of types used in the QMCWaveFunction module, without resorting
22  * to ifdef'd type aliases accessed through inheritance.
23  *
24  * You can at least test all flavors without tricky scoping or recompiling.
25  * Determines type set for class through composition instead of inheritance.
26  *
27  * Its somewhat question whether it is even worth have all these shortened type aliases
28  * Defined differently in different modules of the code, but it needs further study.
29  *
30  * I would have liked to use QMCTypes but they do something dumb with handling complex
31  * which basically bakes in multiple builds for Real and Complex.
32  */
33 template<typename VALUE, typename FP_VALUE>
34 struct WaveFunctionTypes final
35 {
36  // Should be factored up into a non broken QMCTypes
37  using Value = VALUE;
38  using FullPrecValue = FP_VALUE;
41  using Complex = std::complex<Real>;
42  // This is all that belongs here so far.
43  using PsiValue = FP_VALUE;
46  using LogValue = std::complex<FullPrecReal>;
47 };
48 
49 } // namespace qmcplusplus
50 #endif
Fixed-size array.
Definition: OhmmsTinyMeta.h:30
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
RealAlias< FullPrecValue > FullPrecReal
Consistent way to get the set of types used in the QMCWaveFunction module, without resorting to ifdef...
Tensor<T,D> class for D by D tensor.
Definition: OhmmsTinyMeta.h:32
std::complex< FullPrecReal > LogValue
typename RealAlias_impl< T >::value_type RealAlias
If you have a function templated on a value that can be real or complex and you need to get the base ...