![]() |
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Typedefs | |
| using | PolynomialType = std::vector< double > |
| using | IntervalType = std::array< double, 2 > |
Functions | |
| std::size_t | Degree (const PolynomialType &rPolynomial) |
| double | Evaluate (const PolynomialType &rPolynomial, double x) |
| PolynomialType | Differentiate (const PolynomialType &rPolynomial) |
| PolynomialType | Multiply (const PolynomialType &rA, const PolynomialType &rB) |
| void | Divide (PolynomialType &rQuotient, PolynomialType &rRemainder, const PolynomialType &rA, const PolynomialType &rB) |
| void | IsolateRoots (std::vector< IntervalType > &rRootIntervals, const PolynomialType &rPolynomial, const IntervalType &rRange) |
| Define disjoint subintervals of rRange, each containing a single root of rPolynomial. More... | |
| double | FindRoot (const PolynomialType &rPolynomial, const IntervalType &rRange) |
| Find a root of rPolynomial within the interval defined by rRange. More... | |
| using Kratos::PolynomialUtilities::IntervalType = typedef std::array<double, 2> |
| using Kratos::PolynomialUtilities::PolynomialType = typedef std::vector<double> |
| std::size_t Kratos::PolynomialUtilities::Degree | ( | const PolynomialType & | rPolynomial | ) |
Degree of the polynomial
| PolynomialType Kratos::PolynomialUtilities::Differentiate | ( | const PolynomialType & | rPolynomial | ) |
Derivative of the polynomial
| void Kratos::PolynomialUtilities::Divide | ( | PolynomialType & | rQuotient, |
| PolynomialType & | rRemainder, | ||
| const PolynomialType & | rA, | ||
| const PolynomialType & | rB | ||
| ) |
Euclidian division of polynomials rA / rB = rQuotient*rB + rRemainder
| double Kratos::PolynomialUtilities::Evaluate | ( | const PolynomialType & | rPolynomial, |
| double | x | ||
| ) |
Evaluate the polynomial at the given x value
| double Kratos::PolynomialUtilities::FindRoot | ( | const PolynomialType & | rPolynomial, |
| const IntervalType & | rRange | ||
| ) |
Find a root of rPolynomial within the interval defined by rRange.
The implementation assumes that rRange contains exactly one root and that rRange[0]*rRange[1] < 0
| rPolynomial | the polynomial |
| rRange | interval containing the root |
| void Kratos::PolynomialUtilities::IsolateRoots | ( | std::vector< IntervalType > & | rRootIntervals, |
| const PolynomialType & | rPolynomial, | ||
| const IntervalType & | rRange | ||
| ) |
Define disjoint subintervals of rRange, each containing a single root of rPolynomial.
The function uses the signs of the Sturm sequence in order to isolate the roots.
| rRootIntervals | each term defines a subinterval of rRange containing a single root. |
| rPolynomial | the polynomial for which we want to find the roots. |
| rRange | the interval in which the roots are to be found. |
| PolynomialType Kratos::PolynomialUtilities::Multiply | ( | const PolynomialType & | rA, |
| const PolynomialType & | rB | ||
| ) |
Product of two polynomials