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

Defines a Dirichlet condition prescribed by a mathematical expression.

Data Types

type  expression_dirichlet_t
 Dirichlet condition \( x = g(x, y, z, t) \) on \(\partial \Omega\), where \( g \) is a mathematical expression given in the case file. More...
 

Functions/Subroutines

subroutine expression_dirichlet_init (this, coef, json)
 Constructor from JSON.
 
subroutine expression_dirichlet_init_from_components (this, coef, str)
 Constructor from components.
 
subroutine expression_dirichlet_free (this)
 Destructor.
 
subroutine expression_dirichlet_finalize (this, only_facets)
 Finalize.
 
subroutine expression_dirichlet_update (this, time, strm)
 Bring g up to date with the current time.
 
subroutine expression_dirichlet_apply_scalar (this, x, n, time, strong)
 Apply the condition to a scalar field.
 
subroutine expression_dirichlet_apply_vector (this, x, y, z, n, time, strong)
 (No-op) Apply vector.
 
subroutine expression_dirichlet_apply_scalar_dev (this, x_d, time, strong, strm)
 Apply the condition to a scalar field (device version).
 
subroutine expression_dirichlet_apply_vector_dev (this, x_d, y_d, z_d, time, strong, strm)
 (No-op) Apply vector (device version).
 
subroutine, public expression_mask_coords (bc, xm, ym, zm)
 Tabulate the coordinates of the points of the mask of a boundary condition.
 
subroutine gather_coords (msk, m, x, y, z, n, xm, ym, zm)
 Gather the coordinates of the masked points into contiguous arrays.
 

Function/Subroutine Documentation

◆ expression_dirichlet_apply_scalar()

subroutine expression_dirichlet::expression_dirichlet_apply_scalar ( class(expression_dirichlet_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
Parameters
[in,out]xThe field onto which to apply the values.
[in]nThe size of x.
[in]timeThe current time state.
[in]strongWhether the condition is applied strongly.

Definition at line 238 of file expression_dirichlet.f90.

◆ expression_dirichlet_apply_scalar_dev()

subroutine expression_dirichlet::expression_dirichlet_apply_scalar_dev ( class(expression_dirichlet_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
Parameters
[in,out]x_dDevice pointer to the field.
[in]timeThe current time state.
[in]strongWhether the condition is applied strongly.
[in,out]strmThe device stream to issue the work on.

Definition at line 294 of file expression_dirichlet.f90.

Here is the call graph for this function:

◆ expression_dirichlet_apply_vector()

subroutine expression_dirichlet::expression_dirichlet_apply_vector ( class(expression_dirichlet_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
Parameters
[in,out]xThe x-component of the field.
[in,out]yThe y-component of the field.
[in,out]zThe z-component of the field.
[in]nThe size of x, y and z.
[in]timeThe current time state.
[in]strongWhether the condition is applied strongly.

Definition at line 279 of file expression_dirichlet.f90.

◆ expression_dirichlet_apply_vector_dev()

subroutine expression_dirichlet::expression_dirichlet_apply_vector_dev ( class(expression_dirichlet_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
Parameters
[in,out]x_dDevice pointer to the x-component of the field.
[in,out]y_dDevice pointer to the y-component of the field.
[in,out]z_dDevice pointer to the z-component of the field.
[in]timeThe current time state.
[in]strongWhether the condition is applied strongly.
[in,out]strmThe device stream to issue the work on.

Definition at line 326 of file expression_dirichlet.f90.

◆ expression_dirichlet_finalize()

subroutine expression_dirichlet::expression_dirichlet_finalize ( class(expression_dirichlet_t), intent(inout), target  this,
logical, intent(in), optional  only_facets 
)
private

Tabulates the coordinates of the points of the mask, which is only known once the mask has been built, and evaluates the expression right away if it does not depend on time.

Parameters
[in]only_facetsWhether to only mark the facets of the mask.

Definition at line 160 of file expression_dirichlet.f90.

Here is the call graph for this function:

◆ expression_dirichlet_free()

subroutine expression_dirichlet::expression_dirichlet_free ( class(expression_dirichlet_t), intent(inout), target  this)
private

Definition at line 136 of file expression_dirichlet.f90.

◆ expression_dirichlet_init()

subroutine expression_dirichlet::expression_dirichlet_init ( class(expression_dirichlet_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 103 of file expression_dirichlet.f90.

◆ expression_dirichlet_init_from_components()

subroutine expression_dirichlet::expression_dirichlet_init_from_components ( class(expression_dirichlet_t), intent(inout), target  this,
type(coef_t), intent(in), target  coef,
character(len=*), intent(in str 
)
private
Parameters
[in]coefThe SEM coefficients.
[in]strThe expression prescribing the boundary value.

Definition at line 118 of file expression_dirichlet.f90.

◆ expression_dirichlet_update()

subroutine expression_dirichlet::expression_dirichlet_update ( class(expression_dirichlet_t), intent(inout this,
type(time_state_t), intent(in), optional  time,
type(c_ptr), intent(inout), optional  strm 
)
private

A no-op unless the expression depends on time and the values have not already been updated in this timestep.

Parameters
[in]timeThe current time state.
[in,out]strmThe device stream to issue the copy on.

Definition at line 202 of file expression_dirichlet.f90.

Here is the call graph for this function:

◆ expression_mask_coords()

subroutine, public expression_dirichlet::expression_mask_coords ( class(bc_t), intent(in bc,
real(kind=rp), dimension(:), intent(inout xm,
real(kind=rp), dimension(:), intent(inout ym,
real(kind=rp), dimension(:), intent(inout zm 
)
Parameters
[in]bcThe boundary condition, which must have been finalized.
[in,out]xmThe x-coordinates of the points of the mask.
[in,out]ymThe y-coordinates of the points of the mask.
[in,out]zmThe z-coordinates of the points of the mask.

Definition at line 343 of file expression_dirichlet.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gather_coords()

subroutine expression_dirichlet::gather_coords ( integer, dimension(0:m), intent(in msk,
integer, intent(in m,
real(kind=rp), dimension(n), intent(in x,
real(kind=rp), dimension(n), intent(in y,
real(kind=rp), dimension(n), intent(in z,
integer, intent(in n,
real(kind=rp), dimension(m), intent(inout xm,
real(kind=rp), dimension(m), intent(inout ym,
real(kind=rp), dimension(m), intent(inout zm 
)
private

Split out from expression_mask_coords so that the rank 4 coordinate arrays of the dofmap are linearised by the call.

Parameters
[in]mskThe mask, where msk(0) is its length.
[in]mThe number of masked points.
[in]xThe x-coordinates of every point of the dofmap.
[in]yThe y-coordinates of every point of the dofmap.
[in]zThe z-coordinates of every point of the dofmap.
[in]nThe number of points of the dofmap.
[in,out]xmThe x-coordinates of the masked points.
[in,out]ymThe y-coordinates of the masked points.
[in,out]zmThe z-coordinates of the masked points.

Definition at line 366 of file expression_dirichlet.f90.

Here is the caller graph for this function: