libsim  Versione 7.2.1
forno.F03
1 module forno
2 
3 USE alchimia
5 IMPLICIT NONE
6 
7 private
8 public register_forno
9 
10 contains
11 
12 subroutine register_forno(vfn)
13 
14  type(fndsv),intent(inout) :: vfn
15 
16  call fnregister(vfn,inforna_def())
17  call fnregister(vfn,rosola_def())
18  call fnregister(vfn,ripassa_def())
19  call fnregister(vfn,brucia_def())
20 
21 end subroutine register_forno
22 
23 
24 subroutine inforna(mybin,mybout,bin,bout,in,out)
25  CHARACTER(len=10),intent(in) :: mybin(:)
26  CHARACTER(len=10),intent(in) :: mybout(:)
27  CHARACTER(len=10),intent(in) :: bin(:)
28  CHARACTER(len=10),intent(in) :: bout(:)
29  real, intent(in) :: in(:,:)
30  real, intent(out) :: out(:,:)
31  integer :: i
32 
33  do i=1,size(bin)
34  if (index_c(mybin,bin(i)) == 0) print *,"not in bin : ",bin(i)
35  end do
36  do i=1,size(bout)
37  if (index_c(mybout,bout(i)) == 0) print *,"not in bout: ",bout(i)
38  end do
39 
40  out=5.
41 end subroutine inforna
42 
43 type(fnds) function inforna_def()
44  call init(inforna_def,"inforna",&
45  [character(len=10) :: "farina","lievito","acqua","sale"],&
46  [character(len=10) :: "pane"],0,func=inforna)
47 end function inforna_def
48 
49 
50 
51 subroutine rosola(mybin,mybout,bin,bout,in,out)
52  CHARACTER(len=10),intent(in) :: mybin(:)
53  CHARACTER(len=10),intent(in) :: mybout(:)
54  CHARACTER(len=10),intent(in) :: bin(:)
55  CHARACTER(len=10),intent(in) :: bout(:)
56  real, intent(in) :: in(:,:)
57  real, intent(out) :: out(:,:)
58  integer :: i
59 
60  do i=1,size(bin)
61  if (index_c(mybin,bin(i)) == 0) print *,"not in bin : ",bin(i)
62  end do
63  do i=1,size(bout)
64  if (index_c(mybout,bout(i)) == 0) print *,"not in bout: ",bout(i)
65  end do
66 
67  out=6.
68 
69 end subroutine rosola
70 
71 type(fnds) function rosola_def()
72  call init(rosola_def,"rosola",&
73  [character(len=10) :: "patate","sale"],&
74  [character(len=10) :: "patatine"],0,func=rosola)
75 end function rosola_def
76 
77 
78 subroutine ripassa(mybin,mybout,bin,bout,in,out)
79  CHARACTER(len=10),intent(in) :: mybin(:)
80  CHARACTER(len=10),intent(in) :: mybout(:)
81  CHARACTER(len=10),intent(in) :: bin(:)
82  CHARACTER(len=10),intent(in) :: bout(:)
83  real, intent(in) :: in(:,:)
84  real, intent(out) :: out(:,:)
85  integer :: i
86 
87  do i=1,size(bin)
88  if (index_c(mybin,bin(i)) == 0) print *,"not in bin : ",bin(i)
89  end do
90  do i=1,size(bout)
91  if (index_c(mybout,bout(i)) == 0) print *,"not in bout: ",bout(i)
92  end do
93 
94  out=7.
95 
96 end subroutine ripassa
97 
98 type(fnds) function ripassa_def()
99  call init(ripassa_def,"ripassa",&
100  [character(len=10) :: "patatine","pole.frit."],&
101  [character(len=10) :: "pole.pata."],0,func=ripassa)
102 end function ripassa_def
103 
104 
105 subroutine brucia(mybin,mybout,bin,bout,in,out)
106  CHARACTER(len=10),intent(in) :: mybin(:)
107  CHARACTER(len=10),intent(in) :: mybout(:)
108  CHARACTER(len=10),intent(in) :: bin(:)
109  CHARACTER(len=10),intent(in) :: bout(:)
110  real, intent(in) :: in(:,:)
111  real, intent(out) :: out(:,:)
112  integer :: i
113 
114  do i=1,size(bin)
115  if (index_c(mybin,bin(i)) == 0) print *,"not in bin : ",bin(i)
116  end do
117  do i=1,size(bout)
118  if (index_c(mybout,bout(i)) == 0) print *,"not in bout: ",bout(i)
119  end do
120 
121  out=8.
122 
123 end subroutine brucia
124 
125 type(fnds) function brucia_def()
126  call init(brucia_def,"brucia",&
127  [character(len=10) :: "patate","sale"],&
128  [character(len=10) :: "carboncini"],0,func=brucia)
129 end function brucia_def
130 
131 
132 
133 end module forno
This module defines objects and methods for generating derivative variables.
Definition: alchimia.F03:224
This module defines usefull general purpose function and subroutine.

Generated with Doxygen.