8.0
general documentation
Time step modification

Time step modification

We do a computation restart with an adaptive (variable in time and constant in space) or local (variable in time and space) time step. We want to modify the time step read from the restart file (in order to overcome a too slow evolution for instance).

Initialization

The following block can be added to cs_user_initialization.c to do this:

if (! cs_restart_present()) /* Useful only for a restart */
return;
const cs_lnum_t n_cells = domain->mesh->n_cells;
for (cs_lnum_t cell_id = 0; cell_id < n_cells; cell_id++) {
f->val[cell_id] *= 10.;
}
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_field_t * cs_field_by_name(const char *name)
Return a pointer to a field based on its name.
Definition: cs_field.c:2340
int cs_restart_present(void)
Check if we have a restart directory.
Definition: cs_restart.c:2097
Field descriptor.
Definition: cs_field.h:130
cs_real_t * val
Definition: cs_field.h:151