7 #ifndef __driveline_SemiImplicitDriveline_h__ 8 #define __driveline_SemiImplicitDriveline_h__ 15 class FE_DL_EXPORT DrivelineItem :
public SemiImplicit1D::Force,
16 public CastableAs<DrivelineItem>
20 virtual ~DrivelineItem(
void);
22 void setDriveline(sp<DrivelineI> a_spDriveLine)
23 { m_spDriveLine = a_spDriveLine; }
26 hp<DrivelineI> m_spDriveLine;
30 class ShaftForce :
public DrivelineItem,
public CastableAs<ShaftForce>
33 ShaftForce(sp<SemiImplicit1D> a_integrator)
37 virtual ~ShaftForce(
void) {}
39 void bind(SemiImplicit1D::Particle *a_particle)
41 m_particle = a_particle;
44 virtual void accumulate(
void)
46 m_particle->m_force += (t_solve_real)(m_force);
49 void set(
const t_solve_real &a_force)
51 m_force = a_force * m_particle->m_ratio;
52 fe_fprintf(stderr,
"FRC %g %g\n", m_force, a_force);
54 t_solve_real
get(void)
56 return m_particle->m_force / m_particle->m_ratio;
58 t_solve_real location(
void)
60 return m_particle->m_location_ratio;
62 t_solve_real velocity(
void)
64 return m_particle->m_velocity * m_particle->m_ratio;
66 t_solve_real coreVelocity(
void)
68 return m_particle->m_velocity;
70 void setvelocity(
const t_solve_real &a_value)
72 m_particle->m_velocity = a_value / m_particle->m_ratio;
76 SemiImplicit1D::Particle *m_particle;
82 :
virtual public DrivelineI,
89 virtual void initialize(
void);
91 virtual void step(t_moa_real a_dt);
92 virtual void sync(
void);
93 virtual bool compile(
Record r_driveline);
100 bool m_has_externalTorque;
107 AsSolverParticle1D m_asSolverParticle;
109 AsExternalTorque m_asExternalTorque;
110 std::map< String, Shaft > m_shafts;
Driveline Solver.
Definition: SemiImplicitDriveline.h:81
kernel
Definition: namespace.dox:3
Reference to an instance of a Layout.
Definition: RecordSB.h:35
particle in physical space
Definition: shapeAS.h:114
Driveline Shaft.
Definition: drivelineAS.h:29
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192