Prolong from a parent to a child with index offset dix. This method could sometimes work better than the default prolongation, which does not take the variation in epsilon into account Initialize MPI if needed, and store MPI information
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mg_t), | intent(inout) | :: | mg | |||
| integer, | intent(in), | optional | :: | comm |
MPI communicator (default: MPI_COMM_WORLD) |
subroutine mg_comm_init(mg, comm) use mpi type(mg_t), intent(inout) :: mg !> MPI communicator (default: MPI_COMM_WORLD) integer, intent(in), optional :: comm integer :: ierr logical :: initialized call mpi_initialized(initialized, ierr) if (.not. initialized) then call mpi_init(ierr) end if if (present(comm)) then mg%comm = comm else mg%comm = MPI_COMM_WORLD end if call mpi_comm_rank(mg%comm, mg%my_rank, ierr) call mpi_comm_size(mg%comm, mg%n_cpu, ierr) end subroutine mg_comm_init