31 :
Flux(
"function", subsection)
33 expression_ =
"0.5*u*u";
34 add_parameter(
"expression",
36 "A function expression of the flux as a function of "
37 "state used to create a muparser object to evaluate the "
38 "flux. For two, or three dimensional fluxes, components "
39 "are separated with a semicolon (;).");
42 add_parameter(
"derivative approximation delta",
44 "Step size of the central difference quotient to compute "
45 "an approximation of the flux derivative");
51 const auto set_up_muparser = [
this] {
52 std::vector<std::string> split_expressions;
53 boost::split(split_expressions, expression_, boost::is_any_of(
";"));
55 const auto size = split_expressions.size();
57 Assert(0 < size && size <= 3,
59 "user specified flux description must be either one, two, "
60 "or three strings separated by a comma"));
61 flux_function_ = std::make_unique<dealii::FunctionParser<1>>(
63 flux_function_->initialize({
"u"}, split_expressions, {});
69 ParameterAcceptor::parse_parameters_call_back.connect(set_up_muparser);