diff --git a/src/call_option.f90 b/src/call_option.f90 index 1c3759e..d55e1ee 100644 --- a/src/call_option.f90 +++ b/src/call_option.f90 @@ -5,6 +5,7 @@ subroutine call_option(option, arg_pos) use opt_orient use opt_deform use opt_delete + use opt_redef_box use box implicit none @@ -38,6 +39,8 @@ subroutine call_option(option, arg_pos) call run_delete(arg_pos) case('-set_cac') arg_pos=arg_pos +3 + case('-redef_box') + call redef_box(arg_pos) case default print *, 'Option ', trim(adjustl(option)), ' is not currently accepted.' stop 3 diff --git a/src/opt_redef_box.f90 b/src/opt_redef_box.f90 index c1a2dee..8d0d30f 100644 --- a/src/opt_redef_box.f90 +++ b/src/opt_redef_box.f90 @@ -35,9 +35,9 @@ module opt_redef_box delete_list(:) = 0 do i = 1, ele_num !Determine if all nodes are within the new boundaries + node_out(:) = .false. do inod = 1, ng_node(lat_ele(i)) do ibasis = 1, basisnum(lat_ele(i)) - node_out(:) = .false. if(.not.in_block_bd(r_node(:,ibasis,inod,i), new_bd)) then node_out(inod) = .true. end if @@ -66,7 +66,7 @@ module opt_redef_box end if end do - call delete_elements(delete_num, delete_list) + call delete_elements(delete_num, delete_list(1:delete_num)) box_bd=new_bd box_bc = new_bc