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)
77 call this%init_base(rhs_fields, coef, user)
78 end subroutine adjoint_source_term_init
87 subroutine adjoint_init_user_source(source_term, rhs_fields, coef, type, user)
88 class(source_term_t),
allocatable,
intent(inout) :: source_term
89 type(field_list_t) :: rhs_fields
90 type(coef_t),
intent(in) :: coef
91 character(len=*) :: type
92 type(user_t),
intent(in) :: user
94 allocate(fluid_user_source_term_t::source_term)
96 select type (source_term)
97 type is (fluid_user_source_term_t)
98 call source_term%init_from_components(rhs_fields, coef,
type, &
99 user%fluid_user_f_vector, &
102 end subroutine adjoint_init_user_source
Implements the adjoint_source_term_t type.
Wrapper contaning and executing the adjoint source terms.