40 use dirichlet,
only : dirichlet_t
41 use neumann,
only : neumann_t
42 use user_intf,
only : user_t
43 use utils,
only : neko_type_error
44 use field_dirichlet,
only : field_dirichlet_t
48 character(len=25) :: ADJOINT_SCALAR_KNOWN_BCS(4) = [character(len=25) :: &
63 module subroutine adjoint_bc_factory(object, scheme, json, coef, user)
64 class(bc_t),
pointer,
intent(inout) :: object
65 type(adjoint_scalar_pnpn_t),
intent(in) :: scheme
66 type(json_file),
intent(inout) :: json
67 type(coef_t),
intent(in) :: coef
68 type(user_t),
intent(in) :: user
69 character(len=:),
allocatable :: type
71 integer,
allocatable :: zone_indices(:)
73 call json_get(json,
"type", type)
75 select case (trim(type))
77 allocate(field_dirichlet_t::object)
78 select type (obj => object)
79 type is (field_dirichlet_t)
80 obj%update => user%dirichlet_conditions
83 call json%add(
"field_name", scheme%s_adj%name)
86 allocate(dirichlet_t::object)
88 allocate(neumann_t::object)
90 call neko_type_error(
"scalar_pnpn boundary conditions",
type, &
91 ADJOINT_SCALAR_KNOWN_BCS)
94 call json_get(json,
"zone_indices", zone_indices)
95 call object%init(coef, json)
96 do i = 1,
size(zone_indices)
97 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
99 call object%finalize()
101 end subroutine adjoint_bc_factory
104end submodule adjoint_scalar_pnpn_bc_fctry
Contains the adjoint_scalar_pnpn_t type.