ComputeStir.h

Go to the documentation of this file.
00001 
00007 /* Barry Isralewitz, July 2001 */
00008 
00009 #ifndef COMPUTESTIR_H
00010 #define COMPUTESTIR_H
00011 
00012 #include "ComputeHomePatch.h"
00013 #include "ReductionMgr.h"
00014 #include "Vector.h"
00015 #include "Tensor.h"
00016 
00017 
00018 class ComputeStir : public ComputeHomePatch
00019 {
00020 
00021  public:
00022         ComputeStir(ComputeID c, PatchID pid);  //  Constructor
00023         virtual ~ComputeStir();                 //  Destructor
00024         
00025         virtual void doForce(FullAtom* p, Results* r);
00026         
00027         SubmitReduction *reduction;
00028  private:  
00029 
00030         Bool stirOn;
00031         BigReal omega; //rotation speed in radians/timestep
00032         BigReal startingTheta; //rotation offset in radians, normally zero
00033                          // even for restarted runs 
00034                          // since offset is automatically calculated 
00035                          // as omega * firsttimestep 
00036                          // useful to change speeds midrun
00037                          // or start torque mid-run, without losing
00038                          // track of timestep for handy bookeeping
00039         Tensor matMult (Tensor , Tensor );   //multiplies two matrices
00040         Tensor arbRotMat (BigReal theta); //make arbRotation matrix
00041                                           // needs pre/post translation
00042         Vector axisUnit;    //rotation axis direction
00043         Vector pivot;      //rotation axis pivot
00044         void printTensor (Tensor &);  //for debug printing
00045         void initVars ();     //initialize the matrices needed
00046         BigReal distanceToRay(Vector,Vector,Vector);// find dist. to Ray
00047         BigReal findHeight(Vector);      //find height along vector
00048         Vector projectionOnRay (Vector,Vector,Vector); //find projection on ray
00049         Vector placeThetaRadius (BigReal,BigReal,BigReal); //find point given theta
00050                                                     //and radius
00051           
00052         BigReal findTheta (Vector refPos);
00053         Tensor leftMat, rightMat; // for arbitary rotations and related
00054                                   // coordinate operations
00055 
00061 };
00062 
00063 #endif
00064 
00065 
00066 
00067 
00068 
00069 
00070 

Generated on Fri Sep 22 01:17:12 2017 for NAMD by  doxygen 1.4.7