diff options
author | diener <diener@2a26948c-0e4f-0410-aee8-f1d3e353619c> | 2003-09-01 12:37:49 +0000 |
---|---|---|
committer | diener <diener@2a26948c-0e4f-0410-aee8-f1d3e353619c> | 2003-09-01 12:37:49 +0000 |
commit | 77500494f954c4690b6e98f9121b2faab5c48261 (patch) | |
tree | 5e1a49eaa1ecd3c1ce87660a18d774d3131fc55a /src | |
parent | fa299c4b96774f44292152af38555f421ec8961d (diff) |
Major cleanup. All references to approximation re-parametrization is deleted
and reparam has been changed to reinit everywhere.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/EHFinder/trunk@134 2a26948c-0e4f-0410-aee8-f1d3e353619c
Diffstat (limited to 'src')
-rw-r--r-- | src/EHFinder_Check.F90 | 77 |
1 files changed, 22 insertions, 55 deletions
diff --git a/src/EHFinder_Check.F90 b/src/EHFinder_Check.F90 index 4a6e07a..22b3703 100644 --- a/src/EHFinder_Check.F90 +++ b/src/EHFinder_Check.F90 @@ -1,10 +1,12 @@ +! Check to see if the re-initialization has to be undone. +! $Header$ !option opt(o(0))) #include "cctk.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" -subroutine EHFinder_ReParametrize_Check(CCTK_ARGUMENTS) +subroutine EHFinder_ReInitialize_Check(CCTK_ARGUMENTS) use EHFinder_mod @@ -17,53 +19,30 @@ subroutine EHFinder_ReParametrize_Check(CCTK_ARGUMENTS) CCTK_INT :: i, j, k, l CCTK_REAL :: fmin_extremum, fmin_extremum_loc, fmax_loc, fmin_bound_loc character(len=128) :: info_message - logical :: check_reparam + logical :: check_re_init CCTK_INT, dimension(3) :: ex_loc - check_reparam = .false. - reparam_undone = .false. - if ( ( CCTK_EQUALS ( re_param_method, 'approx' ) ) .or. & - ( CCTK_EQUALS ( re_param_method, 'mixed' ) ) ) then - if ( reparametrize_every_approx .gt. 0 ) then - if ( mod(cctk_iteration,reparametrize_every_approx) .eq. 0 ) then - check_reparam = .true. - end if - end if - end if - if ( ( CCTK_EQUALS ( re_param_method, 'pde' ) ) .or. & - ( CCTK_EQUALS ( re_param_method, 'mixed' ) ) ) then - if ( reparametrize_every_pde .gt. 0 ) then - if ( mod(cctk_iteration,reparametrize_every_pde) .eq. 0 ) then - check_reparam = .true. - end if +! Initializa flags. + check_re_init = .false. + re_initialize_undone = .false. + +! If re-initialization has just be done we need to check and see if it +! needs to be undone. + if ( re_initialize_every .gt. 0 ) then + if ( mod(cctk_iteration,re_initialize_every) .eq. 0 ) then + check_re_init = .true. end if end if #include "include/physical_part2.h" - if ( check_reparam ) then + if ( check_re_init ) then + +! Loop over the different level sets. do l = 1, eh_number_level_sets - fmin_bound_loc = huge - if ( cctk_lbnd(1) .eq. 0 .and. .not.symx ) then - fmin_bound_loc = min ( fmin_bound_loc, minval ( f(1,:,:,l) ) ) - end if - if ( cctk_ubnd(1) .eq. cctk_gsh(1)-1 ) then - fmin_bound_loc = min ( fmin_bound_loc, minval ( f(nx,:,:,l) ) ) - end if - if ( cctk_lbnd(2) .eq. 0 .and. .not.symy ) then - fmin_bound_loc = min ( fmin_bound_loc, minval ( f(:,1,:,l) ) ) - end if - if ( cctk_ubnd(2) .eq. cctk_gsh(2)-1 ) then - fmin_bound_loc = min ( fmin_bound_loc, minval ( f(:,ny,:,l) ) ) - end if - if ( cctk_lbnd(3) .eq. 0 .and. .not.symz ) then - fmin_bound_loc = min ( fmin_bound_loc, minval ( f(:,:,1,l) ) ) - end if - if ( cctk_ubnd(3) .eq. cctk_gsh(3)-1 ) then - fmin_bound_loc = min ( fmin_bound_loc, minval ( f(:,:,nz,l) ) ) - end if - ! print*,fmin_bound_loc +! Initialize the variables holding the processor local maximum +! values in the extremum. fmax_loc = zero fmin_extremum_loc = ex_value @@ -89,34 +68,22 @@ subroutine EHFinder_ReParametrize_Check(CCTK_ARGUMENTS) call CCTK_WARN(0,'Reduction of fmax_extremum failed') end if - call CCTK_ReduceLocScalar ( ierr, cctkGH, -1, min_handle, & - fmin_bound_loc, fmin_bound, CCTK_VARIABLE_REAL ) - - if ( ierr .ne. 0 ) then - call CCTK_WARN(0,'Reduction of fmax failed') - end if - write(info_message,'(a39,i3,a6,f12.5)') & 'Minimum f at the extrema for level set ', l, ' is : ',fmin_extremum call CCTK_INFO(info_message) - write(info_message,'(a45,i3,a6,f12.5)') & - 'Limit for centered differences for level set ', l, ' is : ', & - fmin_bound - three*maxval ( cctk_delta_space ) - call CCTK_INFO(info_message) - - if ( reparam_undo .gt. 0 ) then + if ( re_init_undo .gt. 0 ) then if ( fmin_extremum .gt. -two * minval(cctk_delta_space) ) then write(info_message,'(a45,i3,a6,f12.5)') & - 'Re-parametrization of level set ', l, & + 'Re-initialization of level set ', l, & 'undone due to imminent pinch-off' call CCTK_INFO(info_message) f(:,:,:,l) = fbak(:,:,:,l) eh_mask(:,:,:,l) = eh_mask_bak(:,:,:,l) - reparam_undone(l) = .true. + re_initialize_undone(l) = .true. end if end if end do end if -end subroutine EHFinder_ReParametrize_Check +end subroutine EHFinder_ReInitialize_Check |