44 integer,
private :: npt_part
46 real(real64) :: vol_elem_1part
47 real(real64),
allocatable :: origin(:)
48 integer,
allocatable :: enlarge_1part(:)
49 integer,
allocatable :: nr_1part(:,:)
50 integer,
allocatable,
private :: ll(:)
51 real(real64),
allocatable :: h_1part(:)
52 type(hypercube_t) :: hypercube_1part
58 type(modelmb_1part_t),
intent(out) :: this
59 type(mesh_t),
intent(in) :: mesh
60 integer,
intent(in) :: ikeeppart
61 integer,
intent(in) :: ndim1part
63 integer :: idir, irealdir
67 this%ndim1part = ndim1part
71 do idir = 1, ndim1part
72 this%npt_part = this%npt_part*(mesh%idx%nr(2,(ikeeppart - 1)*ndim1part + idir) &
73 - mesh%idx%nr(1,(ikeeppart - 1)*ndim1part + idir) + 1)
78 safe_allocate(this%ll(1:ndim1part))
79 do idir = 1, ndim1part
80 this%ll(idir) = mesh%idx%ll((ikeeppart-1)*ndim1part+idir)
81 this%npt = this%npt*this%ll(idir)
85 safe_allocate(this%h_1part(1:ndim1part))
86 this%vol_elem_1part =
m_one
88 irealdir = (ikeeppart-1)*ndim1part + idir
89 this%vol_elem_1part = this%vol_elem_1part*mesh%spacing(irealdir)
90 this%h_1part(idir) = mesh%spacing(irealdir)
94 safe_allocate(this%nr_1part(1:2, 1:ndim1part))
95 this%nr_1part(:,:) = mesh%idx%nr(:,(ikeeppart-1)*ndim1part+1:ikeeppart*ndim1part)
99 safe_allocate(this%enlarge_1part(1:ndim1part))
100 this%enlarge_1part = mesh%idx%enlarge((ikeeppart-1)*ndim1part+1:ikeeppart*ndim1part)
101 call hypercube_init(this%hypercube_1part, ndim1part, this%nr_1part, this%enlarge_1part(1))
106 safe_allocate(this%origin(1:ndim1part))
107 do idir = 1,ndim1part
108 irealdir = (ikeeppart-1)*ndim1part + idir
110 this%origin(idir) =
m_zero
118 type(modelmb_1part_t),
intent(inout) :: this
122 safe_deallocate_a(this%origin)
123 safe_deallocate_a(this%enlarge_1part)
124 safe_deallocate_a(this%nr_1part)
125 safe_deallocate_a(this%ll)
126 safe_deallocate_a(this%h_1part)
real(real64), parameter, public m_zero
real(real64), parameter, public m_one
subroutine, public hypercube_init(this, ndim, nr, enlarge)
subroutine, public hypercube_end(this)
This module defines the meshes, which are used in Octopus.
general module for modelmb particles (eg 4 electrons in 1D equiv to 1 in 4D). Also calculate differen...
subroutine, public modelmb_1part_end(this)
subroutine, public modelmb_1part_init(this, mesh, ikeeppart, ndim1part)
container type for the position and dimensions for 1 particle