ia_external_m Module

External potentials

This module is meant to be a placeholder to any external fields that the user wants to add. Accordingly replace/add to the existing routines. The subroutines ia_external_setup and ia_add_external_forces must remain for interfacing to the force calculation driver routine ia_calc_forces.

  • Style 0: None
  • Style 1: Pulling force along +ve x-axis
  • Style 2: Hard planar wall

Uses

  • module~~ia_external_m~~UsesGraph module~ia_external_m ia_external_m module~constants_m constants_m module~ia_external_m->module~constants_m module~atmcfg_m atmcfg_m module~ia_external_m->module~atmcfg_m iso_fortran_env iso_fortran_env module~constants_m->iso_fortran_env module~atmcfg_m->module~constants_m

Used by

  • module~~ia_external_m~~UsedByGraph module~ia_external_m ia_external_m module~interaction_m interaction_m module~interaction_m->module~ia_external_m module~bd_solver_m bd_solver_m module~bd_solver_m->module~interaction_m module~setup_m setup_m module~setup_m->module~interaction_m module~setup_m->module~bd_solver_m program~main main program~main->module~setup_m

Contents


Subroutines

public subroutine ia_external_setup(num_externals, external_styles, external_params)

Sets up parameters for external potentials. Usually there is nothing to set for externals, but this acts as a placeholder for special cases.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: num_externals

Number of external fields

integer, intent(in), dimension(:):: external_styles

Styles for each field

real(kind=rp), intent(inout), dimension(:,:):: external_params

Parameters for each field, depending on style

public subroutine ia_add_external_forces(num_externals, external_styles, external_params, coordinates, energy_external, forces, stress, ierr)

Calculates the force and energy due to an external field and adds to energy_external, 'forces, &stress`.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: num_externals

Number of external fields

integer, intent(in), dimension(:):: external_styles

Styles for each field

real(kind=rp), intent(inout), dimension(:,:):: external_params

Parameters for each field, depending on style

real(kind=rp), intent(in), dimension(:,:):: coordinates
real(kind=rp), intent(out) :: energy_external
real(kind=rp), intent(inout), dimension(:,:):: forces
real(kind=rp), intent(inout), dimension(3,3):: stress
integer, intent(out) :: ierr