指定物体运动或变形
MotionConstraint
/**
* @class MotionConstraint
* @brief Base class for constraining with prescribed motion.
* Exact motion function will be defined in derive class.
* Note that, we do not impose acceleration, so that this constraint
* must be imposed after updating particle velocity by forces
* and before updating particle position.
*/
template <class DynamicsIdentifier>
class MotionConstraint : public BaseLocalDynamics<DynamicsIdentifier>
{
public:
explicit MotionConstraint(DynamicsIdentifier &identifier)
: BaseLocalDynamics<DynamicsIdentifier>(identifier),
pos_(this->particles_->template getVariableDataByName<Vecd>("Position")),
pos0_(this->particles_->template registerStateVariableDataFrom<Vecd>("InitialPosition", "Position")),
vel_(this->particles_->template registerStateVariableData<Vecd>("Velocity")) {};
virtual ~MotionConstraint() {};
protected:
Vecd *pos_, *pos0_, *vel_;
};案例
造波器的平动
蠕动泵的变形



Last updated