Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

ContactSolver.h

Go to the documentation of this file.
00001 #ifndef CONTACTSOLVER_H
00002 #define CONTACTSOLVER_H
00003 
00004 #include "ThyrixParameters.h"
00005 #include "GlobalContactInfo.h"
00006 
00007 enum ContactSet {
00008    contactSetC,   //contact
00009    contactSetNC,  //non-contact
00010    contactSetI    //ignored (redundant constraint, f=0)
00011 };
00012 
00013 class ContactSolver {
00014 
00015 public:
00016    ContactSolver(GlobalContactInfoVector* contacts);
00017    virtual ~ContactSolver();
00018 
00021    void init();
00022 
00024    void computeContacts();
00025 
00027    void computeContactsPreda();
00028 
00030    void uploadForces();
00031 
00033    real** contactMatrix;
00034 
00036    real* contactVector;
00037 
00039    real* tempVector1;
00040    real* tempVector2;
00041    real** tempMatrix;
00042    
00043 private:
00044    real maxStep(int d, int *sIndex);
00045    bool driveToZero(int d);
00046    void initForcesVelocities();
00047 
00049    GlobalContactInfoVector* contacts;
00050 
00052    int nContacts;
00053 
00055    int nContactsMax;
00056    
00058    real** contactMatrixTemp;
00059 
00061    real* contactForces;
00062    
00064    real* contactVectorTemp;
00065    
00067    real* contactDForces;
00068 
00070    real* contactVelocities;
00071 
00073    ContactSet* contactSets;
00074 
00076    int* contactIndexC;
00077 
00079    //int* contactIndex;
00080 
00082    int* contactIndexTemp;
00083 
00085    int* zeros;
00086 
00087 };
00088 
00089 #endif //CONTACTSOLVER_H

Thyrix homepageUsers' guide

(C) Arxia 2004-2005