35    real(real64), 
allocatable :: dipole(:)
 
   50    class(dipole_t), 
intent(out) :: this
 
   51    class(space_t),  
intent(in)  :: space
 
   53    this%periodic = space%is_periodic()
 
   56    safe_allocate(this%dipole(1:this%dim))
 
   63    class(dipole_t), 
intent(inout) :: this
 
   65    safe_deallocate_a(this%dipole)
 
   72    class(dipole_t),     
intent(inout) :: this
 
   73    class(mesh_t),       
intent(in)    :: gr
 
   74    type(ions_t),        
intent(in)    :: ions
 
   75    type(states_elec_t), 
intent(in)    :: st
 
   79    this%dipole = - ions%dipole() - st%dipole(gr)
 
   86    class(dipole_t), 
intent(in) :: this
 
   87    real(real64)                :: dipole(1:this%dim)
 
   90    assert(.not. this%periodic) 
 
This modules implements the dipole moment of the matter system.
 
subroutine dipole_init(this, space)
initialize the dipole moment
 
real(real64) function, dimension(1:this%dim) dipole_get(this)
accedd the dipole moment
 
subroutine dipole_calculate(this, gr, ions, st)
Calculate the dipole moment from the ions and the electronic states.
 
subroutine dipole_end(this)
finalizer: release memory
 
real(real64), parameter, public m_zero
 
This module defines the meshes, which are used in Octopus.