19 template<
typename Matrix>
23 using VectorFunctionType = std::function<const Vectord& (const Vectord&, const bool)>;
24 using MatrixFunctionType = std::function<const Matrix& (const Vectord&)>;
26 using VecMatPair = std::pair<const Vectord*, const Matrix*>;
27 using VectorMatrixFunctionType = std::function<VecMatPair(const Vectord&, const bool)>;
28 using UpdateFunctionType = std::function<void (const Vectord&, const bool)>;
29 using UpdatePrevStateFunctionType = std::function<void ()>;
32 NonLinearSystem(
const VectorFunctionType& F,
const MatrixFunctionType& dF);
33 NonLinearSystem(
const VectorFunctionType& F,
const MatrixFunctionType& dF,
const VectorMatrixFunctionType& F_dF);
40 virtual void setFunction(
const VectorFunctionType&
function);
45 virtual void setJacobian(
const MatrixFunctionType&
function);
50 virtual const Vectord&
evaluateF(
const Vectord& x,
const bool isSemiImplicit);
60 void setUnknownVector(Vectord& v)
92 m_FUpdate = updateFunc;
100 m_FUpdatePrevState = updateFunc;
119 VectorMatrixFunctionType m_F_dF;
120 Vectord* m_unknown =
nullptr;
122 UpdateFunctionType m_FUpdate;
123 UpdatePrevStateFunctionType m_FUpdatePrevState;
virtual const Vectord & evaluateF(const Vectord &x, const bool isSemiImplicit)
Evaluate function at a given state.
VectorFunctionType m_F
Get the vector denoting the filter.
Base class for a multi-variable nonlinear system.
MatrixFunctionType m_dF
Gradient of the Nonlinear function with respect to the unknown vector.
virtual void setJacobian(const MatrixFunctionType &function)
Set the method that evaluates the gradient of the nonlinear function.
virtual const Matrix & evaluateJacobian(const Vectord &x)
Evaluate gradient of the function at a given state.
void setUpdatePreviousStatesFunction(const UpdatePrevStateFunctionType &updateFunc)
Set the update function.
void setUpdateFunction(const UpdateFunctionType &updateFunc)
Get the vector denoting the filter.
Vectord & getUnknownVector()
Get the vector used to populate the solution.
virtual void setFunction(const VectorFunctionType &function)
Set nonlinear method that evaluates the nonlinear function.