~asc/fluidity/iceshelfcavity

« back to all changes in this revision

Viewing changes to legacy_reservoir_prototype/tests/BL_test_gravity/input_usource_BL1_func.f90

  • Committer: Adam Candy
  • Date: 2011-10-12 20:39:04 UTC
  • Revision ID: adam.candy@imperial.ac.uk-20111012203904-9gwqzs4z798zcw0l
Automatic sync to launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
program main
2
 
  implicit none
3
 
  integer :: ndim
4
 
  integer, parameter :: nphase = 2
5
 
  real, dimension( : ), allocatable :: field
6
 
  integer :: u_nonods, u_nods
7
 
 
8
 
 
9
 
  open( 5, file = 'filedim', status = 'unknown' )
10
 
  read( 5, * ) ndim
11
 
  close( 5 )
12
 
 
13
 
  allocate( field( ndim ))
14
 
  u_nonods = ndim / 2
15
 
 
16
 
  field = 0.
17
 
 
18
 
  do u_nods = 1, ndim
19
 
 
20
 
     if( u_nods <= u_nonods )then
21
 
        field( u_nods ) = -981. * ( 1.05 - .71 ) * 0.02 ! -981. * 1.05 ! -981. * ( 1.05 - .71 )
22
 
     elseif( u_nods > u_nonods ) then
23
 
        field( u_nods ) = 0.
24
 
     end if
25
 
 
26
 
     print*, field( u_nods )
27
 
 
28
 
  end do
29
 
 
30
 
end program main