My Project
programmer's documentation
Time step modification

Time step modification

Local variables to be added

The following local variables need to be defined for the examples in this section:

integer iel
integer, allocatable, dimension(:) :: lstelt

Allocation

Before user initialization, work arrays lstelt must be allocated, like in basic example.

Initialization

The following initialization block needs to be added for the following examples:

allocate(lstelt(ncel)) ! temporary array for cells selection
!===============================================================================
! Time step modification
!
! We do a computation restart with a variable in time and constant in space
! time step or with a variable in time and space time step.
! We want to modify the time step given by the reading of the restart file
! (in order to overcome a too slow evolution for instance).
!===============================================================================
if (isuite .eq. 1 .and. (idtvar.eq.1 .or. idtvar.eq.2)) then
do iel = 1, ncel
dt(iel) = 10.d0*dt(iel)
enddo
endif

Finalization

At the end of the subroutine, it is recommended to deallocate the work array lstelt, like in basic example.

dt
Definition: cs_field_pointer.h:65