Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
facet_normal Module Reference

Dirichlet condition applied in the facet normal direction.

Data Types

type  facet_normal_t
 Dirichlet condition in facet normal direction. More...
 

Functions/Subroutines

subroutine facet_normal_init (this, coef, json)
 Constructor.
 
subroutine facet_normal_init_from_components (this, coef)
 Constructor from components.
 
subroutine facet_normal_apply_scalar (this, x, n, time, strong)
 No-op scalar apply.
 
subroutine facet_normal_apply_scalar_dev (this, x_d, time, strong, strm)
 No-op scalar apply on device.
 
subroutine facet_normal_apply_vector_dev (this, x_d, y_d, z_d, time, strong, strm)
 No-op vector apply on device.
 
subroutine facet_normal_apply_vector (this, x, y, z, n, time, strong)
 No-op vector apply.
 
subroutine facet_normal_apply_surfvec (this, x, y, z, u, v, w, n, time)
 Apply in facet normal direction (vector valued)
 
subroutine facet_normal_apply_surfvec_sub (this, res, u, v, w, c, n)
 Subtract the normal projection of a vector from a scalar field, on the facet nodes only.
 
subroutine facet_normal_apply_surfvec_dev (this, x_d, y_d, z_d, u_d, v_d, w_d, time, strm)
 Apply in facet normal direction (vector valued, device version)
 
subroutine facet_normal_free (this)
 Destructor.
 
subroutine facet_normal_finalize (this)
 Finalize.
 
subroutine facet_normal_recompute_normals (this)
 Recompute area-weighted normals from the current mesh.
 

Function/Subroutine Documentation

◆ facet_normal_apply_scalar()

subroutine facet_normal::facet_normal_apply_scalar ( class(facet_normal_t), intent(inout)  this,
real(kind=rp), dimension(n), intent(inout)  x,
integer, intent(in)  n,
type(time_state_t), intent(in), optional  time,
logical, intent(in), optional  strong 
)
private

Definition at line 106 of file facet_normal.f90.

◆ facet_normal_apply_scalar_dev()

subroutine facet_normal::facet_normal_apply_scalar_dev ( class(facet_normal_t), intent(inout), target  this,
type(c_ptr), intent(inout)  x_d,
type(time_state_t), intent(in), optional  time,
logical, intent(in), optional  strong,
type(c_ptr), intent(inout)  strm 
)
private

Definition at line 115 of file facet_normal.f90.

◆ facet_normal_apply_surfvec()

subroutine facet_normal::facet_normal_apply_surfvec ( class(facet_normal_t), intent(in)  this,
real(kind=rp), dimension(n), intent(inout)  x,
real(kind=rp), dimension(n), intent(inout)  y,
real(kind=rp), dimension(n), intent(inout)  z,
real(kind=rp), dimension(n), intent(inout)  u,
real(kind=rp), dimension(n), intent(inout)  v,
real(kind=rp), dimension(n), intent(inout)  w,
integer, intent(in)  n,
type(time_state_t), intent(in), optional  time 
)
private

Definition at line 149 of file facet_normal.f90.

◆ facet_normal_apply_surfvec_dev()

subroutine facet_normal::facet_normal_apply_surfvec_dev ( class(facet_normal_t), intent(in), target  this,
type(c_ptr)  x_d,
type(c_ptr)  y_d,
type(c_ptr)  z_d,
type(c_ptr)  u_d,
type(c_ptr)  v_d,
type(c_ptr)  w_d,
type(time_state_t), intent(in), optional  time,
type(c_ptr), optional  strm 
)
private

Definition at line 219 of file facet_normal.f90.

Here is the call graph for this function:

◆ facet_normal_apply_surfvec_sub()

subroutine facet_normal::facet_normal_apply_surfvec_sub ( class(facet_normal_t), intent(in)  this,
real(kind=rp), dimension(n), intent(inout)  res,
real(kind=rp), dimension(n), intent(in)  u,
real(kind=rp), dimension(n), intent(in)  v,
real(kind=rp), dimension(n), intent(in)  w,
real(kind=rp), intent(in)  c,
integer, intent(in)  n 
)
private

Computes res(k) = res(k) - c * (u,v,w)(k) . n(k) over the unique facet-node mask. This is the fused form of zeroing three full fields, calling apply_surfvec into them, and then reading all three back across the whole domain: the surface term is nonzero only on the mask, so the full-field traffic carries nothing. Safe to accumulate in place because unique_mask visits every dof exactly once, with the normals of all adjoining faces already summed into nx/ny/nz (see finalize).

Note
This carries orphaned worksharing rather than opening its own parallel region, so the caller can cover several of these and the loops around them with one region. The trailing barrier of the !$omp do is required: consecutive calls read and write the same res entries wherever two facet masks meet. Encountered outside a parallel region it still gives the right answer, just on one thread.
Parameters
resScalar field to subtract from.
uFirst component of the vector.
vSecond component of the vector.
wThird component of the vector.
cScalar coefficient applied to the projection.
nNumber of entries in each array.

Definition at line 197 of file facet_normal.f90.

◆ facet_normal_apply_vector()

subroutine facet_normal::facet_normal_apply_vector ( class(facet_normal_t), intent(inout)  this,
real(kind=rp), dimension(n), intent(inout)  x,
real(kind=rp), dimension(n), intent(inout)  y,
real(kind=rp), dimension(n), intent(inout)  z,
integer, intent(in)  n,
type(time_state_t), intent(in), optional  time,
logical, intent(in), optional  strong 
)
private

Definition at line 138 of file facet_normal.f90.

◆ facet_normal_apply_vector_dev()

subroutine facet_normal::facet_normal_apply_vector_dev ( class(facet_normal_t), intent(inout), target  this,
type(c_ptr), intent(inout)  x_d,
type(c_ptr), intent(inout)  y_d,
type(c_ptr), intent(inout)  z_d,
type(time_state_t), intent(in), optional  time,
logical, intent(in), optional  strong,
type(c_ptr), intent(inout)  strm 
)
private

Definition at line 125 of file facet_normal.f90.

◆ facet_normal_finalize()

subroutine facet_normal::facet_normal_finalize ( class(facet_normal_t), intent(inout), target  this)
private

Definition at line 278 of file facet_normal.f90.

Here is the call graph for this function:

◆ facet_normal_free()

subroutine facet_normal::facet_normal_free ( class(facet_normal_t), intent(inout), target  this)
private

Definition at line 258 of file facet_normal.f90.

◆ facet_normal_init()

subroutine facet_normal::facet_normal_init ( class(facet_normal_t), intent(inout), target  this,
type(coef_t), intent(in), target  coef,
type(json_file), intent(inout)  json 
)
Parameters
[in]coefThe SEM coefficients.
[in,out]jsonThe JSON object configuring the boundary condition.

Definition at line 87 of file facet_normal.f90.

◆ facet_normal_init_from_components()

subroutine facet_normal::facet_normal_init_from_components ( class(facet_normal_t), intent(inout), target  this,
type(coef_t), intent(in), target  coef 
)
private
Parameters
[in]coefThe SEM coefficients.

Definition at line 97 of file facet_normal.f90.

◆ facet_normal_recompute_normals()

subroutine facet_normal::facet_normal_recompute_normals ( class(facet_normal_t), intent(inout), target  this)
private

Definition at line 372 of file facet_normal.f90.

Here is the call graph for this function: