14 template <
typename _Type>
26 Residual(
const unsigned& order,
const unsigned& nvars);
65 problem =
"The Residual::residual_fn method has not been implemented.\n";
66 problem +=
"You have to implement this method to define the residual.\n";
99 template <
typename _Type>
105 residual_fn(LAST_STATE, FN_AT_LAST_STATE);
106 jacobian(LAST_STATE, JAC_AT_LAST_STATE);
112 template <
typename _Type>
114 return FN_AT_LAST_STATE;
117 template <
typename _Type>
119 return JAC_AT_LAST_STATE;
122 template <
typename _Type>
124 return ORDER_OF_SYSTEM;
127 template <
typename _Type>
129 return NUMBER_OF_VARS;
132 template <
typename _Type>
137 template <
typename _Type>
A matrix class that constructs a DENSE matrix as an STL Vector of DenseVectors.
Specification for a templated DenseVector class – a dense, dynamic, vector object.
A spec for the CppNoddy Timer object.
A matrix class that constructs a DENSE matrix as a row major std::vector of DenseVectors.
An DenseVector class – a dense vector object.
A generic runtime exception.
A base class to be inherited by objects that define residuals.
const DenseMatrix< _Type > & jacobian() const
Retrun a handle to the Jacobian of the residual corresponding to the last update state.
_Type DELTA
A default step for FD computation of the Jacobian.
const DenseVector< _Type > & residual() const
Return a handle to the residuals corresponding to the last update state.
unsigned get_number_of_vars() const
Get the number of variables that this residual condition is defined for.
const _Type & delta() const
virtual void residual_fn(const DenseVector< _Type > &state, DenseVector< _Type > &f) const
A blank virtual residual function method.
unsigned get_order() const
Get the order of the residual vector.
virtual ~Residual()
An empty destructor, virtual since we have virtual methods.
DenseVector< _Type > FN_AT_LAST_STATE
Residual for the last state vector.
unsigned NUMBER_OF_VARS
The number of elements in the state vector.
DenseVector< _Type > LAST_STATE
The last state vector.
DenseMatrix< _Type > JAC_AT_LAST_STATE
Jacobian for the last state vector.
unsigned ORDER_OF_SYSTEM
The order of the system of equations.
void update(const DenseVector< _Type > &state)
Update the Residual object for the current set of state variables.
A simple CPU-clock-tick timer for timing metods.
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...