pub enum ParticleDensityComputationStrategy {
Global,
SynchronizeSubdomains,
IndependentSubdomains,
}
Expand description
Available strategies for the computation of the particle densities
Variants§
Global
Compute the particle densities globally before performing domain decomposition.
With this approach the particle densities are computed globally on all particles before any domain decomposition is performed.
This approach is guaranteed to lead to consistent results and does not depend on the following decomposition. However, it is also by far the slowest method as global operations (especially the global neighborhood search) are much slower.
SynchronizeSubdomains
Compute particle densities for all particles locally followed by a synchronization step.
This is the recommended approach. The particle densities will be evaluated for all particles per subdomain, possibly in parallel. Afterwards, the values for all non-ghost particles are written to a global array. This happens in a separate step before performing any reconstructions For the following reconstruction procedure, each subdomain will update the densities of its ghost particles from this global array. This ensures that all ghost-particles receive correct density values without requiring to double the width of the ghost-particle margin just to ensure correct values for the actual inner ghost-particles (i.e. in contrast to the completely local approach).
The actual synchronization overhead is relatively low and this approach is often the fastest method.
This approach should always lead consistent results. Only in very rare cases when a particle is not uniquely assigned during domain decomposition this might lead to problems. If you encounter such problems with this approach please report it as a bug.
IndependentSubdomains
Compute densities locally per subdomain without global synchronization.
The particle densities will be evaluated per subdomain on-the-fly just before the reconstruction of the subdomain happens. In order to compute correct densities for the ghost particles of each subdomain it is required that the ghost-particle margin is at least two times the kernel compact support radius. This may add a lot of additional ghost-particles to each subdomain.
If the ghost-particle margin is not set wide enough, this may lead to density differences on subdomain boundaries. Otherwise this approach robust with respect to the classification of particles into the subdomains.
Trait Implementations§
source§impl Clone for ParticleDensityComputationStrategy
impl Clone for ParticleDensityComputationStrategy
source§fn clone(&self) -> ParticleDensityComputationStrategy
fn clone(&self) -> ParticleDensityComputationStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Copy for ParticleDensityComputationStrategy
Auto Trait Implementations§
impl RefUnwindSafe for ParticleDensityComputationStrategy
impl Send for ParticleDensityComputationStrategy
impl Sync for ParticleDensityComputationStrategy
impl Unpin for ParticleDensityComputationStrategy
impl UnwindSafe for ParticleDensityComputationStrategy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.