![]() |
ASPECT
|
Functions | |
std::string | get_averaging_operation_names () |
AveragingOperation | parse_averaging_operation_name (const std::string &s) |
template<int dim> | |
void | average (const AveragingOperation operation, const typename DoFHandler< dim >::active_cell_iterator &cell, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping, MaterialModelOutputs< dim > &values_out) |
void | average_property (const AveragingOperation operation, const FullMatrix< double > &projection_matrix, const FullMatrix< double > &expansion_matrix, std::vector< double > &values_out) |
A namespace in which we define how material model outputs should be averaged on each cell.
Material models compute output quantities such as the viscosity, the density, etc, based on pressures, temperatures, composition, and location at every quadrature point. For some models, these values vary drastically from quadrature point to quadrature point, and this creates difficulties both for the stability of the discretization as well as for the linear solvers. Some of this can be ameliorated by averaging values on every cell, although this of course reduces the ideal convergence order. This namespace defines the means to achieve such averaging.
An enum to define what kind of averaging operations are implemented. These are:
\[ \bar x = \frac 1Q \sum_{q=1}^Q x_q \]
where \(x_q\) are the values at the \(Q\) quadrature points.\[ \bar x = \left(\frac 1Q \sum_{q=1}^Q \frac{1}{x_q}\right)^{-1} \]
where \(x_q\) are the values at the \(Q\) quadrature points.\[ \bar x = \left(\prod_{q=1}^Q x_q\right)^{1/Q} \]
where \(x_q\) are the values at the \(Q\) quadrature points.\[ \bar x = \max_{1\le q\le Q} x_q \]
where \(x_q\) are the values at the \(Q\) quadrature points.\[ \bar x = {10}^{\frac 1Q \sum_{q=1}^Q \log_{10} x_q} \]
where \(x_q\) are the values at the \(Q\) quadrature points.Definition at line 693 of file interface.h.
std::string aspect::MaterialModel::MaterialAveraging::get_averaging_operation_names | ( | ) |
Return a string that represents the various averaging options laid out above and that can be used in the declaration of an input parameter. The options are separated by "|" so that they can be used in a ::Patterns::Selection argument.
AveragingOperation aspect::MaterialModel::MaterialAveraging::parse_averaging_operation_name | ( | const std::string & | s | ) |
Parse a string representing one of the options returned by get_averaging_operation_names(), and return the corresponding AveragingOperation value.
void aspect::MaterialModel::MaterialAveraging::average | ( | const AveragingOperation | operation, |
const typename DoFHandler< dim >::active_cell_iterator & | cell, | ||
const Quadrature< dim > & | quadrature_formula, | ||
const Mapping< dim > & | mapping, | ||
MaterialModelOutputs< dim > & | values_out | ||
) |
Given the averaging operation
, a description of where the quadrature points are located on the given cell, and a mapping, perform this operation on all elements of the values
structure.
Referenced by aspect::Postprocess::VisualizationPostprocessors::average_quantities().
void aspect::MaterialModel::MaterialAveraging::average_property | ( | const AveragingOperation | operation, |
const FullMatrix< double > & | projection_matrix, | ||
const FullMatrix< double > & | expansion_matrix, | ||
std::vector< double > & | values_out | ||
) |
Do the requested averaging operation for one array. The projection matrix argument is only used if the operation chosen is project_to_Q1