46 character(len=25) :: SCALAR_PNPN_KNOWN_BCS(5) = [character(len=25) :: &
62 module subroutine bc_factory(object, scheme, json, coef,
user)
63 class(bc_t),
pointer,
intent(inout) :: object
64 type(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(:)
71 character(len=:),
allocatable :: default_name
72 character(len=64) :: buf
74 if (
associated(object))
then
79 call json_get(json,
"type", type)
81 select case (trim(type))
82 case (
"user_dirichlet")
84 select type (obj => object)
86 obj%update =>
user%dirichlet_conditions
89 call json%add(
"field_name", scheme%s%name)
95 select type (obj => object)
97 obj%update =>
user%neumann_conditions
100 call json%add(
"field_name", scheme%s%name)
104 case (
"overset_interface")
106 select type (obj => object)
108 call json%add(
"field_name", scheme%s%name)
112 SCALAR_PNPN_KNOWN_BCS)
115 call json_get(json,
"zone_indices", zone_indices)
116 call object%init(coef, json)
117 do i = 1,
size(zone_indices)
118 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
121 write(buf,
'("scalar_bc_",I0)') zone_indices(1)
122 default_name = trim(buf)
123 call json_get_or_default(json,
"name", object%name, default_name)
124 object%zone_indices = zone_indices
125 call object%finalize()
127 end subroutine bc_factory
130end 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.
Defines overset interface scalar boundary conditions.
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.
Overset interface BC for a scalar field.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...