@@ -127,7 +127,7 @@ namespace thermalfist {
127127 *
128128 * \param conserve true -- canonically, false -- grand-canonically
129129 */
130- virtual void ConserveBaryonCharge (bool conserve = true ) { m_BCE = static_cast <int >(conserve); }
130+ virtual void ConserveBaryonCharge (bool conserve = true ) { m_BCE = static_cast <int >(conserve); m_PartialZCalculated = false ; }
131131
132132 /* *
133133 * \brief Specifies whether the electric charge is treated canonically.
@@ -136,7 +136,7 @@ namespace thermalfist {
136136 *
137137 * \param conserve true -- canonically, false -- grand-canonically
138138 */
139- virtual void ConserveElectricCharge (bool conserve = true ) { m_QCE = static_cast <int >(conserve); }
139+ virtual void ConserveElectricCharge (bool conserve = true ) { m_QCE = static_cast <int >(conserve); m_PartialZCalculated = false ; }
140140
141141 /* *
142142 * \brief Specifies whether the strangeness charge is treated canonically.
@@ -145,7 +145,7 @@ namespace thermalfist {
145145 *
146146 * \param conserve true -- canonically, false -- grand-canonically
147147 */
148- virtual void ConserveStrangeness (bool conserve = true ) { m_SCE = static_cast <int >(conserve); }
148+ virtual void ConserveStrangeness (bool conserve = true ) { m_SCE = static_cast <int >(conserve); m_PartialZCalculated = false ; }
149149
150150 /* *
151151 * \brief Specifies whether the charm charge is treated canonically.
@@ -154,7 +154,7 @@ namespace thermalfist {
154154 *
155155 * \param conserve true -- canonically, false -- grand-canonically
156156 */
157- virtual void ConserveCharm (bool conserve = true ) { m_CCE = static_cast <int >(conserve); }
157+ virtual void ConserveCharm (bool conserve = true ) { m_CCE = static_cast <int >(conserve); m_PartialZCalculated = false ; }
158158
159159 virtual bool IsConservedChargeCanonical (ConservedCharge::Name charge) const ;
160160
@@ -182,6 +182,27 @@ namespace thermalfist {
182182 */
183183 void SetIntegrationIterationsMultiplier (int multiplier) { (multiplier > 0 ? m_IntegrationIterationsMultiplier = multiplier : m_IntegrationIterationsMultiplier = 1 ); }
184184
185+ /*
186+ * \brief Reset all flags which correspond to a calculation status
187+ */
188+ virtual void ResetCalculatedFlags () {
189+ ThermalModelBase::ResetCalculatedFlags ();
190+ ResetPartialZCalculated ();
191+ }
192+ /*
193+ * \brief Reset the flags indicating whether the partial partition functions are calculated
194+ */
195+ void ResetPartialZCalculated () { m_PartialZCalculated = false ; m_PartialZCalculatedFlucts = false ; }
196+
197+ /*
198+ * \brief Whether the partial partition functions are calculated
199+ */
200+ bool IsPartialZCalculated () const { return m_PartialZCalculated; }
201+
202+ /*
203+ * \brief Whether the partial partition functions are calculated with fluctuations
204+ */
205+ bool IsPartialZCalculatedFlucts () const { return m_PartialZCalculatedFlucts; }
185206
186207 // Override functions begin
187208
@@ -310,6 +331,9 @@ namespace thermalfist {
310331 * \brief Flag indicating whether the analytical calculation of baryon fugacity is used.
311332 */
312333 bool m_Banalyt;
334+
335+ bool m_PartialZCalculated;
336+ bool m_PartialZCalculatedFlucts;
313337 };
314338
315339} // namespace thermalfist
0 commit comments