Set the work vector used by perturb_x_and_compute_f and
perturb_x_and_compute_f_partitioned to the nominal x.
This must be called before a sequence of calls to those routines.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(numdiff_type), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in), | dimension(:) | :: | x |
nominal variable vector |
subroutine init_xwork(me,x) implicit none class(numdiff_type),intent(inout) :: me real(wp),dimension(:),intent(in) :: x !! nominal variable vector if (allocated(me%xwork)) then if (size(me%xwork)/=size(x)) deallocate(me%xwork) end if if (.not. allocated(me%xwork)) allocate(me%xwork(size(x))) me%xwork = x end subroutine init_xwork