List of all members.
Detailed Description
template<typename mbd_types>
class OpenTissue::mbd::ConstraintInterface< mbd_types >
Constraint base Class. Constraints are always imposed between a pair of bodies. These bodies are ordered uniquely such that the body denoted by A have the smallest index and the body denoted by B have the greatest index.
Besides that it defines several paramters common to all constraints such as error reduction parameter and constraint force mixing.
Member Typedef Documentation
template<typename mbd_types >
template<typename mbd_types >
template<typename mbd_types >
template<typename mbd_types >
template<typename mbd_types >
template<typename mbd_types >
Constructor & Destructor Documentation
template<typename mbd_types >
template<typename mbd_types >
Member Function Documentation
template<typename mbd_types >
Evaluate Constraint. This method is responsible for evaluating the current state of the constraint. This implies setting up any internal data structures needed for construting the jacobians and auxiliary data later on.
Also the method is responsible for evaluating whetever the constraint is actually active in the current state. This implies that if the method isEvaluatedActive() is invoked afterwards then it should return the active state determined by evaluate().
template<typename mbd_types >
Get Angular Jacobian of body A.
- Parameters:
-
| J | Upon return this matrix contains the request jacobian matrix. The matrix must have dimension mx3, where m is the number of jacobian variables (rows). |
template<typename mbd_types >
Get Angular Jacobian of body B.
- Parameters:
-
| J | Upon return this matrix contains the request jacobian matrix. The matrix must have dimension mx3, where m is the number of jacobian variables (rows). |
template<typename mbd_types >
Get body_type A.
- Returns:
- A pointer to the first body.
template<typename mbd_types >
Get body_type B.
- Returns:
- A pointer to the second body.
template<typename mbd_types >
Get Bounds Scaling Factor. Imagine having the same case as described in the getDepedencyIndices() method. The first row is not dependent on the others, so its scale factor is a ``don't care'', if the bounds of the second row are twice the value of the first variable, and the bounds on the third row are three times the value of the first variable, then the fac-vector is equal to [0,2,3] real_type.
Notice that all factor values are non-negative.
- Parameters:
-
| factors | Upon return the vector holds all factor values. Must be have size equal to number of jacobian rows. |
template<typename mbd_types >
Get Dependency Indices. As an example say a constraint have tree variables, ie. three jacobian rows, these are numbered locally 0,1, and 2. Imagine that the bounds on the last two are dependent on the first row. Further assume that the global index of the first row is given by the index-value m. In this case the dep-vector should be equal to
[max_value,m,m]
Note: An entry containing the maximum possible value of the underlying data type indicates that there are no dependencies on the correspoding constraint.
Note: The method should return global indices of the dependent constraints and NOT local indices. One can use the method get_jacobian_index() to retrieve the global index of the first constraint variable.
- Parameters:
-
| dep | Upon return vector holds relative dependency indices. Must be have size equal to number of jacobian rows |
template<typename mbd_types >
Get Jacobian High Limits.
- Parameters:
-
| hi | Upon return this vector holds the high limits of the lagrange multipliers associated with the jacobian constraints. Must be have size equal to number of jacobian rows. |
template<typename mbd_types >
Return Starting Index of Jacobian Data.
- Returns:
- The starting row index into the system jacobian and error term vector.
template<typename mbd_types >
Get Linear Jacobian of body A.
- Parameters:
-
| J | Upon return this matrix contains the request jacobian matrix. The matrix must have dimension mx3, where m is the number of jacobian variables (rows). |
template<typename mbd_types >
Get Linear Jacobian of body B.
- Parameters:
-
| J | Upon return this matrix contains the request jacobian matrix. The matrix must have dimension mx3, where m is the number of jacobian variables (rows). |
template<typename mbd_types >
Get Jacobian Low Limits.
- Parameters:
-
| lambda_low | Upon return this vector holds the low limits of the lagrange multipliers associated with the jacobian constraints. |
template<typename mbd_types >
Get Constraint force_type Mixing Vector.
- Parameters:
-
| gamma | Upon return this vector holds the values of the gamma paramters. Must be have size equal to number of jacobian rows. |
template<typename mbd_types >
Get Cached Solution.
- Parameters:
-
| solution | Upon return this vector expression will contain the last stored solution. Must be have size equal to number of jacobian rows. |
template<typename mbd_types >
Get Error Term Vector.
- Parameters:
-
| b_error | Upon return this vector holds the error term (or right hand side vector) related to the jacobian variables. Initially the vector must have the same size as the number of jacobian variables (rows). |
template<typename mbd_types >
Set Starting Index of Jacobian Data.
- Parameters:
-
| idx | The global starting row index into the system jacobian and error term vector. That is the global index corresponding to local 0-row. |
template<typename mbd_types >
Set Constraint force_type Mixing Parameters. Note all values must be in the interval 0..1. The vector must have same size as the number of jacobian constraints (rows in the jacobian matrices).
- Parameters:
-
| gamma | A vector containing the new parameter values. Must be have size equal to number of jacobian rows. |
template<typename mbd_types >
Save Solution of Jacobian Lagrange Multipliers
- Parameters:
-
| solution | A vector expression containing the solution to be saved. Must be have size equal to number of jacobian rows. |
Member Data Documentation
template<typename mbd_types >
A pointer to the first body.
template<typename mbd_types >
A pointer to the second body.
template<typename mbd_types >
Starting row index if jacobian data in system jacobian (note that column indices are determined by bodies).
The documentation for this class was generated from the following file: