xlifepp – Functions – G#

gammaFunction#

complex_t xlifepp::gammaFunction(const complex_t&)#

return \(\int_0^t dt t^{x-1} \exp(-t)\) for x > 0

real_t xlifepp::gammaFunction(int_t n)#

Function \(Gamma(z) = \int_0^{\infty} t^{z-1} exp(-t) dt for Re(z) > 0\).

  • Gamma(1-z) = Pi / ( sin(Pi z) Gamma(z) )

  • Gamma(z+1) = z Gamma(z)

  • Gamma(n+1) = n! for integer n > 0 return Gamma(n) = (n-1)!

real_t xlifepp::gammaFunction(real_t)#

return \(\int_0^t dt t^{x-1} \exp(-t)\) for x > 0

gammaTest#

void xlifepp::gammaTest(std::ostream &out)#

gaussJacobi20Output#

void xlifepp::gaussJacobi20Output(number_t nmax, std::ostream &out)#

Output of Gauss-Jacobi (2,0) rule as displayed in function GaussJacobi20Rule.

“tabulated output” of Gauss-Jacobi (2,0) rules up to a given number of points

gaussJacobi20Rule#

void xlifepp::gaussJacobi20Rule(number_t n, std::vector<real_t> &points, std::vector<real_t> &weights)#

Compute Gauss-Jacobi n-point formula on [-1, 1] for the weight (1-x)^2.

returns Gauss-Jacobi (2,0) rule with tabulated

  • Points xj are roots of Jacobi Polynomial Pn(2,0) of ordre n

  • Weights are 8/((1-xi^2)*Pn(2,0)’(xi)^2) (see gaussJacobiRuleComputed)

  • tabulated values for n<=10, computed values for n>10 (nothing was done for n>10 before)

Note: the n points are returned in ascending order, points and weights are resized to n.

gaussJacobiOutput#

void xlifepp::gaussJacobiOutput(number_t nmax, real_t a, real_t b, std::ostream &out)#

Output of Gauss-Jacobi rule as displayed in function GaussJacobi20Rule.

“tabulated output” of Gauss-Jacobi rules up to a given number of points

gaussJacobiRule#

void xlifepp::gaussJacobiRule(number_t n, real_t a, real_t b, std::vector<real_t> &points, std::vector<real_t> &weights)#

Compute Gauss-Jacobi n-point formula on [-1, 1] for the weight (1-x)^a*(1+x)^b, a>-1, b>-1.

returns Gauss-Jacobi rule with tabulated

  • Points xj are roots of Jacobi Polynomial Pn(a,b) of ordre n (namely orthogonal polynomials of weight (1-x)^a*(1+x)^b)

  • Weights are 2^(a+b+1)*Gamma(n+a+1)*Gamma(n+b+1)/(Gamma(n+a+b+1)*n!*(1-xi^2)*Pn(a,b)’(xi)^2)

  • exact for polynomials of degree 2n-1 (times the weight)

Note: a=b=0 is the Gauss-Legendre rule (gaussLegendreRule), a=2, b=0 uses tabulated values up to n=10, the n points are returned in ascending order

gaussJacobiRuleComputed#

static void xlifepp::gaussJacobiRuleComputed(number_t n, real_t a, real_t b, std::vector<real_t> &points, std::vector<real_t> &weights)#

Compute Gauss-Jacobi n-point formula on [-1, 1] for any n, a>-1, b>-1 (weight (1-x)^a*(1+x)^b)

  • points: eigenvalues of the symmetric tridiagonal Jacobi matrix (bisection with Sturm sequences), ascending order

  • weights: 2^(a+b+1)*Gamma(n+a+1)*Gamma(n+b+1)/(Gamma(n+a+b+1)*n!*(1-xi^2)*Pn(a,b)’(xi)^2) with Pn(a,b)’ = (n+a+b+1)/2*P(n-1)(a+1,b+1)

gaussLegendreOutput#

void xlifepp::gaussLegendreOutput(number_t nmax, std::ostream &out)#

Output of Gauss-Legendre rule as displayed in function GaussLegendreRule.

“tabulated output” of Gauss-Lobatto rules up to a given number of points

gaussLegendreRule#

