Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ OBJS_MD=fire.o\
run_md.o\
verlet.o\

OBJS_NEIGHBOR=sltk_adjacent_set.o\
sltk_atom.o\
OBJS_NEIGHBOR=sltk_atom.o\
sltk_atom_arrange.o\
sltk_atom_input.o\
sltk_grid.o\
Expand Down
1 change: 0 additions & 1 deletion source/module_cell/module_neighbor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
add_library(
neighbor
OBJECT
sltk_adjacent_set.cpp
sltk_atom.cpp
sltk_atom_arrange.cpp
sltk_atom_input.cpp
Expand Down
121 changes: 0 additions & 121 deletions source/module_cell/module_neighbor/sltk_adjacent_set.cpp

This file was deleted.

117 changes: 0 additions & 117 deletions source/module_cell/module_neighbor/sltk_adjacent_set.h

This file was deleted.

15 changes: 0 additions & 15 deletions source/module_cell/module_neighbor/sltk_atom.cpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
#include "sltk_atom.h"
#include <iostream>

class AdjacentSet;

//int FAtom::count1 = 0;
//int FAtom::count2 = 0;

/*** Constructors and destructor ***/
FAtom::FAtom()
{
d_x = 0.0;
d_y = 0.0;
d_z = 0.0;
as = nullptr;
type = 0;
natom = 0;
}

FAtom::~FAtom()
{
}

void FAtom::delete_vector(void)
{
if (as) { as->delete_vector(); }
}
42 changes: 14 additions & 28 deletions source/module_cell/module_neighbor/sltk_atom.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

#include <memory>
#include "sltk_util.h"
#include "sltk_adjacent_set.h"

class AdjacentSet;
#include "module_base/timer.h"
#include <vector>

// a class contains the atom position,
// the type and the index,
Expand All @@ -15,7 +14,7 @@ class FAtom
double d_x;
double d_y;
double d_z;
std::shared_ptr<AdjacentSet> as;
std::vector<FAtom *> adjacent;

int type;
int natom;
Expand All @@ -42,30 +41,17 @@ class FAtom
cell_y = cell_y_in;
cell_z = cell_z_in;
}
~FAtom();
//2015-05-07
void delete_vector();

// static int count1;
// static int count2;

//==========================================================
// MEMBER FUNCTION :
// NAME : setAdjacent
// Dangerous but high performance interface function!
// no exception test.
//
// NAME : getAdjacentSet
//
// NAME : setAdjacentSet
//==========================================================

std::shared_ptr<AdjacentSet> getAdjacentSet() const
{ return this->as; }

void allocate_AdjacentSet()
{ this->as = std::make_shared<AdjacentSet>(); }
~FAtom()
{
adjacent.clear();
}

void addAdjacent(FAtom& atom_in)
{
adjacent.push_back( &atom_in);
}
const std::vector<FAtom *>& getAdjacent() const { return adjacent; }
void clearAdjacent() { adjacent.clear(); }
//==========================================================
// MEMBER FUNCTION :
// EXPLAIN : get value
Expand All @@ -77,7 +63,7 @@ class FAtom
const int& getNatom() const { return natom;}
const int& getCellX() const { return cell_x; }
const int& getCellY() const { return cell_y; }
const int& getCellZ() const { return cell_z; }
const int& getCellZ() const { return cell_z; }
};

#endif
Loading
Loading