reaction_sandbox_base.F90 coverage: 0.00 %func 0.00 %block
1) module Reaction_Sandbox_Base_class
2)
3) use PFLOTRAN_Constants_module
4)
5) implicit none
6)
7) private
8)
9) #include "petsc/finclude/petscsys.h"
10)
11) type, abstract, public :: reaction_sandbox_base_type
12) class(reaction_sandbox_base_type), pointer :: next
13) contains
14) #if 0
15) procedure(Base_Read), public, deferred :: ReadInput
16) procedure(Base_Setup), public, deferred :: Setup
17) procedure(Base_React), public, deferred :: Evaluate
18) procedure(Base_Destroy), public, deferred :: Destroy
19) #else
20) procedure, public :: ReadInput => Base_Read
21) procedure, public :: Setup => Base_Setup
22) procedure, public :: Evaluate => Base_React
23) procedure, public :: Destroy => Base_Destroy
24) #endif
25) end type reaction_sandbox_base_type
26)
27) ! for some reason cannot use the interfaces when passing in "this"
28) ! with Intel
29) #if 0
30) abstract interface
31)
32) subroutine Base_Setup(this,reaction,option)
33)
34) use Option_module
35) use Reaction_Aux_module
36)
37) import reaction_sandbox_base_type
38)
39) implicit none
40)
41) class(reaction_sandbox_base_type) :: this
42) type(reaction_type) :: reaction
43) type(option_type) :: option
44)
45) end subroutine Base_Setup
46)
47) subroutine Base_Read(this,input,option)
48)
49) use Option_module
50) use Input_Aux_module
51)
52) import reaction_sandbox_base_type
53)
54) implicit none
55)
56) class(reaction_sandbox_base_type) :: this
57) type(input_type), pointer :: input
58) type(option_type) :: option
59)
60) end subroutine Base_Read
61)
62) subroutine Base_SkipBlock(this,input,option)
63)
64) use Option_module
65) use Input_Aux_module
66)
67) import reaction_sandbox_base_type
68)
69) implicit none
70)
71) class(reaction_sandbox_base_type) :: this
72) type(input_type), pointer :: input
73) type(option_type) :: option
74)
75) end subroutine Base_SkipBlock
76)
77) subroutine Base_React(this,Res,Jac,compute_derivative,rt_auxvar, &
78) global_auxvar,material_auxvar,reaction,option)
79)
80) use Option_module
81) use Reaction_Aux_module
82) use Reactive_Transport_Aux_module
83) use Global_Aux_module
84) use Material_Aux_class
85)
86) import reaction_sandbox_base_type
87)
88) implicit none
89)
90) class(reaction_sandbox_base_type) :: this
91) type(option_type) :: option
92) type(reaction_type) :: reaction
93) PetscBool :: compute_derivative
94) ! the following arrays must be declared after reaction
95) PetscReal :: Res(reaction%ncomp)
96) PetscReal :: Jac(reaction%ncomp,reaction%ncomp)
97) type(reactive_transport_auxvar_type) :: rt_auxvar
98) type(global_auxvar_type) :: global_auxvar
99) class(material_auxvar_type) :: material_auxvar
100)
101) end subroutine
102)
103) subroutine Base_Destroy(this)
104)
105) import reaction_sandbox_base_type
106)
107) implicit none
108)
109) class(reaction_sandbox_base_type) :: this
110)
111) end subroutine Base_Destroy
112)
113) end interface
114)
115) #else
116)
117) contains
118)
119) ! ************************************************************************** !
120)
121) subroutine Base_Setup(this,reaction,option)
122)
123) use Option_module
124) use Reaction_Aux_module
125)
126) implicit none
127)
128) class(reaction_sandbox_base_type) :: this
129) type(reaction_type) :: reaction
130) type(option_type) :: option
131)
132) end subroutine Base_Setup
133)
134) ! ************************************************************************** !
135)
136) subroutine Base_Read(this,input,option)
137)
138) use Option_module
139) use Input_Aux_module
140)
141) implicit none
142)
143) class(reaction_sandbox_base_type) :: this
144) type(input_type), pointer :: input
145) type(option_type) :: option
146)
147) end subroutine Base_Read
148)
149) ! ************************************************************************** !
150)
151) subroutine Base_SkipBlock(this,input,option)
152)
153) use Option_module
154) use Input_Aux_module
155)
156) implicit none
157)
158) class(reaction_sandbox_base_type) :: this
159) type(input_type), pointer :: input
160) type(option_type) :: option
161)
162) end subroutine Base_SkipBlock
163)
164) ! ************************************************************************** !
165)
166) subroutine Base_React(this,Residual,Jacobian,compute_derivative,rt_auxvar, &
167) global_auxvar,material_auxvar,reaction,option)
168) use Option_module
169) use Reaction_Aux_module
170) use Reactive_Transport_Aux_module
171) use Global_Aux_module
172) use Material_Aux_class
173)
174) implicit none
175)
176) class(reaction_sandbox_base_type) :: this
177) type(option_type) :: option
178) type(reaction_type) :: reaction
179) PetscBool :: compute_derivative
180) ! the following arrays must be declared after reaction
181) PetscReal :: Residual(reaction%ncomp)
182) PetscReal :: Jacobian(reaction%ncomp,reaction%ncomp)
183) type(reactive_transport_auxvar_type) :: rt_auxvar
184) type(global_auxvar_type) :: global_auxvar
185) class(material_auxvar_type) :: material_auxvar
186)
187) end subroutine
188)
189) ! ************************************************************************** !
190)
191) subroutine Base_Destroy(this)
192)
193) implicit none
194)
195) class(reaction_sandbox_base_type) :: this
196)
197) end subroutine Base_Destroy
198) #endif
199)
200) end module Reaction_Sandbox_Base_class