diff options
author | diener <diener@2a26948c-0e4f-0410-aee8-f1d3e353619c> | 2003-05-27 09:35:53 +0000 |
---|---|---|
committer | diener <diener@2a26948c-0e4f-0410-aee8-f1d3e353619c> | 2003-05-27 09:35:53 +0000 |
commit | 88aa804bc7e3fa6b079a51e46fa5b5b06464db69 (patch) | |
tree | 50760015ee77ef896ac4cdfc0e6573e1242cc751 | |
parent | a454628dc04978583a1189f51b62493418b9f48b (diff) |
First go at having more than one generator. In this case they are
placed on a line located at y=0 on the initial sphere.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/EHFinder/trunk@109 2a26948c-0e4f-0410-aee8-f1d3e353619c
-rw-r--r-- | param.ccl | 4 | ||||
-rw-r--r-- | src/EHFinder_Init.F90 | 50 |
2 files changed, 50 insertions, 4 deletions
@@ -220,6 +220,10 @@ CCTK_INT number_of_generators "How many generators should be evolved" 1:* :: "Postive please" } 1 +KEYWORD generator_distribution "What initial distribution should be used" +{ + "line" :: "Put the generatos on a line on the x-axis" +} "line" shares: grid USES KEYWORD domain diff --git a/src/EHFinder_Init.F90 b/src/EHFinder_Init.F90 index ebb7cb7..3036a1d 100644 --- a/src/EHFinder_Init.F90 +++ b/src/EHFinder_Init.F90 @@ -15,11 +15,13 @@ subroutine EHFinder_Init_F(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_FUNCTIONS - CCTK_INT :: i, j, k + CCTK_INT :: i, j, k, status CCTK_REAL, dimension(3) :: xp, xpt CCTK_REAL, dimension(3,3) :: txyz CCTK_REAL :: cosa, sina, cosb, sinb, cosc, sinc CCTK_REAL :: last_time + CCTK_REAL :: theta, dtheta, thetamin, thetamax + CCTK_INT, dimension(1) :: lsh, lbnd ! Initialize the current_iteration variable. current_iteration = last_iteration_number @@ -42,9 +44,49 @@ subroutine EHFinder_Init_F(CCTK_ARGUMENTS) ( y - translate_y )**2 + & ( z - translate_z )**2 ) - initial_rad if ( evolve_generators .gt. 0 ) then - xg(1) = initial_rad + translate_x - yg(1) = translate_y - zg(1) = translate_z + + call CCTK_GrouplbndGN ( status, cctkGH, 1, lbnd, "ehfinder::generators" ) + if ( status .lt. 0 ) then + call CCTK_WARN ( 0, "cannot get lower bounds for generator arrays" ) + end if + call CCTK_GrouplshGN ( status, cctkGH, 1, lsh, "ehfinder::generators" ) + if ( status .lt. 0 ) then + call CCTK_WARN ( 0, "cannot get local size for generator arrays" ) + end if + + if ( CCTK_EQUALS( generator_distribution, 'line' ) ) then + + if ( CCTK_EQUALS( domain, 'full' ) ) then + thetamin = zero; thetamax = pi + else if ( CCTK_EQUALS( domain, 'bitant') ) then + if ( CCTK_EQUALS( bitant_plane, 'xy' ) ) then + thetamin = zero; thetamax = half * pi + else + thetamin = zero; thetamax = pi + end if + else if ( CCTK_EQUALS( domain, 'quadrant' ) ) then + if ( CCTK_EQUALS( quadrant_direction, 'x' ) .or. & + CCTK_EQUALS( quadrant_direction, 'y' ) ) then + thetamin = zero; thetamax = half * pi + else + thetamin = zero; thetamax = pi + end if + else if ( CCTK_EQUALS( domain, 'octant' ) ) then + thetamin = zero; thetamax = half * pi + end if + + if ( number_of_generators .eq. 1 ) then + theta = half * ( thetamax - thetamin ) + thetamin + else + dtheta = ( thetamax - thetamin ) / ( number_of_generators - 1 ) + end if + do i = 1, lsh(1) + theta = thetamin + dtheta * ( i + lbnd(1) - 1 ) + xg(i) = initial_rad * sin(theta) + translate_x + yg(i) = translate_y + zg(i) = initial_rad * cos(theta) + translate_z + end do + end if end if end if |