AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
StabilityReport.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGX_STABILITYREPORT_H
18#define AGX_STABILITYREPORT_H
19
20#include <agx/SparseTypes.h>
22
27
28namespace agx
29{
30 class Solver;
31 class DirectSolverData;
32 class ElementaryConstraint;
33
35
37 {
38 public:
40 {
41 public:
43
44 public:
46 Diff( const agx::RealValarray& solution,
47 agx::RangeReal range,
48 agx::UInt permutedRowIndex );
49
50 agx::Bool isValid() const { return m_permutedRowIndex != agx::InvalidIndex; }
51 agx::Real getSolution() const { return m_solution; }
52 agx::RangeReal getBound() const { return m_bound; }
53 agx::Real getDiff() const { return m_diff; }
54 agx::UInt getPermutedRowIndex() const { return m_permutedRowIndex; }
55
56 bool operator < ( const Diff& other ) const { return m_diff < other.m_diff; }
57
58 private:
59 Real m_solution;
60 RangeReal m_bound;
61 Real m_diff;
62 UInt m_permutedRowIndex;
63 };
64
66 {
67 public:
69
70 public:
71 Frame( const agx::RealValarray& solution, const agx::SparseRangeReal& bounds, const agx::String& description );
72
73 const Diff::Container& getDiffs() const;
74
75 private:
76 void initialize( const agx::RealValarray& solution, const agx::SparseRangeReal& bounds, const agx::String& description );
77
78 private:
79 Diff::Container m_diffs;
80 agx::String m_description;
81 };
82
84 {
85 public:
87
88 public:
91 const agx::UInt permutedStartRow )
92 : diff( diff )
93 , contact( contact )
94 , permutedStartRow( permutedStartRow )
95 {
96 }
97
101 };
102
104 {
105 public:
107
108 public:
110 const agx::ConstraintImplementation* constraint,
111 const agx::Physics::ConstraintBasePtr constraintEntity,
112 const agx::ElementaryConstraint* elementaryConstraint,
113 const agx::UInt permutedStartRow )
114 : diff( diff )
115 , constraint( constraint )
116 , constraintEntity( constraintEntity )
117 , elementaryConstraint( elementaryConstraint )
118 , permutedStartRow( permutedStartRow )
119 {
120 }
121
127 };
128
129 public:
131
132 void setEnable( agx::Bool enable );
134
136
139
140 virtual void report( const agx::RealValarray& z,
141 const agx::SparseRangeReal& bounds,
142 const agx::String& description );
143 virtual void finalize( agx::Solver *solver,
144 const agx::Physics::SolveIslandPtr island,
145 const agx::Physics::ContactConstraintData& contactConstraint,
146 const agx::Physics::BinaryConstraintData& binaryConstraint,
147 const agx::Physics::ManyBodyConstraintData& manyBodyConstraint );
148
149 protected:
151
152 protected:
157 };
158}
159
160#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXPHYSICS_EXPORT
Elementary constraint base class with interface and global constraint functionality.
Pointer to a entity instance of type Physics.ConstraintBase.
Pointer to a entity instance of type Physics.ContactConstraint.
Pointer to a entity instance of type Physics.SolveIsland.
Base class providing referencing counted objects.
Definition Referenced.h:120
Essentially a sparse array of bounds.
Definition SparseTypes.h:74
agx::VectorPOD< Diff > Container
agx::Real getSolution() const
Diff(const agx::RealValarray &solution, agx::RangeReal range, agx::UInt permutedRowIndex)
agx::UInt getPermutedRowIndex() const
agx::RangeReal getBound() const
const Diff::Container & getDiffs() const
Frame(const agx::RealValarray &solution, const agx::SparseRangeReal &bounds, const agx::String &description)
agx::Vector< Frame > Container
const agx::ConstraintImplementation * constraint
PotentialConstraintIssue(const agx::StabilityReport::Diff &diff, const agx::ConstraintImplementation *constraint, const agx::Physics::ConstraintBasePtr constraintEntity, const agx::ElementaryConstraint *elementaryConstraint, const agx::UInt permutedStartRow)
agx::Vector< PotentialConstraintIssue > Container
const agx::ElementaryConstraint * elementaryConstraint
const agx::Physics::ConstraintBasePtr constraintEntity
const agx::StabilityReport::Diff diff
const agx::Physics::ContactConstraintPtr contact
agx::Vector< PotentialContactIssue > Container
PotentialContactIssue(const agx::StabilityReport::Diff &diff, const agx::Physics::ContactConstraintPtr contact, const agx::UInt permutedStartRow)
virtual void report(const agx::RealValarray &z, const agx::SparseRangeReal &bounds, const agx::String &description)
const agx::StabilityReport::PotentialConstraintIssue::Container & getPotentialConstraintIssues() const
PotentialContactIssue::Container m_potentialContactIssues
virtual void finalize(agx::Solver *solver, const agx::Physics::SolveIslandPtr island, const agx::Physics::ContactConstraintData &contactConstraint, const agx::Physics::BinaryConstraintData &binaryConstraint, const agx::Physics::ManyBodyConstraintData &manyBodyConstraint)
PotentialConstraintIssue::Container m_potentialConstraintIssues
virtual ~StabilityReport()
void setEnable(agx::Bool enable)
Frame::Container m_frames
agx::Bool empty() const
agx::Bool getEnable() const
const agx::StabilityReport::PotentialContactIssue::Container & getPotentialContactIssues() const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42
std::valarray< agx::Real > RealValarray
For this module, vectors are defined using valarray.
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex