Main class for forward dynamics computation. More...
#include <psim.h>

Public Member Functions | |
| int | AutoSchedule (int max_procs) |
Automatic scheduling for max_procs processors. | |
| virtual void | Clear () |
| int | ConstraintForces (fVec &cf) |
| Extract the constraint forces. | |
| void | DumpSchedule (ostream &ost) |
Dump the schedule information to ost. | |
| void | GetPJoint (Joint *_joint, pJoint *_pjoints[2]) |
| int | NumLeaves () |
| pSim () | |
| Default constructor. | |
| int | Schedule () |
| Creates default schedule, which is optimized for serial computation. | |
| int | Schedule (Joint **joints) |
| Creates a schedule that assembles the chain in the specified order of joints. | |
| int | ScheduleDepth () |
| int | TotalCost () |
| Approximate indicators of total computational cost. | |
| int | Update () |
| Compute joint accelerations. | |
| int | Update (double timestep, std::vector< class SDContactPair * > &sdContactPairs) |
| Compute joint accelerations and contact forces. | |
| ~pSim () | |
Protected Member Functions | |
| virtual int | clear_contact () |
| virtual int | clear_data () |
| Clear arrays only; don't delete joints. | |
| virtual int | init (SceneGraph *sg) |
| Initialize the parameters. | |
| int | init_contact () |
| int | myinit () |
Private Member Functions | |
| int | build_subchain_tree (int _n_joints, Joint **joints, subchain_list &buf) |
| void | build_subchain_tree (Joint *cur_joint, subchain_list &buf) |
| void | calc_consts () |
| void | calc_dvel () |
| void | col_disassembly () |
| int | contact_vjoint_index (Joint *_jnt) |
| pSubChain * | default_schedule (pSubChain *p, Joint *j) |
| void | default_schedule_virtual (Joint *j) |
| void | disassembly () |
| int | in_subchain (pSubChain *sc, pLink *pl) |
| void | setup_pjoint (Joint *j) |
| void | setup_pjoint_virtual (Joint *j) |
| void | update_collision () |
| void | update_position () |
| void | update_velocity () |
Private Attributes | |
| std::vector< fVec3 > | all_jdot_r |
| std::vector< fVec3 > | all_jdot_v |
| std::vector< fMat > | all_Jr |
| std::vector< fMat > | all_Jv |
| joint_list | all_vjoints |
| fVec3 | cone_dir [N_FRIC_CONE_DIV] |
| std::vector< fVec3 > | contact_relvels |
| joint_list | contact_vjoints |
| std::vector< double > | fric_coefs |
| JointInfo * | joint_info |
| pSubChain * | subchains |
Friends | |
| class | pJoint |
| class | pLink |
| class | pSubChain |
| pSim::pSim | ( | ) | [inline] |
| pSim::~pSim | ( | ) | [inline] |
| int pSim::AutoSchedule | ( | int | max_procs | ) |
Automatic scheduling for max_procs processors.
Definition at line 765 of file schedule.cpp.
| int pSim::build_subchain_tree | ( | int | _n_joints, |
| Joint ** | joints, | ||
| subchain_list & | buf | ||
| ) | [private] |
Definition at line 1352 of file schedule.cpp.
| void pSim::build_subchain_tree | ( | Joint * | cur_joint, |
| subchain_list & | buf | ||
| ) | [private] |
Definition at line 1363 of file schedule.cpp.
| void pSim::calc_consts | ( | ) | [private] |
| void pSim::calc_dvel | ( | ) | [private] |
Definition at line 574 of file update.cpp.
| void pSim::Clear | ( | ) | [virtual] |
| int pSim::clear_contact | ( | ) | [protected, virtual] |
| int pSim::clear_data | ( | ) | [protected, virtual] |
| void pSim::col_disassembly | ( | ) | [private] |
Definition at line 676 of file update.cpp.
| int pSim::ConstraintForces | ( | fVec & | cf | ) |
| int pSim::contact_vjoint_index | ( | Joint * | _jnt | ) | [inline, private] |
| pSubChain * pSim::default_schedule | ( | pSubChain * | p, |
| Joint * | j | ||
| ) | [private] |
Definition at line 1072 of file schedule.cpp.
| void pSim::default_schedule_virtual | ( | Joint * | j | ) | [private] |
Definition at line 1117 of file schedule.cpp.
| void pSim::disassembly | ( | ) | [private] |
disassembly
Definition at line 1155 of file update.cpp.
| void pSim::DumpSchedule | ( | ostream & | ost | ) |
| void pSim::GetPJoint | ( | Joint * | _joint, |
| pJoint * | _pjoints[2] | ||
| ) | [inline] |
| int pSim::in_subchain | ( | pSubChain * | sc, |
| pLink * | pl | ||
| ) | [private] |
Definition at line 1407 of file schedule.cpp.
| int pSim::init | ( | SceneGraph * | sg | ) | [protected, virtual] |
| int pSim::init_contact | ( | ) | [protected] |
| int pSim::myinit | ( | ) | [protected] |
| int pSim::NumLeaves | ( | ) |
| int pSim::Schedule | ( | ) |
Creates default schedule, which is optimized for serial computation.
default schedule: most efficient for serial computation
Definition at line 1060 of file schedule.cpp.
| int pSim::Schedule | ( | Joint ** | joints | ) |
Creates a schedule that assembles the chain in the specified order of joints.
manual schedule: specify the order
Definition at line 1336 of file schedule.cpp.
| void pSim::setup_pjoint | ( | Joint * | j | ) | [private] |
| void pSim::setup_pjoint_virtual | ( | Joint * | j | ) | [private] |
| int pSim::TotalCost | ( | ) |
| int pSim::Update | ( | ) |
Compute joint accelerations.
Definition at line 40 of file update.cpp.
| int pSim::Update | ( | double | timestep, |
| std::vector< class SDContactPair * > & | sdContactPairs | ||
| ) |
Compute joint accelerations and contact forces.
Compute joint accelerations and contact forces. Contact forces are computed such that the relative velocity becomes zero after timestep [s].
| [in] | timestep | Timestep of the integration. |
| [in] | sdContactPairs | Pointer to the ColInfo object containing the contact information. |
| void pSim::update_collision | ( | ) | [private] |
collision
Definition at line 568 of file update.cpp.
| void pSim::update_position | ( | ) | [private] |
position-dependent
Definition at line 146 of file update.cpp.
| void pSim::update_velocity | ( | ) | [private] |
velocity-dependent
Definition at line 768 of file update.cpp.
std::vector<fVec3> pSim::all_jdot_r [private] |
std::vector<fVec3> pSim::all_jdot_v [private] |
std::vector<fMat> pSim::all_Jr [private] |
std::vector<fMat> pSim::all_Jv [private] |
joint_list pSim::all_vjoints [private] |
fVec3 pSim::cone_dir[N_FRIC_CONE_DIV] [private] |
std::vector<fVec3> pSim::contact_relvels [private] |
joint_list pSim::contact_vjoints [private] |
std::vector<double> pSim::fric_coefs [private] |
JointInfo* pSim::joint_info [private] |
pSubChain* pSim::subchains [private] |