pub struct DecomposedDomain<I, S, C> {
pub n_subdomains: NonZeroUsize,
pub index_subdomain_cells: Vec<(I, S, Vec<C>)>,
pub neighbor_map: BTreeMap<I, BTreeSet<I>>,
pub rng_seed: u64,
}
Expand description
Generated by the decompose method. The backend will know how to deal with this type and crate a working simulation from it.
Fields§
§n_subdomains: NonZeroUsize
Number of spawned SubDomains. This number is guaranteed to be smaller or equal to the number may be different to the one given to the Domain::decompose method. Such behaviour can result from not being able to construct as many subdomains as desired. Note that this function will attempt to construct more SubDomains than available CPUs if given a larger number.
index_subdomain_cells: Vec<(I, S, Vec<C>)>
Vector containing properties of individual SubDomains. Entries are Domain::SubDomainIndex, SubDomain, and a vector of cells.
neighbor_map: BTreeMap<I, BTreeSet<I>>
Encapsulates how the subdomains are linked to each other. Eg. two subdomains without any boundary will never appear in each others collection of neighbors. For the future, we might opt to change to an undirected graph rather than a BTreeMap.
rng_seed: u64
Initial seed of the simulation for random number generation.