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) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
8 //                    Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
9 //
10 // File created by: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 #include "SPOInfo.h"
15 #include <limits>
16 
17 
18 namespace qmcplusplus
19 {
20 typedef QMCTraits::RealType RealType;
21 
22 const int SPOInfo::no_index       = -1;
23 const int SPOInfo::no_degeneracy  = -1;
24 const RealType SPOInfo::no_energy = std::numeric_limits<RealType>::max();
25 
SPOInfo()26 SPOInfo::SPOInfo()
27 {
28   index      = no_index;
29   degeneracy = no_degeneracy;
30   energy     = no_energy;
31 }
32 
SPOInfo(int orb_index,RealType en)33 SPOInfo::SPOInfo(int orb_index, RealType en)
34 {
35   index      = orb_index;
36   degeneracy = no_degeneracy;
37   energy     = en;
38 }
39 
report(const std::string & pad) const40 void SPOInfo::report(const std::string& pad) const
41 {
42   if (has_index())
43     app_log() << pad << "index      = " << index << std::endl;
44   else
45     app_log() << pad << "index      = not assigned" << std::endl;
46   if (has_energy())
47     app_log() << pad << "energy     = " << energy << std::endl;
48   else
49     app_log() << pad << "energy     = not assigned" << std::endl;
50   if (has_degeneracy())
51     app_log() << pad << "degeneracy = " << degeneracy << std::endl;
52   else
53     app_log() << pad << "degeneracy = not assigned" << std::endl;
54   app_log().flush();
55 }
56 } // namespace qmcplusplus
57