Neko 1.99.5
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
map_1d::map_1d_t Type Reference

Map every GLL point in the mesh to a level in one physical direction. Can be used to average across the two remaining directions. More...

Collaboration diagram for map_1d::map_1d_t:

Public Member Functions

procedure, pass(thisinit_int (this, coef, dir, tol)
 Constructor.
 
procedure, pass(thisinit_char (this, coef, dir, tol)
 
generic init (this, coef, dir, tol)
 Constructor.
 
generic init (this, coef, dir, tol)
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thisaverage_planes_fld_lst (this, avg_planes, field_list)
 Average field list along planes.
 
procedure, pass(thisaverage_planes_vec_ptr (this, avg_planes, vector_ptr)
 Computes average of vector_pt in two directions and outputs matrix with averaged values avg_planes contains coordinates in first row, avg. of fields in the rest.
 
generic average_planes (this, avg_planes, field_list)
 Average field list along planes.
 
generic average_planes (this, avg_planes, vector_ptr)
 Computes average of vector_pt in two directions and outputs matrix with averaged values avg_planes contains coordinates in first row, avg. of fields in the rest.
 

Public Attributes

integer, dimension(:), allocatable dir_el
 Local tensor-product direction aligned with the requested physical direction for each element. Values 1, 2, and 3 correspond to r, s, and t, respectively.
 
integer, dimension(:), allocatable el_lvl
 One-dimensional element level assigned by propagating the global minimum coordinate through the mesh connectivity.
 
integer, dimension(:, :, :, :), allocatable pt_lvl
 One-dimensional GLL level for each local point in each element. Levels run from 1 to n_gll_lvls and are used as row indices in the averaged output matrix.
 
integer n_el_lvls
 Number of element levels in the requested physical direction.
 
integer n_gll_lvls
 Number of total GLL levels in the requested physical direction. For a polynomial space with lx points per element direction, this is n_el_lvls * lx.
 
type(dofmap_t), pointer dof => null()
 Dofmap that owns the physical coordinates used to build the map.
 
type(coef_t), pointer coef => null()
 SEM coefficients that provide quadrature weights and connectivity.
 
type(mesh_t), pointer msh => null()
 Mesh associated with dof and coef.
 
integer dir
 Requested physical direction of the 1D mapping. Values 1, 2, and 3 correspond to x, y, and z, respectively.
 
real(kind=rp) tol = 1e-7
 Coordinate comparison tolerance used when identifying propagated levels.
 
real(kind=rp), dimension(:), allocatable volume_per_gll_lvl
 Integrated quadrature weight volume associated with each GLL level. Used as the denominator when computing plane averages.
 

Detailed Description

This type is used to average fields over planes normal to one physical direction. The constructor first determines which local tensor-product direction (r, s, or t) is most closely aligned with the requested physical direction (x, y, or z) for each element. It then assigns a one-dimensional element level to each element and expands that element level into GLL-point levels along the aligned local direction.

The element-level assignment is based on propagation of the global minimum coordinate through the gather-scatter connectivity. Elements whose minimum coordinate matches the global minimum are assigned to the first level. On each following pass, the current lower face of every element is masked to the global maximum, a gather-scatter add exchanges boundary values, and the result is converted into an effective boundary minimum. Elements that have newly received the global minimum are assigned to the next level. This repeats until the propagated minimum reaches the global maximum level.

Once element levels are known, every GLL point receives a global 1D level (pt_lvl) ordered consistently with the local element orientation. The constructor also accumulates volume_per_gll_lvl, the quadrature weight volume associated with each 1D level. Averaging then sums each field into these levels and divides by the corresponding level volume.

The propagation algorithm assumes that the connectivity and coordinate layout allow a unique stack of element levels in the requested direction. If an element level remains unassigned, the resulting point levels are not valid for the volume accumulation or averaging steps.

Remarks
Could also be rather easily extended to say polar coordinates as well (I think). Martin Karp

Definition at line 88 of file map_1d.f90.

Member Function/Subroutine Documentation

◆ average_planes() [1/2]

generic map_1d::map_1d_t::average_planes ( class(map_1d_t), intent(inout this,
type(matrix_t), intent(inout avg_planes,
type(field_list_t), intent(inout field_list 
)
Parameters
avg_planesoutput averages
field_listlist of fields to be averaged

Definition at line 132 of file map_1d.f90.

◆ average_planes() [2/2]

generic map_1d::map_1d_t::average_planes ( class(map_1d_t), intent(inout this,
type(matrix_t), intent(inout avg_planes,
type(vector_ptr_t), dimension(:), intent(inout vector_ptr 
)
Parameters
avg_planesoutput averages
vector_ptsto vectors to be averaged

Definition at line 132 of file map_1d.f90.

◆ average_planes_fld_lst()

procedure, pass(this) map_1d::map_1d_t::average_planes_fld_lst ( class(map_1d_t), intent(inout this,
type(matrix_t), intent(inout avg_planes,
type(field_list_t), intent(inout field_list 
)
Parameters
avg_planesoutput averages
field_listlist of fields to be averaged

Definition at line 128 of file map_1d.f90.

◆ average_planes_vec_ptr()

procedure, pass(this) map_1d::map_1d_t::average_planes_vec_ptr ( class(map_1d_t), intent(inout this,
type(matrix_t), intent(inout avg_planes,
type(vector_ptr_t), dimension(:), intent(inout vector_ptr 
)
Parameters
avg_planesoutput averages
vector_ptsto vectors to be averaged

Definition at line 130 of file map_1d.f90.

◆ free()

procedure, pass(this) map_1d::map_1d_t::free ( class(map_1d_t this)

Definition at line 126 of file map_1d.f90.

◆ init() [1/2]

generic map_1d::map_1d_t::init ( class(map_1d_t this,
type(coef_t), intent(inout), target  coef,
integer, intent(in dir,
real(kind=rp), intent(in tol 
)

Definition at line 124 of file map_1d.f90.

◆ init() [2/2]

generic map_1d::map_1d_t::init ( class(map_1d_t this,
type(coef_t), intent(inout), target  coef,
character(len=*), intent(in dir,
real(kind=rp), intent(in tol 
)

Definition at line 124 of file map_1d.f90.

◆ init_char()

procedure, pass(this) map_1d::map_1d_t::init_char ( class(map_1d_t this,
type(coef_t), intent(inout), target  coef,
character(len=*), intent(in dir,
real(kind=rp), intent(in tol 
)

Definition at line 123 of file map_1d.f90.

◆ init_int()

procedure, pass(this) map_1d::map_1d_t::init_int ( class(map_1d_t this,
type(coef_t), intent(inout), target  coef,
integer, intent(in dir,
real(kind=rp), intent(in tol 
)

Definition at line 122 of file map_1d.f90.

Member Data Documentation

◆ coef

type(coef_t), pointer map_1d::map_1d_t::coef => null()

Definition at line 109 of file map_1d.f90.

◆ dir

integer map_1d::map_1d_t::dir

Definition at line 114 of file map_1d.f90.

◆ dir_el

integer, dimension(:), allocatable map_1d::map_1d_t::dir_el

Definition at line 92 of file map_1d.f90.

◆ dof

type(dofmap_t), pointer map_1d::map_1d_t::dof => null()

Definition at line 107 of file map_1d.f90.

◆ el_lvl

integer, dimension(:), allocatable map_1d::map_1d_t::el_lvl

Definition at line 95 of file map_1d.f90.

◆ msh

type(mesh_t), pointer map_1d::map_1d_t::msh => null()

Definition at line 111 of file map_1d.f90.

◆ n_el_lvls

integer map_1d::map_1d_t::n_el_lvls

Definition at line 101 of file map_1d.f90.

◆ n_gll_lvls

integer map_1d::map_1d_t::n_gll_lvls

Definition at line 105 of file map_1d.f90.

◆ pt_lvl

integer, dimension(:, :, :, :), allocatable map_1d::map_1d_t::pt_lvl

Definition at line 99 of file map_1d.f90.

◆ tol

real(kind=rp) map_1d::map_1d_t::tol = 1e-7

Definition at line 116 of file map_1d.f90.

◆ volume_per_gll_lvl

real(kind=rp), dimension(:), allocatable map_1d::map_1d_t::volume_per_gll_lvl

Definition at line 119 of file map_1d.f90.


The documentation for this type was generated from the following file: