mbe_result_allocate_gradient Subroutine

private subroutine mbe_result_allocate_gradient(this, total_atoms)

Allocate gradient array for total_atoms

Type Bound

mbe_result_t

Arguments

Type IntentOptional Attributes Name
class(mbe_result_t), intent(inout) :: this
integer, intent(in) :: total_atoms

Called by

proc~~mbe_result_allocate_gradient~~CalledByGraph proc~mbe_result_allocate_gradient mbe_result_t%mbe_result_allocate_gradient proc~serial_fragment_processor serial_fragment_processor proc~serial_fragment_processor->proc~mbe_result_allocate_gradient interface~serial_fragment_processor serial_fragment_processor interface~serial_fragment_processor->proc~serial_fragment_processor proc~mbe_run_serial mbe_context_t%mbe_run_serial proc~mbe_run_serial->interface~serial_fragment_processor

Source Code

   subroutine mbe_result_allocate_gradient(this, total_atoms)
      !! Allocate gradient array for total_atoms
      class(mbe_result_t), intent(inout) :: this
      integer, intent(in) :: total_atoms
      if (allocated(this%gradient)) deallocate (this%gradient)
      allocate (this%gradient(3, total_atoms))
      this%gradient = 0.0_dp
   end subroutine mbe_result_allocate_gradient