36 use fluid_user_source_term,
only: fluid_user_source_term_t
37 use source_term,
only: source_term_t
38 use source_term_handler,
only: source_term_handler_t
39 use field,
only: field_t
40 use field_list,
only: field_list_t
41 use coefs,
only: coef_t
42 use user_intf,
only: user_t
54 procedure, pass(this) :: init => adjoint_source_term_init
56 procedure,
nopass :: init_user_source => adjoint_init_user_source
63 subroutine adjoint_source_term_init(this, f_x, f_y, f_z, coef, user)
65 type(field_t),
pointer,
intent(in) :: f_x, f_y, f_z
66 type(coef_t),
target,
intent(in) :: coef
67 type(user_t),
target,
intent(in) :: user
69 type(field_list_t) :: rhs_fields
72 call rhs_fields%init(3)
73 call rhs_fields%assign(1, f_x)
74 call rhs_fields%assign(2, f_y)
75 call rhs_fields%assign(3, f_z)
78 call this%init_base(rhs_fields, coef, user,
'temp')
79 end subroutine adjoint_source_term_init
89 subroutine adjoint_init_user_source(source_term, rhs_fields, coef, type, &
91 class(source_term_t),
allocatable,
intent(inout) :: source_term
92 type(field_list_t) :: rhs_fields
93 type(coef_t),
intent(in) :: coef
94 character(len=*) :: type
95 type(user_t),
intent(in) :: user
96 character(len=*),
intent(in) :: variable_name
98 allocate(fluid_user_source_term_t::source_term)
100 select type (source_term)
101 type is (fluid_user_source_term_t)
102 call source_term%init_from_components(rhs_fields, coef,
type, &
103 user%fluid_user_f_vector, &
106 end subroutine adjoint_init_user_source
Implements the adjoint_source_term_t type.
Wrapper contaning and executing the adjoint source terms.