42 logical,
allocatable :: join(:)
43 integer,
allocatable ::
type(:)
44 real(real64),
allocatable :: params(:,:)
50 type(volume_t),
intent(out) :: vol
56 type(volume_t),
intent(inout) :: vol
58 safe_deallocate_a(vol%join)
59 safe_deallocate_a(vol%type)
60 safe_deallocate_a(vol%params)
64 type(volume_t),
intent(inout) :: vol
65 type(namespace_t),
intent(in) :: namespace
66 character(len=*),
intent(in) :: block_name
69 integer :: i, j, n_par
70 character(len=100) :: str
93 if (
parse_block(namespace, block_name, blk, check_varinfo_=.false.) == 0)
then
96 safe_allocate(vol%join(1:vol%n_elements))
97 safe_allocate(vol%type(1:vol%n_elements))
98 safe_allocate(vol%params(1:8, 1:vol%n_elements))
102 do i = 1, vol%n_elements
107 vol%join(i) = .false.
111 select case (vol%type(i))
112 case (option__volume__vol_sphere)
114 case (option__volume__vol_slab)
132 class(space_t),
intent(in) :: space
133 type(volume_t),
intent(in) :: vol
134 real(real64),
intent(in) :: xx(1:space%dim)
136 logical :: in_partial_volume
141 do i = 1, vol%n_elements
142 select case (vol%type(i))
143 case (option__volume__vol_sphere)
144 r = norm2(xx - vol%params(1:space%dim, i))
145 in_partial_volume = (r <= vol%params(4, i))
147 case (option__volume__vol_slab)
149 in_partial_volume = (r <= vol%params(1, i))
152 if (vol%join(i))
then
153 in_vol = in_vol .or. in_partial_volume
155 in_vol = in_vol .and. .not. in_partial_volume
real(real64), parameter, public m_zero
subroutine, public messages_input_error(namespace, var, details, row, column)
integer function, public parse_block(namespace, name, blk, check_varinfo_)
subroutine, public volume_read_from_block(vol, namespace, block_name)
logical function, public volume_in_volume(space, vol, xx)
subroutine, public volume_end(vol)
subroutine, public volume_init(vol)