init_site Subroutine

private subroutine init_site(this, id, coordinate, force, multipoles, overlapped)

Arguments

TypeIntentOptionalAttributesName
class(site_type), intent(inout) :: this
integer, intent(in) :: id
real(kind=dp), intent(in), dimension(:):: coordinate
real(kind=dp), intent(in), dimension(:):: force
type(multipoles_type), intent(in), optional :: multipoles
logical, intent(in) :: overlapped

Contents

Source Code


Source Code

subroutine init_site(this, id, coordinate, force, multipoles, overlapped)

    class(site_type), intent(inout) :: this
    integer, intent(in) :: id
    real(dp), dimension(:), intent(in) :: coordinate
    real(dp), dimension(:), intent(in) :: force
    type(multipoles_type), intent(in), optional :: multipoles
    logical, intent(in) :: overlapped

    this%id = id
    allocate(this%coordinate(3))
    this%coordinate = coordinate
    allocate(this%force(3))
    this%force = force
    if (present(multipoles)) then
        this%multipoles = multipoles
    end if
    this%overlapped = overlapped

end subroutine init_site