SPHinXsys  alpha version
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SPH::solid_dynamics::ConstrainSolidBodyPartBySimBody Class Reference

Constrain a solid body part from the motion computed from Simbody. More...

#include <constraint_dynamics.h>

Inherits SPH::PartSimpleDynamicsByParticle, and SPH::DataDelegateSimple< BodyType, ParticlesType, MaterialType >.

Public Member Functions

 ConstrainSolidBodyPartBySimBody (SolidBody &solid_body, SolidBodyPartForSimbody &body_part, SimTK::MultibodySystem &MBsystem, SimTK::MobilizedBody &mobod, SimTK::Force::DiscreteForces &force_on_bodies, SimTK::RungeKuttaMersonIntegrator &integ)
 
- Public Member Functions inherited from SPH::PartSimpleDynamicsByParticle
 PartSimpleDynamicsByParticle (SPHBody &sph_body, BodyPartByParticle &body_part)
 
virtual void exec (Real dt=0.0) override
 
virtual void parallel_exec (Real dt=0.0) override
 
- Public Member Functions inherited from SPH::PartDynamicsByParticle
 PartDynamicsByParticle (SPHBody &sph_body, BodyPartByParticle &body_part)
 
- Public Member Functions inherited from SPH::ParticleDynamics< void >
 ParticleDynamics (SPHBody &sph_body)
 
SPHBodygetSPHBody ()
 
- Public Member Functions inherited from SPH::DataDelegateSimple< BodyType, ParticlesType, MaterialType >
 DataDelegateSimple (SPHBody &sph_body)
 
BodyType * getBody ()
 
ParticlesType * getParticles ()
 
MaterialType * getMaterial ()
 

Protected Member Functions

virtual void setupDynamics (Real dt=0.0) override
 
virtual void Update (size_t index_i, Real dt=0.0) override
 
- Protected Member Functions inherited from SPH::ParticleDynamics< void >
void setBodyUpdated ()
 

Protected Attributes

StdLargeVec< Vecd > & pos_
 
StdLargeVec< Vecd > & pos0_
 
StdLargeVec< Vecd > & vel_
 
StdLargeVec< Vecd > & n_
 
StdLargeVec< Vecd > & n0_
 
SimTK::MultibodySystem & MBsystem_
 
SimTK::MobilizedBody & mobod_
 
SimTK::Force::DiscreteForces & force_on_bodies_
 
SimTK::RungeKuttaMersonIntegrator & integ_
 
const SimTK::State * simbody_state_
 
Vec3d initial_mobod_origin_location_
 
- Protected Attributes inherited from SPH::PartSimpleDynamicsByParticle
ParticleFunctor functor_update_
 
- Protected Attributes inherited from SPH::PartDynamicsByParticle
IndexVectorbody_part_particles_
 
- Protected Attributes inherited from SPH::ParticleDynamics< void >
SPHBodysph_body_
 
SPHAdaptationsph_adaptation_
 
BaseParticlesbase_particles_
 
- Protected Attributes inherited from SPH::DataDelegateSimple< BodyType, ParticlesType, MaterialType >
BodyType * body_
 
ParticlesType * particles_
 
MaterialType * material_
 
StdLargeVec< size_t > & sorted_id_
 
StdLargeVec< size_t > & unsorted_id_
 

Additional Inherited Members

- Static Public Attributes inherited from SPH::GlobalStaticVariables
static Real physical_time_ = 0.0
 

Detailed Description

Constrain a solid body part from the motion computed from Simbody.

Member Function Documentation

◆ setupDynamics()

void SPH::solid_dynamics::ConstrainSolidBodyPartBySimBody::setupDynamics ( Real  dt = 0.0)
overrideprotectedvirtual

the function for set global parameters for the particle dynamics

Reimplemented from SPH::ParticleDynamics< void >.

◆ Update()

void SPH::solid_dynamics::ConstrainSolidBodyPartBySimBody::Update ( size_t  index_i,
Real  dt = 0.0 
)
overrideprotectedvirtual

this is how we calculate the particle position in after transform of MBbody. const SimTK::Rotation& R_GB = mobod_.getBodyRotation(simbody_state); const SimTK::Vec3& p_GB = mobod_.getBodyOriginLocation(simbody_state); const SimTK::Vec3 r = R_GB * rr; // re-express station vector p_BS in G (15 flops) base_particle_data_i.pos_ = (p_GB + r).getSubVec<2>(0);

this is how we calculate the particle position in after transform of MBbody. const SimTK::Rotation& R_GB = mobod_.getBodyRotation(simbody_state); const SimTK::Vec3& p_GB = mobod_.getBodyOriginLocation(simbody_state); const SimTK::Vec3 r = R_GB * rr; // re-express station vector p_BS in G (15 flops) base_particle_data_i.pos_ = (p_GB + r);

Implements SPH::PartSimpleDynamicsByParticle.


The documentation for this class was generated from the following files: