From: Jonathan Perry-Houts Date: Tue, 20 Oct 2015 22:46:50 +0000 (-0700) Subject: Add erfc function to FunctionParser. X-Git-Tag: v8.4.0-rc2~255^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51ebcb4be89194b9832528f9f0f710b83841701a;p=dealii.git Add erfc function to FunctionParser. --- diff --git a/source/base/function_parser.cc b/source/base/function_parser.cc index 25ffd17e81..badd034b01 100644 --- a/source/base/function_parser.cc +++ b/source/base/function_parser.cc @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef DEAL_II_WITH_MUPARSER @@ -170,6 +171,11 @@ namespace internal { return std::pow(a, b); } + + double mu_erfc(double value) + { + return erfc(value); + } } @@ -208,6 +214,7 @@ void FunctionParser:: init_muparser() const fp.get()[component].DefineFun("sec", internal::mu_sec, true); fp.get()[component].DefineFun("log", internal::mu_log, true); fp.get()[component].DefineFun("pow", internal::mu_pow, true); + fp.get()[component].DefineFun("erfc", internal::mu_erfc, true); try { @@ -257,7 +264,8 @@ void FunctionParser:: init_muparser() const "csc", "floor", "sec", - "pow" + "pow", + "erfc" }; for (unsigned int f=0; f