1 /*
2  *                This source code is part of
3  *
4  *                          HelFEM
5  *                             -
6  * Finite element methods for electronic structure calculations on small systems
7  *
8  * Written by Susi Lehtola, 2018-
9  * Copyright (c) 2018- Susi Lehtola
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  */
16 #include "helfem/HollowNucleus.h"
17 
18 namespace helfem {
19   namespace modelpotential {
HollowNucleus(int Z_,double R_)20     HollowNucleus::HollowNucleus(int Z_, double R_) : Z(Z_), R(R_) {
21     }
22 
~HollowNucleus()23     HollowNucleus::~HollowNucleus() {
24     }
25 
V(double r) const26     double HollowNucleus::V(double r) const {
27       if(r>=R) {
28         return -Z/r;
29       } else {
30         return -Z/R;
31       }
32     }
33 
get_R() const34     double HollowNucleus::get_R() const {
35       return R;
36     }
37 
set_R(double R_)38     void HollowNucleus::set_R(double R_) {
39       R=R_;
40     }
41   }
42 }
43