96 double initial_time,
int fact_resize_i)
97 :
Evolution<TyT>(initial_value, initial_j, initial_time, 100),
102template<
typename TyT>
109template<
typename TyT>
122template<
typename TyT>
131template<
typename TyT>
137 for (
int j=0; j<
size; j++) {
141 for (
int j=0; j<
size; j++) {
146 for (
int j=0; j<
size; j++) {
153 for (
int j=0; j<
size; j++) {
154 if (evo.
val[j] != 0x0) {
155 val[j] =
new TyT( *(evo.
val[j]) ) ;
165template<
typename TyT>
168 cerr <<
"void Evolution_full<TyT>::operator= : not implemented yet ! \n" ;
175template<
typename TyT>
183 assert( fabs(
the_time[pos] - time_j) < 1.e-14 ) ;
184 assert(
val[pos] != &new_value ) ;
186 val[pos] =
new TyT(new_value) ;
192 "Evolution_full<TyT>::update : the time step j = "
193 << j <<
" must be in the future\n"
194 <<
" of the last stored time step (" <<
step[
pos_jtop] <<
") !"
206 int* step_new =
new int[size_new] ;
207 for (
int i=0; i<
size; i++) {
208 step_new[i] =
step[i] ;
210 for (
int i=
size; i<size_new; i++) {
211 step_new[i] = UNDEF_STEP ;
214 double* the_time_new =
new double[size_new] ;
215 for (
int i=0; i<
size; i++) {
218 for (
int i=
size; i<size_new; i++) {
219 the_time_new[i] = -1e20 ;
222 TyT** val_new =
new TyT*[size_new] ;
223 for (
int i=0; i<
size; i++) {
224 val_new[i] =
val[i] ;
226 for (
int i=
size; i<size_new; i++) {
Evolution_full(const TyT &initial_value, int initial_j=0, double initial_time=0., int fact_resize_i=2)
Constructor from initial value.
virtual void update(const TyT &new_value, int j, double time_j)
Sets a new value at a given time step.
virtual void operator=(const Evolution_full< TyT > &t_in)
Assignement to another Evolution_full.
int fact_resize
Factor by which the size size of the arrays val and the_time are to be multiplied when their limits h...
virtual ~Evolution_full()
Destructor.
Evolution(const TyT &initial_value, int initial_j, double initial_time, int initial_size)
Constructor from some initial value.
TyT ** val
Array of pointers onto the values (size = size).
int size
Maximum number of stored time steps.
int * step
Array of time step indices (size = size).
int pos_jtop
Position in the arrays step, the_time and val of the most evolved time step.
double * the_time
Array of values of t at the various time steps (size = size).
int position(int j) const
Gives the position in the arrays step, the_time and val corresponding to the time step j.
bool is_known(int j) const
Checks whether the value a given time step has been set.