00001
00007
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);
00023 virtual ~ComputeStir();
00024
00025 virtual void doForce(FullAtom* p, Results* r);
00026
00027 SubmitReduction *reduction;
00028 private:
00029
00030 Bool stirOn;
00031 BigReal omega;
00032 BigReal startingTheta;
00033
00034
00035
00036
00037
00038
00039 Tensor matMult (Tensor , Tensor );
00040 Tensor arbRotMat (BigReal theta);
00041
00042 Vector axisUnit;
00043 Vector pivot;
00044 void printTensor (Tensor &);
00045 void initVars ();
00046 BigReal distanceToRay(Vector,Vector,Vector);
00047 BigReal findHeight(Vector);
00048 Vector projectionOnRay (Vector,Vector,Vector);
00049 Vector placeThetaRadius (BigReal,BigReal,BigReal);
00050
00051
00052 BigReal findTheta (Vector refPos);
00053 Tensor leftMat, rightMat;
00054
00055
00061 };
00062
00063 #endif
00064
00065
00066
00067
00068
00069
00070