Simbody
3.4 (development)
|
Options for the advanced project() methods. More...
#include <System.h>
Public Types | |
enum | Option { None = 0x0000, LocalOnly = 0x0001, DontThrow = 0x0002, UseInfinityNorm = 0x0004, ForceProjection = 0x0008, ForceFullNewton = 0x0010 } |
Public Member Functions | |
ProjectOptions () | |
Default constructor sets options to their default values. | |
ProjectOptions (Real accuracy) | |
This constructor allows the default accuracy to be overridden while leaving all other options at their default values. | |
ProjectOptions (Option opt) | |
This constructor creates default options except one setting one non-default Option. | |
ProjectOptions & | clear () |
Restore this object to its default-constructed state (no options selected, default accuracy and overshoot). | |
ProjectOptions & | setRequiredAccuracy (Real accuracy) |
The norm of the constraint errors must be driven to below this value for a project() to be considered successful. | |
ProjectOptions & | setOvershootFactor (Real overshoot) |
Project will attempt to reach accuracy*overshoot but settle for just accuracy. | |
ProjectOptions & | setProjectionLimit (Real limit) |
Project will fail immediately if the initial norm is greater than the projection limit, with status FailureToConverge. | |
ProjectOptions & | clearOption (Option opt) |
Remove a given option from the set. | |
ProjectOptions & | setOption (Option opt) |
Set a particular option. | |
Real | getRequiredAccuracy () const |
Return the current value for the required accuracy option. | |
Real | getOvershootFactor () const |
Return the factor by which a project() method should try to do better than the required accuracy. | |
Real | getProjectionLimit () const |
Return the maximum norm we're allowed to attempt to correct. | |
bool | isOptionSet (Option opt) const |
ProjectOptions & | operator|= (const ProjectOptions &opts) |
ProjectOptions & | operator&= (const ProjectOptions &opts) |
ProjectOptions & | operator-= (const ProjectOptions &opts) |
ProjectOptions & | operator|= (Option opt) |
ProjectOptions & | operator-= (Option opt) |
Static Public Member Functions | |
static Real | getDefaultRequiredAccuracy () |
static Real | getDefaultOvershootFactor () |
Options for the advanced project() methods.
The default is to require project() methods to reduce constraint errors to an RMS norm of 1e-4, while asking them to attempt 10X tighter accuracy if possible.
SimTK::ProjectOptions::ProjectOptions | ( | ) | [inline] |
Default constructor sets options to their default values.
SimTK::ProjectOptions::ProjectOptions | ( | Real | accuracy | ) | [inline, explicit] |
This constructor allows the default accuracy to be overridden while leaving all other options at their default values.
If accuracy is nonpositive, the default accuracy will be used.
SimTK::ProjectOptions::ProjectOptions | ( | Option | opt | ) | [inline, explicit] |
This constructor creates default options except one setting one non-default Option.
You can add more with the setOption() method.
ProjectOptions& SimTK::ProjectOptions::clear | ( | ) | [inline] |
Restore this object to its default-constructed state (no options selected, default accuracy and overshoot).
A reference to the newly-cleared object is returned.
ProjectOptions& SimTK::ProjectOptions::setRequiredAccuracy | ( | Real | accuracy | ) | [inline] |
The norm of the constraint errors must be driven to below this value for a project() to be considered successful.
Normally an RMS norm is used but you can override that to use an infinity norm instead. If accuracy is nonpositive we'll use the default; see getDefaultRequiredAccuracy().
ProjectOptions& SimTK::ProjectOptions::setOvershootFactor | ( | Real | overshoot | ) | [inline] |
Project will attempt to reach accuracy*overshoot but settle for just accuracy.
ProjectOptions& SimTK::ProjectOptions::setProjectionLimit | ( | Real | limit | ) | [inline] |
Project will fail immediately if the initial norm is greater than the projection limit, with status FailureToConverge.
ProjectOptions& SimTK::ProjectOptions::clearOption | ( | Option | opt | ) | [inline] |
Remove a given option from the set.
Nothing happens if the option wasn't already set.
ProjectOptions& SimTK::ProjectOptions::setOption | ( | Option | opt | ) | [inline] |
Set a particular option.
Multiple calls are or'ed together.
Real SimTK::ProjectOptions::getRequiredAccuracy | ( | ) | const [inline] |
Return the current value for the required accuracy option.
Real SimTK::ProjectOptions::getOvershootFactor | ( | ) | const [inline] |
Return the factor by which a project() method should try to do better than the required accuracy.
Real SimTK::ProjectOptions::getProjectionLimit | ( | ) | const [inline] |
Return the maximum norm we're allowed to attempt to correct.
bool SimTK::ProjectOptions::isOptionSet | ( | Option | opt | ) | const [inline] |
static Real SimTK::ProjectOptions::getDefaultRequiredAccuracy | ( | ) | [inline, static] |
static Real SimTK::ProjectOptions::getDefaultOvershootFactor | ( | ) | [inline, static] |
ProjectOptions& SimTK::ProjectOptions::operator|= | ( | const ProjectOptions & | opts | ) | [inline] |
ProjectOptions& SimTK::ProjectOptions::operator&= | ( | const ProjectOptions & | opts | ) | [inline] |
ProjectOptions& SimTK::ProjectOptions::operator-= | ( | const ProjectOptions & | opts | ) | [inline] |
ProjectOptions& SimTK::ProjectOptions::operator|= | ( | Option | opt | ) | [inline] |
ProjectOptions& SimTK::ProjectOptions::operator-= | ( | Option | opt | ) | [inline] |