mod_mpi_radiation Module

MPI infrastructure for the radiation solver.

This module manages the parallel execution of the radiation transport solver. Unlike the flow solver which uses a replicated mesh, the radiation solver can be configured with its own communicator and task decomposition logic (e.g., distributing rays or discrete ordinates).



Derived Types

type, public ::  radiation_mpi_t

MPI context for radiation operations.

Components

Type Visibility Attributes Name Initial
type(MPI_Comm), public :: comm = MPI_COMM_NULL
integer, public :: first_task = 0
integer, public :: first_wavenumber = 0
integer, public :: last_task = -1
integer, public :: last_wavenumber = -1
integer, public :: nlocal_tasks = 0
integer, public :: nlocal_wavenumbers = 0
integer, public :: nprocs = 0
integer, public :: rank = -1

Subroutines

public subroutine radiation_configure_spectral(rad, n_wavenumbers)

Configure spectral radiation decomposition.

Read more…

Arguments

Type IntentOptional Attributes Name
type(radiation_mpi_t), intent(inout) :: rad
integer, intent(in) :: n_wavenumbers

public subroutine radiation_mpi_finalize(rad)

Releases radiation MPI resources.

Arguments

Type IntentOptional Attributes Name
type(radiation_mpi_t), intent(inout) :: rad

public subroutine radiation_mpi_initialize(rad, comm_parent, n_tasks)

Initializes the radiation MPI context by duplicating a parent communicator.

Arguments

Type IntentOptional Attributes Name
type(radiation_mpi_t), intent(inout) :: rad

The radiation context to initialize.

type(MPI_Comm), intent(in) :: comm_parent

The parent communicator (usually MPI_COMM_WORLD).

integer, intent(in), optional :: n_tasks

Optional total number of tasks to decompose immediately.

public subroutine radiation_task_bounds(rad, n_tasks)

Performs contiguous task decomposition for the radiation solver.

Arguments

Type IntentOptional Attributes Name
type(radiation_mpi_t), intent(inout) :: rad

The radiation context to update.

integer, intent(in) :: n_tasks

Total number of discrete tasks (e.g., rays).

private subroutine check_mpi(ierr, where)

Internal helper for MPI error checking.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ierr
character(len=*), intent(in) :: where