47  use json_module, 
only : json_file
 
   50  use, 
intrinsic :: iso_c_binding, only : c_ptr, c_size_t
 
   78     procedure, pass(this) :: init_from_components => &
 
   89     procedure, pass(this) :: apply_vector_dev => &
 
   92     procedure, pass(this) :: apply_scalar_dev => &
 
 
  122    type(
coef_t), 
target, 
intent(in) :: coef
 
  123    type(json_file), 
intent(inout) ::json
 
  124    character(len=:), 
allocatable :: field_name
 
  126    call json_get(json, 
"field_name", field_name)
 
  127    call this%init_from_components(coef, field_name)
 
 
  135    type(
coef_t), 
intent(in) :: coef
 
  136    character(len=*), 
intent(in) :: field_name
 
  138    call this%init_base(coef)
 
  140    call this%field_bc%init(this%dof, field_name)
 
  141    call this%field_list%init(1)
 
  142    call this%field_list%assign_to_field(1, this%field_bc)
 
 
  151    call this%field_bc%free()
 
  152    call this%field_list%free()
 
  154    if (
associated(this%update)) 
then 
  155       this%update => null()
 
 
  166    integer, 
intent(in) :: n
 
  167    real(kind=
rp), 
intent(inout), 
dimension(n) :: x
 
  169    logical, 
intent(in), 
optional :: strong
 
  172    if (
present(strong)) 
then 
  180       if (.not. this%updated) 
then 
  181          call this%update(this%field_list, this, time)
 
  182          this%updated = .true.
 
  185       call masked_copy_0(x, this%field_bc%x, this%msk, n, this%msk(0))
 
 
  196    type(c_ptr), 
intent(inout) :: x_d
 
  198    logical, 
intent(in), 
optional :: strong
 
  199    type(c_ptr), 
intent(inout) :: strm
 
  202    if (
present(strong)) 
then 
  209       if (.not. this%updated) 
then 
  210          call this%update(this%field_list, this, time)
 
  211          this%updated = .true.
 
  214       if (this%msk(0) .gt. 0) 
then 
  216               this%field_bc%dof%size(), this%msk(0), strm)
 
 
  230    integer, 
intent(in) :: n
 
  231    real(kind=
rp), 
intent(inout), 
dimension(n) :: x
 
  232    real(kind=
rp), 
intent(inout), 
dimension(n) :: y
 
  233    real(kind=
rp), 
intent(inout), 
dimension(n) :: z
 
  235    logical, 
intent(in), 
optional :: strong
 
  237    call neko_error(
"field_dirichlet cannot apply vector BCs.& 
  238    & Use field_dirichlet_vector instead!")
 
 
  251    type(c_ptr), 
intent(inout) :: x_d
 
  252    type(c_ptr), 
intent(inout) :: y_d
 
  253    type(c_ptr), 
intent(inout) :: z_d
 
  255    logical, 
intent(in), 
optional :: strong
 
  256    type(c_ptr), 
intent(inout) :: strm
 
  257    call neko_error(
"field_dirichlet cannot apply vector BCs.& 
  258    & Use field_dirichlet_vector instead!")
 
 
  265    logical, 
optional, 
intent(in) :: only_facets
 
  266    logical :: only_facets_
 
  268    if (
present(only_facets)) 
then 
  269       only_facets_ = only_facets
 
  271       only_facets_ = .false.
 
  274    call this%finalize_base(only_facets_)
 
 
Abstract interface defining a dirichlet condition on a list of fields.
 
Retrieves a parameter by name or throws an error.
 
Defines a boundary condition.
 
subroutine, public device_masked_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Copy a masked vector .
 
Defines a dirichlet boundary condition.
 
Defines a mapping of the degrees of freedom.
 
Defines user dirichlet condition for a scalar field.
 
subroutine field_dirichlet_finalize(this, only_facets)
Finalize.
 
subroutine field_dirichlet_apply_vector_dev(this, x_d, y_d, z_d, time, strong, strm)
(No-op) Apply vector (device).
 
subroutine field_dirichlet_apply_vector(this, x, y, z, n, time, strong)
(No-op) Apply vector.
 
subroutine field_dirichlet_init_from_components(this, coef, field_name)
Constructor from components.
 
subroutine field_dirichlet_apply_scalar(this, x, n, time, strong)
Apply scalar by performing a masked copy.
 
subroutine field_dirichlet_init(this, coef, json)
Constructor.
 
subroutine field_dirichlet_free(this)
Destructor. Currently thisfield_bc is being freed in fluid_scheme_incompressible::free
 
subroutine field_dirichlet_apply_scalar_dev(this, x_d, time, strong, strm)
Apply scalar (device).
 
Utilities for retrieving parameters from the case files.
 
subroutine, public masked_copy_0(a, b, mask, n, n_mask)
Copy a masked vector .
 
integer, parameter, public rp
Global precision used in computations.
 
Module with things related to the simulation time.
 
character(len=100) function, dimension(:), allocatable, public split_string(string, delimiter)
Split a string based on delimiter (tokenizer) OBS: very hacky, this should really be improved,...
 
Base type for a boundary condition.
 
A list of allocatable `bc_t`. Follows the standard interface of lists.
 
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
 
Generic Dirichlet boundary condition  on .
 
User defined dirichlet condition, for which the user can work with an entire field....
 
field_list_t, To be able to group fields together
 
A struct that contains all info about the time, expand as needed.