00001 00007 #ifndef COMPUTESPHERICALBC_H 00008 #define COMPUTESPHERICALBC_H 00009 00010 #include "ComputePatch.h" 00011 #include "ReductionMgr.h" 00012 00013 class ComputeSphericalBC : public ComputePatch 00014 { 00015 private: 00016 BigReal r1; // Radius of first sphere 00017 BigReal r1_2; // Radius of first sphere squared 00018 BigReal k1; // First force constant 00019 BigReal r2; // Radius of second sphere (-1 if inactive) 00020 BigReal r2_2; // Raidus of second sphere squared 00021 BigReal k2; // Second force constant 00022 int exp1; // Exponent for first boundary condition 00023 int exp2; // Exponent for second boundary condition 00024 Bool twoForces; // Are there two potentials or just one 00025 BigReal energy; // Energy computed for the current timestep 00026 Vector center; // Center of spheres 00027 00028 public: 00029 ComputeSphericalBC(ComputeID c, PatchID pid); // Constructor 00030 virtual ~ComputeSphericalBC(); // Destructor 00031 #ifdef MEM_OPT_VERSION 00032 virtual void doForce(CompAtom* p, CompAtomExt* pExt, Results* r); 00033 #else 00034 virtual void doForce(CompAtom* p, Results* r); 00035 #endif 00036 SubmitReduction *reduction; 00037 00038 }; 00039 00040 #endif 00041 00042 00043 00044 00045 00046 00047
1.3.9.1