TBTK
ManyParticleContext.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_PARTICLE_CONTEXT
25 #define COM_DAFER45_TBTK_MANY_PARTICLE_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 // ManyParticleContext(FockSpace<BitRegister> *fockSpace);
44  const SingleParticleContext *singleParticleContext
45  );
46 
49 // ManyParticleContext(FockSpace<ExtensiveBitRegister> *fockSpace);
50 
53 
55  bool wrapsBitRegister();
56 
60 
64 
68 
71 
73  void addIA(InteractionAmplitude ia);
74 
77 
80 private:
82  std::shared_ptr<FockSpace<BitRegister>> brFockSpace;
83 
85  std::shared_ptr<FockSpace<ExtensiveBitRegister>> ebrFockSpace;
86 
88 // std::vector<FockStateRule::WrapperRule> fockStateRules;
89  FockStateRuleSet fockStateRuleSet;
90 
92  std::shared_ptr<InteractionAmplitudeSet> interactionAmplitudeSet;
93 };
94 
96  if(brFockSpace.get() != NULL)
97  return true;
98  else
99  return false;
100 }
101 
103  if(ebrFockSpace.get() != NULL)
104  return true;
105  else
106  return false;
107 }
108 
110  return brFockSpace.get();
111 }
112 
114  return ebrFockSpace.get();
115 }
116 
118  fockStateRuleSet.addFockStateRule(rule);
119 }
120 
122  interactionAmplitudeSet.get()->addIA(ia);
123 }
124 
126  return interactionAmplitudeSet.get();
127 }
128 
130  return fockStateRuleSet;
131 }
132 
133 }; //End of namespace TBTK
134 
135 #endif
The context for the single particle part of a Model.
Definition: SingleParticleContext.h:37
Definition: FockSpace.h:44
Register of bits.
bool wrapsBitRegister()
Definition: ManyParticleContext.h:95
FockSpace< ExtensiveBitRegister > * getFockSpaceExtensiveBitRegister()
Definition: ManyParticleContext.h:113
Definition: ManyParticleContext.h:38
void addFockStateRule(const FockStateRule::WrapperRule &fockStateRule)
Definition: FockStateRuleSet.h:89
Register of bits.
The context for the single particle part of a Model.
const FockStateRuleSet & getFockStateRuleSet() const
Definition: ManyParticleContext.h:129
Definition: InteractionAmplitudeSet.h:11
Definition: WrapperRule.h:31
bool wrapsExtensiveBitRegister()
Definition: ManyParticleContext.h:102
FockStateRuleSet.
Definition: ModelFactory.h:35
void addIA(InteractionAmplitude ia)
Definition: ManyParticleContext.h:121
ManyParticleContext(const SingleParticleContext *singleParticleContext)
void addFockStateRule(const FockStateRule::WrapperRule rule)
Definition: ManyParticleContext.h:117
Definition: InteractionAmplitude.h:11
FockSpace< BitRegister > * getFockSpaceBitRegister()
Definition: ManyParticleContext.h:109
const InteractionAmplitudeSet * getInteractionAmplitudeSet() const
Definition: ManyParticleContext.h:125
Definition: FockStateRuleSet.h:33