diff --git a/src/Makefile b/src/Makefile index feb933f..3b170e7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ FC=ifort FFLAGS=-mcmodel=large -g -O0 -stand f08 -fpe0 -traceback -check bounds,uninit -warn all -implicitnone -no-wrap-margin -heap-arrays #FFLAGS=-mcmodel=large -Ofast -no-wrap-margin -heap-arrays MODES=mode_create.o mode_merge.o mode_convert.o -OPTIONS=opt_disl.o opt_group.o opt_orient.o opt_delete.o opt_deform.o opt_redef_box.o +OPTIONS=opt_disl.o opt_group.o opt_orient.o opt_delete.o opt_deform.o opt_redef_box.o opt_slip_plane.o OBJECTS=main.o elements.o io.o subroutines.o functions.o atoms.o call_mode.o box.o $(MODES) $(OPTIONS) call_option.o sorts.o .SUFFIXES: diff --git a/src/call_option.f90 b/src/call_option.f90 index d55e1ee..af63333 100644 --- a/src/call_option.f90 +++ b/src/call_option.f90 @@ -6,6 +6,7 @@ subroutine call_option(option, arg_pos) use opt_deform use opt_delete use opt_redef_box + use opt_slip_plane use box implicit none @@ -41,6 +42,8 @@ subroutine call_option(option, arg_pos) arg_pos=arg_pos +3 case('-redef_box') call redef_box(arg_pos) + case('-slip_plane') + call run_slip_plane(arg_pos) case default print *, 'Option ', trim(adjustl(option)), ' is not currently accepted.' stop 3 diff --git a/src/elements.f90 b/src/elements.f90 index 6df859b..a1ab9bc 100644 --- a/src/elements.f90 +++ b/src/elements.f90 @@ -736,4 +736,24 @@ module elements end subroutine lattice_map + subroutine get_interp_pos(i,j,k, ie, r) + !This returns the position of an interpolated basis from an element ie. + !i, j, k should be in natural coordinates + + integer, intent(in) :: i, j, k, r, s, t, ie, inod -= + real(kind=dp), dimension(3,max_basisnum), intent(out) :: r + + r = (1.0_dp*(i-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2) + s = (1.0_dp*(j-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2) + t = (1.0_dp*(k-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2) + r(:) = 0 + do ibasis = 1, bnum + do inod = 1, 8 + r(:,ibasis) = r(:,ibasis) + a_shape(inod) * r_node(:,ibasis,inod,ie) + end do + end do + + + end subroutine + end module elements diff --git a/src/mode_create.f90 b/src/mode_create.f90 index bcec2d5..00d7d8b 100644 --- a/src/mode_create.f90 +++ b/src/mode_create.f90 @@ -528,7 +528,7 @@ module mode_create do i = 1, 3 filzero(i) = bd_ele_lat(2*i-1) -1 end do - do while(efill_size>9) + do while(efill_size>min_efillsize) !First check whether there are enough lattice points to house the current element size efill_ele=cubic_cell*(efill_size-1) if (nump_ele < efill_size**3) then diff --git a/src/parameters.f90 b/src/parameters.f90 index f261552..8677381 100644 --- a/src/parameters.f90 +++ b/src/parameters.f90 @@ -3,7 +3,8 @@ module parameters implicit none !Default precision - integer, parameter :: dp= selected_real_kind(15,307) + integer, parameter :: dp= selected_real_kind(15,307), & + min_efillsize = 11 !Parameters for floating point tolerance real(kind=dp), parameter :: lim_zero = epsilon(1.0_dp), & lim_large = huge(1.0_dp), &