Plugins
Loading...
Searching...
No Matches
incomplete_gamma_function.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Gesellschaft fuer Anlagen- und Reaktorsicherheit gGmbH
3 * SPDX-License-Identifier: EUPL-1.2
4 * SPDX-FileContributor: Sabine Stichel
5 * SPDX-FileContributor: Goethe Universität Frankfurt
6 * SPDX-FileType: SOURCE
7 *
8 * This file is part of d3f++.
9 * d3f++ is an extension for UG4. Licensing information and citation requirements of UG4 are provided in LICENSES/UG4-LGPL_2.1
10 */
11
12
13/*
14 * Original by J.Musuuza
15 */
16
17// extern headers
18#include <iostream>
19#include <sstream>
20#include <fstream>
21#include <string>
22#include <cmath>
23#include <vector>
24
25
26#define _USE_MATH_DEFINES
27#include <math.h>
28#include <float.h> //for DBL_MAX
29#include <iomanip>
30#include <cstdlib>
31#include <time.h>
32#include "common/common.h"
33
37#include "bridge/bridge.h"
38#include "lib_disc/domain.h"
48#include "common/parser/rapidxml/rapidxml_print.hpp"
49#include "common/parser/rapidxml/rapidxml.hpp"
50#include "../plugins/experimental/biogas/save_load.h"
51
52
53//using namespace std;
54//using namespace rapidxml;
55#ifdef UG_FOR_LUA
57#endif
58
59namespace ug{
60namespace d3f{
61
62/*functions copied from: incomplete_gamma_function.c*/
63
83template <typename TData, int dim, typename TRet>
85{
86 return (double) xIncomplete_Gamma_Function((long double)x, (long double)nu);
87}
88
90
109template <typename TData, int dim, typename TRet>
110long double FractalField<TData,dim,TRet>::xIncomplete_Gamma_Function(long double x, long double nu)
111{
112 if ( x == 0.0L )
113 return 0.0L;
114 if ( nu <= Gamma_Function_Max_Arg() )
115 return xEntire_Incomplete_Gamma_Function(x,nu) * xGamma_Function(nu);
116 else
117 return expl(logl(xEntire_Incomplete_Gamma_Function(x,nu)) + xLn_Gamma_Function(nu));
118}
119
120
121
122}
123}
long double xIncomplete_Gamma_Function(long double x, long double nu)
long double xIncomplete_Gamma_Function(long double x, long double nu)
Definition incomplete_gamma_function.h:110
double Incomplete_Gamma_Function(double x, double nu)
Definition incomplete_gamma_function.h:84