mirror of https://github.com/lammps/lammps.git
catch up on refactoring default destructors that were missed previously
This commit is contained in:
parent
3ad75c40ec
commit
27145d2789
|
@ -22,11 +22,6 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
FixedPoint::FixedPoint(){
|
|
||||||
}
|
|
||||||
FixedPoint::~FixedPoint(){
|
|
||||||
}
|
|
||||||
|
|
||||||
FixedPoint::FixedPoint(double x, double y, double z){
|
FixedPoint::FixedPoint(double x, double y, double z){
|
||||||
position(1) = x;
|
position(1) = x;
|
||||||
position(2) = y;
|
position(2) = y;
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
class FixedPoint : public Point {
|
class FixedPoint : public Point {
|
||||||
public:
|
public:
|
||||||
FixedPoint();
|
FixedPoint() = default;
|
||||||
~FixedPoint();
|
~FixedPoint() = default;
|
||||||
FixedPoint(double x, double y, double z);
|
FixedPoint(double x, double y, double z);
|
||||||
FixedPoint(Vect3& v);
|
FixedPoint(Vect3& v);
|
||||||
PointType GetType();
|
PointType GetType();
|
||||||
|
|
|
@ -24,8 +24,6 @@ using namespace std;
|
||||||
Mat3x3::Mat3x3(){
|
Mat3x3::Mat3x3(){
|
||||||
numrows = numcols = 3;
|
numrows = numcols = 3;
|
||||||
}
|
}
|
||||||
Mat3x3::~Mat3x3(){
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat3x3::Mat3x3(const Mat3x3& A){
|
Mat3x3::Mat3x3(const Mat3x3& A){
|
||||||
numrows = numcols = 3;
|
numrows = numcols = 3;
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Mat3x3 : public VirtualMatrix {
|
||||||
double elements[3][3];
|
double elements[3][3];
|
||||||
public:
|
public:
|
||||||
Mat3x3();
|
Mat3x3();
|
||||||
~Mat3x3();
|
~Mat3x3() = default;
|
||||||
Mat3x3(const Mat3x3& A); // copy constructor
|
Mat3x3(const Mat3x3& A); // copy constructor
|
||||||
Mat3x3(const VirtualMatrix& A); // copy constructor
|
Mat3x3(const VirtualMatrix& A); // copy constructor
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ using namespace std;
|
||||||
Mat4x4::Mat4x4(){
|
Mat4x4::Mat4x4(){
|
||||||
numrows = numcols = 4;
|
numrows = numcols = 4;
|
||||||
}
|
}
|
||||||
Mat4x4::~Mat4x4(){
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat4x4::Mat4x4(const Mat4x4& A){
|
Mat4x4::Mat4x4(const Mat4x4& A){
|
||||||
numrows = numcols = 4;
|
numrows = numcols = 4;
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Mat4x4 : public VirtualMatrix {
|
||||||
double elements[4][4];
|
double elements[4][4];
|
||||||
public:
|
public:
|
||||||
Mat4x4();
|
Mat4x4();
|
||||||
~Mat4x4();
|
~Mat4x4() = default;
|
||||||
Mat4x4(const Mat4x4& A); // copy constructor
|
Mat4x4(const Mat4x4& A); // copy constructor
|
||||||
Mat4x4(const VirtualMatrix& A); // copy constructor
|
Mat4x4(const VirtualMatrix& A); // copy constructor
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ using namespace std;
|
||||||
Mat6x6::Mat6x6(){
|
Mat6x6::Mat6x6(){
|
||||||
numrows = numcols = 6;
|
numrows = numcols = 6;
|
||||||
}
|
}
|
||||||
Mat6x6::~Mat6x6(){
|
|
||||||
}
|
|
||||||
|
|
||||||
Mat6x6::Mat6x6(const Mat6x6& A){
|
Mat6x6::Mat6x6(const Mat6x6& A){
|
||||||
numrows = numcols = 6;
|
numrows = numcols = 6;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Mat6x6 : public VirtualMatrix {
|
||||||
double elements[6][6];
|
double elements[6][6];
|
||||||
public:
|
public:
|
||||||
Mat6x6();
|
Mat6x6();
|
||||||
~Mat6x6();
|
~Mat6x6() = default;
|
||||||
Mat6x6(const Mat6x6& A); // copy constructor
|
Mat6x6(const Mat6x6& A); // copy constructor
|
||||||
Mat6x6(const VirtualMatrix& A); // copy constructor
|
Mat6x6(const VirtualMatrix& A); // copy constructor
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ using namespace std;
|
||||||
Vect3::Vect3(){
|
Vect3::Vect3(){
|
||||||
numrows = 3; numcols = 1;
|
numrows = 3; numcols = 1;
|
||||||
}
|
}
|
||||||
Vect3::~Vect3(){
|
|
||||||
}
|
|
||||||
|
|
||||||
Vect3::Vect3(const Vect3& A){ // copy constructor
|
Vect3::Vect3(const Vect3& A){ // copy constructor
|
||||||
numrows = 3; numcols = 1;
|
numrows = 3; numcols = 1;
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Vect3 : public VirtualColMatrix {
|
||||||
double elements[3];
|
double elements[3];
|
||||||
public:
|
public:
|
||||||
Vect3();
|
Vect3();
|
||||||
~Vect3();
|
~Vect3() = default;
|
||||||
Vect3(const Vect3& A); // copy constructor
|
Vect3(const Vect3& A); // copy constructor
|
||||||
Vect3(const VirtualMatrix& A); // copy constructor
|
Vect3(const VirtualMatrix& A); // copy constructor
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ using namespace std;
|
||||||
Vect4::Vect4(){
|
Vect4::Vect4(){
|
||||||
numrows = 4; numcols = 1;
|
numrows = 4; numcols = 1;
|
||||||
}
|
}
|
||||||
Vect4::~Vect4(){
|
|
||||||
}
|
|
||||||
|
|
||||||
Vect4::Vect4(const Vect4& A){ // copy constructor
|
Vect4::Vect4(const Vect4& A){ // copy constructor
|
||||||
numrows = 4; numcols = 1;
|
numrows = 4; numcols = 1;
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Vect4 : public VirtualColMatrix {
|
||||||
double elements[4];
|
double elements[4];
|
||||||
public:
|
public:
|
||||||
Vect4();
|
Vect4();
|
||||||
~Vect4();
|
~Vect4() = default;
|
||||||
Vect4(const Vect4& A); // copy constructor
|
Vect4(const Vect4& A); // copy constructor
|
||||||
Vect4(const VirtualMatrix& A); // copy constructor
|
Vect4(const VirtualMatrix& A); // copy constructor
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ using namespace std;
|
||||||
Vect6::Vect6(){
|
Vect6::Vect6(){
|
||||||
numrows = 6; numcols = 1;
|
numrows = 6; numcols = 1;
|
||||||
}
|
}
|
||||||
Vect6::~Vect6(){
|
|
||||||
}
|
|
||||||
|
|
||||||
Vect6::Vect6(const Vect6& A){ // copy constructor
|
Vect6::Vect6(const Vect6& A){ // copy constructor
|
||||||
numrows = 6; numcols = 1;
|
numrows = 6; numcols = 1;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Vect6 : public VirtualColMatrix {
|
||||||
double elements[6];
|
double elements[6];
|
||||||
public:
|
public:
|
||||||
Vect6();
|
Vect6();
|
||||||
~Vect6();
|
~Vect6() = default;
|
||||||
Vect6(const Vect6& A); // copy constructor
|
Vect6(const Vect6& A); // copy constructor
|
||||||
Vect6(const VirtualMatrix& A); // copy constructor
|
Vect6(const VirtualMatrix& A); // copy constructor
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,6 @@ VirtualColMatrix::VirtualColMatrix(){
|
||||||
numcols = 1;
|
numcols = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualColMatrix::~VirtualColMatrix(){
|
|
||||||
}
|
|
||||||
|
|
||||||
double& VirtualColMatrix::operator_2int(int i, int j){
|
double& VirtualColMatrix::operator_2int(int i, int j){
|
||||||
if(j!=1){
|
if(j!=1){
|
||||||
cerr << "matrix index invalid in operator ()" << endl;
|
cerr << "matrix index invalid in operator ()" << endl;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
class VirtualColMatrix : public VirtualMatrix {
|
class VirtualColMatrix : public VirtualMatrix {
|
||||||
public:
|
public:
|
||||||
VirtualColMatrix();
|
VirtualColMatrix();
|
||||||
~VirtualColMatrix();
|
~VirtualColMatrix() = default;
|
||||||
double& operator_2int (int i, int j); // array access
|
double& operator_2int (int i, int j); // array access
|
||||||
double Get_2int (int i, int j) const;
|
double Get_2int (int i, int j) const;
|
||||||
void Set_2int (int i, int j, double value);
|
void Set_2int (int i, int j, double value);
|
||||||
|
|
|
@ -26,8 +26,7 @@ VirtualMatrix::VirtualMatrix(){
|
||||||
numrows = numcols = 0;
|
numrows = numcols = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualMatrix::~VirtualMatrix(){
|
VirtualMatrix::~VirtualMatrix()= default;
|
||||||
}
|
|
||||||
|
|
||||||
int VirtualMatrix::GetNumRows() const {
|
int VirtualMatrix::GetNumRows() const {
|
||||||
return numrows;
|
return numrows;
|
||||||
|
|
|
@ -26,9 +26,6 @@ VirtualRowMatrix::VirtualRowMatrix(){
|
||||||
numrows = 1;
|
numrows = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualRowMatrix::~VirtualRowMatrix(){
|
|
||||||
}
|
|
||||||
|
|
||||||
double& VirtualRowMatrix::operator_2int (int i, int j){
|
double& VirtualRowMatrix::operator_2int (int i, int j){
|
||||||
if(i!=1){
|
if(i!=1){
|
||||||
cerr << "matrix index invalid in operator ()" << endl;
|
cerr << "matrix index invalid in operator ()" << endl;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
class VirtualRowMatrix : public VirtualMatrix {
|
class VirtualRowMatrix : public VirtualMatrix {
|
||||||
public:
|
public:
|
||||||
VirtualRowMatrix();
|
VirtualRowMatrix();
|
||||||
~VirtualRowMatrix();
|
~VirtualRowMatrix() = default;
|
||||||
double& operator_2int (int i, int j); // array access
|
double& operator_2int (int i, int j); // array access
|
||||||
double Get_2int(int i, int j) const;
|
double Get_2int(int i, int j) const;
|
||||||
void Set_2int(int i, int j, double value);
|
void Set_2int(int i, int j, double value);
|
||||||
|
|
|
@ -215,15 +215,6 @@ FixSMDMoveTriSurf::FixSMDMoveTriSurf(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixSMDMoveTriSurf::~FixSMDMoveTriSurf()
|
|
||||||
{
|
|
||||||
// unregister callbacks to this fix from Atom class
|
|
||||||
//atom->delete_callback(id,Atom::GROW);
|
|
||||||
//atom->delete_callback(id,Atom::RESTART);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
int FixSMDMoveTriSurf::setmask() {
|
int FixSMDMoveTriSurf::setmask() {
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= INITIAL_INTEGRATE;
|
mask |= INITIAL_INTEGRATE;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace LAMMPS_NS {
|
||||||
class FixSMDMoveTriSurf : public Fix {
|
class FixSMDMoveTriSurf : public Fix {
|
||||||
public:
|
public:
|
||||||
FixSMDMoveTriSurf(class LAMMPS *, int, char **);
|
FixSMDMoveTriSurf(class LAMMPS *, int, char **);
|
||||||
~FixSMDMoveTriSurf();
|
~FixSMDMoveTriSurf() = default;
|
||||||
int setmask();
|
int setmask();
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void initial_integrate(int);
|
virtual void initial_integrate(int);
|
||||||
|
|
|
@ -53,13 +53,6 @@ ThrOMP::ThrOMP(LAMMPS *ptr, int style)
|
||||||
fix = static_cast<FixOMP *>(lmp->modify->fix[ifix]);
|
fix = static_cast<FixOMP *>(lmp->modify->fix[ifix]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
ThrOMP::~ThrOMP()
|
|
||||||
{
|
|
||||||
// nothing to do?
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Hook up per thread per atom arrays into the tally infrastructure
|
Hook up per thread per atom arrays into the tally infrastructure
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
|
|
@ -46,7 +46,7 @@ class ThrOMP {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ThrOMP(LAMMPS *, int);
|
ThrOMP(LAMMPS *, int);
|
||||||
virtual ~ThrOMP();
|
virtual ~ThrOMP() = default;
|
||||||
|
|
||||||
double memory_usage_thr();
|
double memory_usage_thr();
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ double f_lammps_get_natoms();
|
||||||
class LAMMPS_commands : public ::testing::Test {
|
class LAMMPS_commands : public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
LAMMPS_NS::LAMMPS *lmp;
|
LAMMPS_NS::LAMMPS *lmp;
|
||||||
LAMMPS_commands(){};
|
LAMMPS_commands() = default;
|
||||||
~LAMMPS_commands() override{};
|
~LAMMPS_commands() override = default;
|
||||||
|
|
||||||
void SetUp() override
|
void SetUp() override
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue