template<int dim, typename DataType>
class parallel::distributed::ContinuousQuadratureDataTransfer< dim, DataType >
A class for the transfer of continuous data stored at quadrature points when performing h-adaptive refinement of parallel::distributed::Triangulation .
This class implements the transfer of the quadrature point data between cells in case of adaptive refinement using L2 projection. That also includes automatic shipping of information between different processors.
To that end, the constructor of the class is provided with three main objects: scalar FiniteElement
data_quadrature Quadrature rules. First, the data located at
data_quadrature of each cell is L2-projected to the continuous space defined by a single FiniteElement
projection_fe . This is achieved using FETools::compute_projection_from_quadrature_points_matrix(). In doing so the mass matrix of this element is required, which will be calculated with the
mass_quadrature rule . Should the cell now belong to another processor, the data is then sent to this processor. The class makes use of a feature of p4est (and parallel::distributed::Triangulation) that allows one to attach information to cells during mesh refinement and rebalancing. On receiving information on the target cell, the data is projected back to the quadrature points using the matrix calculated by FETools::compute_interpolation_to_quadrature_points_matrix() . In the case that local refinement is performed, this class first project local DoF values of the parent element to each child.
This class is templated by
DataType type, however the user's
DataType class has to be derived from the TransferableQuadraturePointData class. In practice that amounts to implementing the following three functions shown below for a quadrature point data with 2 scalars:
unsigned int number_of_values() const
void pack_values(std::vector<double> &values) const
scalars = elasticity_parameter_lambda;
scalars = elasticity_parameter_mu;
void unpack_values(const std::vector<double> &values)
elasticity_parameter_lambda = scalars;
elasticity_parameter_mu = scalars;
Note that the order of packing and unpacking has to be the same.
This class can then be use with CellDataStorage in the following way:
This approach can be extended to quadrature point data with Tensors of arbitrary order, although with a little bit more work in packing and unpacking of data inside MyQData class.
- Currently coarsening is not supported.
The functionality provided by this class can alternatively be achieved using parallel::distributed::SolutionTransfer. However, that would require the following steps: (i) create an auxiliary DoFHandler with a (discontinuous Galerkin) FiniteElement which has enough components to represent all data stored at the quadrature points; (ii) project the data to the FiniteElement space and thereby store results in global vectors; (iii) use parallel::distributed::SolutionTransfer to project FE vectors to the new mesh; and (iv) finally project the data back to the quadrature points on the new mesh via FEValues class. The ContinuousQuadratureDataTransfer class aims at simplifying the whole process by only requiring that the quadrature point data class is derived from the TransferableQuadraturePointData. Everything else will be done automatically.
This class is not well suited to situations where the values stored at quadrature points represent samples from a discontinuous field. An example for such a situation would be where the data stored at the quadrature points represents the elastic or plastic state of a material, i.e., a property that varies discontinuously within a solid. In such cases, trying to transfer data from the quadrature points to a finite element field that is continuous (at least within one cell) will likely yield over and undershoots that, once evaluated at a different set of quadrature points (on child or parent cells) results in values that will not make much sense.
- Denis Davydov, Jean-Paul Pelteret, 2016
Definition at line 326 of file quadrature_point_data.h.