Geometry
GridapDistributed.DistributedDiscreteModel
— TypeGridapDistributed.DistributedFaceLabeling
— TypeGridapDistributed.DistributedGrid
— TypeGridapDistributed.DistributedGridTopology
— TypeGridapDistributed.DistributedTriangulation
— TypeGridapDistributed.GenericDistributedDiscreteModel
— TypeMacroDiscreteModels
These are functionalities to select and globally number the interfaces between processors:
GridapDistributed.MacroDiscreteModel
— Typestruct MacroDiscreteModel{Dc,Dp} <: DistributedDiscreteModel{Dc,Dp}
DistributedModel of the interfaces between the processors.
Each d-interface is given as an agglomeration of d-faces, and a global numbering is produced for the interfaces.
Constructors:
MacroDiscreteModel(model::DistributedDiscreteModel)
Visualizing the interfaces:
Interfaces have two different numberings. One is local to each processor, and the other is global and consistent across all processors. To extract and visualize the interfaces, you can use the following functions:
get_local_face_labeling(macro_model::MacroDiscreteModel{Dc})
get_global_face_labeling(macro_model::MacroDiscreteModel{Dc})
writevtk_local(macro_model::MacroDiscreteModel{Dc},filename::String;vtk_kwargs...)
writevtk_global(macro_model::MacroDiscreteModel{Dc},filename::String;vtk_kwargs...)
GridapDistributed.classify_interfaces
— MethodReturns a JaggedArray of JaggedArrays such that we have
[interface dimension][interface lid][face dimension] -> interface dfaces lids
I.e we bundle interfaces of the same dimension together (macro-faces, macro-edges, macro-nodes), and for each interface we return a JaggedArray with the d-faces in the interface.
If sort_faces
is true, the faces in each interface are sorted by gid. If false, the faces are by default sorted by lid.
GridapDistributed.generate_interface_gids
— Methodfunction generate_interface_gids(nbors,keys) -> gids
Generates a global numbering for the interfaces, given two input arrays per processor:
- `nbors`: For each interface, the minimum rank of the neighboring processors.
- `keys`: For each interface, the minimum gid of the faces in the interface.
Then the gids are assigned in the following way: We iterate over the processors in ascending order. For each processor, we iterate over the local interfaces. Then:
- If the `nbor` processor of an interface has a higher (or equal) rank than the current processor, it means we
haven't assigned a gid to that interface yet. So we assign a new gid to the current interface.
- If the `nbor` processor of an interface has a lower rank than the current processor, it means we
already assigned a gid to that interface (while iterating over `nbor`). So we look for a matching `key`
in the `keys` array of the `nbor` processor, and assign the same gid to the current interface.
GridapDistributed.generate_nbors_and_keys
— MethodGiven a model and a set of local interfaces for each model, returns - nbors
: For each interface, the minimum rank of the neighboring processors. - keys
: For each interface, the minimum gid of the faces in the interface.
Options:
is_sorted
: If true, the keys are assumed to be sorted by gid. This allows some optimization.dimensions
: List/Set of interface dimensions to be considered.
GridapDistributed.get_global_face_labeling
— MethodReturns a global (consistent) face labeling for the macro model. Requires communication.
The face labeling contains the following tags: - Interior_i
: Faces which are interior to processor i
. - Interface_j
: Faces which belong to interface j
(global id). - Interiors
: Union of all Interior_i
tags. - Interfaces
: Union of all Interface_j
tags.
GridapDistributed.get_local_face_labeling
— MethodReturns a local face labeling for the macro model. Does not require communication. WARNING: This is NOT consistent, it is sub-assembled. The same face might have different labels in different processors.
The face labeling contains the following tags: - Interior
: Faces which are interior to the processor. - Exterior
: Faces which are exterior to the processor. - Interface_i
: Faces which belong to interface i
(local id). - Interfaces
: Union of all Interface_i
tags.