Template Class fdmThermodynamics#

Class Documentation#

template<typename nrgcore_type>
class fdmThermodynamics#

Evaluate thermodynamic quantities from discarded-shell FDM data.

This helper accumulates the discarded eigenvalues and the full spectrum for each NRG iteration, builds the corresponding thermodynamic weights, and stores the resulting entropy, specific heat, and optionally observable expectation values for a supplied temperature grid.

Template Parameters:

nrgcore_type – Type of the underlying NRG core object.

Public Functions

inline explicit fdmThermodynamics(nrgcore_type *t_nrg_object, std::vector<double> tArray)#

Construct a thermodynamic evaluator for a given NRG run.

Parameters:
  • t_nrg_object – Pointer to the NRG model object.

  • tArray – Temperature grid used to evaluate entropy and specific heat.

inline void setSystemOperator(std::vector<qOperator> *qsysOPerator_)#

Register a system operator whose expectation value should be stored.

Parameters:

qsysOPerator_ – Pointer to the vector of operators to evaluate.

inline void calcThermodynamics(double energyRescale)#

Accumulate one thermodynamic shell contribution for the current NRG iteration.

The routine records the discarded eigenvalues, the full eigenvalue set, and the diagonal matrix element of the registered operator on the discarded states for later thermal averaging.

Parameters:

energyRescale – Energy scaling factor applied to the stored eigenvalues.

inline void setCurrentKeptIndex()#

Update the kept-state index set for the current shell.

template<typename filetype>
inline void saveFinalData(filetype *pfile)#

Compute and write the final thermodynamic observables to a file.

The function builds the shell weights, entropy, and specific heat as a function of the supplied temperature grid and writes the results to the provided file wrapper.

Template Parameters:

filetype – Type of the output file object exposing a write method.

Parameters:

pfile – Pointer to the output file handle.

Public Members

std::vector<std::vector<size_t>> currentKeptIndex#

Kept-state indices for the current shell.