void xlifepp::gaussLegendreRule(number_t n, std::vector<real_t> &points, std::vector<real_t> &weights)#

returns quadrature points and weights for Gauss-Legendre formula for a given number of points n; n-point Gauss-Legendre formula is exact for polynomials of degree up to {2n-1} on [-1,1].

returns Gauss-Legendre rule with computed or tabulated

Points and weights are given below for n up to 16

Note: the (n+1)/2 positive points in ascending order only are returned.

gaussLegendreRuleComputed#

void xlifepp::gaussLegendreRuleComputed(number_t n, std::vector<real_t> &points, std::vector<real_t> &weights)#

Compute Gauss-Legendre n-point formula on [-1, 1].

returns Gauss-Legendre rule for any number of points

  • Points xj are roots of Legendre Polynomial pn of ordre n

  • Weights are 2/( (1-xj^2) (P’_n(xj)^2) )

Note: the (n+1)/2 first positive points in ascending order only are returned.

gaussLobattoOutput#

void xlifepp::gaussLobattoOutput(number_t nmax, std::ostream &out)#

Output of Gauss-Lobatto rule as displayed in function GaussLobattoRule.

“tabulated output” of Gauss-Lobatto rules up to a given number of points

gaussLobattoPoints#

void xlifepp::gaussLobattoPoints(number_t n, std::vector<real_t> &points)#

returns quadrature nodes for Gauss-Lobatto rule for a given number of points.

returns Gauss-Lobatto points for any number of points

Note: the (n+1)/2 points non-negative points in ascending order are returned only with possible point 0 included and including end point 1

gaussLobattoRule#

void xlifepp::gaussLobattoRule(number_t n, std::vector<real_t> &points, std::vector<real_t> &weights)#

returns quadrature points & weights for Gauss-Lobatto rule for a given number of points.

returns Gauss-Lobatto rule with computed or tabulated

n-point Gauss-Lobatto formula is exact for P_{2n-3}(0,1)

Note: only points and weights corresponding to the (n+1)/2 points non-negative points, with possible point 0 included and including end point 1, are returned

The following programs shows table of values (with 20 significant digits) up to n=16 which have been computed by function GaussLobattoRuleComputed using type long double.

gaussLobattoRuleComputed#

void xlifepp::gaussLobattoRuleComputed(number_t n, std::vector<real_t> &points, std::vector<real_t> &weights)#

compute Gauss-Lobatto n-point formula on [-1, 1] end points included

returns Gauss-Lobatto rule for any number of points

  • Points xj are roots of (1-x^2)*P’_{n-1} with P’_{n-1} derivative of Legendre Polynomial of ordre n-1

  • Weights are 2./(n*(n-1)) for end points -1 and +1 2./(n*(n-1)*{P_{n-1}(xj)}^2) for other xj

Note: the (n-1)/2 first positive points in ascending order only are returned that is excluding end point 1 and corresponding weight.

gaussMultipleSolver#

template<typename K_>
bool xlifepp::gaussMultipleSolver(std::vector<K_> &mat, std::vector<K_> &rhs, number_t nbrhs, real_t &minPivot, number_t &row)#

Template multiple Gaussian elimination solver with partial pivoting strategy for a square linear system with dense row major access matrix the number of right hand sides is given by nbrhs Note: when giving Id matrix as rhs, it returns the inverse of mat in rhs.

gaussSolve#

template<typename T>
void xlifepp::gaussSolve(LargeMatrix<T> &mat, std::vector<std::vector<T>> &rhss)#
template<typename T>
void xlifepp::gaussSolve(LargeMatrix<T> &mat, std::vector<T> &rhs)#
void xlifepp::gaussSolve(MatrixEntry&, VectorEntry&, VectorEntry&)#

Gauss solver (only in scalar representation)

SuTermVector xlifepp::gaussSolve(SuTermMatrix&, const SuTermVector&, bool keepA = false)#

solve AX=B using Gauss reduction solve AX=B using umfpack if available

TermVectors xlifepp::gaussSolve(TermMatrix &A, const std::vector<TermVector> &Bs, bool keepA)#
TermVector xlifepp::gaussSolve(TermMatrix &A, const TermVector &B, bool keepA)#

gaussSolver#

