Reference documentation for deal.II version 9.3.3
|
#include <deal.II/distributed/cell_data_transfer.h>
Static Public Member Functions | |
static VectorType::value_type | check_equality (const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &parent, const VectorType &input_vector) |
static VectorType::value_type | sum (const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &parent, const VectorType &input_vector) |
static VectorType::value_type | mean (const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &parent, const VectorType &input_vector) |
When data is transferred during coarsening, it is not trivial to decide how to handle data of child cells which will be coarsened. Or in other words, which data should be stored in the corresponding parent cell.
In this struct, we offer a few strategies that cope with this problem. Such strategies can be passed to the CellDataTransfer and parallel::distributed::CellDataTransfer constructors.
Definition at line 147 of file cell_data_transfer.h.
|
inlinestatic |
Check if data on all children match, and return value of the first child.
\[ d_{K_p} = d_{K_c} \qquad \forall K_c \text{ children of } K_p \]
Definition at line 155 of file cell_data_transfer.h.
|
inlinestatic |
Return the sum over all processors of the value t
. This function is collective over all processors given in the communicator. If deal.II is not configured for use of MPI, this function simply returns the value of t
. This function corresponds to the MPI_Allreduce
function, i.e. all processors receive the result of this operation.
MPI_Reduce
function instead of the MPI_Allreduce
function. The latter is at most twice as expensive, so if you are concerned about performance, it may be worthwhile investigating whether your algorithm indeed needs the result everywhere.T
, namely float, double, int, unsigned int
.Definition at line 179 of file cell_data_transfer.h.
|
inlinestatic |
The function or difference of functions is integrated on each cell \(K\):
\[ E_K = \int_K \sum_c (\hat{f}_c - f_c) \, w_c = \int_K \sum_c e_c \, w_c \]
and summed up to get
\[ E = \sum_K E_K = \int_\Omega \sum_c (\hat{f}_c - f_c) \, w_c \]
or, for \(w \equiv 1\):
\[ E = \int_\Omega (\hat{f} - f) = \int_\Omega e. \]
Note: This differs from what is typically known as the mean of a function by a factor of \(\frac{1}{|\Omega|}\). To compute the mean you can also use compute_mean_value(). Finally, pay attention to the sign: if \(\hat{f}=0\), this will compute the negative of the mean of \(f\).
Definition at line 199 of file cell_data_transfer.h.