44 character(len=25) :: SCALAR_PNPN_KNOWN_BCS(3) = [character(len=25) :: &
58 module subroutine bc_factory(object, scheme, json, coef,
user)
59 class(bc_t),
pointer,
intent(inout) :: object
60 type(scalar_pnpn_t),
intent(in) :: scheme
61 type(json_file),
intent(inout) :: json
62 type(coef_t),
intent(in) :: coef
63 type(user_t),
intent(in) :: user
64 character(len=:),
allocatable :: type
66 integer,
allocatable :: zone_indices(:)
67 character(len=:),
allocatable :: default_name
68 character(len=64) :: buf
70 if (
associated(object))
then
75 call json_get(json,
"type", type)
77 select case (trim(type))
80 select type (obj => object)
82 obj%update =>
user%dirichlet_conditions
85 call json%add(
"field_name", scheme%s%name)
93 SCALAR_PNPN_KNOWN_BCS)
96 call json_get(json,
"zone_indices", zone_indices)
97 call object%init(coef, json)
98 do i = 1,
size(zone_indices)
99 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
102 write(buf,
'("scalar_bc_",I0)') zone_indices(1)
103 default_name = trim(buf)
104 call json_get_or_default(json,
"name", object%name, default_name)
105 object%zone_indices = zone_indices
106 call object%finalize()
108 end subroutine bc_factory
111end submodule scalar_pnpn_bc_fctry
Defines a dirichlet boundary condition.
Defines user dirichlet condition for a scalar field.
Defines a Neumann boundary condition.
Contains the scalar_pnpn_t type.
Interfaces for user interaction with NEKO.
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Generic Dirichlet boundary condition on .
User defined dirichlet condition, for which the user can work with an entire field....
A Neumann boundary condition. Sets the flux of the field to the chosen values.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...