Program listing for file kernel/src/modelingTools/LagrangianR.hpp#

 1#ifndef LAGRANGIANRELATION_H
 2#define LAGRANGIANRELATION_H
 3
 4#include "Relation.hpp"
 5#include "Interaction.hpp"
 6#include "PluginTypes.hpp"
 7
 8
 9
10
11class LagrangianR : public Relation
12{
13public:
14  enum LagrangianRDS  {z, q0, q1, q2, p0, p1, p2, DSlinkSize};
15
16protected:
17
18  ACCEPT_SERIALIZATION(LagrangianR);
19
20
21  SP::SimpleMatrix _jachlambda{nullptr};
22
23
24  SP::SimpleMatrix _jachq{nullptr};
25
26
27  SP::SimpleMatrix _jachqDot{nullptr};
28
29
30  SP::SimpleMatrix _dotjachq{nullptr};
31
32  SP::PluggedObject _pluginJachq{nullptr};
33
34
35  LagrangianR(RELATION::SUBTYPES lagType): Relation(RELATION::Lagrangian, lagType) {}
36
37
38  void _zeroPlugin() override;
39
40public:
41
42
43  virtual ~LagrangianR() noexcept = default;
44
45
46
47  inline void initialize(Interaction &inter) override {};
48
49
50
51
52  inline SP::SimpleMatrix jachq() const
53  {
54    return _jachq;
55  }
56  inline SP::SimpleMatrix jachqDot() const
57  {
58    return _jachqDot;
59  }
60  inline SP::SimpleMatrix dotJachq() const
61  {
62    return _dotjachq;
63  }
64  inline SP::SimpleMatrix jachlambda() const
65  {
66    return _jachlambda;
67  }
68
69
70  inline void setJachqPtr(SP::SimpleMatrix newPtr)
71  {
72    _jachq = newPtr ;
73  }
74
75  inline SP::SimpleMatrix C() const override
76  {
77    return _jachq;
78  }
79
80  inline SP::SimpleMatrix H() const override
81  {
82    return _jachq;
83  }
84
85
86  void display() const override;
87
88};
89TYPEDEF_SPTR(LagrangianR)
90#endif