12#ifndef BELFEM_FN_CIRCUIT_STATE_IO_HPP
13#define BELFEM_FN_CIRCUIT_STATE_IO_HPP
36 const string & aLabel,
48 tSamples( k ) = aRegister( k );
69 const string & aLabel,
78 "Register %s in the restart file has capacity %u, the circuit expects %u ( BDF order changed? ). Delete the memdump to restart with a cold circuit.",
86 "Register %s in the restart file holds %lu samples, more than its stated capacity %u. Delete the memdump to restart with a cold circuit.",
88 (
long unsigned int ) tSamples.
length(),
94 aRegister.
push( tSamples( k - 1 ) );
#define BELFEM_ERROR(aCheck,...)
Definition assert.hpp:264
auto size() const -> decltype(mSize)
Get current number of elements.
Definition cl_ShiftRegister.hpp:370
void push(T &aValue)
Definition cl_ShiftRegister.hpp:269
auto capacity() const -> decltype(mCapacity)
Get maximum capacity.
Definition cl_ShiftRegister.hpp:381
void clear()
Clear all elements.
Definition cl_ShiftRegister.hpp:414
size_t length() const
get the length of the vector
Definition cl_AR_Vector.hpp:257
Definition cl_Capacitor.cpp:18
void load_shift_register(hid_t &aGroup, const string &aLabel, ShiftRegister< real > &aRegister)
restore one history register saved by save_shift_register().
Definition fn_circuit_state_io.hpp:67
void save_shift_register(hid_t &aGroup, const string &aLabel, const ShiftRegister< real > &aRegister)
write one time-stepping history register into the restart group, as aLabel ( samples,...
Definition fn_circuit_state_io.hpp:34
void save_vector_to_file(hid_t &aLoc, const std::string &aLabel, const Vector< T > &aVector, herr_t &aStatus)
Definition hdf5_tools.hpp:549
void load_scalar_from_file(hid_t &aLoc, const std::string &aLabel, T &aValue, herr_t &aStatus)
Definition hdf5_tools.hpp:300
void save_scalar_to_file(hid_t &aLoc, const std::string &aLabel, const T &aValue, herr_t &aStatus)
saves a scalar value to a file file must be open
Definition hdf5_tools.hpp:235
void load_vector_from_file(hid_t &aLoc, const std::string &aLabel, Vector< T > &aVector, herr_t &aStatus)
Definition hdf5_tools.hpp:634
USER GUIDES:
Definition cl_Capacitor.cpp:16
int hid_t
Definition hdf5_types.hpp:20
unsigned int uint
Definition typedefs.hpp:30
uint32_t index_t
Definition typedefs.hpp:52
int herr_t
Definition hdf5_types.hpp:21