45 real(real64),
public :: radius =
m_zero
47 real(real64),
allocatable :: site_position(:,:)
48 type(lookup_t) :: site_lookup
57 procedure box_minimum_constructor
64 integer,
intent(in) :: dim
65 real(real64),
intent(in) :: radius
66 integer,
intent(in) :: n_sites
67 real(real64),
intent(in) :: site_position(1:dim,1:n_sites)
68 type(namespace_t),
intent(in) :: namespace
69 class(box_minimum_t),
pointer :: box
71 real(real64) :: center(dim)
80 call box_shape_init(box, namespace, dim, center, bounding_box_min=minval(abs(site_position), dim=2) - radius, &
81 bounding_box_max=maxval(abs(site_position), dim=2) + radius)
84 safe_allocate_source(box%site_position, site_position)
86 box%bounding_box_l = maxval(abs(site_position), dim=2) + box%radius
88 call lookup_init(box%site_lookup, box%dim, box%n_sites, box%site_position)
95 type(box_minimum_t),
intent(inout) :: this
101 safe_deallocate_a(this%site_position)
110 class(box_minimum_t),
intent(in) :: this
111 integer,
intent(in) :: nn
112 real(real64),
contiguous,
intent(in) :: xx(:,:)
113 logical :: contained(1:nn)
116 integer,
allocatable :: nlist(:)
118 safe_allocate(nlist(1:nn))
123 contained(ip) = nlist(ip) /= 0 .neqv. this%is_inside_out()
126 safe_deallocate_a(nlist)
132 class(box_minimum_t),
intent(in) :: this
133 integer,
optional,
intent(in) :: iunit
134 type(namespace_t),
optional,
intent(in) :: namespace
150 type(
unit_t),
intent(in) :: unit_length
154 write(
info,
'(a,f11.6,a,a)')
'BoxShape = minimum; Radius =',
units_from_atomic(unit_length, this%radius),
' ', &
subroutine box_minimum_finalize(this)
class(box_minimum_t) function, pointer box_minimum_constructor(dim, radius, n_sites, site_position, namespace)
subroutine box_minimum_write_info(this, iunit, namespace)
character(len=box_info_len) function box_minimum_short_info(this, unit_length)
logical function, dimension(1:nn) box_minimum_shape_contains_points(this, nn, xx)
real(real64), parameter, public box_boundary_delta
subroutine, public box_shape_init(this, namespace, dim, center, bounding_box_min, bounding_box_max, axes)
subroutine, public box_shape_end(this)
real(real64), parameter, public m_zero
subroutine, public lookup_end(this)
subroutine, public lookup_init(this, dim, nobjs, pos)
subroutine, public lookup_get_list(this, npoint, points, radius, nlist, list)
This module is intended to contain "only mathematical" functions and procedures.
subroutine, public messages_info(no_lines, iunit, verbose_limit, stress, all_nodes, namespace)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
character(len=20) pure function, public units_abbrev(this)
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
Class implementing a box that is a union of spheres. We do this in a specific class instead of using ...
Base class for more specialized boxes that are defined by a shape and have a center and basis vectors...