template<typename K_>
bool xlifepp::gaussSolver(std::vector<K_> &mat, std::vector<K_> &rhs, real_t &minPivot, number_t &row)#

Template Gaussian elimination solver with partial pivoting strategy for a square linear system with dense row major access matrix.

gcdNumber#

static number_t xlifepp::gcdNumber(number_t a, number_t b)#

greatest common divisor

gegenbauerPolynomials#

void xlifepp::gegenbauerPolynomials(real_t lambda, real_t, std::vector<real_t>&)#

Gegenbauer ultraspherical polynomials on [-1, 1], with parameter lambda up to order n P_0 = 1, P_1 = 2*lambda*x n*P_n(x) = 2*(n+lambda-1)*x*P_{n-1}(x) - (n+2*lambda-2)*P_{n-2}(x) , n > 1.

genDomName#

string_t xlifepp::genDomName(number_t ndom)#
string_t xlifepp::genDomName(number_t ndom, const map<number_t, string_t> &domNameMap)#

genDomName2#

string_t xlifepp::genDomName2(number_t ndom, number_t nbdoms)#

genSDomName#

string_t xlifepp::genSDomName(number_t ndom, number_t nsdom)#
string_t xlifepp::genSDomName(number_t ndom, number_t nsdom, const map<number_t, string_t> &domNameMap)#

genSDomName2#

string_t xlifepp::genSDomName2(number_t ndom, number_t nsdom, number_t nbdoms)#

geomElementFromParameters#

inline const GeomElement *xlifepp::geomElementFromParameters(Parameters &pars)#

geomUnionOf#

const GeomDomain *xlifepp::geomUnionOf(std::vector<const GeomDomain*> &doms, const GeomDomain *largeDom)#

construct or identify the geometrical union of domains.

construct or identify the geometrical symbolic union of domains

Geometrical union is a real union which performs element or side element inclusion in other elements or side elements it uses the element id number to test inclusion of a list of elements in an other list of elements for side element it uses the parent element id number. !!! Side of side element is not handled for the moment

largeDom is a large domain containing all domains given in doms

GeomDomains may be a meshDomain or a compositeDomain of union type (domains intersection are not managed) when a domain contains all others, the function returns it when the union gives an existing domain, the function returns it else the function return a new compositeDomain (union)

Note

do not confuse geometrical union with union of domains which is a semantic union (no geometrical analysis is performed) Geometrical union is an internal tool, end users do not have to use it

get_value_type#

ValueType xlifepp::get_value_type(const string_t&)#

get the type of the parameter value by name

getB#

inline Vector<real_t> &xlifepp::getB()#
inline Vector<real_t> &xlifepp::getB(number_t t)#

getBasisIndex#

inline number_t xlifepp::getBasisIndex()#
inline number_t xlifepp::getBasisIndex(number_t t)#

getBx#

inline Vector<real_t> &xlifepp::getBx()#
inline Vector<real_t> &xlifepp::getBx(number_t t)#

getBy#

inline Vector<real_t> &xlifepp::getBy()#
inline Vector<real_t> &xlifepp::getBy(number_t t)#

getComponentBordersToGeo#

Strings xlifepp::getComponentBordersToGeo(const Geometry &g)#

returns the borders numbers of a canonical geometry in a geo file

writing the borders numbers of a canonicl geometry in a geo file

getDerivative#

inline number_t xlifepp::getDerivative()#
inline number_t xlifepp::getDerivative(number_t t)#

getDof#

inline Dof &xlifepp::getDof()#
inline Dof &xlifepp::getDof(number_t t)#

getDomain#

inline GeomDomain &xlifepp::getDomain()#

getDomainx#

inline GeomDomain &xlifepp::getDomainx()#

getDomainy#

inline GeomDomain &xlifepp::getDomainy()#

getElement#

inline GeomElement &xlifepp::getElement()#
inline GeomElement &xlifepp::getElement(number_t t)#

getElementP#

inline GeomElement *xlifepp::getElementP()#
inline GeomElement *xlifepp::getElementP(number_t t)#

getFeDof#

inline FeDof &xlifepp::getFeDof()#
inline FeDof &xlifepp::getFeDof(number_t t)#

getImpl#

