| Procedure | Location | Procedure Type | Description |
|---|---|---|---|
| abl_diagnostics_t | m_abl_diagnostics | Interface | |
| abl_t | m_abl | Interface | |
| abl_wall_sample_location | m_les | Subroutine | Where the ABL wall model samples the velocity, dsampling grid spacings above the floor (vertex 1). As in Incompact3d's wall_sgs_noslip, the sample is interpolated linearly between the vertices below and above that height, so a non-integer dsampling is honoured rather than rounded to a grid plane. |
| abl_wall_upper_plane | m_base_backend | Function | The y-vertex above the ABL wall-model sample plane, checked against the interpolation weight. With a zero weight the upper plane is not read, so the sample may then sit on the last vertex. |
| abort_run | m_logger | Subroutine | Report a fatal error and stop every rank of the run. |
| accumulate_mean | m_stats | Subroutine | Incremental running-mean update:
where |
| add_gaussian_sources | m_cuda_kernels_fieldops | Subroutine | a, b, c += src(4:6, s)*exp(-dist^2/eps^2) within r_cut of the point src(1:3, s), over the global index box box(1:3, s)..box(4:6, s); see source_index_boxes. Box indices are wrapped across periodic boundaries and skipped where this rank does not own them. Launch with blocks (n_src, box extent in z) and threads striding y within the box; sources overlap, so the adds are atomic. |
| add_gaussian_sources | m_omptgt_kernels_fieldops | Subroutine | a, b, c += src(4:6, s)*exp(-dist^2/eps^2) within r_cut of the point src(1:3, s), over the global index box box(1:3, s)..box(4:6, s); see source_index_boxes. Box indices are wrapped across periodic boundaries and skipped where this rank does not own them. One thread per (source, z, y) of the box, each sweeping x; sources overlap, so the adds are atomic. grid holds the local VERT dims, global VERT dims, rank offsets and periodic flags (1/0), three entries each, then the padded y-block count. |
| add_scalar_x_face | m_cuda_kernels_fieldops | Subroutine | Adds a uniform constant |
| advance_turbine | m_alm_turbine | Subroutine | Advance the rotor by one time step: update the angular velocity (and
pitch) from the operating mode, then rotate the blades. For the
controlled modes |
| alloc_cuda_tdsops | m_cuda_backend | Subroutine | |
| alloc_omp_tdsops | m_omp_backend | Subroutine | |
| alloc_tdsops_base | m_base_backend | Subroutine | Allocates the backend's own tdsops type and fills in the coefficients of the requested operation. |
| allocate_flow_case | m_case_factory | Subroutine | Build the flow case with the given name. |
| allocate_io_reader | m_io_backend | Subroutine | |
| allocate_io_reader | m_io_backend | Subroutine | |
| allocate_io_writer | m_io_backend | Subroutine | |
| allocate_io_writer | m_io_backend | Subroutine | |
| allocate_line | m_alm_element | Subroutine | (Re)allocate the station and element arrays of |
| allocate_tdsops | m_tdsops_setup | Subroutine | |
| allocator_init | m_allocator | Function | |
| allocator_t | m_allocator | Interface | |
| apply_BC_abl | m_case_abl | Subroutine | |
| apply_BC_channel | m_case_channel | Subroutine | |
| apply_BC_cylinder | m_case_cylinder | Subroutine | |
| apply_BC_generic | m_case_generic | Subroutine | |
| apply_BC_tgv | m_case_tgv | Subroutine | |
| apply_BC_wind_turbine | m_case_wind_turbine | Subroutine | Pre-correction (called per substep after the integrator step): enforce the inflow Dirichlet and convective outflow BCs, then apply an exact uniform mass correction to the outlet, following Incompact3d's pre_correc. |
| apply_les | m_solver | Subroutine | Add the configured explicit SGS closure to the momentum RHS. |
| apply_spatial_filter | m_solver | Subroutine | Apply the explicit low-pass filter to the velocity, as Incompact3d does for wall-modelled ABL runs (ifilter=1, C_filter). |
| axpby | m_cuda_kernels_fieldops | Subroutine | |
| axpby | m_omptgt_kernels_fieldops | Subroutine | |
| base_init | m_poisson_fft | Subroutine | Sets up the state every case shares. The backend's init calls it once it has set bc_code, which the spectral extents it passes in already depend on. The supported BC codes are the cases of the backend factories, create_omp_poisson_fft and create_cuda_poisson_fft. |
| base_init | m_base_backend | Subroutine | |
| buffer_copy | m_cuda_kernels_fieldops | Subroutine | |
| buffer_copy | m_omptgt_kernels_fieldops | Subroutine | Copies the first and last four points of every line into the start
and end send buffers. |
| card_shared_skip | m_memcheck_report | Function | True when another process changes its card memory by more than 128 MiB or an NVML sample fails. Log the skip line once when emit_line is true |
| case_abl_init | m_case_abl | Function | |
| case_abl_t | m_case_abl | Interface | |
| case_channel_init | m_case_channel | Function | |
| case_channel_t | m_case_channel | Interface | |
| case_cylinder_init | m_case_cylinder | Function | |
| case_cylinder_t | m_case_cylinder | Interface | |
| case_finalise | m_base_case | Subroutine | |
| case_generic_init | m_case_generic | Function | |
| case_generic_t | m_case_generic | Interface | |
| case_init | m_base_case | Subroutine | |
| case_tgv_init | m_case_tgv | Function | |
| case_tgv_t | m_case_tgv | Interface | |
| case_wind_turbine_init | m_case_wind_turbine | Function | |
| case_wind_turbine_t | m_case_wind_turbine | Interface | |
| check_cuda | m_cuda_errors | Subroutine | Abort the run if a CUDA runtime call did not return cudaSuccess. |
| check_cufft | m_cuda_errors | Subroutine | Abort the run if a cuFFT call did not return CUFFT_SUCCESS (0). cuFFT has no error-string function, so only the code is reported. |
| check_labelled_fields | m_base_backend | Subroutine | Checks the fields passed to the labelled field operations share a valid data location and the DIR_X layout. |
| check_mpi | m_logger | Subroutine | Abort the run if an MPI call did not succeed. |
| check_point_fields | m_base_backend | Subroutine | Checks the fields passed to the point sampling and source operations are DIR_X VERT fields. |
| classify | m_memcheck_estimate | Function | The FITS, BORDERLINE or DOES_NOT_FIT verdict of every estimate. |
| classify_bc | m_memcheck_context | Subroutine | The BC parse and four-way split of classify_boundaries in m_mesh. |
| classify_boundaries | m_mesh | Subroutine | Parse the BC strings of the three directions. A direction is periodic only if both ends are 'periodic'. bc_code is the FFT_BC_* class of the resulting periodicity, or FFT_BC_UNSUPPORTED. Shared by mesh_init and callers with only BC strings (no mesh_t, e.g. static memory estimation). |
| cleanup_field_arrays | m_io_field_utils | Subroutine | |
| cleanup_field_buffers | m_io_field_utils | Subroutine | |
| compute_derived_fields | m_postprocess | Subroutine | Compute derived fields from the velocity gradient tensor. |
| compute_line_forces | m_alm_element | Subroutine | Blade-element loads of every element from the sampled fluid velocity, the body velocity and the static polars. |
| compute_outflow_params | m_base_case | Subroutine | Convective outflow number and inlet/outlet flow-rate imbalance for a case with an x inflow and a convective x outflow (the X_FACE form of field_set_face_from_field). Three slice reductions on the device and two batched MPI_Allreduces; no D2H copy of the full field. Assumes x is not decomposed, as the FFT Poisson solver requires. Without flow_rate_diff only the outflow number is computed. |
| compute_pressure_vert | m_postprocess | Subroutine | Interpolates the pressure field from CELL (DIR_Z) to VERT (DIR_X) for snapshot output and rescales from pseudo-pressure to physical (kinematic) pressure. |
| compute_qcriterion_base | m_base_backend | Subroutine | Computes the Q-criterion from velocity gradients |
| compute_qcriterion_cuda | m_cuda_backend | Subroutine | |
| compute_qcriterion_omp | m_omp_backend | Subroutine | |
| compute_rank_pos_from_global | m_mesh_content | Subroutine | From the global rank maps, fills in the rank position as well
as the previous and next rank in the |
| compute_sgs_stress_base | m_base_backend | Subroutine | Forms nut(scale_agradient_a + scale_b*gradient_b). |
| compute_sgs_stress_cuda | m_cuda_backend | Subroutine | |
| compute_sgs_stress_omp | m_omp_backend | Subroutine | |
| compute_smagorinsky_nut_base | m_base_backend | Subroutine | Computes nut=l_s^2sqrt(2S_ij*S_ij) from velocity gradients. |
| compute_smagorinsky_nut_cuda | m_cuda_backend | Subroutine | |
| compute_smagorinsky_nut_omp | m_omp_backend | Subroutine | |
| compute_tower_forces | m_alm_element | Subroutine | Tower loads: constant drag and a lift oscillating at the shedding
frequency St*U/D, perturbed by |
| compute_turbine_forces | m_alm_turbine | Subroutine | Loads on the blades (with end effects) and tower from the element velocities, then the rotor performance. |
| compute_vorticity_base | m_base_backend | Subroutine | Computes the vorticity magnitude from velocity gradients |
| compute_vorticity_cuda | m_cuda_backend | Subroutine | |
| compute_vorticity_omp | m_omp_backend | Subroutine | |
| copy | m_cuda_kernels_fieldops | Subroutine | |
| copy | m_omptgt_kernels_fieldops | Subroutine | |
| copy_cell2vert_dims | m_mesh_content | Subroutine | Copies cell_dims information to vert_dims taking periodicity into account |
| copy_data_to_f_base | m_base_backend | Subroutine | Copy a regular 3D array in host memory into the specialist data structure field that lives on device or host |
| copy_data_to_f_cuda | m_cuda_backend | Subroutine | |
| copy_data_to_f_omp | m_omp_backend | Subroutine | |
| copy_f_to_data_base | m_base_backend | Subroutine | Copy the specialist data structure from device or host back to a regular 3D data array in host memory. |
| copy_f_to_data_cuda | m_cuda_backend | Subroutine | |
| copy_f_to_data_omp | m_omp_backend | Subroutine | |
| copy_halo | m_cuda_sendrecv | Subroutine | Periodic wrap-around on a single rank: copies the first n_data elements of a halo buffer, the groups of the direction being exchanged. The buffers are sized for the direction with the most groups, so a whole-array assignment would copy that maximum on every exchange (16 times the data in use on an elongated mesh). |
| copy_into_buffers | m_omp_backend | Subroutine | |
| copy_into_buffers | m_cuda_backend | Subroutine | |
| copy_vert2cell_dims | m_mesh_content | Subroutine | Copies vert_dims information to cell_dims taking periodicity into account |
| count_steps_up_to | m_io_backend | Function | Count the leading steps of a file whose scalar |
| count_steps_up_to | m_io_backend | Function | No file can be read without ADIOS2, so there are no steps to keep |
| create_block | m_allocator | Function | Allocate memory for a new block and return a pointer to a new m_allocator object. |
| create_cuda_block | m_cuda_allocator | Function | |
| create_cuda_poisson_fft | m_cuda_poisson_fft | Subroutine | Allocates the solver type of the mesh's boundary condition case and initialises it. |
| create_fft_plan | m_cuda_poisson_fft | Subroutine | Helper subroutine to create FFT plan with automatic cuFFTMp fallback |
| create_fft_plan_pair | m_cuda_poisson_fft | Subroutine | Creates the forward and the backward FFT plan the way the solver does. A backward plan that forces the fallback to plain cuFFT makes the forward plan, built on cuFFTMp, get rebuilt on plain cuFFT, so both plans end on the same library. Shared by the solver init and the x3d2-memcheck probe. The optional arguments are the ones of create_fft_plan. label is appended to the plan names in the messages. When stat is present and not zero, the plans made so far are destroyed and the other plan is left undefined. |
| create_omp_poisson_fft | m_omp_poisson_fft | Subroutine | Allocates the solver type of the mesh's boundary condition case and initialises it. |
| create_plans | m_cuda_poisson_fft | Subroutine | Standard R2C/C2R plans on the grid permuted into the spectral layout, with cuFFTMp fallback. This serves the 000, 010 and 100 cases. fft_n and fft_n_loc are the plan dimensions from cuda_fft_plan_setup. |
| create_plans_110 | m_cuda_poisson_fft | Subroutine | R2C with Z-transpose, on (nz, nx, ny). A single rank keeps the plain cuFFT path; on multiple ranks cuFFTMp distributes the transform, and the physical Z-slab is redistributed into its Y-slab input through an MPI_Alltoall (see redistribute_110_to_yslab). |
| cross | m_alm_element | Function | |
| cuda_allocator_init | m_cuda_allocator | Function | |
| cuda_allocator_t | m_cuda_allocator | Interface | |
| cuda_backend_t | m_cuda_backend | Interface | |
| cuda_fft_decomp_reason | m_cuda_poisson_fft | Function | The reason the solver cannot run the BC class bc_code on the cell dimensions cdims and the decomposition nproc_dir, blank when it can. The text is the message the solver init aborts with. Shared by the solver init and x3d2-memcheck. |
| cuda_fft_plan_setup | m_cuda_poisson_fft | Subroutine | The cuFFT plan dimensions and types of a BC class. The 100 case transposes X<->Y and runs the FFT on (ny, nx, nz), the 110 case transposes to (nz, nx, ny) with R2C along Z, and the 000 and 010 cases run it on (nx, ny, nz). fft_n holds the global plan dimensions and fft_n_loc the local extents of the first two. Shared by the solver init and the x3d2-memcheck probe. |
| cuda_fft_spectral_dims | m_cuda_poisson_fft | Subroutine | The size n_spec and the offset n_sp_st of the local spectral pencil in the permuted state, for the BC class bc_code on the cell dimensions dims_glob and dims_loc, the decomposition nproc_dir and the rank position nrank_dir. A BC class the solver does not support gives zeros. Shared by the solver init and the x3d2-memcheck estimate. |
| cuda_field_init | m_cuda_allocator | Function | |
| cuda_field_t | m_cuda_allocator | Interface | |
| cuda_tdsops_init | m_cuda_tdsops | Function | Constructor function for the cuda_tdsops_t class. See tdsops_t for details. |
| cuda_tdsops_t | m_cuda_tdsops | Interface | |
| cufftExecC2R_C | m_cuda_poisson_fft | Interface | |
| cufftExecR2C_C | m_cuda_poisson_fft | Interface | |
| curl | m_solver | Subroutine | Wrapper for curl |
| curl | m_vector_calculus | Subroutine | Curl of a vector field (u, v, w). |
| decomposition_2decomp | m_decomp | Subroutine | |
| decomposition_2decomp | m_decomp | Subroutine | Performs 2D mesh decomposition using 2decomp&fft |
| decomposition_generic | m_mesh | Subroutine | |
| define_BC_abl | m_case_abl | Subroutine | |
| define_BC_channel | m_case_channel | Subroutine | |
| define_BC_cylinder | m_case_cylinder | Subroutine | |
| define_BC_generic | m_case_generic | Subroutine | |
| define_BC_tgv | m_case_tgv | Subroutine | |
| define_BC_wind_turbine | m_case_wind_turbine | Subroutine | Boundary Conditions hook (called per substep before transeq). Builds the inlet Dirichlet profile only; outflow parameters are computed in apply_BC from the post-integration velocity. u = bc_start_u + inlet_noise(1) * um * (2r - 1) v = bc_start_v + inlet_noise(2) * um * (2r - 1) w = bc_start_w + inlet_noise(3) * um * (2r - 1) |
| der_penta_full | m_omptgt_kernels_dist | Subroutine | Full non-periodic pentadiagonal solve on a single subdomain. |
| der_penta_full | m_omp_kernels_dist | Subroutine | Full (forward + backward) non-periodic pentadiagonal Thomas solve on CPU. Mirrors the CUDA der_penta_full kernel; operates on 2D (SZ, n) arrays. |
| der_penta_full | m_cuda_kernels_dist | Subroutine | Full (forward + backward) non-periodic pentadiagonal Thomas solve. |
| der_penta_periodic | m_omptgt_kernels_dist | Subroutine | Cyclic pentadiagonal solve via Sherman-Morrison-Woodbury (rank 4):
A_cyc = A_np + UC with U = [e_1|e_2|e_{n-1}|e_n]. |
| der_penta_periodic | m_omp_kernels_dist | Subroutine | Cyclic pentadiagonal compact solve via Sherman-Morrison-Woodbury rank-4 correction. A_cyc = A_np + U*W^T where U = [e_1,e_2,e_{n-1},e_n] and W^T encodes the four corner coupling pairs; A_np is the non-periodic Thomas factorisation in (ffr,...). |
| der_penta_periodic | m_cuda_kernels_dist | Subroutine | Periodic pentadiagonal Thomas solve via Sherman-Morrison-Woodbury rank-4. |
| der_univ_dist | m_omptgt_kernels_dist | Subroutine | First phase of the distributed solve: builds the RHS and runs the forward and backward hybrid sweeps, leaving the 2x2 boundary values in the send buffers. |
| der_univ_dist | m_omp_kernels_dist | Subroutine | |
| der_univ_dist | m_cuda_kernels_dist | Subroutine | |
| der_univ_fused_subs | m_omp_kernels_dist | Subroutine | |
| der_univ_subs | m_omptgt_kernels_dist | Subroutine | Second phase of the distributed solve: resolves the 2x2 boundary systems with the neighbours' values and substitutes back. |
| der_univ_subs | m_omp_kernels_dist | Subroutine | |
| der_univ_subs | m_cuda_kernels_dist | Subroutine | |
| der_univ_thom | m_cuda_kernels_thom | Subroutine | |
| der_univ_thom | m_omp_kernels_thom | Subroutine | |
| der_univ_thom | m_omptgt_kernels_thom | Subroutine | Non-periodic Thomas solve along each line of a single subdomain. |
| der_univ_thom_per | m_cuda_kernels_thom | Subroutine | |
| der_univ_thom_per | m_omp_kernels_thom | Subroutine | |
| der_univ_thom_per | m_omptgt_kernels_thom | Subroutine | Periodic Thomas solve along each line of a single subdomain. |
| deriv_1st | m_tdsops | Subroutine | |
| deriv_2nd | m_tdsops | Subroutine | |
| destroy | m_allocator | Subroutine | Go through the block list from head to tail, deallocating each memory block in turn. Deallocation of a m_allocator object automatically deallocates its internal allocatable data array. |
| dev_alloc | m_omptgt_common | Interface | Allocates a device array of the given extents. |
| dev_clone | m_omptgt_common | Interface | Allocates a device array of a host array's shape and copies it in. |
| dev_download | m_omptgt_common | Interface | Copies a device array into a host array of the same size. |
| dev_free | m_omptgt_common | Interface | Frees a device array allocated with |
| dev_upload | m_omptgt_common | Interface | Copies a host array into a device array of the same size. |
| device_sync | m_omptgt_common | Subroutine | Waits until the device work queued so far has completed. |
| disc_kernel | m_adm | Function | Unnormalised smearing kernel of |
| divergence_v2c | m_vector_calculus | Subroutine | Divergence of a vector field (u, v, w). |
| divergence_v2p | m_solver | Subroutine | Wrapper for divergence_v2p |
| enforce_periodicity | m_poisson_fft | Subroutine | Reorder hook of solve_poisson, overridden by every case that has a non-periodic direction. |
| enforce_periodicity_x | m_cuda_spectral | Subroutine | |
| enforce_periodicity_x_cuda | m_cuda_poisson_fft | Subroutine | |
| enforce_periodicity_x_omp | m_omp_poisson_fft | Subroutine | Gathers the non-periodic x line into a periodic one so that a plain FFT can stand in for the cosine transform. |
| enforce_periodicity_xy | m_cuda_spectral | Subroutine | Combined X and Y periodicity enforcement (interleave shuffle). |
| enforce_periodicity_xy_cuda | m_cuda_poisson_fft | Subroutine | |
| enforce_periodicity_xy_omp | m_omp_poisson_fft | Subroutine | Gathers the non-periodic x and, when it is not split across ranks, y lines into periodic ones so that a plain FFT can stand in for the cosine transform in both directions. |
| enforce_periodicity_y | m_cuda_spectral | Subroutine | |
| enforce_periodicity_y_cuda | m_cuda_poisson_fft | Subroutine | |
| enforce_periodicity_y_omp | m_omp_poisson_fft | Subroutine | |
| estimate_for_num_gpus | m_memcheck_estimate | Subroutine | The per-GPU estimate at num_gpus GPUs. The formula floor stands unless the full-grid probe gave a result and the floor is not over the limit. workspace_gib, overhead_gib and io_gib (optional) split the result. used_gib and npeak (optional) are the num_gpus=1 measurement of the real build and its peak_fields: the estimate is then that measurement scaled to num_gpus, and workspace_gib holds the fields and halo alone. |
| eval_static_coeffs | m_alm_airfoil | Subroutine | Interpolate the static polars at Reynolds number |
| exchange_dim2_mirror | m_cuda_poisson_fft | Subroutine | Fills c_mirror_dev and c_plane_recv_dev with the dim2 mirror of the local spectral slab, so that the paired split can read its partner mode without going looking for it in another rank's memory. |
| exec_dist_penta_compact | m_omptgt_exec_dist | Subroutine | Single-subdomain non-periodic pentadiagonal compact solve. |
| exec_dist_penta_compact | m_cuda_exec_dist | Subroutine | Single-GPU non-periodic pentadiagonal compact-FD solve. |
| exec_dist_penta_compact | m_omp_exec_dist | Subroutine | Single-pass non-periodic pentadiagonal compact-FD solve on CPU. No MPI exchange is needed; each group is solved independently. |
| exec_dist_penta_periodic | m_omptgt_exec_dist | Subroutine | Cyclic pentadiagonal compact solve via Sherman-Morrison-Woodbury. Halos u_recv_s/e must hold the periodic extension. |
| exec_dist_penta_periodic | m_cuda_exec_dist | Subroutine | Cyclic pentadiagonal compact-FD solve via Sherman-Morrison-Woodbury. Halos u_recv_s/e must be set to periodic-extension values by the caller. |
| exec_dist_penta_periodic | m_omp_exec_dist | Subroutine | Cyclic pentadiagonal compact-FD solve via Sherman-Morrison-Woodbury. Halos u_recv_s/e must be set to periodic-extension values by the caller. |
| exec_dist_tds_compact | m_omptgt_exec_dist | Subroutine | |
| exec_dist_tds_compact | m_cuda_exec_dist | Subroutine | |
| exec_dist_tds_compact | m_omp_exec_dist | Subroutine | |
| exec_dist_transeq_3fused | m_omptgt_exec_dist | Subroutine | |
| exec_dist_transeq_3fused | m_cuda_exec_dist | Subroutine | |
| exec_dist_transeq_compact | m_omp_exec_dist | Subroutine | |
| exec_thom_tds_compact | m_exec_thom | Subroutine | |
| exec_thom_tds_compact | m_omptgt_exec_thom | Subroutine | |
| exec_thom_tds_compact | m_cuda_exec_thom | Subroutine | |
| export_field_to_device | m_base_backend | Subroutine | Pack the first |
| export_field_to_device_cuda | m_cuda_backend | Subroutine | DIR_X fields are reordered and unpadded by a single kernel. DIR_C fields are unpadded directly, and DIR_Y/DIR_Z fields are reordered to DIR_C first. Precision conversion happens in the same kernel. |
| fft_backward_100_cuda | m_cuda_poisson_fft | Subroutine | |
| fft_backward_100_omp | m_omp_poisson_fft | Subroutine | Backward FFT for the non-periodic x case, undoing the x-y transpose applied by fft_forward_100_omp. Only the unpadded extents are written, which is all undo_periodicity_x_omp goes on to read. |
| fft_backward_110_cuda | m_cuda_poisson_fft | Subroutine | Backward FFT for 110 case: C2R then transpose (nz,nx,ny)->(nx,ny,nz) |
| fft_backward_110_omp | m_omp_poisson_fft | Subroutine | Backward FFT for the non-periodic x and y case, undoing the transpose applied by fft_forward_110_omp. Only the unpadded extents are written, which is all undo_periodicity_xy_omp goes on to read. |
| fft_backward_cuda | m_cuda_poisson_fft | Subroutine | |
| fft_backward_omp | m_omp_poisson_fft | Subroutine | |
| fft_bc_class | m_poisson_fft | Function | The FFT_BC_* class of a poisson_bc_code case, or FFT_BC_UNSUPPORTED. The CUDA solver passes it to the helpers it shares with x3d2-memcheck, so it classifies through poisson_bc_code alone. x3d2-memcheck has no mesh and takes the class from m_mesh's classify_boundaries; test_poisson_bc_code checks that the two agree. |
| fft_forward_100_cuda | m_cuda_poisson_fft | Subroutine | Forward FFT for non-periodic-X case We transpose X<->Y so that the non-periodic direction becomes the "Y" direction in the transposed space, then use the same FFT approach as 010 |
| fft_forward_100_omp | m_omp_poisson_fft | Subroutine | Forward FFT for the non-periodic x case. Transposes x and y so that the non-periodic direction sits in dim2, where it keeps its full mode range, then transforms the (ny, nx, nz) buffer with the swapped plan set up in init. |
| fft_forward_110_cuda | m_cuda_poisson_fft | Subroutine | Forward FFT for 110 case: transpose (nx,ny,nz)->(nz,nx,ny) then R2C |
| fft_forward_110_omp | m_omp_poisson_fft | Subroutine | Forward FFT for the non-periodic x and y case. Transposes the physical field (nx, ny, nz) to (nz, nx, ny) so that the r2c transform runs along the periodic z direction, then transforms with the plan set up in init. |
| fft_forward_cuda | m_cuda_poisson_fft | Subroutine | |
| fft_forward_omp | m_omp_poisson_fft | Subroutine | |
| fft_postprocess_000_cuda | m_cuda_poisson_fft | Subroutine | |
| fft_postprocess_000_omp | m_omp_poisson_fft | Subroutine | |
| fft_postprocess_010_cuda | m_cuda_poisson_fft | Subroutine | if stretching in y is 'bottom' |
| fft_postprocess_010_omp | m_omp_poisson_fft | Subroutine | |
| fft_postprocess_100_cuda | m_cuda_poisson_fft | Subroutine | |
| fft_postprocess_100_omp | m_omp_poisson_fft | Subroutine | Post-process div U* in spectral space for the non-periodic x case. |
| fft_postprocess_110_cuda | m_cuda_poisson_fft | Subroutine | Spectral post-processing for 110 case (R2C Z-transpose). Spectral array is (nz/2+1, nx, ny) = (nx_spec, ny_spec, nz_spec). Thread i->X (ny_spec), blockIdx%y k->Y (nz_spec), serial j->Z (nx_spec). On a single rank X and Y are both whole, so 7 kernel launches avoid cross-block race conditions. On multiple ranks cuFFTMp splits X across ranks, so the X pairing reaches its partner through the dim2 mirror exchange (see exchange_dim2_mirror) instead, adding two more launches. |
| fft_postprocess_110_omp | m_omp_poisson_fft | Subroutine | Post-process div U* in spectral space for the non-periodic x and y case. After the (nx, ny, nz) -> (nz, nx, ny) transpose applied by fft_forward_110_omp, dim1 holds the periodic z r2c modes, dim2 holds the non-periodic x modes and dim3 holds the non-periodic y modes. |
| fft_workspace_bytes_query | m_cuda_memcheck_device | Subroutine | Creates and destroys the forward and backward FFT plans the way the solver does, for the cell dimensions cdims, and for cuFFTMp also the xtdesc buffer, each bracketed with cudaMemGetInfo. worksize_bytes is the plan workspace (used only on the plain cuFFT path, in cuFFTMp it is part of the heap), heap_bytes the memory the plans took, xtdesc_bytes the xtdesc buffer. The 110 BC never uses cuFFTMp. stat is the first non-zero cuFFT/CUDA code, or 0, and the other outputs are then not valid. A plan that aborts inside the library never returns. With query_only set, a cuFFTMp plan is made with auto-allocation off. heap_bytes is then the plan memory without the workspace, worksize_bytes the workspace of both plans (not allocated), xtdesc_bytes is zero and no xtdesc buffer is allocated. A plain cuFFT plan is not changed by it. |
| field_add_const_x_face | m_omptgt_kernels_fieldops | Subroutine | Add the constant c to every point of the x plane i_plane of f. |
| field_add_const_x_face_base | m_base_backend | Subroutine | Adds a uniform constant |
| field_add_const_x_face_cuda | m_cuda_backend | Subroutine | |
| field_add_const_x_face_omp | m_omp_backend | Subroutine | |
| field_add_face_from_field_base | m_base_backend | Subroutine | Add the face planes of |
| field_add_face_from_field_cuda | m_cuda_backend | Subroutine | |
| field_add_face_from_field_omp | m_omp_backend | Subroutine | |
| field_add_gaussian_sources_base | m_base_backend | Subroutine | Adds isotropic Gaussian sources to the DIR_X VERT fields a, b and c: at every grid point x within distance r_cut of points(1:3, s), a += coeffs(1, s)*exp(-|x - points(:, s)|^2/eps^2), and likewise b and c with coeffs(2, s) and coeffs(3, s). The kernel wraps across periodic boundaries, consistent with field_sample_points, and is cut at non-periodic ones. Needs a uniform grid. |
| field_add_gaussian_sources_cuda | m_cuda_backend | Subroutine | |
| field_add_gaussian_sources_omp | m_omp_backend | Subroutine | |
| field_add_x_face_from_field | m_cuda_kernels_fieldops | Subroutine | f += g on the x-faces (pencil index 1 and nx) flagged by set_start/set_end. Launch as field_set_x_face_from_field. |
| field_add_x_face_from_field | m_omptgt_kernels_fieldops | Subroutine | f += g on the x faces flagged by set_start/set_end. |
| field_add_y_face_from_field | m_cuda_kernels_fieldops | Subroutine | f += g on the y-faces (j = 1 and ny) flagged by set_start/set_end. Launch as field_set_y_face. |
| field_add_y_face_from_field | m_omptgt_kernels_fieldops | Subroutine | f += g on the y faces flagged by set_start/set_end. |
| field_blend_x_band | m_cuda_kernels_fieldops | Subroutine | f(i_start + i - 1, j, k) = lambda(i)band(i, j, k) + (1 - lambda(i))f(i_start + i - 1, j, k) for a DIR_X vertex field; one thread per i, one block per (j, k) |
| field_blend_x_band | m_omptgt_kernels_fieldops | Subroutine | f(i_start + i - 1, j, k) = lambda(i)band(i, j, k) + (1 - lambda(i))f(i_start + i - 1, j, k) for a DIR_X vertex field |
| field_get_x_band | m_cuda_kernels_fieldops | Subroutine | band(i, j, k) = f(i_start + i - 1, j, k) for a DIR_X vertex field; one thread per i, one block per (j, k) |
| field_get_x_band | m_omptgt_kernels_fieldops | Subroutine | band(i, j, k) = f(i_start + i - 1, j, k) for a DIR_X vertex field |
| field_init | m_field | Function | |
| field_labelled_axpy_base | m_base_backend | Subroutine | Adds coeffs(1, l)g, coeffs(2, l)g and coeffs(3, l)*g to a, b and c at every point of the DIR_X fields labelled l in 1..size(coeffs, 2). Points with any other label are left unchanged. |
| field_labelled_axpy_cuda | m_cuda_backend | Subroutine | |
| field_labelled_axpy_omp | m_omp_backend | Subroutine | |
| field_labelled_sums_base | m_base_backend | Subroutine | Computes this rank's sums of ga, gb and g*c separately for each
label in a single pass over DIR_X fields. |
| field_labelled_sums_cuda | m_cuda_backend | Subroutine | |
| field_labelled_sums_omp | m_omp_backend | Subroutine | |
| field_max_mean_base | m_base_backend | Subroutine | Obtains maximum and mean values in a field |
| field_max_mean_cuda | m_cuda_backend | Subroutine | |
| field_max_mean_omp | m_omp_backend | Subroutine | |
| field_max_sum | m_cuda_kernels_fieldops | Subroutine | |
| field_max_sum | m_omptgt_kernels_fieldops | Subroutine | Maximum and sum of |f|. |
| field_plane_partial_sums | m_cuda_kernels_fieldops | Subroutine | First pass of field_plane_sums: partial(j, z) is the sum over x of y index j at z. Launch with threads = dim3(SZ, 1, 1) and blocks = dim3(n_y_blocks, nz, 1). |
| field_plane_partial_sums | m_omptgt_kernels_fieldops | Subroutine | First pass of field_plane_sums: partial(j, z) is the sum over x of y index j at z, summed in a fixed order. |
| field_plane_sums_base | m_base_backend | Subroutine | Sum a DIR_X field over x and z on every local y-plane: sums(j) is the sum over the plane of y index j. The order of summation is fixed, so the result is reproducible. |
| field_plane_sums_cuda | m_cuda_backend | Subroutine | |
| field_plane_sums_omp | m_omp_backend | Subroutine | |
| field_plane_sums_reduce | m_cuda_kernels_fieldops | Subroutine | Second pass of field_plane_sums: sums(j) = sum over z of partial(j, z), in a fixed order. Launch with one thread per y index. |
| field_plane_sums_reduce | m_omptgt_kernels_fieldops | Subroutine | Second pass of field_plane_sums: sums(j) is the sum over z of partial(j, z), in a fixed order. |
| field_sample_points_base | m_base_backend | Subroutine | Computes this rank's part of the trilinear interpolation of the DIR_X
VERT fields a, b and c at |
| field_sample_points_cuda | m_cuda_backend | Subroutine | |
| field_sample_points_omp | m_omp_backend | Subroutine | |
| field_scale | m_cuda_kernels_fieldops | Subroutine | |
| field_scale | m_omptgt_kernels_fieldops | Subroutine | |
| field_scale_base | m_base_backend | Subroutine | Scales a field by a |
| field_scale_cuda | m_cuda_backend | Subroutine | |
| field_scale_omp | m_omp_backend | Subroutine | |
| field_set_abl_wall_stress | m_cuda_kernels_fieldops | Subroutine | Drag law tau = drag_coeffu_c|u_h| from each column's own sampled velocity, written into one stress plane (component 1: x, 3: z). The velocity is interpolated between the sample plane and the one above it. |
| field_set_abl_wall_stress | m_omptgt_kernels_fieldops | Subroutine | Drag law tau = drag_coeffu_c|u_h| from each column's own sampled velocity, written into one stress plane (component 1: x, 3: z). The velocity is interpolated between sample_plane and upper_plane. |
| field_set_abl_wall_stress_base | m_base_backend | Subroutine | Replace one SGS stress plane using the local sampled velocity. The velocity is interpolated linearly between y-vertices sample_plane and sample_plane + 1, with weight sample_weight on the upper one, as Incompact3d samples at a non-integer dsampling. |
| field_set_abl_wall_stress_cuda | m_cuda_backend | Subroutine | |
| field_set_abl_wall_stress_omp | m_omp_backend | Subroutine | |
| field_set_face_base | m_base_backend | Subroutine | A field is a subdomain with a rectangular cuboid shape. It has 6 faces, and these faces are either a subdomain boundary or a global domain boundary based on the location of the subdomain. This subroutine allows us to set any of these faces to a value, 'c_start' and 'c_end' for faces at opposite sides. 'face' is one of X_FACE, Y_FACE, Z_FACE from common.f90 Optionally, bc_start/bc_end select the BC type (default BC_DIRICHLET). |
| field_set_face_cuda | m_cuda_backend | Subroutine | |
| field_set_face_from_field_base | m_base_backend | Subroutine | As field_set_face but with a spatially-varying inlet face field instead of a scalar c_start. |
| field_set_face_from_field_cuda | m_cuda_backend | Subroutine | Set a face of |
| field_set_face_from_field_omp | m_omp_backend | Subroutine | |
| field_set_face_omp | m_omp_backend | Subroutine | |
| field_set_x_face | m_cuda_kernels_fieldops | Subroutine | Set domain X_FACE boundary values. c_start: Dirichlet value applied at the left face (i = 1) c_end: convective velocity Uc = uxmax * gdt / dx, used as multiplier in the outflow scheme du/dt + Uc*du/dx = 0 |
| field_set_x_face | m_omptgt_kernels_fieldops | Subroutine | Sets the x faces: a Dirichlet value c_start at the inlet (pencil index 1) and the convective outflow du/dt + Uc*du/dx = 0, Uc = c_end, at the outlet (pencil index nx). BC_NEUMANN (1) leaves a face untouched. |
| field_set_x_face_from_field | m_cuda_kernels_fieldops | Subroutine | Set domain X_FACE boundary values with a spatially-varying inlet. |
| field_set_x_face_from_field | m_omptgt_kernels_fieldops | Subroutine | As field_set_x_face, with the inlet taken from the inlet plane of f_start rather than a constant. |
| field_set_x_face_from_plane | m_cuda_kernels_fieldops | Subroutine | Write two (ny, nz) planes into the x = 1 and x = nx planes of a DIR_X field. p_end is read only when apply_end = 1. Launch convention matches field_set_x_face_from_field. |
| field_set_x_face_from_plane | m_omptgt_kernels_fieldops | Subroutine | Writes two (ny, nz) planes into the x = 1 and x = nx planes of f. p_end is read only when apply_end is true. |
| field_set_x_inlet_plane_base | m_base_backend | Subroutine | Overwrites the x = 1 plane (pencil index 1) of a DIR_X field with
the host array |
| field_set_y_face | m_cuda_kernels_fieldops | Subroutine | Set domain Y_FACE boundary values. c_start: Dirichlet value applied at the bottom face (j = 1) c_end: Dirichlet value applied at the top face (j = ny) set_start/set_end: whether that face carries a prescribed value at all, so the two y-faces can differ (ABL: no-slip floor, free-slip lid). |
| field_set_y_face | m_omptgt_kernels_fieldops | Subroutine | Sets the bottom (y = 1) and top (y = ny) faces where flagged, so the two y faces can differ (ABL: no-slip floor, free-slip lid). |
| field_set_y_face_from_field | m_cuda_kernels_fieldops | Subroutine | Set domain Y_FACE boundary values from another field. Both f and f_start are DIR_X VERT pencil-layout. Only the bottom (j = 1) and top (j = ny) y-pencil planes of f_start are read. |
| field_set_y_face_from_field | m_omptgt_kernels_fieldops | Subroutine | Copies the bottom and top y planes of f_start onto those of f. |
| field_set_y_face_from_plane | m_cuda_kernels_fieldops | Subroutine | Write two (nx, nz) planes into the y = 1 and y = ny planes of a DIR_X field. p_end is read only when apply_end = 1. Launch convention matches field_set_y_face_from_field. |
| field_set_y_face_from_plane | m_omptgt_kernels_fieldops | Subroutine | Writes two (nx, nz) planes into the y = 1 and y = ny planes of f. p_end is read only when apply_end is true. |
| field_set_y_plane | m_cuda_kernels_fieldops | Subroutine | Set one interior y-plane to a constant. The caller resolves the plane into its position within a y-block and the group offset for that block, so this kernel stays free of layout arithmetic. |
| field_set_y_plane | m_omptgt_kernels_fieldops | Subroutine | Sets the y plane |
| field_set_y_plane_base | m_base_backend | Subroutine | Set one interior y-plane of a DIR_X field to a constant. |
| field_set_y_plane_cuda | m_cuda_backend | Subroutine | |
| field_set_y_plane_omp | m_omp_backend | Subroutine | |
| field_shift | m_cuda_kernels_fieldops | Subroutine | |
| field_shift | m_omptgt_kernels_fieldops | Subroutine | |
| field_shift_base | m_base_backend | Subroutine | Shifts a field by a |
| field_shift_blend_x_band_base | m_base_backend | Subroutine | Blend an x band of a DIR_X vertex field towards a spanwise-shifted copy of an upstream band (the ABL shifted periodic fringe): f(i + i_offset, j, k) = lambdaf(i, j, k - nshift) + (1 - lambda)f(i + i_offset, j, k) for i = i_start, ..., i_start + size(lambda) - 1, with k circular over the global z planes. x and y must not be decomposed; z_plane_rank(kg) is the rank holding global z plane kg. |
| field_shift_blend_x_band_cuda | m_cuda_backend | Subroutine | |
| field_shift_cuda | m_cuda_backend | Subroutine | |
| field_shift_omp | m_omp_backend | Subroutine | |
| field_t | m_field | Interface | |
| field_volume_integral_base | m_base_backend | Function | Reduces field to a scalar by integrating over the volume |
| field_volume_integral_cuda | m_cuda_backend | Function | volume integral of a field |
| field_volume_integral_omp | m_omp_backend | Function | volume integral of a field |
| fields_plus_halo_bytes_n | m_memcheck_estimate | Function | The fields and halo term at num_gpus GPUs for npeak fields. |
| fill | m_field | Subroutine | |
| fill_cuda | m_cuda_allocator | Subroutine | |
| fill_rhs | x3d2_poisson_solver | Subroutine | Fill |
| filter_field | m_solver | Subroutine | Filter one velocity component in all three directions, in place. |
| filter_in_dir | m_solver | Subroutine | Filter a DIR_X field along one direction, in place. |
| filter_width | m_les | Function | Volume-equivalent grid-filter width, Delta=(dxdydz)^(1/3). |
| finalise | m_solver | Subroutine | Release resources owned by the solver and its runtime models. |
| finalise | m_monitoring | Subroutine | |
| finalise_abl | m_case_abl | Subroutine | |
| finalise_adm | m_adm | Subroutine | |
| finalise_case_specific_default | m_base_case | Subroutine | |
| finalise_dummy | m_turbine_dummy | Subroutine | |
| finalise_turbine_model | m_turbine_setup | Subroutine | Release a turbine model set up by init_turbine_model; a no-op when the case has none |
| finalise_wind_turbine | m_case_wind_turbine | Subroutine | |
| finalize | m_time_integrator | Subroutine | |
| finish_step | m_base_case | Subroutine | The per-iteration work after the substeps: sets current_iter and computes the pressure and the derived fields. Shared by run() and x3d2-memcheck. |
| fold_index | m_cuda_spectral | Function | Source index of entry i of a non-periodic line of n points gathered into a periodic one: the odd entries ascending, then the even entries descending, so that a plain FFT can stand in for the cosine transform. For an odd n the last entry lands at the centre, n/2 + 1. The single definition of the fold for the periodicity kernels: the enforce kernels gather through it and the undo kernels scatter through it, which keeps their reads contiguous. The OpenMP backend has the same function. |
| forcings_abl | m_case_abl | Subroutine | |
| forcings_channel | m_case_channel | Subroutine | |
| forcings_cylinder | m_case_cylinder | Subroutine | |
| forcings_generic | m_case_generic | Subroutine | |
| forcings_tgv | m_case_tgv | Subroutine | |
| forcings_wind_turbine | m_case_wind_turbine | Subroutine | |
| friction_velocity | m_abl_diagnostics | Function | Friction velocity from the magnitude of a mean wall-stress vector. |
| generate_coordinates | m_io_field_utils | Subroutine | |
| get_argument | m_common | Function | |
| get_block | m_allocator | Function | Return a pointer to the first available memory block, i.e. the current head of the block list. If the list is empty, allocate a new block with create_block first. |
| get_block_ids | m_allocator | Function | Utility function that returns an array made of the |
| get_coordinates | m_mesh | Function | Get the coordinates of a vertex with i, j, k local cartesian indices Avoid calling this in hot loops |
| get_default_backend | m_io_backend | Function | |
| get_default_backend | m_io_backend | Function | |
| get_dev_ptr | m_field | Function | Address of the block's storage in a separate device allocation, null for a host block. A device field type that keeps its storage behind a raw device pointer overrides this, letting its backend reach the storage by dynamic dispatch rather than by a type query. |
| get_device_bw_info_base | m_base_backend | Subroutine | Reports the memory clock rate and bus width of the target device, used to work out a theoretical peak bandwidth. |
| get_device_bw_info_cuda | m_cuda_backend | Subroutine | |
| get_device_bw_info_omp | m_omp_backend | Subroutine | |
| get_dims | m_mesh | Function | Getter for local domain dimensions |
| get_dims_dataloc | m_mesh | Function | Getter for domain dimensions |
| get_dirs_from_rdr | m_common | Subroutine | |
| get_field_data | m_base_backend | Subroutine | Extract data from field |
| get_field_ptr | m_io_field_utils | Function | Resolve a field name to the corresponding solver field pointer. Centralises the name-to-field mapping used by I/O managers. |
| get_global_dims | m_mesh | Function | Getter for local domain dimensions |
| get_imag | m_poisson_fft | Function | |
| get_index_dir | m_ordering | Subroutine | Get application storage directional index from cartesian index |
| get_index_ijk | m_ordering | Subroutine | Get cartesian index from application storage directional one |
| get_index_reordering | m_ordering | Subroutine | Converts indices in between any two DIR_? |
| get_km | m_poisson_fft | Function | |
| get_km_im | m_poisson_fft | Function | |
| get_km_re | m_poisson_fft | Function | |
| get_log_level | m_logger | Function | |
| get_n_dir | m_mesh | Function | Getter for the main dimension a field oriented along |
| get_n_groups | m_allocator | Function | |
| get_n_phi | m_mesh | Function | Getter for the main dimension of field phi |
| get_output_dimensions | m_io_field_utils | Subroutine | |
| get_padded_dims | m_allocator | Function | |
| get_rdr_from_dirs | m_common | Function | Returns RDR_?2? value based on two direction inputs |
| get_real | m_poisson_fft | Function | |
| get_shape | m_field | Function | |
| get_shape_cuda | m_cuda_allocator | Function | |
| global_cell_dims | m_mesh | Function | Global number of cells per direction: a periodic direction has as many cells as vertices, any other has one less. Shared by mesh_init and callers with only the global vertex dims (no mesh_t). |
| gpu_io_staging_bytes | m_memory_estimate | Function | Device memory the GPU-aware ADIOS2 write path (src/io/adios2/io.f90, write_device_field_adios2) holds on top of the solver's own peak: a single reused staging buffer (file_handle%device_staging), sized to one unpadded LOCAL field in whichever precision that write uses. The buffer is grown, never shrunk (see write_device_field_adios2), so its steady-state size is the LARGEST single write it is asked to hold: the build precision whenever a checkpoint is enabled (always native, and always at least as large as a single-precision snapshot), otherwise whatever precision the snapshot uses. |
| gpu_io_staging_parts | m_memory_estimate | Subroutine | Which writes can take the device path: a snapshot only at unit stride (striding falls back to the host path in snapshot_manager.f90), a checkpoint never strides. Shared by gpu_io_staging_bytes and the x3d2-memcheck report. |
| gpu_write_mode_from_env | m_io_backend | Function | The gpu_write_mode_* value of the environment variable X3D2_ADIOS2_GPU_WRITE_MODE. An unset or empty variable gives auto. |
| gradient_c2v | m_vector_calculus | Subroutine | Gradient of a scalar field 'p'. |
| gradient_p2v | m_solver | Subroutine | Wrapper for gradient_p2v |
| halo_bytes | m_memory_estimate | Function | CUDA-backend halo-exchange buffer bytes. Mirrors the 24 allocate statements in src/backend/cuda/backend.f90:128-152: 12 arrays shaped (sz, n_halo, n_groups) for u/v/w send/recv start/end, plus 12 more shaped (sz, 1, n_groups) for du/dud/d2u send/recv start/end - all real(dp). n_groups is the max over X/Y/Z of ny_pnz_p/sz, nx_pnz_p/ sz, nx_pny_p/sz (src/allocator.f90:81-83, allocator_t% n_groups_dir/get_n_groups), where _p are the sz-padded dims (x/y padded via padded_dim, z untouched, same rule padded_cells uses). |
| has_output_field | m_config | Function | Check whether a field name is present in the output_fields list. |
| ibm_mask_filename | m_ibm | Function | The ibm_ |
| ibm_t | m_ibm | Interface | |
| inflow_file_name | m_inflow_planes | Function | File holding block |
| inflow_plane_reader_t | m_inflow_planes | Interface | |
| inflow_plane_writer_t | m_inflow_planes | Interface | |
| init | m_time_integrator | Function | |
| init | m_omp_backend | Function | |
| init | m_solver | Function | |
| init | m_vector_calculus | Function | |
| init | m_monitoring | Subroutine | |
| init | m_cuda_backend | Function | |
| init_adm | m_adm | Subroutine | |
| init_case | m_cuda_poisson_fft | Subroutine | Sets up the device state of the case ahead of the FFT plans. The 000 case needs nothing beyond the shared state. |
| init_case_010 | m_cuda_poisson_fft | Subroutine | if stretching in y is 'bottom' |
| init_case_100 | m_cuda_poisson_fft | Subroutine | |
| init_case_110 | m_cuda_poisson_fft | Subroutine | |
| init_controller | m_alm_controller | Subroutine | |
| init_cuda_poisson_fft | m_cuda_backend | Subroutine | |
| init_dim2_mirror | m_cuda_poisson_fft | Subroutine | The 010, 100 and 110 cases pair each dim2 spectral mode with its mirror, which cuFFTMp may place on another rank. Slab index r of P owns global dim2 modes [rm + 1, (r + 1)m] with m = ny_spec, and the mirror of that range is slab P - 1 - r shifted up by one plane, so the extra plane comes from slab P - r. Both partners are symmetric. A single rank holds every partner itself and allocates nothing. This is the only place c_mirror_dev is allocated, see the cuFFTMp check in init_cuda. |
| init_dummy | m_turbine_dummy | Subroutine | |
| init_loads_file | m_alm_output | Subroutine | Start |
| init_omp_poisson_fft | m_omp_backend | Subroutine | |
| init_pair_buffers | m_omp_poisson_fft | Subroutine | Allocates c_pair, the y-pencil of sp, and when with_waves is set also waves_pair, redistributing waves into it once. |
| init_poisson_fft_base | m_base_backend | Subroutine | Allocates and initialises the backend's FFT based Poisson solver. |
| init_turbine_model | m_turbine_setup | Subroutine | Allocate the turbine model wind_turbine_nml selects, initialise it and register it for checkpointing |
| initial_conditions_abl | m_case_abl | Subroutine | |
| initial_conditions_channel | m_case_channel | Subroutine | |
| initial_conditions_cylinder | m_case_cylinder | Subroutine | |
| initial_conditions_generic | m_case_generic | Subroutine | |
| initial_conditions_tgv | m_case_tgv | Subroutine | |
| initial_conditions_wind_turbine | m_case_wind_turbine | Subroutine | |
| interpl_c2v | m_vector_calculus | Subroutine | Interpolation of a scalar field from cell centres to vertices. |
| interpl_mid | m_tdsops | Subroutine | |
| is_avail_2decomp | m_decomp | Function | |
| is_avail_2decomp | m_decomp | Function | |
| is_root | m_mesh_content | Function | Returns whether or not the current rank is the root rank |
| is_supported_flow_case | m_case_factory | Function | True when allocate_flow_case has a branch for the name. |
| labelled_axpy | m_cuda_kernels_fieldops | Subroutine | a, b, c += coeffs(1:3, l)*g at the points labelled l; launch as vector_norm_squared. |
| labelled_axpy | m_omptgt_kernels_fieldops | Subroutine | a, b, c += coeffs(1:3, l)*g at the points labelled l. |
| labelled_sums | m_cuda_kernels_fieldops | Subroutine | s(1:3, l) += sums of ga, gb and g*c over the points labelled l; launch as vector_norm_squared. Each thread accumulates runs of equal labels along its pencil and flushes a run when the label changes, so the atomics scale with the label changes rather than the points. |
| labelled_sums | m_omptgt_kernels_fieldops | Subroutine | s(1:3, l) += sums of ga, gb and g*c over the points labelled l, as cuda/kernels/fieldops.f90: each thread accumulates runs of equal labels along its pencil and flushes a run when the label changes, so the atomics scale with the label changes rather than the points. Atomics instead of reduction(+:s), which flang cannot do on the GPU for an array whose shape is only known at run time. |
| laplacian | m_vector_calculus | Subroutine | Laplacian of a scalar field 'u'. |
| les_t | m_les | Interface | |
| local_corner | m_omp_backend | Subroutine | Local one-based index of the zero-based global VERT index g, wrapped across periodic boundaries; owned is false off this rank or outside a non-periodic boundary. |
| local_index | m_cuda_kernels_fieldops | Function | Local one-based index of the zero-based global index g, wrapped when periodic; 0 when it is off this rank or outside the domain. |
| log_debug | m_logger | Subroutine | Detail for developers, hidden unless the level is LOG_LEVEL_DEBUG. |
| log_error | m_logger | Subroutine | An error the caller handles itself. Use abort_run to stop the run. |
| log_info | m_logger | Subroutine | Progress and setup information. |
| log_warn | m_logger | Subroutine | Something is suspicious, but the run can carry on. |
| lowpass | m_tdsops | Subroutine | Tridiagonal low-pass filter, matching Incompact3d's |
| make_line_geometry | m_alm_element | Subroutine | Element centres, unit vectors, areas and chords from the stations. |
| memcpy3D | m_cuda_spectral | Subroutine | Copy data between x3d2 padded arrays and cuFFTMp descriptors |
| memcpy3D_with_transpose | m_cuda_spectral | Subroutine | Copy with transpose: src(nx, ny, nz) -> dst(ny, nx, nz) Used for 100 case forward FFT |
| memcpy3D_with_transpose_back | m_cuda_spectral | Subroutine | Copy with transpose back: src(ny, nx, nz) -> dst(nx, ny, nz) Used for 100 case backward FFT |
| memcpy_d2d | m_omptgt_common | Subroutine | Copies |
| memcpy_d2h | m_omptgt_common | Subroutine | Copies |
| memcpy_h2d | m_omptgt_common | Subroutine | Copies |
| mesh_init | m_mesh | Function | Completely initialise the mesh object. Upon initialisation the mesh object can be read-only and shouldn't be edited Takes as argument global information about the mesh like its length, number of cells and decomposition in each direction |
| mesh_t | m_mesh | Interface | |
| mirror_buffer_bytes_100 | m_memory_estimate | Function | 100-case multi rank only mirror/exchange buffers, zero at num_gpus<=1 - matches the nproc>1 guard at src/backend/cuda/poisson_fft.f90:332-349: c_mirror_dev + c_slab_send_dev: (nx_spec, ny_spec, nz_spec) x2 c_plane_send_dev + c_plane_recv_dev: (nx_spec, nz_spec) x2 all complex(dp). n_spec is the spectral shape of the 100 case. |
| move_data_loc | m_common | Function | |
| neutral_drag_coefficient | m_les | Function | Neutral rough-wall drag coefficient, (kappa/ln(h/z0))2, so that the wall stress is drag_coeffu|u| at the sampling height h. |
| neutral_log_law | m_abl_diagnostics | Function | |
| neutral_wall_stress | m_les | Subroutine | Neutral rough-wall drag law. Returns the wall value of the SGS stress tau_xy (and tau_yz), signed so that a positive sample gives a positive stress and hence a momentum sink once differentiated. |
| nml_group_in_file | m_config | Function | Whether a line of the file opens the namelist group (&group, in any case), so an optional namelist that is present but unterminated can be told apart from an absent one. |
| no_device_exit | x3d2_memcheck | Subroutine | Shuts MPI down, then stops. |
| nolds_of | m_time_integrator | Function | Number of old-step blocks per variable that a time_intg_t keeps: k - 1 for ABk (nstep - 1) and k for RKk (nstage). Static, so that x3d2-memcheck can size the history blocks without allocating them. |
| num_gpus_unsupported_reason | m_memcheck_estimate | Function | The reason GPU count num_gpus is not a supported decomposition, blank when it is. |
| nvtx_enabled | m_nvtx | Function | Whether ranges are emitted: X3D2_NVTX (default on), read on first use. |
| nvtx_pop | m_nvtx | Subroutine | |
| nvtx_push | m_nvtx | Subroutine | |
| obtain_coordinates | m_mesh_content | Subroutine | Obtains global coordinates for all the vertices and midpoints |
| omp_backend_t | m_omp_backend | Interface | |
| omptgt_allocator_t | m_omptgt_allocator | Interface | |
| omptgt_backend_t | m_omptgt_backend | Interface | |
| omptgt_tdsops_init | m_omptgt_tdsops | Subroutine | Initialises |
| operate_controller | m_alm_controller | Subroutine | Advance the controller to |
| outflow_flow_rate_correction | m_base_case | Function | The flow_rate_diff for the X_FACE stamp of field_set_face_from_field that makes the flow rate out equal the flow rate in exactly, as the pressure projection sees them. The x staggered derivative sums to (u(nx) - u(1))/dx over the cells, so only the two face planes enter, each weighted over y by y_weights: the case passes the weights of the y interpolation (1/2 on a non-periodic boundary plane, 1 elsewhere), with 0 on any plane it overwrites with the same value on both faces after the stamp. The stamp is linear in u, u(nx) <- (1 - c)u(nx) + cu(nx - 1) + flow_rate_diff, so the sums of the planes before it give the outlet flow rate after it. Call it with u as it is about to be stamped, once bc_start_u_x holds this substep's inlet plane. Assumes x is not decomposed, as compute_outflow_params does. |
| output_field_active | m_config | Function | Whether a snapshot output field is actually driven at runtime - a field only triggers its associated allocations if BOTH it is listed in output_fields AND snapshotting is enabled. Mirrors the pattern used for keep_pressure (src/case/base_case.f90:120-122), shared by run() and x3d2-memcheck. |
| pack_110_xyz_to_yslab | m_cuda_spectral | Subroutine | Packs the physical Z-slab field block (nx, ny, nz_l) into the MPI_Alltoall send buffer, selecting for each destination rank s the Y range [sny_l+1, (s+1)ny_l] it owns in the Y-slab layout. |
| pack_110_yslab | m_cuda_spectral | Subroutine | Inverse of unpack_110_yslab: packs the Y-slab real view into the MPI_Alltoall send buffer, selecting for each destination rank s the Z range it originally owned in the physical Z-slab layout. |
| pack_c_dp | m_cuda_kernels_reorder | Subroutine | Copy the unpadded (nx, ny, nz) part of a DIR_C field |
| pack_c_sp | m_cuda_kernels_reorder | Subroutine | Single precision output variant of pack_c_dp |
| pack_spectral_plane | m_cuda_spectral | Subroutine | Copies the first dim2 plane of the local spectral slab into a contiguous buffer so it can be handed to MPI. |
| pack_x2c_dp | m_cuda_kernels_reorder | Subroutine | Reorder a DIR_X field into an unpadded (nx, ny, nz) Cartesian buffer in one pass: reorder_x2c followed by dropping the padding. |
| pack_x2c_sp | m_cuda_kernels_reorder | Subroutine | Single precision output variant of pack_x2c_dp |
| padded_cells | m_memory_estimate | Function | Cell count of one padded field at dims (x, y padded to sz, z untouched). i8 so callers can multiply by field count/nbytes without overflow, as the allocator's own int32 ngrid does for very large grids. |
| padded_dim | m_allocator | Function | Smallest multiple of sz that is >= n. Used for the x/y padding in allocator_init; z is never padded so is not covered here. |
| padded_halo_bytes | m_memory_estimate | Function | halo_bytes for a local block of local_dims cells: pads x and y to sz (z untouched) the way the allocator does, then sizes the halo-exchange buffers of those padded dims. |
| pair_bw | m_cuda_spectral | Function | Backward counterpart of pair_fw, symmetric in the same way. |
| pair_fw | m_cuda_spectral | Function | Forward paired split of one dim2 mode against its mirror. The rule is symmetric, so the partner entry is pair_fw(partner, own, i2_rev). |
| parse_args | m_memcheck_context | Subroutine | |
| parse_arguments | x3d2_poisson_solver | Subroutine | Read |
| parse_gpu_write_mode | m_io_backend | Function | Map the text of X3D2_ADIOS2_GPU_WRITE_MODE to a gpu_write_mode_* value. Case is ignored, an unknown or empty text gives auto. |
| peak_fields_lookup | m_memory_estimate | Function | Static estimate of the allocator's work-field high-water mark (allocator_t%next_id after one substep - see src/allocator.f90), evaluated purely from config flags, no build/run required. |
| penta_periodic_columns | m_omptgt_tdsops | Function | Solves A_np*z_k = e_{p_k} for p = 1, 2, n-1, n with the non-periodic pentadiagonal LU factors, as thread 1 of der_penta_periodic does in the CUDA backend. |
| pitch_line | m_alm_element | Subroutine | Pitch every station by |
| poisson_bc_code | m_poisson_fft | Function | Names the boundary condition case of the FFT Poisson solver, one digit per direction in x, y, z order: 0 for periodic, 1 otherwise. The 000 case is periodic everywhere, 110 is non-periodic in x and y. |
| poisson_cg | m_solver | Subroutine | |
| poisson_divide | m_cuda_spectral | Subroutine | Divide one entry by its spectral equivalence constant, with the eps_wave guard that keeps roundoff noise out of the pressure field. |
| poisson_fft | m_solver | Subroutine | |
| poisson_uses_2decomp | m_backend_setup | Function | Whether the Poisson solver of this build runs on 2decomp: only the FFT solver of the OMP backend does. |
| populate_line_airfoils | m_alm_element | Subroutine | Give every element the airfoil whose thickness ratio is closest to its own, clamped to the thinnest and thickest available. |
| post_step | m_base_case | Subroutine | Called after every completed time step, unlike postprocess which runs only every n_output steps. No-op unless a case overrides it. |
| post_step_abl | m_case_abl | Subroutine | |
| post_step_wind_turbine | m_case_wind_turbine | Subroutine | |
| post_z_shift_exchange | m_base_backend | Subroutine | Post the sends and receives of a circular z shift by nshift planes for the planes held by other ranks; band(:, :, k) and shifted(:, :, k) are this rank's local plane k. The tag is the receiving global plane. |
| postprocess_abl | m_case_abl | Subroutine | |
| postprocess_channel | m_case_channel | Subroutine | |
| postprocess_cylinder | m_case_cylinder | Subroutine | |
| postprocess_dim13_bw | m_cuda_spectral | Subroutine | Backward counterpart of postprocess_dim13_fw. |
| postprocess_dim13_fw | m_cuda_spectral | Subroutine | Forward postprocess of one spectral entry in dim3 then dim1. |
| postprocess_generic | m_case_generic | Subroutine | |
| postprocess_tgv | m_case_tgv | Subroutine | |
| postprocess_wind_turbine | m_case_wind_turbine | Subroutine | |
| precorrect_walls | m_solver | Subroutine | Incompact3d's pre_correc: on each Dirichlet face, add the previous projection's tangential correction to the value set by the case. The projection that follows then leaves the face at its prescribed value plus dt(grad p_old - grad p_new), instead of -dtgrad p_new. The kept correction is dt_last*grad p_old, so it is rescaled by dt_now/dt_last first, as Incompact3d does with gdt(itr). The timestep is time_intg_t%stage_dt, the time the substep has advanced from the divergence-free start of the step, which is what the projection scales its correction by. For AB this ratio is always 1; for RK it changes between stages (1/2, 3/4, 1 for RK3). Before the first projection (or after a restart, as in Incompact3d) there is no correction to add. |
| predicted_fft_heap_bytes | m_memory_estimate | Function | The NVSHMEM heap of the forward and backward cuFFTMp plans with the workspace allocated and without the xtdesc buffer: the plan memory plus the workspace rounded up to 1 GiB. This is the definition of the measured heap of the normal FFT workspace query. |
| prepare_field_buffers | m_io_field_utils | Subroutine | |
| prepare_probe | m_memcheck_estimate | Subroutine | Decides the FFT probe once per run and runs it. The small-grid probe gives the context and the heap. The full-grid probe follows when the mode allows and the card has room for the memory the plans need. The decision is in ctx%probe_plan and ctx%probe_reason (see ensure_probe in the device). |
| preprocess_dist | m_tdsops | Subroutine | |
| preprocess_penta_dist | m_tdsops | Subroutine | LU preprocessing for non-periodic pentadiagonal Thomas algorithm. |
| preprocess_thom | m_tdsops | Subroutine | |
| pressure_correction | m_solver | Subroutine | |
| print_requested_line | m_memcheck_report | Subroutine | The verdict line of the requested nproc_dir, or why it is not supported. Sets final_verdict. |
| print_rule | m_memcheck_report | Subroutine | A separator line of 60 characters. |
| print_table_header | m_memcheck_report | Subroutine | |
| print_table_row | m_memcheck_report | Subroutine | One table row. basis is the mark of the overhead (see basis_name). |
| process_spectral_000 | m_omp_spectral | Subroutine | Post-process div U* in spectral space for all periodic BCs. |
| process_spectral_000 | m_cuda_spectral | Subroutine | Post-processes the divergence of velocity in spectral space, including scaling w.r.t. grid size. |
| process_spectral_010 | m_omp_spectral | Subroutine | Post-process div U* in spectral space, for non-periodic BC in y-dir. |
| process_spectral_010 | m_cuda_spectral | Subroutine | Post-processes the divergence of velocity in spectral space, including scaling w.r.t. grid size. |
| process_spectral_010_bw | m_cuda_spectral | Subroutine | Post-processes the divergence of velocity in spectral space, including scaling w.r.t. grid size. |
| process_spectral_010_fw | m_cuda_spectral | Subroutine | Post-processes the divergence of velocity in spectral space, including scaling w.r.t. grid size. |
| process_spectral_010_poisson | m_cuda_spectral | Subroutine | Solve the Poisson equation at cell centres with non-periodic BC along y |
| process_spectral_100 | m_omp_spectral | Subroutine | Post-process div U* in spectral space, for non-periodic BC in x-dir. |
| process_spectral_110 | m_omp_spectral | Subroutine | Post-process div U* in spectral space, for non-periodic BC in both x- and y-directions (R2C Z-transpose layout: dim1 = Z r2c modes, dim2 = X modes, dim3 = Y modes). |
| process_spectral_110_bw | m_omp_spectral | Subroutine | Backward third of the spectral post-process for the 110 case: the X paired even/odd recombine, then the Z periodic post-process backward. |
| process_spectral_110_fw | m_omp_spectral | Subroutine | Forward third of the spectral post-process for the 110 case (non-periodic x and y, periodic z, R2C Z-transpose layout): normalise, Z periodic post-process forward, then the X paired even/odd split. |
| process_spectral_110_norm_z | m_cuda_spectral | Subroutine | Step 1 (forward): normalise + Z periodic post-process Z is dim1 (serial j loop), periodic R2C — no sign flip needed since j only goes to nz/2+1. nx, ny are the local loop bounds (equal to nx_glob, ny_glob on a single rank); the normalisation divisor always needs the globals. |
| process_spectral_110_poisson | m_cuda_spectral | Subroutine | Step 4: Poisson solve — divide by waves x and y are cosine transformed, so neither has a Nyquist mode and the only singular entry is the mean, which the eps_wave test handles. The x Nyquist zeroing of the 010 case must not be copied here: in this layout x index nx/2 + 1 is the regular cosine mode N/2 (#465). |
| process_spectral_110_solve | m_omp_spectral | Subroutine | Middle third of the spectral post-process for the 110 case: the Y paired even/odd split, the Poisson divide, and the Y paired even/odd recombine. x and y are cosine transformed, so neither has a Nyquist mode and only the mean is singular (handled by eps_wave); the x Nyquist zeroing of the 010 case does not apply here (#465). |
| process_spectral_110_x_pair_bw | m_cuda_spectral | Subroutine | Step 6 (backward): X paired even/odd recombine |
| process_spectral_110_x_pair_bw_mirror | m_cuda_spectral | Subroutine | Multi-rank counterpart of process_spectral_110_x_pair_bw, see process_spectral_110_x_pair_fw_mirror. |
| process_spectral_110_x_pair_fw | m_cuda_spectral | Subroutine | Step 2 (forward): X paired even/odd split X is dim2 (thread i). Only i in [2, nx/2+1] executes. Writes to i and nx-i+2. Race-free (pair doesn't enter). |
| process_spectral_110_x_pair_fw_mirror | m_cuda_spectral | Subroutine | Multi-rank counterpart of process_spectral_110_x_pair_fw: the X paired split, but the partner mode lives on another rank, reached through the dim2 mirror exchange (see exchange_dim2_mirror). Unlike the single-rank kernel this only updates this rank's own modes; the partner rank updates its own copy the same way. At the global Nyquist mode (even grid size) the mirror partner is this rank's own pre-update value, so the formula below self-pairs it exactly as the single-rank kernel does. |
| process_spectral_110_y_pair_bw | m_cuda_spectral | Subroutine | Step 5 (backward): Y paired even/odd recombine |
| process_spectral_110_y_pair_fw | m_cuda_spectral | Subroutine | Step 3 (forward): Y paired even/odd split Y is dim3 (blockIdx%y = k). Only k in [2, ny/2+1] executes. Writes to k and ny-k+2. Race-free (pair block doesn't enter). |
| process_spectral_110_z_bw | m_cuda_spectral | Subroutine | Step 7 (backward): Z periodic undo |
| process_spectral_fw | m_cuda_spectral | Subroutine | Stage 1 (forward): normalisation followed by the dim3 and dim1 postprocess. Every mode is handled on its own here. |
| process_spectral_pair_bw | m_cuda_spectral | Subroutine | Stage 3 (backward): the dim2 paired recombination, then the dim3 and dim1 postprocess. |
| process_spectral_pair_fw | m_cuda_spectral | Subroutine | Stage 2 (forward): the dim2 paired split, then the Poisson solve. |
| project_forces_adm | m_adm | Subroutine | |
| project_forces_dummy | m_turbine_dummy | Subroutine | |
| pwmul | m_cuda_kernels_fieldops | Subroutine | |
| pwmul | m_omptgt_kernels_fieldops | Subroutine | |
| qcriterion_from_gradients | m_cuda_kernels_fieldops | Subroutine | |
| qcriterion_from_gradients | m_omptgt_kernels_fieldops | Subroutine | |
| quat_rot | m_alm_element | Function | Rotate point |
| query_card_gib | x3d2_memcheck | Subroutine | |
| query_device_memory | m_omptgt_device_info | Subroutine | Memory clock (kHz) and bus width (bits) of OpenMP device |
| read_abl_nml | m_config | Subroutine | |
| read_ad_file | m_adm | Subroutine | Read turbine disc parameters from a |
| read_airfoil | m_alm_airfoil | Subroutine | Read an |
| read_channel_nml | m_config | Subroutine | |
| read_checkpoint_adm | m_adm | Subroutine | |
| read_checkpoint_dummy | m_turbine_dummy | Subroutine | |
| read_checkpoint_nml | m_config | Subroutine | |
| read_config | m_memcheck_context | Subroutine | |
| read_cylinder_nml | m_config | Subroutine | |
| read_domain_nml | m_config | Subroutine | |
| read_inflow_block | m_inflow_planes | Subroutine | Read one block on this rank's y-z subdomain. The arrays are allocated
here as (ntimesteps, ny, nz) on the local VERT dims, and |
| read_inflow_nml | m_config | Subroutine | The namelist is optional: a missing inflow_nml keeps the defaults. |
| read_les_nml | m_config | Subroutine | |
| read_line_geometry | m_alm_element | Subroutine | Read an actuator line geometry ( |
| read_solver_nml | m_config | Subroutine | |
| read_stats_nml | m_config | Subroutine | |
| read_string_attribute | m_io_backend | Function | Read a string attribute of a file. Returns an empty string if the attribute is not in the file. |
| read_string_attribute | m_io_backend | Function | No file can be read without ADIOS2, so there is no attribute |
| read_turbine_file | m_alm_turbine | Subroutine | Read a |
| read_wind_turbine_nml | m_config | Subroutine | |
| redistribute_110_to_yslab | m_cuda_poisson_fft | Subroutine | Redistributes the 110 field from the physical Z-slab (nx, ny, nz_l) to the cuFFTMp Y-slab real view (2*(nz/2+1), nx, ny_l), ahead of the forward transform. See the comment above pack_110_xyz_to_yslab. |
| redistribute_110_to_zslab | m_cuda_poisson_fft | Subroutine | Inverse of redistribute_110_to_yslab, after the backward transform. |
| release_block | m_allocator | Subroutine | Release memory block pointed to by HANDLE to the block list. It is pushed to the front of the block list, in other words it is made the head block. |
| reorder | m_omptgt_kernels_fieldops | Subroutine | Reorders u_i in layout dir_from into u_o in layout dir_to. |
| reorder_base | m_base_backend | Subroutine | reorder subroutines are straightforward, they rearrange data into our specialist data structure so that regardless of the direction tridiagonal systems are solved efficiently and fast. |
| reorder_c2x | m_cuda_kernels_reorder | Subroutine | |
| reorder_cuda | m_cuda_backend | Subroutine | |
| reorder_omp | m_omp_backend | Subroutine | |
| reorder_x2c | m_cuda_kernels_reorder | Subroutine | |
| reorder_x2y | m_cuda_kernels_reorder | Subroutine | |
| reorder_x2z | m_cuda_kernels_reorder | Subroutine | |
| reorder_y2x | m_cuda_kernels_reorder | Subroutine | |
| reorder_y2z | m_cuda_kernels_reorder | Subroutine | |
| reorder_z2x | m_cuda_kernels_reorder | Subroutine | |
| reorder_z2y | m_cuda_kernels_reorder | Subroutine | |
| report | m_memcheck_report | Subroutine | |
| requested_unsupported_reason | m_memcheck_estimate | Function | The reason the nproc_dir of the input file is not supported, blank when it is. The CUDA backend only supports nproc_dir = [1,1,num_gpus]. |
| resolve_field_t | m_omptgt_backend | Subroutine | Views the device storage of |
| resolve_field_t | m_cuda_backend | Subroutine | |
| resolve_gpu_io_mode | m_memcheck_context | Subroutine | Resolves whether snapshot and checkpoint writes stage through a device buffer, with the environment reader the solver uses for the write mode. |
| rotate | m_time_integrator | Subroutine | |
| rotate_line | m_alm_element | Subroutine | Rotate the stations of |
| round_up_bytes | m_memory_estimate | Function | The smallest multiple of step_bytes that is at least n_bytes. |
| run | m_base_case | Subroutine | Runs the solver forwards in time from t=t_0 to t=T, performing postprocessing/IO and reporting diagnostics. |
| run_build_mode | m_memcheck_build | Subroutine | The real build: a case build and one substep on 1 GPU in this process, measured with cudaMemGetInfo. The estimate stands when the num_gpus=1 row is DOES_NOT_FIT or the inputs are not valid. |
| sample_points | m_cuda_kernels_fieldops | Subroutine | vals(1:3, p) = this rank's part of the trilinear interpolation of a, b and c at points(:, p), one thread per point; see field_sample_points. (dx, dy, dz) is the grid spacing, (nx, ny, nz) and (gx, gy, gz) the local and global VERT dims, (ox, oy, oz) the rank offsets and (px, py, pz) flag periodic directions. |
| sample_points | m_omptgt_kernels_fieldops | Subroutine | vals(1:3, p) = this rank's part of the trilinear interpolation of the DIR_X VERT fields a, b and c at points(:, p), one thread per point; see field_sample_points. grid holds the local VERT dims, global VERT dims, rank offsets and periodic flags (1/0), three entries each, then the padded y-block count of the DIR_X layout. |
| scalar_product | m_cuda_kernels_fieldops | Subroutine | |
| scalar_product | m_omptgt_kernels_fieldops | Function | |
| scalar_product_base | m_base_backend | Function | Calculates the scalar product of two input fields |
| scalar_product_cart | m_omptgt_kernels_fieldops | Function | Scalar product of two DIR_C fields, whose storage is the padded Cartesian box n_c with the physical points in 1:dims. |
| scalar_product_cuda | m_cuda_backend | Function | |
| scalar_product_omp | m_omp_backend | Function | |
| seed_rng | m_case_wind_turbine | Subroutine | Deterministic seeding of the intrinsic RNG, distinct for every (rank, start iteration) pair. A fresh run starts at iter = 0. |
| sendrecv_3fields | m_omptgt_sendrecv | Subroutine | |
| sendrecv_3fields | m_cuda_sendrecv | Subroutine | |
| sendrecv_fields | m_omptgt_sendrecv | Subroutine | |
| sendrecv_fields | m_omp_sendrecv | Subroutine | |
| sendrecv_fields | m_cuda_sendrecv | Subroutine | |
| set_curr_fields | m_base_case | Subroutine | Allocates the time integrator field lists and points curr at the solver velocity and species fields. Shared by run() and x3d2-memcheck. |
| set_data_loc | m_field | Subroutine | |
| set_field_data | m_base_backend | Subroutine | |
| set_field_face_data_base | m_base_backend | Subroutine | Write host 2D planes into the face planes of a DIR_X field and touch nothing else. For Y_FACE the planes are (nx, nz) and are written to y = 1 (data_start) and y = ny (data_end). For X_FACE the planes are (ny, nz) and are written to x = 1 (data_start) and x = nx (data_end). data_end is optional, when absent only the start face is written. |
| set_field_face_data_cuda | m_cuda_backend | Subroutine | m_base_backend The host planes are copied to small device arrays and one kernel scatters them into the face planes of the DIR_X field. |
| set_field_face_data_omp | m_omp_backend | Subroutine | |
| set_init | m_base_case | Subroutine | |
| set_log_level | m_logger | Subroutine | Drop messages below |
| set_shape | m_field | Subroutine | |
| set_shape_cuda | m_cuda_allocator | Subroutine | |
| set_turbine_geometry | m_alm_turbine | Subroutine | Build the blades (and tower) at the current azimuth and collective
pitch. Unless |
| setup_field_arrays | m_io_field_utils | Subroutine | |
| setup_output_adm | m_adm | Subroutine | |
| setup_output_dummy | m_turbine_dummy | Subroutine | |
| sgs_stress_from_gradients | m_cuda_kernels_fieldops | Subroutine | |
| sgs_stress_from_gradients | m_omptgt_kernels_fieldops | Subroutine | |
| shifted_z_source | m_base_backend | Function | Global z plane that global plane kg takes its value from in a circular shift by nshift planes |
| slice_max_sum | m_omptgt_kernels_fieldops | Subroutine | Signed maximum and sum of the slice f(:, i_slice, :). |
| slice_max_sum_base | m_base_backend | Subroutine | Reduces a single slice of f at index i_slice along f's DIR axis. Returns signed max (not abs) and signed sum. No division by count. Caller is responsible for MPI_Allreduce across ranks. |
| slice_max_sum_cuda | m_cuda_backend | Subroutine | |
| slice_max_sum_kernel | m_cuda_backend | Subroutine | Reduces a single slice f(i_slice, :, :) (in the kernel's packed-pencil indexing). Signed max/sum, no abs. One thread per (y, z) point. |
| slice_max_sum_omp | m_omp_backend | Subroutine | |
| smagorinsky_from_gradients | m_cuda_kernels_fieldops | Subroutine | |
| smagorinsky_from_gradients | m_omptgt_kernels_fieldops | Subroutine | |
| smagorinsky_nut | m_les | Function | |
| solve_poisson | m_poisson_fft | Subroutine | Gathers each non-periodic line into a periodic one, so that a plain FFT can stand in for the cosine transform, solves in spectral space, and scatters the result back. The 000 case has nothing to reorder and overrides this to transform f in place. |
| solve_poisson_000_cuda | m_cuda_poisson_fft | Subroutine | The 000 case has nothing to reorder, so it transforms f in place. |
| solve_poisson_000_omp | m_omp_poisson_fft | Subroutine | The 000 case has nothing to reorder, so it transforms f in place. |
| solver_t | m_solver | Interface | |
| source_index_boxes | m_base_backend | Subroutine | Global zero-based VERT index box [lo, hi] of the grid points within r_cut of each point, on a uniform grid. In a periodic direction the box is left unclipped, so it may run past either end of the domain; the projection wraps those indices onto the grid, which keeps the whole kernel. In a non-periodic direction it is clipped to the domain, so a kernel crossing an inflow, outflow or wall loses that part, as in Incompact3d. Stops the run if a box is wider than a periodic direction, as the wrapped kernel would then cover points twice. |
| spectral_dirs | m_poisson_fft | Function | The physical direction held in each dimension of the spectral array. The r2c transform runs along dim1, so a case with x non-periodic permutes a periodic direction into dim1 ahead of the FFT: 100 swaps x and y, 110 brings z to the front. |
| spectral_extra_bytes_110 | m_memory_estimate | Function | 110-case bytes on top of the waves_dev slab (never runs at num_gpus>1 in this solver): a SECOND complex array of the same spectral shape n_spec, c_dev (src/backend/cuda/poisson_fft.f90:416-418), plus a real, globally-shaped transposed workspace r_dev_110 (:414), which has the same total element count as cdims, just permuted. |
| spectral_slab_bytes | m_memory_estimate | Function | Bytes of ONE complex spectral array (waves_dev, and c_dev on the plain-cuFFT fallback path) of the shape n_spec. n_spec comes from cuda_fft_spectral_dims in src/backend/cuda/poisson_fft.f90, the routine the solver init calls, so the shape per BC class and per number of ranks is the solver's. Whether a decomposition is valid is checked by cuda_fft_decomp_reason, not here. |
| stagder_1st | m_tdsops | Subroutine | |
| str | m_logger | Interface | |
| strain_rate_magnitude | m_les | Function | |S|=sqrt(2 S_ij S_ij), where S_ij=(du_i/dx_j+du_j/dx_i)/2. |
| stretched_y_matrix_bytes | m_memory_estimate | Function | 010-case, non-uniform y-stretching Poisson coefficient matrices, src/poisson_fft.f90:176-186 (only 010 sets stretched_y, and only at num_gpus=1 since 010 error-stops at nproc>1) and :320-323,424-428 (allocation shapes), copied to the device at src/backend/cuda/poisson_fft.f90:390-411: 'bottom': a_re, a_im, shape (nx_spec, ny_spec, nz_spec, 5), real(dp) otherwise ('centred', 'top-bottom'): a_odd_re/im, a_even_re/im, shape (nx_spec, ny_spec/2, nz_spec, 5), real(dp) doubled by the store_a_*_dev copies when lowmem_fft is .false. (the default). |
| stretching_matrix | m_poisson_fft | Subroutine | Stretching necessitates a special operation in spectral space. The coefficients for the operation are stored in matrix form. |
| stride_data | m_io_field_utils | Function | |
| stride_data_to_buffer | m_io_field_utils | Subroutine | |
| substep | m_base_case | Subroutine | One time-integrator sub-stage: case-specific BCs, transeq, forcings, time integration, case BC re-application, IBM body force, and pressure correction. Extracted from run()'s per-sub-stage loop body so the same allocation path can be driven directly (e.g. by the memory-estimate probe) without going through the full time loop, I/O cadence, or diagnostics. |
| sum_intox | m_omptgt_kernels_fieldops | Subroutine | u += u_d, where u is DIR_X and u_d the same field in layout dir_from. |
| sum_intox_omp | m_omp_backend | Subroutine | |
| sum_yintox | m_cuda_kernels_reorder | Subroutine | |
| sum_yintox_base | m_base_backend | Subroutine | sum_yintox combines a y directional field into the corresponding x directional field. |
| sum_yintox_cuda | m_cuda_backend | Subroutine | |
| sum_yintox_omp | m_omp_backend | Subroutine | |
| sum_zintox | m_cuda_kernels_reorder | Subroutine | |
| sum_zintox_base | m_base_backend | Subroutine | As sum_yintox, for a z directional field. |
| sum_zintox_cuda | m_cuda_backend | Subroutine | |
| sum_zintox_omp | m_omp_backend | Subroutine | |
| supports_device_field_export | m_base_backend | Function | Whether |
| supports_device_field_export_cuda | m_cuda_backend | Function | |
| sync_base | m_base_backend | Subroutine | Waits for outstanding device work. |
| sync_cuda | m_cuda_backend | Subroutine | |
| sync_omp | m_omp_backend | Subroutine | |
| tds_solve_base | m_base_backend | Subroutine | Applies a tridiagonal operator to u, the exact algorithm used being decided at runtime. Backend implementations are responsible from directing calls to tds_solve to the correct algorithm. |
| tds_solve_cuda | m_cuda_backend | Subroutine | |
| tds_solve_dist | m_omp_backend | Subroutine | |
| tds_solve_dist | m_cuda_backend | Subroutine | |
| tds_solve_omp | m_omp_backend | Subroutine | |
| tdsops_init | m_tdsops | Function | Constructor function for the tdsops_t class. |
| tdsops_t | m_tdsops | Interface | |
| thom_solve_base | m_base_backend | Subroutine | As tds_solve, solving the tridiagonal system with the Thomas algorithm. |
| thom_solve_cuda | m_cuda_backend | Subroutine | |
| thom_solve_omp | m_omp_backend | Subroutine | |
| time_intg_t | m_time_integrator | Interface | |
| to_gib | m_memcheck_estimate | Function | Bytes to GiB, the one conversion every printed figure goes through. |
| transeq_3fused_dist | m_omptgt_kernels_dist | Subroutine | First phase for du = d(u), dud = d(u*v) and d2u = d2(u) in one sweep. |
| transeq_3fused_dist | m_cuda_kernels_dist | Subroutine | |
| transeq_3fused_subs | m_omptgt_kernels_dist | Subroutine | Second phase: substitutes back and combines r_du = -1/2(convdu + dud) + nu*d2u. |
| transeq_3fused_subs | m_cuda_kernels_dist | Subroutine | |
| transeq_cuda_dist | m_cuda_backend | Subroutine | |
| transeq_cuda_thom | m_cuda_backend | Subroutine | Thomas algorithm implementation. So much more easier than the distributed algorithm. It is intended to work only on a single rank so there is no MPI communication. |
| transeq_default | m_solver | Subroutine | Skew-symmetric form of convection-diffusion terms in the incompressible Navier-Stokes momentum equations, excluding pressure terms. Inputs from velocity grid and outputs to velocity grid. |
| transeq_lowmem | m_solver | Subroutine | low memory version of the transport equation, roughly %2 slower overall |
| transeq_omp_dist | m_omp_backend | Subroutine | |
| transeq_species | m_solver | Subroutine | Skew-symmetric form of convection-diffusion terms in the species equation. Inputs from velocity grid and outputs to velocity grid. |
| transeq_species_base | m_base_backend | Subroutine | As transeq_x, for a scalar species transported by uvw. |
| transeq_species_cuda | m_cuda_backend | Subroutine | Compute the convection and diffusion for the given field in the given direction. Halo exchange for the given field is necessary When sync is true, halo exchange of momentum is necessary |
| transeq_species_omp | m_omp_backend | Subroutine | Compute the convection and diffusion for the given field in the given direction. Halo exchange for the given field is necessary When sync is true, halo exchange of momentum is necessary |
| transeq_x_base | m_base_backend | Subroutine | transeq equation obtains the derivatives direction by direction, and the exact algorithm used to obtain these derivatives are decided at runtime. Backend implementations are responsible from directing calls to transeq_x into the correct algorithm. |
| transeq_x_cuda | m_cuda_backend | Subroutine | |
| transeq_x_omp | m_omp_backend | Subroutine | |
| transeq_y_base | m_base_backend | Subroutine | As transeq_x, for the y direction. |
| transeq_y_cuda | m_cuda_backend | Subroutine | |
| transeq_y_omp | m_omp_backend | Subroutine | |
| transeq_z_base | m_base_backend | Subroutine | As transeq_x, for the z direction. |
| transeq_z_cuda | m_cuda_backend | Subroutine | |
| transeq_z_omp | m_omp_backend | Subroutine | |
| transpose_xyz_to_zxy | m_cuda_spectral | Subroutine | Used before R2C FFT for 110 case to put Z (periodic) in fast dim. |
| transpose_zxy_to_xyz | m_cuda_spectral | Subroutine | Transpose back: src(nz, nx, ny) -> dst(nx, ny, nz) Used after C2R FFT for 110 case. |
| u_func | m_case_tgv | Function | |
| undo_periodicity | m_poisson_fft | Subroutine | Inverse of enforce_periodicity. |
| undo_periodicity_x | m_cuda_spectral | Subroutine | |
| undo_periodicity_x_cuda | m_cuda_poisson_fft | Subroutine | |
| undo_periodicity_x_omp | m_omp_poisson_fft | Subroutine | Scatters the gathered x line back to its original ordering. |
| undo_periodicity_xy | m_cuda_spectral | Subroutine | Combined X and Y periodicity undo (reverse interleave shuffle). |
| undo_periodicity_xy_cuda | m_cuda_poisson_fft | Subroutine | |
| undo_periodicity_xy_omp | m_omp_poisson_fft | Subroutine | Scatters the gathered x and, when it is not split across ranks, y lines back to their original ordering. |
| undo_periodicity_y | m_cuda_spectral | Subroutine | |
| undo_periodicity_y_cuda | m_cuda_poisson_fft | Subroutine | |
| undo_periodicity_y_omp | m_omp_poisson_fft | Subroutine | |
| unpack_110_yslab | m_cuda_spectral | Subroutine | Unpacks the MPI_Alltoall receive buffer into the padded real view (2(nz/2+1), nx, ny_l) of the cuFFTMp Y-slab descriptor: data received from source rank s reconstructs the global Z range [snz_l+1, (s+1)*nz_l]. |
| unpack_110_yslab_to_xyz | m_cuda_spectral | Subroutine | Inverse of pack_110_xyz_to_yslab: unpacks into the physical Z-slab field block (nx, ny, nz_l). dst must be zeroed by the caller first, as fft_backward_110_cuda already does for the single rank path. |
| update_adm | m_adm | Subroutine | |
| update_dummy | m_turbine_dummy | Subroutine | |
| update_inflow_plane | m_case_abl | Subroutine | Fill bc_start_*_x with the precursor plane for the iteration being computed. The plane is held for every substep of the iteration, as Incompact3d does, so it is uploaded once per iteration. |
| upstream_probe | m_alm_turbine | Function | Probe point for the controlled modes, two radii along -rot_n from the rotor centre (as Incompact3d; for a counterclockwise rotor rot_n points upstream, so the probe lies downstream). |
| usage_error | x3d2_poisson_solver | Subroutine | |
| v_func | m_case_tgv | Function | |
| validate_abl_config | m_config | Subroutine | Validate relationships between ABL namelist values in one place. |
| vecadd_base | m_base_backend | Subroutine | adds two vectors together: y = ax + by |
| vecadd_cuda | m_cuda_backend | Subroutine | |
| vecadd_omp | m_omp_backend | Subroutine | |
| veccopy_base | m_base_backend | Subroutine | copy vectors: y = x |
| veccopy_cuda | m_cuda_backend | Subroutine | |
| veccopy_omp | m_omp_backend | Subroutine | |
| vecmult_base | m_base_backend | Subroutine | pointwise multiplication between two vectors: y(:) = y(:) * x(:) |
| vecmult_cuda | m_cuda_backend | Subroutine | |
| vecmult_omp | m_omp_backend | Subroutine | |
| vector_calculus_t | m_vector_calculus | Interface | |
| vector_norm_squared | m_cuda_kernels_fieldops | Subroutine | |
| vector_norm_squared | m_omptgt_kernels_fieldops | Function | |
| vector_norm_squared_base | m_base_backend | Function | Computes the global discrete squared norm of a three-component field. |
| vector_norm_squared_cuda | m_cuda_backend | Function | Global sum of a2 + b2 + c**2, with one MPI reduction. |
| vector_norm_squared_omp | m_omp_backend | Function | Global sum of a2 + b2 + c**2, with one MPI reduction. |
| volume_integral | m_cuda_kernels_fieldops | Subroutine | |
| volume_integral | m_omptgt_kernels_fieldops | Function | |
| vorticity_from_gradients | m_cuda_kernels_fieldops | Subroutine | |
| vorticity_from_gradients | m_omptgt_kernels_fieldops | Subroutine | |
| wall_damped_mixing_length | m_les | Function | Mason-Thomson blend used by Incompact3d's ABL Smagorinsky path. |
| warn_if_rhs_mean_nonzero | x3d2_poisson_solver | Subroutine | Warn on rank 0 if the right-hand side does not have zero mean. The solver needs a zero-mean right-hand side for these boundary conditions. It discards the mean component. The solve runs in both cases. |
| wave_numbers | m_poisson_fft | Subroutine | |
| waves_set | m_poisson_fft | Subroutine | Spectral equivalence constants |
| wrapped_local | m_omp_backend | Function | Local one-based index of the zero-based global VERT index g, wrapped when periodic; 0 when it is off this rank or outside the domain. |
| write_checkpoint_adm | m_adm | Subroutine | |
| write_checkpoint_dummy | m_turbine_dummy | Subroutine | |
| write_line_loads | m_alm_output | Subroutine | Append the element loads of |
| write_output_adm | m_adm | Subroutine | |
| write_output_dummy | m_turbine_dummy | Subroutine | |
| write_single_field_to_buffer | m_io_field_utils | Subroutine | |
| write_step | m_monitoring | Subroutine | Computes and reports monitoring quantities, writing to both stdout and the monitoring file. Kinetic energy: Enstrophy: Divergence: max and mean (should be ~0) |
| x_slice_weighted_sum | m_omptgt_kernels_fieldops | Subroutine | Sum of the slice f(:, i_slice, :) with the weight w(j) on the points of stacked index j. |
| x_slice_weighted_sum_base | m_base_backend | Subroutine | Weighted sum of the x slice f(i_slice, :, :) of a DIR_X field: the point with local y index j counts y_weights(j) times. Gives the flow rate through an x face as the discrete divergence sees it, whose y interpolation weights the boundary planes differently from the interior ones. Caller is responsible for MPI_Allreduce across ranks. |
| x_slice_weighted_sum_cuda | m_cuda_backend | Subroutine | |
| x_slice_weighted_sum_kernel | m_cuda_backend | Subroutine | Weighted sum of the x slice f(:, i_slice, :) of a DIR_X field, w(j) on the points of y index j. One thread per (y, z) point; z is the fast-varying component of the group index. |
| x_slice_weighted_sum_omp | m_omp_backend | Subroutine | |
| y_group_stride | m_omp_backend | Function | Groups between successive z in the OMP DIR_X ordering, group = stride*(z - 1) + y_block. It is the padded y-block count (see get_index_dir in m_ordering), so it can exceed the number of y-blocks a field uses, e.g. a cell field on a non-periodic y. |