Adaptivity

GridapDistributed.RedistributeGlueType

RedistributeGlue

Glue linking two distributions of the same mesh.

  • new_parts: Array with the new part IDs (and comms)
  • old_parts: Array with the old part IDs (and comms)
  • parts_rcv: Array with the part IDs from which each part receives
  • parts_snd: Array with the part IDs to which each part sends
  • lids_rcv : Local IDs of the entries that are received from each part
  • lids_snd : Local IDs of the entries that are sent to each part
  • old2new : Mapping of local IDs from the old to the new mesh
  • new2old : Mapping of local IDs from the new to the old mesh
source
GridapDistributed.redistributeMethod

Redistributes an DistributedDiscreteModel to optimally rebalance the loads between the processors. Returns the rebalanced model and a RedistributeGlue instance.

source
GridapDistributed.redistribute_cartesianMethod
redistribute_cartesian(old_model,new_ranks,new_parts)
redistribute_cartesian(old_model,pdesc::DistributedCartesianDescriptor)

Redistributes a DistributedCartesianDiscreteModel to a new set of ranks and parts. Only redistributes into a superset of the old_model ranks (i.e. towards more processors).

source
GridapDistributed.refine_cell_gidsMethod
refine_cell_gids(
  cmodel::DistributedDiscreteModel{Dc},
  fmodels::AbstractArray{<:DiscreteModel{Dc}}
) where Dc

Given a coarse model and it's local refined models, returns the gids of the fine model. The gids are computed as follows:

  • First, we create a global numbering for the owned cells by adding an owner-based offset to the local cell ids (such that cells belonging to the first processor are numbered first). This is quite standard.
  • The complicated part is making this numeration consistent, i.e communicating gids of the ghost cells. To do so, each processor selects it's ghost fine cells, and requests their global ids by sending two keys:
    1. The global id of the coarse parent
    2. The child id of the fine cell
source
GridapDistributed.refine_local_modelsMethod
refine_local_models(cmodel::DistributedDiscreteModel{Dc},args...;kwargs...) where Dc

Given a coarse model, returns the locally refined models. This is done by

  • refining the local models serially
  • filtering out the extra fine layers of ghosts

We also return the ids of the owned fine cells.

To find the fine cells we want to keep, we have the following criteria:

  • Given a fine cell, it is owned iff A) It's parent cell is owned
  • Given a fine cell, it is a ghost iff not(A) and B) It has at least one neighbor with a non-ghost parent

Instead of checking A and B, we do the following:

  • We mark fine owned cells by checking A
  • If a cell is owned, we set it's fine neighbors as owned or ghost
source