fem.partitioning#
Functions#
|
Compute the connectivity of the multipatch domain. |
Create the fem spaces for each interface in the domain given by the connectivity. |
|
|
Create the reduced spaces for the interface coefficients. |
|
Compute the cartesian decomposition of the coefficient space. |
|
Compute the coefficients needed by the minus patch in a given interface. |
|
Compute the coefficients needed by the plus patch in a given interface. |
|
Partition the coefficients starting from the grid decomposition. |
Details#
- partition_coefficients(domain_decomposition, spaces, min_blocks=None)[source]#
Partition the coefficients starting from the grid decomposition.
- Parameters:
- domain_decomposition: DomainDecomposition
The distributed topological domain.
- spaces: list of SplineSpace
The 1d spline spaces that construct the tensor fem space.
- min_blocks: list of int
The minimum number of coefficients owned by a process.
- Returns:
- global_starts: list of list of int
The starts of the coefficients for every process along each direction.
- global_ends: list of list of int
The ends of the coefficients for every process along each direction.
- construct_connectivity(domain)[source]#
Compute the connectivity of the multipatch domain.
- Parameters:
- domainSympde.topology.Domain
The multipatch domain.
- Returns:
- connectivitydict
Connectivity between the patches. It takes the form of {(i, j):((axis_i, ext_i),(axis_j, ext_j))} for each item of the dictionary, where i,j represent the patch indices
- get_minus_starts_ends(plus_starts, plus_ends, minus_npts, plus_npts, minus_axis, plus_axis, minus_ext, plus_ext, minus_pads, plus_pads, minus_shifts, plus_shifts, diff)[source]#
Compute the coefficients needed by the minus patch in a given interface.
- get_plus_starts_ends(minus_starts, minus_ends, minus_npts, plus_npts, minus_axis, plus_axis, minus_ext, plus_ext, minus_pads, plus_pads, minus_shifts, plus_shifts, diff)[source]#
Compute the coefficients needed by the plus patch in a given interface.
- create_cart(domain_decomposition, spaces)[source]#
Compute the cartesian decomposition of the coefficient space. Two different cases are possible:
- Single patch :
We distribute the coefficients using all the processes provided by the given communicator.
- Multiple patches :
We decompose the provided communicator in a list of smaller disjoint intra-communicators, and decompose the coefficients of each patch with an assigned intra-communicator.
- Parameters:
- domain_decompositionDomainDecomposition | tuple of DomainDecomposition
- spaceslist of list of 1D global Spline spaces
The 1D global spline spaces that will be distributed.
- Returns:
- carttuple of CartDecomposition
Cartesian decomposition of the coefficient space for each patch in the domain.
- construct_interface_spaces(domain_decomposition, g_spaces, carts, interiors, connectivity)[source]#
Create the fem spaces for each interface in the domain given by the connectivity.
- Parameters:
- domain_decompositionDomainDecomposition
- g_spacesdict
dictionary that contains the tensor-fem space for each patch.
- cart: <CartDecomposition|MultiCartDecomposition>
Cartesian decomposition of the coefficient space.
- interiors: list of Sympde.topology.Domain
List of the multipatch domain interiors.
- connectivity: dict
The connectivity of the multipatch domain.
- construct_reduced_interface_spaces(spaces, reduced_spaces, interiors, connectivity)[source]#
Create the reduced spaces for the interface coefficients.
- Parameters:
- spaces: dict
The tensor FEM spaces that we want to reduce for each patch.
- reduced_spaces: dict
The reduced coefficient space for each patch.
- interiors: list of Sympde.topology.Domain
The patches that construct the multipatch domain.
- connectivity: dict
The connectivity of the multipatch domain.