6 #ifndef __driveline_TorsionSpring_h__ 7 #define __driveline_TorsionSpring_h__ 19 class FE_DL_EXPORT TorsionSpring :
public DrivelineItem,
20 public CastableAs<TorsionSpring>
23 TorsionSpring(sp<SemiImplicit1D> a_integrator);
24 virtual ~TorsionSpring(
void);
25 virtual void accumulate(
void);
26 virtual bool validate(
void);
28 virtual void compile(sp<RecordGroup> rg_input,
29 std::vector<SemiImplicit1D::Particle> &a_particles,
30 SemiImplicit1D::CompileMatrix &a_compileMatrix);
32 virtual void pairs(sp<RecordGroup> rg_input,
33 SemiImplicit1D::t_pairs &a_pairs);
35 virtual void reconfigure(
void);
38 class FE_DL_EXPORT Spring
41 t_solve_real m_restlength;
42 t_solve_real m_stiffness;
43 t_solve_real m_damping;
44 t_solve_real *m_location[2];
45 t_solve_real *m_ratio[2];
46 t_solve_real m_prev_distance;
47 t_solve_real *m_velocity[2];
48 t_solve_real *m_force[2];
49 t_solve_real *m_diagonal_dfdx[2];
50 t_solve_real *m_diagonal_dfdv[2];
51 t_solve_real *m_offdiagonal_dfdx;
52 t_solve_real *m_offdiagonal_dfdv;
55 sp< SemiImplicit1D::t_pair> m_spPair;
58 Spring *spring(
const String &a_name);
60 hp<SemiImplicit1D> m_integrator;
62 std::vector<Spring> m_springs;
63 std::map<String, Spring *> m_springmap;
65 t_solve_real m_perturbation;
67 AsGearTrain m_asGearTrain;
kernel
Definition: namespace.dox:3