~asc/fluidity/iceshelfcavity

« back to all changes in this revision

Viewing changes to legacy_reservoir_prototype/tests/CompModel_1d_2Phases_2Components/InputComp2P2C_Comp2.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
 
 
2
 
program main
3
 
  implicit none
4
 
  integer :: cv_nonods, nphase, ncomp, dummy
5
 
  real, dimension( : ), allocatable :: comp
6
 
  ! Local variables
7
 
  integer :: icomp, iphase, i
8
 
 
9
 
 
10
 
  open( 5, file = 'filedim', status = 'unknown' )
11
 
  read( 5, * ) cv_nonods, nphase, ncomp, dummy
12
 
  close( 5 )
13
 
 
14
 
  allocate( comp( cv_nonods * nphase * ncomp ))
15
 
 
16
 
  comp = 0.
17
 
 
18
 
  ! Component 1, Phase 1:
19
 
  icomp = 1
20
 
  iphase = 1
21
 
     comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
22
 
          ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.83721
23
 
 
24
 
  ! Component 1, Phase 2:
25
 
  iphase = 2
26
 
     comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
27
 
          ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.18604
28
 
 
29
 
  ! Component 2, Phase 1:
30
 
  icomp = 2
31
 
  iphase = 1
32
 
     comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
33
 
          ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.16279 
34
 
 
35
 
  ! Component 2, Phase 2:
36
 
  iphase = 2
37
 
     comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
38
 
          ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.81395
39
 
 
40
 
  do i = 1, cv_nonods * nphase * ncomp
41
 
     print*, comp( i )
42
 
  end do
43
 
 
44
 
end program main