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