47 character(len=25) :: SCALAR_PNPN_KNOWN_BCS(6) = [character(len=25) :: &
49 "expression_dirichlet", &
64 module subroutine bc_factory(object, scheme, json, coef,
user)
65 class(bc_t),
pointer,
intent(inout) :: object
66 type(scalar_pnpn_t),
intent(in) :: scheme
67 type(json_file),
intent(inout) :: json
68 type(coef_t),
target,
intent(in) :: coef
69 type(user_t),
intent(in) :: user
70 character(len=:),
allocatable :: type
72 integer,
allocatable :: zone_indices(:)
73 character(len=:),
allocatable :: default_name
74 character(len=64) :: buf
76 if (
associated(object))
then
81 call json_get(json,
"type", type)
83 select case (trim(type))
84 case (
"user_dirichlet")
86 select type (obj => object)
88 obj%update =>
user%dirichlet_conditions
91 call json%add(
"field_name", scheme%s%name)
95 case (
"expression_dirichlet")
99 select type (obj => object)
101 obj%update =>
user%neumann_conditions
104 call json%add(
"field_name", scheme%s%name)
108 case (
"overset_interface")
110 select type (obj => object)
112 call json%add(
"field_name", scheme%s%name)
116 SCALAR_PNPN_KNOWN_BCS)
119 call json_get(json,
"zone_indices", zone_indices)
120 call object%init(coef, json)
121 do i = 1,
size(zone_indices)
122 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
125 write(buf,
'("scalar_bc_",I0)') zone_indices(1)
126 default_name = trim(buf)
127 call json_get_or_default(json,
"name", object%name, default_name)
128 object%zone_indices = zone_indices
129 call object%finalize()
131 end subroutine bc_factory
134end submodule scalar_pnpn_bc_fctry
Defines a dirichlet boundary condition.
Defines a Dirichlet condition prescribed by a mathematical expression.
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 .
Dirichlet condition on , where is a mathematical expression given in the case file.
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...