template<class T>
inline DefaultSPStorage<T>::PointerType xlifepp::getImpl(const DefaultSPStorage<T> &sp)#

getImplConstRef#

template<class T>
inline const DefaultSPStorage<T>::StoredType &xlifepp::getImplConstRef(DefaultSPStorage<T> &sp)#

getImplRef#

template<class T>
inline const DefaultSPStorage<T>::StoredType &xlifepp::getImplRef(const DefaultSPStorage<T> &sp)#
template<class T>
inline DefaultSPStorage<T>::StoredType &xlifepp::getImplRef(DefaultSPStorage<T> &sp)#

getMaterialId#

inline number_t xlifepp::getMaterialId()#
number_t xlifepp::getMaterialId(number_t t)#

get the material id of GeomElement managed by thread t

getN#

inline Vector<real_t> &xlifepp::getN()#
inline Vector<real_t> &xlifepp::getN(number_t t)#

getNormalVectorFrom#

inline const Vector<real_t> &xlifepp::getNormalVectorFrom(const Parameters &pa)#

getNx#

inline Vector<real_t> &xlifepp::getNx()#
inline Vector<real_t> &xlifepp::getNx(number_t t)#

getNxVectorFrom#

inline const Vector<real_t> &xlifepp::getNxVectorFrom(const Parameters &pa)#

getNy#

inline Vector<real_t> &xlifepp::getNy()#
inline Vector<real_t> &xlifepp::getNy(number_t t)#

getNyVectorFrom#

inline const Vector<real_t> &xlifepp::getNyVectorFrom(const Parameters &pa)#

getRefCounted#

template<typename T>
inline const RefCounted<T>::CountType &xlifepp::getRefCounted(const RefCounted<T> &ref)#
template<typename T>
inline RefCounted<T>::CountType &xlifepp::getRefCounted(RefCounted<T> &ref)#

getRefCountedAlloc#

template<typename T>
bool xlifepp::getRefCountedAlloc(RefCounted<T> &ref)#

getRefElt#

RefElement *xlifepp::getRefElt(number_t elmType, const GMSHMAP &gmMap, number_t *nb_pts, number_t *elmDim, bool *isSimplex)#

getT#

inline Vector<real_t> &xlifepp::getT()#
inline Vector<real_t> &xlifepp::getT(number_t t)#

getTx#

inline Vector<real_t> &xlifepp::getTx()#
inline Vector<real_t> &xlifepp::getTx(number_t t)#

getTy#

inline Vector<real_t> &xlifepp::getTy()#
inline Vector<real_t> &xlifepp::getTy(number_t t)#

getVector#

inline Vector<real_t> &xlifepp::getVector(UnitaryVector un)#

grad#

template<typename K>
std::vector<PolynomialT<K>> xlifepp::grad(const MonomialT<K> &m, dimen_t d = 3)#
template<typename K>
PolynomialsBasisT<K> xlifepp::grad(const PolynomialBasisT<K> &ps)#
template<typename K>
std::vector<PolynomialT<K>> xlifepp::grad(const PolynomialT<K> &p, dimen_t d = 3)#
OperatorOnUnknown &xlifepp::grad(const Unknown &un)#

grad_x#

OperatorOnKernel &xlifepp::grad_x(const Kernel&)#

grad_x(k)

OperatorOnKernel &xlifepp::grad_x(OperatorOnKernel&)#

grad_x(opk)

grad_y#

OperatorOnKernel &xlifepp::grad_y(const Kernel&)#

grad_y(k)

OperatorOnKernel &xlifepp::grad_y(OperatorOnKernel&)#

grad_y(opk)

gradG#

OperatorOnUnknown &xlifepp::gradG(const Unknown &un, const complex_t &ax, const complex_t &ay, const complex_t &az, const complex_t &at)#

gradS#

OperatorOnUnknown &xlifepp::gradS(const Unknown &un)#

gradxgradyover4pir#

void xlifepp::gradxgradyover4pir(const Point&, const Point&, Vector<Vector<real_t>>&)#

\(grad_xgrad_y/(4\pi r)\)

gradxover4pir#

void xlifepp::gradxover4pir(const Point&, const Point&, Vector<real_t>&)#

\(grad_x/(4\pi r)\)