Class FieldEquationsMapper<T extends CalculusFieldElement<T>>

    • Method Detail

      • getNumberOfEquations

        public int getNumberOfEquations()
        Get the number of equations mapped.
        Returns:
        number of equations mapped
      • getTotalDimension

        public int getTotalDimension()
        Return the dimension of the complete set of equations.

        The complete set of equations correspond to the primary set plus all secondary sets.

        Returns:
        dimension of the complete set of equations
      • mapStateAndDerivative

        public FieldODEStateAndDerivative<T> mapStateAndDerivative​(T t,
                                                                   T[] y,
                                                                   T[] yDot)
                                                            throws MathIllegalArgumentException
        Map flat arrays to a state and derivative.
        Parameters:
        t - time
        y - state array to map, including primary and secondary components
        yDot - state derivative array to map, including primary and secondary components
        Returns:
        mapped state
        Throws:
        MathIllegalArgumentException - if an array does not match total dimension
      • extractEquationData

        public T[] extractEquationData​(int index,
                                       T[] complete)
                                throws MathIllegalArgumentException
        Extract equation data from a complete state or derivative array.
        Parameters:
        index - index of the equation, must be between 0 included and getNumberOfEquations() (excluded)
        complete - complete state or derivative array from which equation data should be retrieved
        Returns:
        equation data
        Throws:
        MathIllegalArgumentException - if index is out of range
        MathIllegalArgumentException - if complete state has not enough elements
      • insertEquationData

        public void insertEquationData​(int index,
                                       T[] equationData,
                                       T[] complete)
                                throws MathIllegalArgumentException
        Insert equation data into a complete state or derivative array.
        Parameters:
        index - index of the equation, must be between 0 included and getNumberOfEquations() (excluded)
        equationData - equation data to be inserted into the complete array
        complete - placeholder where to put equation data (only the part corresponding to the equation will be overwritten)
        Throws:
        MathIllegalArgumentException - if either array has not enough elements