T
- the type of the field elementspublic class FieldEquationsMapper<T extends CalculusFieldElement<T>> extends Object implements Serializable
Instances of this class are guaranteed to be immutable.
FieldExpandableODE
,
Serialized FormModifier and Type | Method and Description |
---|---|
T[] |
extractEquationData(int index,
T[] complete)
Extract equation data from a complete state or derivative array.
|
int |
getNumberOfEquations()
Get the number of equations mapped.
|
int |
getTotalDimension()
Return the dimension of the complete set of equations.
|
void |
insertEquationData(int index,
T[] equationData,
T[] complete)
Insert equation data into a complete state or derivative array.
|
FieldODEStateAndDerivative<T> |
mapStateAndDerivative(T t,
T[] y,
T[] yDot)
Map flat arrays to a state and derivative.
|
public int getNumberOfEquations()
public int getTotalDimension()
The complete set of equations correspond to the primary set plus all secondary sets.
public FieldODEStateAndDerivative<T> mapStateAndDerivative(T t, T[] y, T[] yDot) throws MathIllegalArgumentException
t
- timey
- state array to map, including primary and secondary componentsyDot
- state derivative array to map, including primary and secondary componentsMathIllegalArgumentException
- if an array does not match total dimensionpublic T[] extractEquationData(int index, T[] complete) throws MathIllegalArgumentException
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 retrievedMathIllegalArgumentException
- if index is out of rangeMathIllegalArgumentException
- if complete state has not enough elementspublic void insertEquationData(int index, T[] equationData, T[] complete) throws MathIllegalArgumentException
index
- index of the equation, must be between 0 included and
getNumberOfEquations()
(excluded)equationData
- equation data to be inserted into the complete arraycomplete
- placeholder where to put equation data (only the
part corresponding to the equation will be overwritten)MathIllegalArgumentException
- if either array has not enough elementsCopyright © 2016-2021 CS GROUP. All rights reserved.