95 template<
typename TyT>
97 int initial_j,
double initial_time)
98 :
Evolution<TyT>(initial_value, initial_j, initial_time, nstored)
102 template<
typename TyT>
108 template<
typename TyT>
121 template<
typename TyT>
131 template<
typename TyT>
137 for (
int j=0; j<size; j++) {
138 step[j] = evo.
step[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]) ) ;
163 template<
typename TyT>
166 cerr <<
"void Evolution_std<TyT>::operator= : not implemented yet ! \n" ;
173 template<
typename TyT>
179 int pos = position(j) ;
180 assert( fabs(the_time[pos] - time_j) < 1.e-14 ) ;
181 assert( val[pos] != &new_value ) ;
183 val[pos] =
new TyT(new_value) ;
188 if ( (pos_jtop != -1) && (j < step[pos_jtop]) ) {
190 "Evolution_std<TyT>::update : the time step j = " 191 << j <<
" must be in the future\n" 192 <<
" of the last stored time step (" << step[pos_jtop] <<
") !" 199 if (pos_jtop == size) {
202 if ( val[0] != 0x0 )
delete val[0] ;
204 for (
int i=0; i<size-1; i++) {
205 step[i] = step[i+1] ;
206 the_time[i] = the_time[i+1] ;
214 assert( pos_jtop < size ) ;
215 assert( val[pos_jtop] == 0x0 ) ;
219 the_time[pos_jtop] = time_j ;
220 val[pos_jtop] =
new TyT( new_value ) ;
Evolution_std(const TyT &initial_value, int nstored, int initial_j=0, double initial_time=0.)
Constructor from initial value.
TyT ** val
Array of pointers onto the values (size = size).
int size
Maximum number of stored time steps.
int pos_jtop
Position in the arrays step, the_time and val of the most evolved time step.
Time evolution with partial storage (*** under development ***).
int * step
Array of time step indices (size = size).
double * the_time
Array of values of t at the various time steps (size = size).
Time evolution (*** under development ***).