Namespace for helper functions for LinearAlgebraDistributions. More...
Functions | |
void | concatenate (const Vector< LinearAlgebraDistribution * > &in_distribution_pt, LinearAlgebraDistribution &out_distribution) |
Takes a vector of LinearAlgebraDistribution objects and concatenates them such that the nrow_local of the out_distribution is the sum of the nrow_local of all the in_distributions and the number of global rows of the out_distribution is the sum of the number of global rows of all the in_distributions. This results in a permutation of the rows in the out_distribution. Think of this in terms of DoubleVectors, if we have DoubleVectors with distributions A and B, distributed across two processors (p0 and p1), A: [a0] (on p0) B: [b0] (on p0) [a1] (on p1) [b1] (on P1),. More... | |
Namespace for helper functions for LinearAlgebraDistributions.
void oomph::LinearAlgebraDistributionHelpers::concatenate | ( | const Vector< LinearAlgebraDistribution * > & | in_distribution_pt, |
LinearAlgebraDistribution & | out_distribution | ||
) |
Takes a vector of LinearAlgebraDistribution objects and concatenates them such that the nrow_local of the out_distribution is the sum of the nrow_local of all the in_distributions and the number of global rows of the out_distribution is the sum of the number of global rows of all the in_distributions. This results in a permutation of the rows in the out_distribution. Think of this in terms of DoubleVectors, if we have DoubleVectors with distributions A and B, distributed across two processors (p0 and p1), A: [a0] (on p0) B: [b0] (on p0) [a1] (on p1) [b1] (on P1),.
then the out_distribution is [a0 (on p0) b0] (on p0) [a1 (on p1) b1] (on p1),
as opposed to [a0 (on p0) a1] (on p0) [b0 (on p1) b1] (on p1).
Note (1): The out_distribution may not be uniformly distributed even if the in_distributions are uniform distributions. Try this out with two distributions of global rows 3 and 5, uniformly distributed across two processors. Compare this against a distribution of global row 8 distributed across two processors.
Note (2): There is no equivalent function which takes a Vector of LinearAlgebraDistribution objects (as opposed to pointers), there should not be one since we do not want to invoke the assignment operator when creating the Vector of LinearAlgebraDistribution objects.
Definition at line 367 of file linear_algebra_distribution.cc.
References oomph::LinearAlgebraDistribution::build(), and oomph::LinearAlgebraDistribution::built().
Referenced by oomph::DoubleVectorHelpers::concatenate_without_communication(), oomph::CRDoubleMatrixHelpers::concatenate_without_communication(), oomph::BlockPreconditioner< MATRIX >::get_concatenated_block(), oomph::BlockPreconditioner< MATRIX >::setup_matrix_vector_product(), and oomph::DoubleVectorHelpers::split_without_communication().