45 character(len=25) :: SCALAR_PNPN_KNOWN_BCS(4) = [character(len=25) :: &
60 module subroutine bc_factory(object, scheme, json, coef,
user)
61 class(bc_t),
pointer,
intent(inout) :: object
62 type(scalar_pnpn_t),
intent(in) :: scheme
63 type(json_file),
intent(inout) :: json
64 type(coef_t),
intent(in) :: coef
65 type(user_t),
intent(in) :: user
66 character(len=:),
allocatable :: type
68 integer,
allocatable :: zone_indices(:)
69 character(len=:),
allocatable :: default_name
70 character(len=64) :: buf
72 if (
associated(object))
then
77 call json_get(json,
"type", type)
79 select case (trim(type))
80 case (
"user_dirichlet")
82 select type (obj => object)
84 obj%update =>
user%dirichlet_conditions
87 call json%add(
"field_name", scheme%s%name)
93 select type (obj => object)
95 obj%update =>
user%neumann_conditions
98 call json%add(
"field_name", scheme%s%name)
104 SCALAR_PNPN_KNOWN_BCS)
107 call json_get(json,
"zone_indices", zone_indices)
108 call object%init(coef, json)
109 do i = 1,
size(zone_indices)
110 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
113 write(buf,
'("scalar_bc_",I0)') zone_indices(1)
114 default_name = trim(buf)
115 call json_get_or_default(json,
"name", object%name, default_name)
116 object%zone_indices = zone_indices
117 call object%finalize()
119 end subroutine bc_factory
122end submodule scalar_pnpn_bc_fctry
Defines a dirichlet boundary condition.
Defines user dirichlet condition for a scalar field.
Defines user neumann 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....
User defined neumann condition, for which the user can work with an entire field. The type stores a s...
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...