////////////////////////////////////////////////////////////////////////////////////////////////////
/// @returns  Distributed2WayBusElectSupplyData* (--) Address of the created supply data object.
///
/// @details  Creates a new Distributed2WayBusElectSupplyData and returns its address to the
///           caller.  Users should call this for each voltage supply in the local model that can
///           supply power to this interface location, and then drive the object to describe the
///           ability of the voltage supply to supply power during runtime.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @returns  float (W) Power demand on the local model from the remote model.
///
/// @details  If in the Supply role, returns the demanded power from the remote model, otherwise
///           returns zero.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Electrical Distributed 2-Way Bus interface data.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Electrical Distributed 2-Way Bus Interface default constructor.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Electrical Distributed 2-Way Bus Interface default destructor.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] isPrimarySide (--) This is the primary side of the interface if true.
/// @param[in] voltage       (V)  Initial voltage at the interface location.
///
/// @details  Initializes this Electrical Distributed 2-Way Bus Interface with its name and initial
///           voltage.  This should be called once at simulation initialization, before any calls to
///           the 'update' functions.  The primary side of the interface defaults to Supply role at
///           init, while the other side defaults to Demand.  If both sides initialize to the same
///           mode, they will sort it out at runtime.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// param[in] localVoltage     (V) Voltage in the local model at this interface location.
/// param[in] localPowerDemand (W) Power demanded from the remote model at this interface location.
///
/// @details  Updates the mode switching logic and drives the output supply voltage and power demand
///           to the other side of the interface.  This should be called as many times as needed
///           during each main model step to ensure this is updated with the latest local circuit
///           voltage amd power draw.
///
/// @note  This should be called after updateFrameCounts() during each main model step.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  This is the default constructor for the UtDistributed2WayBusBase class.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Executed after each unit test.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test for the initialization method.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test for the updateFrameCounts method.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test the push and pop notifications methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test for the mode forcing flags.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  This is the default constructor for the UtDistributed2WayBusElect class.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests for construction of the Electrical Distributed 2-Way Bus notification message.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the constructor of the Distributed2WayBusElect class.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests for Electrical Distributed 2-Way Bus Interface initialization without errors.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests for Electrical Distributed 2-Way Bus Interface nominal initialization with
///           exceptions.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests for Electrical Distributed 2-Way Bus Interface updateFrameCounts method.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests for Electrical Distributed 2-Way Bus Interface update method.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests for Electrical Distributed 2-Way Bus Interface update method with forced roles.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the Electrical Distributed 2-Way Bus Interface getter and setter methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  This is the default constructor for the UtDistributed2WayBusFluid class.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test for nominal initialization without exceptions.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test the processInputs method.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test the processOutput methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test for the computeDemandLimit and getDemandLimitGain methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  angle  (r)  Input angle in range [-3pi, +3pi).
///
/// @return     double (r)   Angle resolved to the range [-pi,+pi).
///
/// @warning    If the input angle is not known to lie in the range [-3pi, +3pi), a mod function
///             should be used instead of this method.
///
/// @details    Returns the specified angle resolved to the range [-pi,+pi).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  angle  (r)   Input angle in radians in range [-4pi,+4pi).
///
/// @return     double (r)   Angle resolved to the range [0,+2pi).
///
/// @warning    If the input angle is not known to lie in the range [-4pi,+4pi), a mod function
///             should be used instead of this method.
///
/// @details    Returns the specified angle resolved to the range [0,+2pi).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  angle  (d)   Input angle in degrees in range [-540, +540).
///
/// @return     double (d)   Angle resolved to the range [-180,+180).
///
/// @warning    If the input angle is not known to lie in the range [-540, +540), a mod function
///             should be used instead of this method.
///
/// @details    Returns the specified angle resolved to the range [-180,+180).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  angle  (d)   Input angle in degrees in range [-720,+720).
///
/// @return     double (d)   Angle resolved to the range [0,+360).
///
/// @warning    If the input angle is not known to lie in the range [-720,+720), a mod function
///             should be used instead of this method.
///
/// @details    Returns the specified angle resolved to the range [0,+360).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  x      (--)  Input argument.
///
/// @return     double (--)  Arcsin of argument.
///
/// @details    Returns the arcsine of the argument with protection against range error.
///             \verbatim
///                       _
///                      |  +pi/2,   x >= 1.0
///             result = |  asin(x), -1.0 < x < 1.0
///                      |_ -pi/2,   x <= -1.0
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  x      (--)  Input argument.
///
/// @return     double (--)  Arccos of argument.
///
/// @details    Returns the arccosine of the argument with protection against range error.
///             \verbatim
///                       _
///                      |  0.0,     x >= 1.0
///             result = |  acos(x), -1.0 < x < 1.0
///                      |_ pi,      x <= -1.0
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  x      (--)  Input argument.
///
/// @return     double (--)  Sqrt of argument.
///
/// @details    Returns the square root of the argument with protection against range error.
///             \verbatim
///                       _
///                      |  0.0,     x <= 0.0
///             result = |_ sqrt(x), x >  0.0
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  x      (--)  Input argument.
///
/// @return     double (--)  Log10 of argument.
///
/// @details    Returns the base 10 logarithm of the argument with protection against range error.
///             \verbatim
///                       _
///                      |  0.0,      x <= 0.0
///             result = |_ log10(x), x >  0.0
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  x      (--)  Input argument.
///
/// @return     double (--)  Log of argument.
///
/// @details    Returns the natural logarithm of the argument with protection against range error.
///             \verbatim
///                       _
///                      |  0.0,    x <= 0.0
///             result = |_ log(x), x >  0.0
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  num        (--)  Numerator (dividend).
/// @param[in]  den        (--)  Denominator (divisor).
/// @param[in]  threshold  (--)  Zero divisor threshold.
/// @param[in]  retval     (--)  Zero divisor return value.
///
/// @return     double     (--)  The quotient of the arguments.
///
/// @warning    If the threshold is negative, then division by zero may be attempted, so don't do that.
///
/// @details    Returns the quotient of the arguments with protection against divide by zero. The zero
///             divisor threshold and return value are optional and default to DBL_EPSILON and 0.0.
///             \verbatim
///                       _
///                      |  num / den    den > +threshold
///             result = |  retval,     -threshold <= den <= +threshold
///                      |_ num / den    den < -threshold
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  lower  (--)  Lower limit of range.
/// @param[in]  x      (--)  Input argument to be limited.
/// @param[in]  upper  (--)  Upper limit of range.
///
/// @return     double (--)  The value limited to outside the specified range.
///
/// @warning    If lower > upper, then x is returned without complaint, so don't do that.
///
/// @details    Limits the value of a double argument to lie outside the specified range
///             (x <= lower || upper <= x).
///             \verbatim
///                       _
///                      |  x,         x <= lower
///                      |  lower,     lower <= x < (upper - lower) / 2
///             result = |  upper,     (upper - lower) / 2 <= x < upper
///                      |_ x,         x >= upper
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  lower  (--)  Lower limit of range.
/// @param[in]  x      (--)  Input argument to be limited.
/// @param[in]  upper  (--)  Upper limit of range.
///
/// @return     int (--)  The value limited to outside the specified range.
///
/// @warning    If lower > upper, then x is returned without complaint, so don't do that.
///
/// @details    Limits the value of an integer argument to lie outside the specified range
///             (x <= lower || upper <= x).
///             \verbatim
///                       _
///                      |  x,         x <= lower
///                      |  lower,     lower <= x < (upper - lower) / 2
///             result = |  upper,     (upper - lower) / 2 <= x < upper
///                      |_ x,         x >= upper
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  x      (--)  Input argument to be rounded.
///
/// @return     int    (--)  The value rounded to the nearest integer value.
///
/// @details    Rounds the value of a double to the nearest integer value.
///             (floor(x) is defined to be equal to x minus its fractional component).
///             \verbatim
///                       _
///             result = |  floor(x),           x - floor(x) < 0.5
///                      |_ floor(x) + 1,       x - floor(x) >= 0.5
///             \endverbatim
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  base     (--)  Base of the power calculation
/// @param[in]  exp      (--)  Exponent of the power calculation
///
/// @return     double   (--)  Result of the power function
///
/// @details   Computes the power in a reliable time frame. std::pow calculations have been observed
///            to spike up to 2 milliseconds for 1 calculation.
///            This is a 30th order series approx for b^x=pow(b,x)
///            based on the identity base^x = e^xlog(base).
///            It uses multiplications for the integer powers of the base.
///            Example: b^7.342 = b^7 * b^0.342 = b*b*b*b*b*b*b*e^(0.342log(b))
///            For any base and exponent it gives single precision results.
///            Gives perfect results for any integer exponent.
///            Like any series solution it has problems when base is close to 0.
///
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  type   (--)  Type of the unit-to-unit conversion to be performed.
/// @param[in]  input  (--)  Input value to be converted.
///
/// @return   double  (--)  The converted input value.
///
/// @throws   TsOutOfBoundsException, TsInitializationException
///
/// @details  Causes the desired units conversion type to be performed on the input value.  It uses
///           the type argument as an index to the desired conversion function in a function pointer
///           array.  Protects against indexing out-of-bounds in the array due to a bad type
///           argument (throws TsOutOfBoundsException).  Protects against null function pointer in
///           the array (throws TsInitializationException).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  pratio  (--)  Input power ratio
///
/// @return   double  (dB)  Power ratio converted to decibels
///
/// @throws   TsOutOfBoundsException
///
/// @details  Converts power ratio to decibels.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]  power  (W)  Input power in watts
///
/// @return   double  (dB*W)  Power converted to decibel watts
///
/// @details  Converts a power from watts to decibel watts.
///
/// @warning  If power <= 0, then 0 is returned.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests randomDouble()
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests randomDouble(double)
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests randomDouble(double,double)
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests randomInt()
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests randomInt(int,int)
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests uniqueRandomDouble
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests valueFound
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this unit conversion unit test.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test angle conversion factors.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test length conversion factors.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test mass conversion factors.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test pressure conversion factors.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test energy conversion factors.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test percent conversion methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test temperature conversion methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test power conversion methods.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test comparison against old values with best tolerance that passes.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test comparison against Trick values with best tolerance that passes.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test comparison of current and previously recorded values.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Test the convert method and that the convert method function pointer array is
///           completely loaded.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Print the current value of the conversion factors and constants.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for resolving an angle to the range [-pi,+pi).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for resolving an angle to the range [0,+2pi).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for resolving an angle to the range [-180,+180).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for resolving an angle to the range [0,+360).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for protected (against domain error) arcsine function.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for protected (against domain error) arccosine function.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for protected (against domain error) sqrt function.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for protected (against domain error) log10 function.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for protected (against domain error) log function.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for range limiting doubles.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for range limiting floats.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for range limiting integers.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for checking doubles in range.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for checking floats in range.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for checking integers in range.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for range limiting for doubles.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for range limiting for integers.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for rounding doubles to the nearest integer value.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for quantize.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the method for fastPow.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] A (--) On input, the pointer to the first element of the matrix A[n][n].  On
///                       output, the matrix A is replaced by the lower triangular, diagonal, and
///                       upper triangular matrices of the Cholesky LDL' factorization of A.
/// @param[in]     n (--) The number of rows and/or columns of the matrix A.
///
/// @throws  TsNumericalException
///
/// @details  This routine uses Cholesky's method to decompose the n x n positive definite symmetric
///           matrix A into the product of a unit lower triangular matrix L, a diagonal matrix D,
///           and a unit upper triangular matrix U equal to the transpose of L.  A unit triangular
///           matrix is a triangular matrix with ones along the diagonal.
///
///           The matrices L, D, and U replace the matrix A so that the original matrix A is
///           destroyed.  The matrix L replaces the lower triangular part of A, U replaces the upper
///           triangular part of A, and D replaces the diagonal of A.
///
///           Cholesky's LDU decomposition is performed by evaluating, in order, the following
///           expressions for i = 0, ... ,n-1 :
///               L[i][k]*D[k] = (A[i][k] - (L[i][0]*D[0]*L[k][0] + ... +
///                                          L[i][k-1]*D[k-1]*L[k][k-1]) ),
///               D[i] = A[i][i] - ( L[i][0]*D[0]*L[i][0] + ... +
///                                          L[k][k-1]*D[k-1]*L[i][k-1] ) ),
///           and subsequently setting
///               U[k][i] = L[i][k], for k = 0, ... , i-1.
///
///           After performing the LDU decomposition for A, call Solve to solve the
///           equation Ax = B or call Inverse to calculate the inverse of the matrix A.
////////////////////////////////////////////////////////////////////////////////////////////////////
//#include <cstdio>  //Todo remove - used for that underflow test below


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] A (--) On input, the pointer to the first element of the matrix A[n][n].  On
///                       output, the matrix A is replaced by the lower triangular, diagonal, and
///                       upper triangular matrices of the Cholesky LDL' factorization of A.
/// @param[in]     n (--) The number of rows and/or columns of the matrix A.
/// @param[in]     r (--) Vector of row numbers to operate on.  This method only decomposes r rows,
///                       and leaves the other rows of A alone.
///
/// @throws  TsNumericalException
///
/// @details  This overloaded version of Decompose operates only on the row/columns given by the
///           vector r.  The intent was for the caller to break up their matrix into separate
///           partitions, or islands, that can be decomposed separately.  Rather than creating
///           separate matrices for each island, the caller could just pass in the total matrix with
///           just the row numbers to operate on for each island.  So far in practice however, this
///           is slower than if the caller builds separate matrices for each island and decomposes
///           them with the old Decompose method above.  Probably because of all the extra array
///           position counters we have to update to skip between the desired rows, which as you can
///           see below, is quite messy!
/// TODO this is a prototype.  It is tested in the unit test code and works, but could maybe be
///      optimized & cleaned up to run faster.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] LDU (--) Pointer to the first element of the matrix whose elements form the unit
///                         lower triangular, diagonal, and unit upper triangular matrix factors of
///                         A.
/// @param[in]     B   (--) Pointer to the column vector, (n x 1) matrix, B.
/// @param[out]    x   (--) Solution to the equation Ax = B.
/// @param[in]     n   (--) The number of rows or columns of the matrix LU.
///
/// @throws  TsNumericalException
///
/// @details  This routine uses Cholesky's method to solve the linear equation Ax = B.  This routine
///           is called after the matrix A has been decomposed into the product of a unit lower
///           triangular matrix L, a diagonal matrix D, and a unit upper triangular matrix U which
///           is the transpose of L.
///
///           The matrix A is the product LDU.
///
///           The solution proceeds by solving the linear equation Ly = B for y, then solving Dz = y
///           for z and finally solving Ux = z for x.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] LDU (--) Pointer to the first element of the matrix whose elements form the unit
///                lower triangular matrix, the diagonal matrix, and the unit upper triangular
///                matrix factors of A.
/// @param[in]     n   (--) The number of rows or columns of the matrix LDU.
///
/// @details  This routine uses Cholesky's method to find the inverse of the matrix A.  This routine
///           is called after the matrix A has been decomposed into a product of a unit lower
///           triangular matrix L, a diagonal matrix D and a unit upper triangular matrix U which is
///           the transpose of L.  The matrix A is the product of L, D, and U.  Upon completion, the
///           inverse of A is stored in LDU so that the matrix LDU is destroyed.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]      L (--) Pointer to the first element of the unit lower triangular matrix.
/// @param[in]      B (--) Pointer to the column vector, (n x 1) matrix, B.
/// @param[in, out] x (--) Pointer to the column vector, (n x 1) matrix, x.
/// @param[in]      n (--) The number of rows or columns of the matrix L.
///
/// @returns void
///
/// @details  This routine solves the linear equation Lx = B, where L is an n x n unit lower
///           triangular matrix.  (Only the subdiagonal part of the matrix is addressed.)  The
///           diagonal is assumed to consist of 1's and is not addressed.
///
///           The algorithm follows:
///                                        x[0] = B[0], and
///                  x[i] = B[i] - (L[i][0] * x[0]  + ... + L[i][i-1] * x[i-1]),
///           for i = 1, ..., n-1.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] L (--) On input, the pointer to the first element of the matrix whose unit lower
///                       triangular elements form the matrix which is to be inverted. On output,
///                       the lower triangular part is replaced by the inverse.  The diagonal and
///                       superdiagonal elements are not modified.
/// @param[in]     n (--) The number of rows and/or columns of the matrix L.
///
/// @returns void
///
/// @details  This routine calculates the inverse of the unit lower triangular matrix L.  Only the
///           subdiagonal part of the matrix is addressed.  The diagonal is assumed to consist of
///           1's and is not addressed.
///
///           The algorithm follows:
///               Let M be the inverse of L, then L M = I,
///               M[i][j] = -( L[i][j] M[j][j] + ... + L[i][i-1] M[i-1][j] ),
///           for i = 1, ..., n-1, j = 0, ..., i - 1.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]     U (--) Pointer to the first element of the upper triangular matrix.                                                    //
/// @param[in]     B (--) Pointer to the column vector, (n x 1) matrix, B.
/// @param[in,out] x (--) Pointer to the column vector, (n x 1) matrix, x.
/// @param[in]     n (--) The number of rows or columns of the matrix U.
///
/// @returns void
///
/// @details  This routine solves the linear equation Ux = B, where U is an n x n unit upper
///           triangular matrix.  (Only the superdiagonal part of the matrix is addressed.)  The
///           diagonal is assumed to consist of 1's and is not addressed.
///
///           The algorithm follows:
///                      x[n-1] = B[n-1], and
///               x[i] = B[i] - (U[i][i+1] * x[i+1]  + ... + U[i][n-1] * x[n-1]),
///           for i = n-2, ..., 0.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]     A      (--) The admittance matrix [A] of [A]{x}={B} for this call.  If A cannot
///                            be referred to as a doubly indexed matrix then if you have a declared
///                            matrix, dm[n][n], set A according to:
///                                double *A;
///                                A = (double **)malloc( (unsigned) n*sizeof(double));
///                                for (i=0; i< n; i++) {A[i] = dm[i];}
/// @param[in]     n      (--) The number of rows in the system, and the size of [A] array is n*n.
///
/// @returns  bool (--)  True if the matrix is positive-definite, false otherwise.
///
/// @details  Compares each diagonal of the matrix to be above a pre-defined condition tolerance.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] x      (--) Both the initial starting point for this solution (in) and the
///                            solution (out) {x} of [A]{x}={B} for this call.
/// @param[in]     A      (--) The admittance matrix [A] of [A]{x}={B} for this call.  If A cannot
///                            be referred to as a doubly indexed matrix then if you have a declared
///                            matrix, dm[n][n], set A according to:
///                                double *A;
///                                A = (double **)malloc( (unsigned) n*sizeof(double));
///                                for (i=0; i< n; i++) {A[i] = dm[i];}
/// @param[in]     B      (--) The resultant vector {B} in [A]{x}={B}.
/// @param[in]     n      (--) The number of rows in the system, and the size of the {x} and {B}
///                            arrays, and [A] is size n*n.
/// @param[in]     Wt     (--) Omega term (0 < Wt <= 1) to accelerate convergence, if Wt = 1 then
///                            this method is equivalent to the Gauss-Seidel method.
/// @param[in]     maxitr (--) The limit on the number of SOR iterations this call may perform.
/// @param[in]     convg  (--) The delta in {x} between iterations below which the solution is
///                            considered converged.
///
/// @returns       int    (--) The number of iterations this solution took if it converged, or -1 if
///                            it did not converge.
///
/// @details  Uses the SOR method to solve the system [A]{x} = {B} for {x}, given an initial
///           estimate for {x} from the caller.  The caller can specify
///
/// @note     If this method fails to converge, the array x{} will be returned with the results of
///           the last, unconverged SOR iteration.  The caller must restore a previous valid
///           solution or take other steps as appropriate.
///
/// @note     The arrays x{}, A[] and B{} must be created outside this routine.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default destructs this CUDA Sparse Solve.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] A (--) On input, the pointer to the first element of the matrix A[n][n].
///                       This routine does not modify the input matrix
/// @param[in]     n (--) The number of rows and/or columns of the matrix A.
///
/// @throws   TsInitializationException, TsNumericalException
///
/// @details  This routine creates sparse matrix from the input matrix A.  This is done on the GPU.
///           Throws exceptions on errors in the GPU processes.
///
/// @note     This doesn't actually decompose the matrix, we're just using it as a convenient
///           interface to get the matrix to the GPU in the desired format.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] LDU (--) Not used
/// @param[in]     B   (--) Pointer to the column vector B.0
/// @param[out]    x   (--) Solution to the equation Ax = B.
/// @param[in]     n   (--) The number of rows or columns of the matrix LDU.
///
/// @throws   TsInitializationException, TsNumericalException
///
/// @details  This routine uses the sparse matrix, class variable d_A and input parameter B
///           to solve the linear equation Ax = B.  d_A is already stored on the GPU.  Copy
///           B to the GPU and solve for x.  x is copied off of the GPU back to host pointer x.
///           Throws exceptions on errors in the GPU processes.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] err  (--) cuda runtime library return code enumeration.
/// @param[in] file (--) Source code file string from the caller.
/// @param[in] line (--) Source code line number from the caller.
///
/// @throws   TsInitialization Exception
///
/// @details  This checks the given function return enum for errors.  For good status code, nothing
///           is done.  For any error status, an exception is thrown and an error message is sent to
///           H&S.
///
///           This overloaded method services the CUDA runtime library return type, cudaError_t.  We
///           put the integer value of the returned enum into the return string.  Meanings of the
///           values can be found in the CUDA runtime library documentation for the cudaError enum.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] err  (--) cusparse library return code enumeration.
/// @param[in] file (--) Source code file string from the caller.
/// @param[in] line (--) Source code line number from the caller.
///
/// @throws   TsInitialization Exception
///
/// @details  This checks the given function return enum for errors.  For good status code, nothing
///           is done.  For any error status, an exception is thrown and an error message is sent to
///           H&S.
///
///           This overloaded method services the CUDA cusparse library return type,
///           cusparseStatus_t.  Meanings of the values can be found in the cusparse runtime library
///           documentation for the cusparseStatus_t enum.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] err  (--) cusolver library return code enumeration.
/// @param[in] file (--) Source code file string from the caller.
/// @param[in] line (--) Source code line number from the caller.
///
/// @throws   TsInitialization Exception
///
/// @details  This checks the given function return enum for errors.  For good status code, nothing
///           is done.  For any error status, an exception is thrown and an error message is sent to
///           H&S.
///
///           This overloaded method services the CUDA cusolver library return type,
///           cusolverStatus_t.  Meanings of the values can be found in the cusolver runtime library
///           documentation for the cusolverStatus_t enum.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this CUDA Dense Matrix Decomposition.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default destructs this CUDA Dense Matrix Decomposition.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in,out] A (--) On input, the pointer to the first element of the matrix A[n][n].  On
///                       output, the matrix A is replaced by the lower triangular, diagonal, and
///                       upper triangular matrices of the LDL' factorization of A.
/// @param[in]     n (--) The number of rows of the matrix A.
///
/// @throws  TsInitializationException, TsNumericalException
///
/// @details Copies the matrix A to the GPU, decomposes it on the GPU, copies it back to the host.
///          Re-allocates GPU memory if the size of A has increased.  Throws exceptions on errors in
///          the GPU processes.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Cholesky Ldu Decomposition unit test.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests that the solution of [A]{x} = {b} satisfies the original system of equations.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the decomposition when the matrix is un-conditioned (not positive definite).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the decomposition throws an exception when the matrix is singular.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the Decomposition handles arithmetic underflows without dying.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests that the solution of [A]{x} = {b} satisfies the original system of equations,
///           and when [A] has some positive off-diagonal terms but is still positive-definite.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the dynamic resizing of the GPU matrix from one decomposition to another.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests handling return values from the CUDA runtime library.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests handling return values from the CUDA cusolver library.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests handling return values from the CUDA cusparse library.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the isPositiveDefinite method.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the solve method returns unconverged when the matrix is un-conditioned (not
///           positive-definite).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the solve method returns unconverged when the matrix is singular.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the Decomposition returns the row number where the matrix is un-
///           conditioned (not positive definite).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the Choleski_LDU_Solve returns the row number where the method fails because the
///           matrix is singular.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests the Decomposition handles arithmetic underflows without dying.  At
///           the time of this writing, Trick sims will die if a variable that is asymptotically
///           approaching zero will terminate with a floating exception when the result gets around
///           E-320 or so, whereas CPP_UNIT tests don't have this problem.  So this unit test can't
///           directly verify that a fault won't occur in the Trick sim.  However, we can check that
///           the Cholesky decomposition algorithm zeroes any value of magnitude less than E-100, in
///           order to avoid the float exception in Trick.
///
///           This test sets up an A matrix identical to one used in an example GUNNS sim that was
///           found to trigger this problem.
///
///           The problem has been found to be unique to the ts-generic repository, there must be
///           some compiler option set wrong.  Expect this test and the corresponding code in
///           CholeskyLdu to go away when it is fixed.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests that [A] multiplied by the inverse of [A] is the identity matrix.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Tests that the solution of [A]{x} = {b} satisfies the original system of equations
///           when decomposed as separate islands.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this interpolator model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x     (--) Independent variable array x.
/// @param[in]    y     (--) Independent variable array y.
/// @param[in]    z     (--) Dependent multidimensional variable array.
/// @param[in]    m     (--) Size of x variable array.
/// @param[in]    n     (--) Size of y variable array.
/// @param[in]    minX  (--) Interpolator model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Interpolator model valid range upper limit for first variable.
/// @param[in]    minY  (--) Interpolator model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Interpolator model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Bilinear interpolator model taking coefficient and range arguments.
///           Determines whether both independent arrays are ordered, and swaps from descending to
///           ascending order if necessary.  getExceptional should be called to get a first-pass
///           value to minimize the time required for the initial search.
/// @throws TsInitializationException
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default destructs this Bilinear interpolation.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Deletes dynamic memory.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x  (--)  First independent variable for bilinear interpolation.
/// @param[in]    y  (--)  Second independent variable for bilinear interpolation.
///
/// @return   bilinear interpolated dependent variable value at specified input.
///
/// @details  Returns this bilinear interpolated for the specified variable.
///           Saves previous indices mI and mJ.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Power curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Power curve fit model taking coefficient and range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Power curve fit model taking coefficient, range and name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Quadratic curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Quadratic curve fit model taking coefficient and range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Quadratic curve fit model taking coefficient, range and
///           name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Cubic curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Cubic curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Cubic curve fit model taking coefficient, range and name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Inverse Linear fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this Inverse Linear fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
///
/// @details  Initializes this Inverse Linear fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x     (--) Independent variable array x.
/// @param[in]    y     (--) Independent variable array y.
/// @param[in]    z     (--) Dependent multidimensional variable array.
/// @param[in]    m     (--) Size of x variable array.
/// @param[in]    n     (--) Size of y variable array.
/// @param[in]    minX  (--) Interpolator model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Interpolator model valid range upper limit for first variable.
/// @param[in]    minY  (--) Interpolator model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Interpolator model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Bilinear reverse interpolator model taking coefficient and range
///           arguments.  Constructs and initializes the object.
///
/// @throws   TsInitializationException
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Initializes this Bilinear reverse interpolator model.  Scans the table for minimum &
///           maximum values of z, which will be used during the evaluate method to limit the input
///           z argument.
///
/// @note     The min & max values of z in the table are stored in the base class's mMinY and mMaxY
///           terms, since the TsApproximation::get function limits the 2nd argument (normally y but
///           in our case z) to be within mMinY & mMaxY.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x  (--)  First independent variable for bilinear interpolation.
/// @param[in]    z  (--)  Second independent variable for bilinear interpolation.
///
/// @return   Bilinear interpolated dependent variable y value at specified input x & z.
///
/// @details  Using the same type of table for z = f(x, y) as in the TsBilinearInterpolator class,
///           this returns the value y given x and z.  It searches the y axis starting from the
///           previous y result.  If there are multiple solutions for y, this returns the first one
///           it finds.  If there are no solutions for y, this returns the y that would result in
///           z = f(x,y) being closest to the given z.
///
/// @note     If there are multiple solutions for y at the given x & z, this is not guaranteed to
///           return the one you want.  This class is best used for tables that have unique
///           solutions for y at every (x,z).
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @return   bool (--) True if x is between end1 and end2, inclusive.
///
/// @details  Returns true if x is between end1 and end2, inclusive.  End1 and end2 can be in any
///           order.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Exponential curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this Exponential curve fit model taking coefficient, range and name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
///
/// @details  Initializes this Exponential curve fit model taking coefficient, range and name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this curve fit/interpolator approximation.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    minX  (--) approximation valid range lower limit for first variable.
/// @param[in]    maxX  (--) approximation valid range upper limit for first variable.
/// @param[in]    minY  (--) approximation valid range lower limit for second variable.
/// @param[in]    maxY  (--) approximation valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this approximation taking range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    minX  (--) approximation valid range lower limit for first variable.
/// @param[in]    maxX  (--) approximation valid range upper limit for first variable.
/// @param[in]    minY  (--) approximation valid range lower limit for second variable.
/// @param[in]    maxY  (--) approximation valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Initializes approximation taking range arguments and a name
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x  (--)  First independent variable for curve fit/interpolation.
/// @param[in]    y  (--)  Second independent variable for curve fit/interpolation.
///
/// @return   Fitted variable at specified input.
///
/// @throws   TsOutOfBoundsException
///
/// @details  Returns this approximation for the specified variables with out of range exception.
////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Rational curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this Rational curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Initializes this Rational curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Bivariate Product curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Bivariate Product curve fit model taking coefficient and range
///           arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Product curve fit model taking coefficient, range and name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Linear Interpolator model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x     (--) Independent variable array.
/// @param[in]    z     (--) Dependent variable array.
/// @param[in]    n     (--) Size of variable arrays.
/// @param[in]    minX  (--) Interpolator model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Interpolator model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Linear interpolator model taking coefficient and range arguments.
///           Determines whether independent array is strictly ordered, and swaps from descending to
///           ascending order if necessary.  getExceptional should be called to get a first-pass value to minimize
///           the time required for the initial search.
/// @throws TsInitializationException
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default destructs this Linear Interpolator model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] n (--) size of the array
/// @param[in] x (--) array
/// @details  Validates the array size is at least two, and the the array is strictly ordered -
///           either increasing or decreasing as the difference between subsequent cells is at
///           least DBL_EPSILON.
/// @throws TsInitializationException
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x     (--) Independent variable array.
/// @param[in]    z     (--) Dependent variable array.
/// @param[in]    n     (--) Size of variable arrays.
/// @param[in]    minX  (--) Interpolator model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Interpolator model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initialization of linear interpolator. Validates parameters and creates copy of
/// the x and y data.  getExceptional should be called to get a first-pass value to minimize
/// the time required for the initial search.
/// @throws TsInitializationException
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]      x      (--) value to find index for cell
/// @param[in]      mX     (--) array of cell bounds
/// @param[in]      size   (--) number of elements of mX
/// @param[in,out]  cIndex (--) previous index found
/// @details  determines index:
///      mIndex  criteria
///         0       x < mX[0]
///         i    mX[i] <= x <mX[i+1]
///         N-1  mX[N-1] < x, where N is the table size
/// Searches linearly staring from cIndex - steps to next cell
/// Provides a basis for refactoring out the search algorithm. An alternate approach could be to use
/// bisection (if there is no expectation that the next x value will be close to the current value.
/// @return index of cell for x
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x  (--)  First independent variable for interpolator model.
/// @param[in]    y  (--)  Second independent variable for interpolator model (defaults to zero since not used).
///
/// @return   Interpolated dependent variable value at specified input.
///
/// @details  Returns this linear interpolator model for the specified variable.
///           The user of this method is responsible for ensuring initialization has occurred.
///           Saves previous index mI.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Bivariate Quadratic, Linear Inverse curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    f     (--) Sixth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this Bivariate Quadratic, Linear Inverse curve fit model taking
///           coefficient and range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    f     (--) Sixth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Bivariate Quadratic, Linear curve fit model taking coefficient, range and
///           name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Linear curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Linear curve fit model taking coefficient and range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Linear curve fit model taking coefficient, range and name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Sutherland curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this Sutherland curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Initializes this Sutherland curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Quartic curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Quartic curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Quartic curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    x  (--)  First independent variable for approximation.
/// @param[in]    y  (--)  Second independent variable for approximation.
///
/// @return   Approximated dependent variable at specified input.
///
/// @details  Returns an approximation for the specified variables with bounding to the valid range.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Quintic curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    f     (--) Sixth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Quintic curve fit model taking coefficient range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    f     (--) Sixth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Quintic curve fit model taking coefficient, range and name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Univariate Quadratic Root curve fit model .
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @note     The arguments are the coefficients of the corresponding quadratic equation.
///
/// @details  Constructs this Univariate Quadratic Root curve fit model taking coefficient and
///           range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this QuadraticRoot curve fit model taking coefficient, range and
///           name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Bivariate Quotient curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Constructs this Bivariate Quotient curve fit model taking coefficient, range and name arguments.
///           arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @throws   TsInitializationException
///
/// @details  Initializes this Bivariate Quotient curve fit model taking coefficient, range and
///           name arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @details  Default constructs this Bivariate Quadratic, Linear curve fit model.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    f     (--) Sixth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Constructs this Bivariate Quadratic, Linear curve fit model taking coefficient and
///           range arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in]    a     (--) First coefficient for curve fit model.
/// @param[in]    b     (--) Second coefficient for curve fit model.
/// @param[in]    c     (--) Third coefficient for curve fit model.
/// @param[in]    d     (--) Fourth coefficient for curve fit model.
/// @param[in]    e     (--) Fifth coefficient for curve fit model.
/// @param[in]    f     (--) Sixth coefficient for curve fit model.
/// @param[in]    minX  (--) Curve fit model valid range lower limit for first variable.
/// @param[in]    maxX  (--) Curve fit model valid range upper limit for first variable.
/// @param[in]    minY  (--) Curve fit model valid range lower limit for second variable.
/// @param[in]    maxY  (--) Curve fit model valid range upper limit for second variable.
/// @param[in]    name  (--) name for the instance.
///
/// @details  Initializes this Bivarirate Quadratic, Linear curve fit model taking coefficient, range and
///           name arguments
////////////////////////////////////////////////////////////////////////////////////////////////////