39 use json_module,
only : json_file
55 integer :: n_nodes = 0
57 integer :: n_samples = 0
59 logical :: user_values = .false.
61 logical :: output_h_enabled = .true.
86 type(json_file),
intent(inout) :: json
104 type(
coef_t),
intent(in) :: coef
105 integer,
intent(in) :: msk(0:)
106 integer,
intent(in) :: facet(0:)
107 type(
vector_t),
intent(in) :: n_x, n_y, n_z
108 character(len=*),
optional,
intent(in) :: bc_name
109 type(
user_t),
target,
optional,
intent(in) :: user
118 type(
field_t),
intent(inout) :: field
119 type(
vector_t),
intent(inout) :: values
138 integer,
intent(in) :: n_nodes
139 integer,
intent(in) :: n_samples
141 logical,
intent(in) :: output_h
143 if (n_nodes < 1 .or. n_samples < 1)
then
144 call neko_error(
'Wall sampler dimensions must be positive')
146 if (h%size() /= n_nodes * n_samples)
then
147 call neko_error(
'Wall sampler distances have an invalid size')
151 this%n_nodes = n_nodes
152 this%n_samples = n_samples
153 this%user_values = .false.
154 this%output_h_enabled = output_h
166 type(
coef_t),
intent(in) :: coef
167 integer,
intent(in) :: msk(0:)
168 character(len=*),
intent(in) :: bc_name
169 type(
field_t),
pointer :: h_field
172 integer :: i, scratch_index
174 if (msk(0) /= this%n_nodes)
then
175 call neko_error(
'Wall sampler mask has an invalid size')
181 call h_at_wall%init(this%n_nodes)
182 do i = 1, this%n_nodes
183 h_at_wall%x(i) = this%h%x((i - 1) * this%n_samples + 1)
192 h_field%size(), this%n_nodes)
194 call output%init(
rp,
'wall_model_h_' // trim(bc_name), 1)
195 call output%fields%assign_to_ptr(1, h_field)
196 call output%sample(0.0_dp)
200 call h_at_wall%free()
Complete sampler setup after geometric and wall-node data are known.
Release sampler resources.
Parse sampler-specific configuration from JSON.
Evaluate and store sampled field values at all sampling points.
Device abstraction, common interface for various accelerators.
integer, parameter, public host_to_device
Implements fld_file_output_t.
integer, parameter neko_bcknd_device
integer, parameter, public dp
integer, parameter, public rp
Global precision used in computations.
Defines a registry for storing and requesting temporary objects This can be used when you have a func...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Interfaces for user interaction with NEKO.
subroutine, public vector_masked_scatter_copy_0(a, b, mask, n, n_mask)
Scatter a contiguous vector into an array .
Defines the abstract interface for wall-model field samplers.
subroutine wall_sampler_output_h(this, coef, msk, bc_name)
Write the first sampling distance at every wall node to a field file.
subroutine wall_sampler_init_base(this, n_nodes, n_samples, h, output_h)
Initialise state common to all fully constructed wall samplers.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
A simple output saving a list of fields to a .fld file.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...
Base type for sampling solution fields at points associated with wall nodes. Samples belonging to one...