37 use,
intrinsic :: iso_c_binding, only : c_ptr
38 use json_module,
only : json_file
41 register_scalar_pnpn_bc
55 procedure :: apply_scalar_dev => &
58 procedure :: apply_vector_dev => &
77 type(
coef_t),
target,
intent(in) :: coef
78 type(json_file),
intent(inout) :: json
81 call this%init_base(coef)
95 integer,
intent(in) :: n
96 real(kind=
rp),
intent(inout) :: x(n)
98 logical,
intent(in),
optional :: strong
101 call neko_error(
"scalar_pnpn_bc_template: apply_scalar is not implemented")
114 integer,
intent(in) :: n
115 real(kind=
rp),
intent(inout) :: x(n), y(n), z(n)
117 logical,
intent(in),
optional :: strong
120 call neko_error(
"scalar_pnpn_bc_template: apply_vector is not implemented")
131 type(c_ptr),
intent(inout) :: x_d
133 logical,
intent(in),
optional :: strong
134 type(c_ptr),
intent(inout) :: strm
138 "scalar_pnpn_bc_template: apply_scalar_dev is not implemented")
151 type(c_ptr),
intent(inout) :: x_d, y_d, z_d
153 logical,
intent(in),
optional :: strong
154 type(c_ptr),
intent(inout) :: strm
158 "scalar_pnpn_bc_template: apply_vector_dev is not implemented")
165 call this%free_base()
172 call this%finalize_base()
180 call register_scalar_pnpn_bc(
"scalar_pnpn_bc_template", allocator)
186 class(
bc_t),
pointer,
intent(inout) :: obj
Boundary condition factory. Both constructs and initializes the object.
Defines a boundary condition.
integer, parameter, public rp
Global precision used in computations.
Template for a user-defined scalar Pn/Pn boundary condition.
subroutine scalar_pnpn_bc_template_apply_vector_dev(this, x_d, y_d, z_d, time, strong, strm)
Apply the boundary condition to a vector field on the device.
subroutine scalar_pnpn_bc_template_free(this)
Destructor.
subroutine scalar_pnpn_bc_template_init(this, coef, json)
Constructor from JSON.
subroutine, public scalar_pnpn_bc_template_register_types()
Register the custom boundary condition type with scalar Pn/Pn.
subroutine scalar_pnpn_bc_template_apply_vector(this, x, y, z, n, time, strong)
Apply the boundary condition to a vector field on the CPU.
subroutine scalar_pnpn_bc_template_allocate(obj)
Allocate the custom boundary condition.
subroutine scalar_pnpn_bc_template_apply_scalar_dev(this, x_d, time, strong, strm)
Apply the boundary condition to a scalar field on the device.
subroutine scalar_pnpn_bc_template_finalize(this)
Finalize the boundary condition.
subroutine scalar_pnpn_bc_template_apply_scalar(this, x, n, time, strong)
Apply the boundary condition to a scalar field on the CPU.
Contains the scalar_pnpn_t type.
Module with things related to the simulation time.
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
A user-defined scalar Pn/Pn boundary condition.
A struct that contains all info about the time, expand as needed.