Hex  2.2
Hydrogen-electron collision solver
ang.h
Go to the documentation of this file.
1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
2 // //
3 // / / / / __ \ \ / / //
4 // / /__ / / / _ \ \ \/ / //
5 // / ___ / | |/_/ / /\ \ //
6 // / / / / \_\ / / \ \ //
7 // //
8 // //
9 // Copyright (c) 2016, Jakub Benda, Charles University in Prague //
10 // //
11 // MIT License: //
12 // //
13 // Permission is hereby granted, free of charge, to any person obtaining a //
14 // copy of this software and associated documentation files (the "Software"), //
15 // to deal in the Software without restriction, including without limitation //
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense, //
17 // and/or sell copies of the Software, and to permit persons to whom the //
18 // Software is furnished to do so, subject to the following conditions: //
19 // //
20 // The above copyright notice and this permission notice shall be included //
21 // in all copies or substantial portions of the Software. //
22 // //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS //
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //
26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, //
27 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF //
28 // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //
29 // //
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 #ifndef HEX_ANG_H
33 #define HEX_ANG_H
34 
35 #include "hex-arrays.h"
36 
37 #include "io.h"
38 
45 {
46  public:
47 
49  AngularBasis (InputFile const & inp);
50  AngularBasis (AngularBasis const & ang)
51  : L_(ang.L_), S_(ang.S_), Pi_(ang.Pi_), maxell_(ang.maxell_),
52  maxlambda_(ang.maxlambda_), states_(ang.states_), f_(ang.f_) {}
53 
55  std::vector<std::pair<int,int>> const & states () const { return states_; }
56 
58  int maxell () const { return maxell_; }
59 
61  int maxlambda () const { return maxlambda_; }
62 
64  Real f (int ill, int illp, int lambda) const
65  {
66  return f_[(lambda * states_.size() + ill) * states_.size() + illp];
67  }
68 
70  rArray const & f () const { return f_; }
71 
73  int L () const { return L_; }
74 
76  int S () const { return S_; }
77  int & S () { return S_; }
78 
80  int Pi () const { return Pi_; }
81 
82  private:
83 
84  // Quantum numbers.
85  int L_, S_, Pi_, nL_;
86 
87  // Highest orbital number.
88  int maxell_;
89 
90  // Highest multipole.
91  int maxlambda_;
92 
93  // List of coupled angular states.
94  std::vector<std::pair<int,int>> states_;
95 
96  // Angular integrals.
97  rArray f_;
98 };
99 
100 #endif
AngularBasis(AngularBasis const &ang)
Definition: ang.h:50
Angular basis.
Definition: ang.h:44
int L() const
Total angular momentum.
Definition: ang.h:73
int & S()
Definition: ang.h:77
std::vector< std::pair< int, int > > const & states() const
List of coupled angular states.
Definition: ang.h:55
Input parameters.
Definition: io.h:321
int S() const
Total spin.
Definition: ang.h:76
int maxlambda() const
Highest multipole.
Definition: ang.h:61
int maxell() const
Highest orbital number.
Definition: ang.h:58
Real f(int ill, int illp, int lambda) const
Angular integrals.
Definition: ang.h:64
rArray const & f() const
Angular integrals.
Definition: ang.h:70
int Pi() const
Total parity.
Definition: ang.h:80
AngularBasis(InputFile const &inp)
Constructor.
Definition: ang.cpp:36