Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
advection_adjoint.f90
Go to the documentation of this file.
1
34!
37 use num_types, only: rp
38 use space, only: space_t
39 use field, only: field_t
40 use coefs, only: coef_t
41 use json_module, only : json_file
42 use field_series, only: field_series_t
43 use time_scheme_controller, only: time_scheme_controller_t
44 implicit none
45 private
46
48 type, abstract :: advection_adjoint_t
49 contains
50 procedure(compute_adv_lin), pass(this), deferred :: compute_linear
51 procedure(compute_adv_lin), pass(this), deferred :: compute_adjoint
52 procedure(compute_scalar_adv_lin), pass(this), deferred :: &
53 compute_adjoint_scalar
54 procedure(advection_adjoint_free), pass(this), deferred :: free
55 end type advection_adjoint_t
56
57 interface
58
71 module subroutine advection_adjoint_factory(object, json, coef, &
72 ulag, vlag, wlag, dtlag, tlag, time_scheme, use_dummy, slag)
73 class(advection_adjoint_t), allocatable, intent(inout) :: object
74 type(json_file), intent(inout) :: json
75 type(coef_t), intent(inout), target :: coef
76 type(field_series_t), intent(in), target :: ulag, vlag, wlag
77 real(kind=rp), intent(in), target :: dtlag(10)
78 real(kind=rp), intent(in), target :: tlag(10)
79 type(time_scheme_controller_t), intent(in), target :: time_scheme
80 logical, optional, intent(in) :: use_dummy
81 type(field_series_t), target, optional, intent(in) :: slag
82 end subroutine advection_adjoint_factory
83 end interface
84
85 ! ========================================================================== !
86 ! Linearized advection operator interface
87
88 abstract interface
89
100 subroutine compute_adv_lin(this, vx, vy, vz, vxb, vyb, vzb, fx, fy, fz, &
101 Xh, coef, n)
102 import :: advection_adjoint_t
103 import :: coef_t
104 import :: space_t
105 import :: field_t
106 import :: rp
107 class(advection_adjoint_t), intent(inout) :: this
108 type(space_t), intent(inout) :: Xh
109 type(coef_t), intent(inout) :: coef
110 type(field_t), intent(inout) :: vx, vy, vz
111 type(field_t), intent(inout) :: vxb, vyb, vzb
112 type(field_t), intent(inout) :: fx, fy, fz
113 integer, intent(in) :: n
114 end subroutine compute_adv_lin
115 end interface
116
117 abstract interface
118
128 subroutine compute_scalar_adv_lin(this, vxb, vyb, vzb, s, fs, Xh, coef, &
129 n, dt)
130 import :: advection_adjoint_t
131 import :: coef_t
132 import :: space_t
133 import :: field_t
134 import :: rp
135 class(advection_adjoint_t), intent(inout) :: this
136 type(field_t), intent(inout) :: vxb, vyb, vzb
137 type(field_t), intent(inout) :: s
138 type(field_t), intent(inout) :: fs
139 type(space_t), intent(inout) :: Xh
140 type(coef_t), intent(inout) :: coef
141 real(kind=rp), intent(in), optional :: dt
142 integer, intent(in) :: n
143 end subroutine compute_scalar_adv_lin
144 end interface
145
146 abstract interface
147
148 subroutine advection_adjoint_free(this)
149 import :: advection_adjoint_t
150 class(advection_adjoint_t), intent(inout) :: this
151 end subroutine advection_adjoint_free
152 end interface
153
154 public :: advection_adjoint_t, advection_adjoint_factory
155end module advection_adjoint
Subroutines to add advection terms to the RHS of a transport equation.
Base abstract type for computing the advection operator.