AGX Dynamics  2.35.0.1
StabilityReport.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_STABILITYREPORT_H
18 #define AGX_STABILITYREPORT_H
19 
20 #include <agx/SparseTypes.h>
21 #include <agx/agx_valarray_types.h>
22 
27 
28 namespace agx
29 {
30  class Solver;
31  class DirectSolverData;
32  class ElementaryConstraint;
33 
35 
37  {
38  public:
40  {
41  public:
43 
44  public:
45  Diff();
46  Diff( const agx::RealValarray& solution, agx::RangeReal range, agx::UInt index );
47 
48  agx::Bool isValid() const { return m_index != agx::InvalidIndex; }
49  agx::Real getSolution() const { return m_solution; }
50  agx::RangeReal getBound() const { return m_bound; }
51  agx::Real getDiff() const { return m_diff; }
52  agx::UInt getIndex() const { return m_index; }
53 
54  bool operator < ( const Diff& other ) const { return m_diff < other.m_diff; }
55 
56  private:
57  Real m_solution;
58  RangeReal m_bound;
59  Real m_diff;
60  UInt m_index;
61  };
62 
64  {
65  public:
67 
68  public:
69  Frame( const agx::RealValarray& solution, const agx::SparseRangeReal& bounds, const agx::String& description );
70 
71  const Diff::Container& getDiffs() const;
72 
73  private:
74  void initialize( const agx::RealValarray& solution, const agx::SparseRangeReal& bounds, const agx::String& description );
75 
76  private:
77  Diff::Container m_diffs;
78  agx::String m_description;
79  };
80 
82  {
83  public:
85  };
86 
88  {
89  public:
91 
92  public:
94 
98 
99  private:
100  PotentialConstraintIssue& operator= ( const PotentialConstraintIssue& ) { return *this; }
101 
102  private:
103  const agx::StabilityReport::Diff m_diff;
104  const agx::ConstraintImplementation* m_constraint;
105  const agx::ElementaryConstraint* m_ec;
106  };
107 
108  public:
110 
111  void setEnable( agx::Bool enable );
113 
114  agx::Bool empty() const;
115 
118 
119  virtual void report( const agx::RealValarray& z, const agx::SparseRangeReal& bounds, const agx::String& description );
120  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 );
121 
122  protected:
123  virtual ~StabilityReport();
124 
125  protected:
130  };
131 }
132 
133 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXPHYSICS_EXPORT
Elementary constraint base class with interface and global constraint functionality.
Pointer to a entity instance of type Physics.SolveIsland.
Base class providing referencing counted objects.
Definition: Referenced.h:114
Essentially a sparse array of bounds.
Definition: SparseTypes.h:74
agx::VectorPOD< Diff > Container
agx::Real getSolution() const
agx::Real getDiff() const
agx::Bool isValid() const
agx::RangeReal getBound() const
agx::UInt getIndex() const
Diff(const agx::RealValarray &solution, agx::RangeReal range, agx::UInt index)
const Diff::Container & getDiffs() const
Frame(const agx::RealValarray &solution, const agx::SparseRangeReal &bounds, const agx::String &description)
agx::Vector< Frame > Container
PotentialConstraintIssue(const agx::StabilityReport::Diff &diff, const agx::ConstraintImplementation *constraint, const agx::ElementaryConstraint *elementaryConstraint)
const agx::ConstraintImplementation * getConstraint() const
const agx::StabilityReport::Diff & getDiff() const
const agx::ElementaryConstraint * getElementaryConstraint() const
agx::Vector< PotentialConstraintIssue > Container
agx::Vector< PotentialContactIssue > Container
virtual void report(const agx::RealValarray &z, const agx::SparseRangeReal &bounds, const agx::String &description)
const agx::StabilityReport::PotentialContactIssue::Container & getPotentialContactIssues() 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
const agx::StabilityReport::PotentialConstraintIssue::Container & getPotentialConstraintIssues() const
agx::Bool empty() const
agx::Bool getEnable() const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42
std::valarray< agx::Real > RealValarray
For this module, vectors are defined using valarray.
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex