|
Neko 1.99.10
A portable framework for high-order spectral element flow simulations
|
A coupled projector for vector fields, suitable for mixed boundary conditions. More...


Public Member Functions | |
| procedure, pass(this) | init (this, coef) |
| Constructor. | |
| procedure, pass(this) | free (this) |
| Destructor. | |
| procedure, pass(this) | mark_bc (this, bc) |
| Mark a boundary condition for later resolution. | |
| procedure, pass(this) | mark_bc_list (this, bclst) |
| Mark a list of boundary conditions for later resolution. | |
| procedure, pass(this) | finalize (this, rebuild_mask) |
| Resolve the queued boundary conditions into masks and basis data. | |
| procedure, pass(this) | apply (this, x, y, z, n, strm) |
| Apply the resolved homogeneous mixed constraints to a vector field. | |
| procedure, pass(this) | debug_output (this, field_name) |
| Write diagnostic output for the resolved masks and basis. | |
| procedure, pass(this) | debug_output_normal_component (this, x, y, z, n, field_name) |
| Write debug output of normal component on mixed BC nodes. | |
| procedure(vector_bc_projector_init_intrf), deferred, pass | init (this, coef) |
| Constructor. | |
| procedure(vector_bc_projector_free_intrf), deferred, pass | free (this) |
| Destructor. | |
| procedure(vector_bc_projector_finalize_intrf), deferred, pass | finalize (this, rebuild_mask) |
| Finalize the vector boundary-condition projector. | |
| procedure(vector_bc_projector_apply_intrf), deferred, pass | apply (this, x, y, z, n, strm) |
| Apply homogeneous resolved vector boundary constraints. | |
| procedure(vector_bc_projector_mark_bc_intrf), deferred, pass | mark_bc (this, bc) |
| Mark a boundary condition in the vector boundary-condition projector. | |
| procedure, pass(this) | mark_bc_component (this, bc, component) |
| Mark a boundary condition on one Cartesian component. | |
| procedure(vector_bc_projector_mark_bc_list_intrf), deferred, pass | mark_bc_list (this, bclst) |
| Mark a list of boundary conditions in the projector. | |
| procedure, pass(this) | mark_bc_list_component (this, bclst, component) |
| Mark a list of boundary conditions on one Cartesian component. | |
| generic | mark (this, bc) |
| Mark a boundary condition in the vector boundary-condition projector. | |
| generic | mark (this, bc, component) |
| Mark a boundary condition on one Cartesian component. | |
| generic | mark (this, bclst) |
| Mark a list of boundary conditions in the projector. | |
| generic | mark (this, bclst, component) |
| Mark a list of boundary conditions on one Cartesian component. | |
Public Attributes | |
| type(mask_t) | dirichlet_dof_mask |
| DOFs that are fully constrained in Cartesian space. | |
| type(mask_t) | mixed_dof_mask |
| DOFs that require basis-aware mixed treatment. | |
| real(kind=rp), dimension(:), allocatable | node_type |
| Per-boundary-DOF node classification using the BC_* constants. | |
| real(kind=rp), dimension(:,:), allocatable | face_type |
| Per-boundary-face classification using the BC_* constants. | |
| integer, dimension(:), allocatable | boundary_dof |
| Linear indices of boundary DOFs. | |
| type(htable_i4_t) | boundary_idx |
| Hash table from a linear DOF index to boundary_dof. | |
| integer, dimension(:,:), allocatable | node_rst |
| Reference-space coordinates of the element corner nodes. | |
| integer, dimension(:,:), allocatable | edge_mid_rst |
| Reference-space coordinates of the edge-midpoint nodes. | |
| integer, dimension(:), allocatable | node_linear_idx |
| Linear indices of the element corner nodes. | |
| integer, dimension(:), allocatable | constraint_n |
| Local normal-component constraint flags on mixed_dof_mask. | |
| integer, dimension(:), allocatable | constraint_t1 |
| Local first-tangent constraint flags on mixed_dof_mask. | |
| integer, dimension(:), allocatable | constraint_t2 |
| Local second-tangent constraint flags on mixed_dof_mask. | |
| type(matrix_t) | n |
| Local normal basis vectors for the mixed-node support. | |
| type(matrix_t) | t1 |
| Local first tangential basis vectors for the mixed-node support. | |
| type(matrix_t) | t2 |
| Local second tangential basis vectors for the mixed-node support. | |
| type(c_ptr) | constraint_n_d = c_null_ptr |
| Device mirror of constraint_n. | |
| type(c_ptr) | constraint_t1_d = c_null_ptr |
| Device mirror of constraint_t1. | |
| type(c_ptr) | constraint_t2_d = c_null_ptr |
| Device mirror of constraint_t2. | |
Private Member Functions | |
| procedure, pass, private | clear_masks (this) |
| Clear the resolved mask-side state. | |
| procedure, pass, private | rebuild_masks (this) |
| Rebuild the Dirichlet and mixed-node masks from the queued BCs. | |
| procedure, pass, private | clear_basis (this) |
| Clear the resolved basis-side state. | |
| procedure, pass, private | rebuild_basis (this) |
| Rebuild the local basis on the resolved mixed-node support. | |
Private Attributes | |
| type(bc_list_t), private | bcs |
| Boundary conditions queued for resolution during finalize(). | |
| type(coef_t), pointer, private | coef => null() |
| SEM coefficients. | |
| type(dofmap_t), pointer, private | dof => null() |
| Degree-of-freedom map. | |
This projector first accumulates the marked vector boundary conditions, then resolves them onto the global velocity dofs in finalize(). The resolved support is split into two disjoint parts: plain Dirichlet nodes, stored in dirichlet_dof_mask, and genuinely mixed nodes, stored in mixed_dof_mask. For the mixed nodes, the projector also builds a local orthonormal basis (n, t1, t2) together with the resolved local constraint flags constraint_n, constraint_t1, and constraint_t2. The apply() routine then projects the vector field to this local basis, zeroes the constrained components, and reconstructs the Cartesian vector. Additionally, the projector propagates the mixed masks and basis data to the boundary conditions of class mixed_bc_t, which is necessary for them to work correctly.
Definition at line 149 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::apply | ( | class(coupled_vector_bc_projector_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, | ||
| integer, intent(in) | n, | ||
| type(c_ptr), intent(inout), optional | strm ) |
| [in,out] | x | x-component field values. |
| [in,out] | y | y-component field values. |
| [in,out] | z | z-component field values. |
| [in] | n | Number of entries in each component array. |
| [in,out] | strm | Optional backend stream/queue used on device backends. |
Definition at line 206 of file vector_bc_projector.f90.
|
pure virtualinherited |
Definition at line 82 of file vector_bc_projector.f90.
|
private |
Definition at line 220 of file vector_bc_projector.f90.
|
private |
Releases the resolved Dirichlet and mixed masks, compact boundary-node caches, and the per-mixed-node constraint flags together with their device mirrors.
Definition at line 214 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::debug_output | ( | class(coupled_vector_bc_projector_t), intent(inout) | this, |
| character(len=*), intent(in), optional | field_name ) |
| [in] | field_name | Optional base name for the output file. The .fld suffix is appended automatically. |
Definition at line 208 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::debug_output_normal_component | ( | class(coupled_vector_bc_projector_t), intent(inout) | this, |
| 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, | ||
| character(len=*), intent(in), optional | field_name ) |
The output is zero outside mixed_dof_mask. The normal vectors come from (1) the resolved basis stored in this projector and (2) the normals stored in coef_t. No area scaling is applied.
| [in] | x | x-component of the vector field. |
| [in] | y | y-component of the vector field. |
| [in] | z | z-component of the vector field. |
| [in] | n | Number of entries in x, y, z. |
| [in] | field_name | Optional base name for the output file. The .fld suffix is appended automatically. |
Definition at line 211 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::finalize | ( | class(coupled_vector_bc_projector_t), intent(inout) | this, |
| logical, intent(in) | rebuild_mask ) |
This routine builds the dof masks for Dirichlet and mixed nodes, and computes the local basis for the mixed ones.
Definition at line 204 of file vector_bc_projector.f90.
|
pure virtualinherited |
Definition at line 79 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::free | ( | class(coupled_vector_bc_projector_t), intent(inout) | this | ) |
Definition at line 197 of file vector_bc_projector.f90.
|
pure virtualinherited |
Definition at line 77 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::init | ( | class(coupled_vector_bc_projector_t), intent(inout) | this, |
| type(coef_t), intent(in), target | coef ) |
| [in] | coef | SEM coefficients. |
This resets any previous resolved state, stores pointers to the coefficient and dofmap objects, and precomputes reference-element lookup tables used later to reconstruct mixed-node normals on edges and corners.
Definition at line 195 of file vector_bc_projector.f90.
|
pure virtualinherited |
Definition at line 75 of file vector_bc_projector.f90.
|
inherited |
Definition at line 95 of file vector_bc_projector.f90.
|
inherited |
Definition at line 95 of file vector_bc_projector.f90.
|
inherited |
Definition at line 95 of file vector_bc_projector.f90.
|
inherited |
Definition at line 95 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::mark_bc | ( | class(coupled_vector_bc_projector_t), intent(inout) | this, |
| class(bc_t), intent(inout), target | bc ) |
| [in,out] | bc | Boundary condition to queue for resolution. |
Definition at line 199 of file vector_bc_projector.f90.
|
pure virtualinherited |
Definition at line 84 of file vector_bc_projector.f90.
|
inherited |
Definition at line 87 of file vector_bc_projector.f90.
| procedure, pass(this) vector_bc_projector::coupled_vector_bc_projector_t::mark_bc_list | ( | class(coupled_vector_bc_projector_t), intent(inout) | this, |
| type(bc_list_t), intent(in) | bclst ) |
| [in] | bclst | Boundary-condition list to queue. |
Definition at line 201 of file vector_bc_projector.f90.
|
pure virtualinherited |
Definition at line 90 of file vector_bc_projector.f90.
|
inherited |
Definition at line 93 of file vector_bc_projector.f90.
|
private |
Using the resolved mixed-node mask and constraint metadata built by rebuild_masks(), this routine reconstructs consistent normals on face, edge, and corner nodes and then builds an orthonormal local basis (n, t1, t2) for each mixed node. It then propagates the basis data to all marked mixed boundary conditions.
Definition at line 223 of file vector_bc_projector.f90.
|
private |
This routine reduces the queued boundary conditions to a nodal classification, constructs the global Dirichlet and mixed-node masks, computes BC-local resolved supports for mixed_bc_t instances, and fills the local constraint flags constraint_n, constraint_t1, and constraint_t2 on the mixed-node mask.
Definition at line 217 of file vector_bc_projector.f90.
|
private |
Definition at line 155 of file vector_bc_projector.f90.
| integer, dimension(:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::boundary_dof |
Definition at line 165 of file vector_bc_projector.f90.
| type(htable_i4_t) vector_bc_projector::coupled_vector_bc_projector_t::boundary_idx |
Definition at line 167 of file vector_bc_projector.f90.
|
private |
Definition at line 157 of file vector_bc_projector.f90.
| integer, dimension(:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::constraint_n |
Definition at line 175 of file vector_bc_projector.f90.
| type(c_ptr) vector_bc_projector::coupled_vector_bc_projector_t::constraint_n_d = c_null_ptr |
Definition at line 188 of file vector_bc_projector.f90.
| integer, dimension(:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::constraint_t1 |
Definition at line 177 of file vector_bc_projector.f90.
| type(c_ptr) vector_bc_projector::coupled_vector_bc_projector_t::constraint_t1_d = c_null_ptr |
Definition at line 190 of file vector_bc_projector.f90.
| integer, dimension(:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::constraint_t2 |
Definition at line 179 of file vector_bc_projector.f90.
| type(c_ptr) vector_bc_projector::coupled_vector_bc_projector_t::constraint_t2_d = c_null_ptr |
Definition at line 192 of file vector_bc_projector.f90.
| type(mask_t) vector_bc_projector::coupled_vector_bc_projector_t::dirichlet_dof_mask |
Definition at line 151 of file vector_bc_projector.f90.
|
private |
Definition at line 159 of file vector_bc_projector.f90.
| integer, dimension(:,:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::edge_mid_rst |
Definition at line 171 of file vector_bc_projector.f90.
| real(kind=rp), dimension(:,:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::face_type |
Definition at line 163 of file vector_bc_projector.f90.
| type(mask_t) vector_bc_projector::coupled_vector_bc_projector_t::mixed_dof_mask |
Definition at line 153 of file vector_bc_projector.f90.
| type(matrix_t) vector_bc_projector::coupled_vector_bc_projector_t::n |
Definition at line 181 of file vector_bc_projector.f90.
| integer, dimension(:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::node_linear_idx |
Definition at line 173 of file vector_bc_projector.f90.
| integer, dimension(:,:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::node_rst |
Definition at line 169 of file vector_bc_projector.f90.
| real(kind=rp), dimension(:), allocatable vector_bc_projector::coupled_vector_bc_projector_t::node_type |
Definition at line 161 of file vector_bc_projector.f90.
| type(matrix_t) vector_bc_projector::coupled_vector_bc_projector_t::t1 |
Definition at line 183 of file vector_bc_projector.f90.
| type(matrix_t) vector_bc_projector::coupled_vector_bc_projector_t::t2 |
Definition at line 185 of file vector_bc_projector.f90.