ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
 All Classes Files Functions Variables Pages
run_chease.f90
Go to the documentation of this file.
1 ! + + + + + + + + + + + + + + + + + + + + + + + + + + + +
7 ! + + + + + + + + + + + + + + + + + + + + + + + + + + + +
8 program run_chease
9 
10  use itm_types
11  use euitm_schemas
12  use xml_file_reader
13  use read_structures
14  use write_structures
15  use deallocate_structures
16  implicit none
17 
18  type (type_equilibrium), pointer :: euitm_equilibrium_in(:)
19  type (type_equilibrium), pointer :: euitm_equilibrium_out(:)
20  type (type_param), save :: code_parameters
21  logical, save :: first = .true.
22  integer, save :: ncall = 0
23  character*32 :: filename = 'EQ_######'
24  integer(itm_i4) :: i, iargc
25 
26  interface
27  subroutine chease (euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
28  use euitm_schemas
29  IMPLICIT NONE
30  type (type_equilibrium), pointer :: euitm_equilibrium_in(:)
31  type (type_equilibrium), pointer :: euitm_equilibrium_out(:)
32  type (type_param) :: code_parameters
33  end SUBROUTINE chease
34  end interface
35 
36  if(iargc().lt.1) then
37  write(*,*) 'filename should be specified'
38  stop 'error: missing filename'
39  endif
40  call fill_param(code_parameters, 'XML/chease.xml', '', 'XML/chease.xsd')
41  do i=1, iargc()
42  call getarg(i,filename)
43  write(*,*) 'Processing ',trim(filename)
44 
45  call open_read_file(1, filename)
46  allocate(euitm_equilibrium_in(1))
47  call read_cpo(euitm_equilibrium_in(1), 'equilibrium')
48  call close_read_file
49  CALL chease(euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
50 
51  filename='EQ_######'
52  write(filename(4:9),'(I6.6)') i-1
53  call open_write_file(1, trim(filename)//'.OUT2')
54  call write_cpo(euitm_equilibrium_out(1), 'equilibrium')
55  call close_write_file
56 
57  call deallocate_cpo(euitm_equilibrium_in)
58  call deallocate_cpo(euitm_equilibrium_out)
59  enddo
60 
61 end program run_chease
program run_chease
Run chease based on a CPO stored in ascii format.
Definition: run_chease.f90:8