View Issue Details

IDProjectCategoryView StatusLast Update
0002741OpenFOAMFeaturepublic2017-10-31 16:05
Reporterchaohsiung Assigned Towill  
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Summary0002741: Error estimation in linearEqn, cubicEqn etc.
DescriptionFor a linear equation, f(x)=a*x+b, the error caused by limit float precision should be
     error = f(x+SMALL) - f(x) = ( a*(x+SMALL)+b - (a*x+b) ) = a*SMALL
rather than
     inline Foam::scalar Foam::linearEqn::error(const scalar x) const
     {
         return mag(SMALL*x*a());
     }

//---------------------
For a n-th order function, using Taylor series

f(x±SMALL) = f(x) ± (f1(x)*SMALL) + (f2(x)*SMALL^2)/2! + ... + (fn(x)*SMALL^n)/n!

where fn(x) represents the n-th order derivative.

re-arrange and ignore the high order small value

     error = f(x±SMALL) - f(x) = f1(x)*SMALL

rather than
     error = f1(x) * SMALL * x

//---------------------
This also exists in other equation-like classes.

Or If I misunderstand the use of these functions?

Best regards

Chaohsiung MIAO
TagsNo tags attached.

Activities

will

2017-10-31 16:05

manager   ~0008966

The error method's estimate assumes a relative error in the input variable, x. It is, therefore, evaluating f(x ± x*SMALL), rather than f(x ± SMALL).

Issue History

Date Modified Username Field Change
2017-10-31 15:30 chaohsiung New Issue
2017-10-31 16:05 will Assigned To => will
2017-10-31 16:05 will Status new => closed
2017-10-31 16:05 will Resolution open => fixed
2017-10-31 16:05 will Note Added: 0008966