Skip to content

Commit

Permalink
changes to pairPotential base class, making it pure virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
Trombach committed Dec 18, 2018
1 parent 4517e4e commit 9498cee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ apps/app-shortestbond
apps/app-GN
apps/app-allNx
apps/app-subgraph
.vscode
6 changes: 0 additions & 6 deletions potential.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
using namespace std;


/*--------------------------------------------------------------------------------------*/
// pair potential base class
/*--------------------------------------------------------------------------------------*/

pairPotential::pairPotential (void) {}

/*----------------------------------Energy----------------------------------------------*/

double pairPotential::calcEnergy (const column_vector &v)
Expand Down
8 changes: 4 additions & 4 deletions potential.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ typedef dlib::matrix<double,0,1> column_vector;
class pairPotential
{
private:
virtual double E (double distance) {return distance;};
virtual double dE_dr (double distance) {return distance;};
virtual double d2E_dr2 (double distance) {return distance;};
virtual double E (double distance) = 0;
virtual double dE_dr (double distance) = 0;
virtual double d2E_dr2 (double distance) = 0;

public:
pairPotential();
virtual ~pairPotential() {};
double calcEnergy (const column_vector &v);
double calcEnergy (structure &S);
const column_vector calcGradient (const column_vector &v);
Expand Down

0 comments on commit 9498cee

Please sign in to comment.