From: Antonio Jimenez Pastor Date: Wed, 5 Dec 2018 16:21:14 +0000 (+0100) Subject: Added option to stop the simplyify_homogeneous with linear equations. X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=1878bcb0dce5575e6b78278cc1fddcbc773d242d;p=ajpastor%2Fdiff_defined_functions.git Added option to stop the simplyify_homogeneous with linear equations. --- diff --git a/ajpastor/dd_functions/toDiffAlgebraic.py b/ajpastor/dd_functions/toDiffAlgebraic.py index 60d4013..d2d906a 100644 --- a/ajpastor/dd_functions/toDiffAlgebraic.py +++ b/ajpastor/dd_functions/toDiffAlgebraic.py @@ -562,7 +562,7 @@ def build_initial_from_homogeneous(init, n, depth, base): return build_initial_from_homogeneous(tuple(new_init), n, depth-1, base); @cached_function -def simplify_homogeneous(poly): +def simplify_homogeneous(poly, _stop_linear=True): ''' Given an homogeneous differential polynomial 'poly', we reduce the order of the equation by 1 using the change of variables y(x) = exp(int(u(x))). @@ -574,7 +574,7 @@ def simplify_homogeneous(poly): poly = fromFinitePolynomial_toInfinitePolynomial(poly); parent = poly.parent(); y = parent.gens()[0]; - if(not(poly.is_homogeneous()) or (poly.degree() == 1)): + if(not(poly.is_homogeneous()) or (_stop_linear and poly.degree() == 1)): return (poly,0); d = {str(y[0]) : parent.one()}; diff --git a/releases/diff_defined_functions__0.6.zip b/releases/diff_defined_functions__0.6.zip index d943b0b..7ab871f 100644 Binary files a/releases/diff_defined_functions__0.6.zip and b/releases/diff_defined_functions__0.6.zip differ diff --git a/releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip b/releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip new file mode 100644 index 0000000..7ab871f Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip differ