39 use dirichlet,
only : dirichlet_t
40 use neumann,
only : neumann_t
41 use user_intf,
only : user_t
42 use utils,
only : neko_type_error
43 use field_dirichlet,
only : field_dirichlet_t
47 character(len=25) :: ADJOINT_SCALAR_KNOWN_BCS(4) = [character(len=25) :: &
62 module subroutine adjoint_bc_factory(object, scheme, json, coef, user)
63 class(bc_t),
pointer,
intent(inout) :: object
64 type(adjoint_scalar_pnpn_t),
intent(in) :: scheme
65 type(json_file),
intent(inout) :: json
66 type(coef_t),
intent(in) :: coef
67 type(user_t),
intent(in) :: user
68 character(len=:),
allocatable :: type
70 integer,
allocatable :: zone_indices(:)
72 call json_get(json,
"type", type)
74 select case (trim(type))
76 allocate(field_dirichlet_t::object)
77 select type (obj => object)
78 type is (field_dirichlet_t)
79 obj%update => user%dirichlet_conditions
82 call json%add(
"field_name", scheme%s_adj%name)
85 allocate(dirichlet_t::object)
87 allocate(neumann_t::object)
89 call neko_type_error(
"scalar_pnpn boundary conditions",
type, &
90 ADJOINT_SCALAR_KNOWN_BCS)
93 call json_get(json,
"zone_indices", zone_indices)
94 call object%init(coef, json)
95 do i = 1,
size(zone_indices)
96 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
98 call object%finalize()
100 end subroutine adjoint_bc_factory
103end submodule adjoint_scalar_pnpn_bc_fctry
Contains the adjoint_scalar_pnpn_t type.