34 |
|
#ifndef BRAINS_FORCEMANAGER_HPP |
35 |
|
#define BRAINS_FORCEMANAGER_HPP |
36 |
|
|
37 |
+ |
#include "brains/SimInfo.hpp" |
38 |
+ |
|
39 |
|
namespace oopse { |
40 |
|
|
41 |
|
/** |
42 |
|
* @class ForceManager ForceManager.hpp "brains/ForceManager.hpp" |
43 |
< |
* @brief ForceManager is responsible for calculating the short range interactions and fortran force |
44 |
< |
* loop |
43 |
> |
* ForceManager is responsible for calculating the short range interactions (c++) and |
44 |
> |
* long range interactions(fortran). If fortran side is not setup before the force calculation, |
45 |
> |
* call SimInfo's update function to settle it down. |
46 |
> |
* @note the reason we delay fortran side's setup is that some applications (Dump2XYZ etc.) |
47 |
> |
* may not need force calculation, why bother? |
48 |
|
*/ |
49 |
|
class ForceManager { |
50 |
|
|
53 |
|
|
54 |
|
virtual ~ForceManager() {} |
55 |
|
|
56 |
+ |
//public virtual function should be avoided |
57 |
+ |
/**@todo need refactory */ |
58 |
|
virtual void calcForces(bool needPotential, bool needStress); |
59 |
|
|
60 |
+ |
protected: |
61 |
+ |
|
62 |
+ |
virtual void preCalculation(); |
63 |
+ |
|
64 |
+ |
virtual void calcShortRangeInteraction(); |
65 |
+ |
|
66 |
+ |
virtual void calcLongRangeInteraction(bool needPotential, bool needStress); |
67 |
+ |
|
68 |
+ |
virtual void postCalculation(); |
69 |
+ |
|
70 |
|
private: |
71 |
|
SimInfo * info_; |
72 |
|
|