11#ifndef lethe_qmom_field_function_h
12#define lethe_qmom_field_function_h
16#include <deal.II/base/exceptions.h>
17#include <deal.II/base/function.h>
18#include <deal.II/base/point.h>
20#include <deal.II/lac/vector.h>
32 QMOMWithoutQMOMKitError,
33 "The \"qmom\" physics is enabled, but Lethe was compiled without QMOMKit. "
34 "Reconfigure Lethe with -DLETHE_WITH_QMOMKIT=ON and "
35 "-DQMOMKIT_DIR=/path/to/qmomkit/installation to use this physics.");
80 const std::string &description);
96 value(
const Point<dim> &p,
const unsigned int component)
const override;
108 vector_value(
const Point<dim> &p, Vector<double> &values)
const override;
119 scalar_values(
const Point<dim> &p, Vector<double> &values)
const;
130 moment_values(
const Point<dim> &p, Vector<double> &values)
const;
138 set_time(
const double new_time)
override;
double value(const Point< dim > &p, const unsigned int component) const override
Evaluate one component of the function: scalar component if component < n_scalars,...
void vector_value(const Point< dim > &p, Vector< double > &values) const override
Evaluate all the components of the function. The moments are computed once for all of them.
Parameters::QMOMFunctions< dim > functions
Functions of the scalars and particle size distribution.
const unsigned int n_scalars
Number of scalars.
void moment_values(const Point< dim > &p, Vector< double > &values) const
Evaluate the moments only, indexed from 0 regardless of the scalars. The moments are computed once fo...
void set_time(const double new_time) override
Set the time of the function and of the underlying functions.
QMOMFieldFunction(const Parameters::QMOMFunctions< dim > &functions, const unsigned int n_scalars, const unsigned int n_moments, const std::string &description)
Constructor. Verifies that the scalars function has one component per scalar, unless there are no sca...
const unsigned int n_moments
Number of moments.
std::vector< double > compute_moments(const Point< dim > &p) const
Compute the raw moments of the particle size distribution at a point.
void scalar_values(const Point< dim > &p, Vector< double > &values) const
Evaluate the scalars only, indexed from 0 regardless of the moments.
DeclExceptionMsg(QMOMWithoutQMOMKitError, "The \"qmom\" physics is enabled, but Lethe was compiled without QMOMKit. " "Reconfigure Lethe with -DLETHE_WITH_QMOMKIT=ON and " "-DQMOMKIT_DIR=/path/to/qmomkit/installation to use this physics.")
Exception thrown when the QMOM physics is enabled but Lethe was not linked with QMOMKit.
Functions of space and time prescribing the fields of the QMOM physics. They are used for the initial...