From 51ebcb4be89194b9832528f9f0f710b83841701a Mon Sep 17 00:00:00 2001 From: Jonathan Perry-Houts Date: Tue, 20 Oct 2015 15:46:50 -0700 Subject: [PATCH] Add erfc function to FunctionParser. --- source/base/function_parser.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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