~asc/fluidity/iceshelfcavity

« back to all changes in this revision

Viewing changes to legacy_reservoir_prototype/tests/CompModel_1d_2Phases_3Components_Equilibrium/InputComp2P3C_suf_t_bc.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
 
  real, dimension( : ), allocatable :: field
5
 
  integer :: idim, iphase
6
 
  integer, parameter :: nphase = 2
7
 
 
8
 
  open( 5, file = 'filedim', status = 'unknown' )
9
 
  read( 5, * ) ndim
10
 
  close( 5 )
11
 
 
12
 
  allocate( field( ndim ))
13
 
 
14
 
  field = 0.
15
 
  field( 1 ) = 0.5
16
 
 
17
 
  do iphase = 2, nphase
18
 
     field( 1 + ( iphase - 1 ) * 2 ) = 0.5
19
 
     field( 2 + ( iphase - 1 ) * 2 ) = 0.
20
 
  end do
21
 
 
22
 
  do idim = 1, ndim
23
 
     print*, field( idim )
24
 
  end do
25
 
 
26
 
 
27
 
end program main
28
 
 
29