TBTK
ManyBodyContext.h
Go to the documentation of this file.
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
24 #ifndef COM_DAFER45_TBTK_MANY_BODY_CONTEXT
25 #define COM_DAFER45_TBTK_MANY_BODY_CONTEXT
26 
27 #include "TBTK/BitRegister.h"
29 #include "TBTK/FockSpace.h"
30 #include "TBTK/FockStateRuleSet.h"
31 #include "TBTK/InteractionAmplitudeSet.h"
33 
34 #include <memory>
35 
36 namespace TBTK{
37 
39 public:
42 // ManyBodyContext(FockSpace<BitRegister> *fockSpace);
43  ManyBodyContext(const SingleParticleContext *singleParticleContext);
44 
47 // ManyBodyContext(FockSpace<ExtensiveBitRegister> *fockSpace);
48 
51 
53  bool wrapsBitRegister();
54 
58 
62 
66 
69 
71  void addIA(InteractionAmplitude ia);
72 
75 
78 private:
80  std::shared_ptr<FockSpace<BitRegister>> brFockSpace;
81 
83  std::shared_ptr<FockSpace<ExtensiveBitRegister>> ebrFockSpace;
84 
86 // std::vector<FockStateRule::WrapperRule> fockStateRules;
87  FockStateRuleSet fockStateRuleSet;
88 
90  std::shared_ptr<InteractionAmplitudeSet> interactionAmplitudeSet;
91 };
92 
94  if(brFockSpace.get() != NULL)
95  return true;
96  else
97  return false;
98 }
99 
101  if(ebrFockSpace.get() != NULL)
102  return true;
103  else
104  return false;
105 }
106 
108  return brFockSpace.get();
109 }
110 
112  return ebrFockSpace.get();
113 }
114 
116  fockStateRuleSet.addFockStateRule(rule);
117 }
118 
120  interactionAmplitudeSet.get()->addIA(ia);
121 }
122 
124  return interactionAmplitudeSet.get();
125 }
126 
128  return fockStateRuleSet;
129 }
130 
131 }; //End of namespace TBTK
132 
133 #endif
The context for the single particle part of a Model.
Definition: SingleParticleContext.h:36
const InteractionAmplitudeSet * getInteractionAmplitudeSet() const
Definition: ManyBodyContext.h:123
Definition: FockSpace.h:44
Register of bits.
ManyBodyContext(const SingleParticleContext *singleParticleContext)
void addIA(InteractionAmplitude ia)
Definition: ManyBodyContext.h:119
const FockStateRuleSet & getFockStateRuleSet() const
Definition: ManyBodyContext.h:127
void addFockStateRule(const FockStateRule::WrapperRule &fockStateRule)
Definition: FockStateRuleSet.h:89
FockSpace< ExtensiveBitRegister > * getFockSpaceExtensiveBitRegister()
Definition: ManyBodyContext.h:111
bool wrapsExtensiveBitRegister()
Definition: ManyBodyContext.h:100
Register of bits.
The context for the single particle part of a Model.
bool wrapsBitRegister()
Definition: ManyBodyContext.h:93
Definition: InteractionAmplitudeSet.h:11
Definition: WrapperRule.h:31
FockStateRuleSet.
Definition: ModelFactory.h:35
Definition: InteractionAmplitude.h:11
void addFockStateRule(const FockStateRule::WrapperRule rule)
Definition: ManyBodyContext.h:115
FockSpace< BitRegister > * getFockSpaceBitRegister()
Definition: ManyBodyContext.h:107
Definition: ManyBodyContext.h:38
Definition: FockStateRuleSet.h:33