Skip to content

Commit 553c91c

Browse files
committed
1. rename class Exx_Stress_Cell_Nearest to Cell_Nearest
1 parent 77062c5 commit 553c91c

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

include/RI/physics/Exx.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#pragma once
77

88
#include "Exx.h"
9-
#include "Exx_Stress_Cell_Nearest.h"
9+
#include "../ri/Cell_Nearest.h"
1010
#include "../ri/Label.h"
1111

1212
#include <cassert>
@@ -266,7 +266,7 @@ void Exx<TA,Tcell,Ndim,Tdata>::cal_stress(
266266
assert(this->flag_finish.dC);
267267
assert(this->flag_finish.dV);
268268

269-
Exx_Stress_Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos> cell_nearest;
269+
Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos> cell_nearest;
270270
cell_nearest.init(this->atoms_pos, this->latvec, this->period);
271271

272272
using namespace Array_Operator;

include/RI/physics/Exx_Stress_Cell_Nearest.h renamed to include/RI/ri/Cell_Nearest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace RI
1212
{
1313

1414
template<typename TA, typename Tcell, std::size_t Ndim, typename Tpos, std::size_t Npos>
15-
class Exx_Stress_Cell_Nearest
15+
class Cell_Nearest
1616
{
1717
public:
1818
using Tatom_pos = std::array<Tpos,Npos>; // tmp
@@ -32,4 +32,4 @@ class Exx_Stress_Cell_Nearest
3232

3333
}
3434

35-
#include "Exx_Stress_Cell_Nearest.hpp"
35+
#include "Cell_Nearest.hpp"

include/RI/physics/Exx_Stress_Cell_Nearest.hpp renamed to include/RI/ri/Cell_Nearest.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#pragma once
77

8-
#include "Exx_Stress_Cell_Nearest.h"
8+
#include "Cell_Nearest.h"
99

1010
#include "../global/Tensor.h"
1111
#include "../global/Array_Operator.h"
@@ -17,7 +17,7 @@ namespace RI
1717
{
1818

1919
template<typename TA, typename Tcell, std::size_t Ndim, typename Tpos, std::size_t Npos>
20-
void Exx_Stress_Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos>::init(
20+
void Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos>::init(
2121
const std::map<TA,Tatom_pos> &atoms_pos,
2222
const std::array<Tatom_pos,Ndim> &latvec_in,
2323
const std::array<Tcell,Ndim> &period_in)
@@ -45,7 +45,7 @@ void Exx_Stress_Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos>::init(
4545
}
4646

4747
template<typename TA, typename Tcell, std::size_t Ndim, typename Tpos, std::size_t Npos>
48-
auto Exx_Stress_Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos>::get_cell_nearest_discrete(
48+
auto Cell_Nearest<TA,Tcell,Ndim,Tpos,Npos>::get_cell_nearest_discrete(
4949
const TA &Ax, const TA &Ay, const TC &cell) const
5050
-> TC
5151
{

unittests/Test_All.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "unittests/global/Map_Operator-test.hpp"
1616
#include "unittests/ri/LRI-test.hpp"
1717
#include "unittests/ri/LRI-speed-test.hpp"
18+
#include "unittests/ri/Cell_Nearest-test.hpp"
1819
#include "unittests/physics/Exx-test.hpp"
1920
#include "unittests/physics/RPA-test.hpp"
2021

@@ -62,6 +63,8 @@ namespace Test_All
6263
LRI_Speed_Test::test_speed<std::complex<float>>(argc, argv, 1, 1);
6364
LRI_Speed_Test::test_speed<std::complex<double>>(argc, argv, 1, 1);
6465

66+
Cell_Nearest_Test::main();
67+
6568
Exx_Test::main<float>(argc, argv);
6669
Exx_Test::main<double>(argc, argv);
6770
Exx_Test::main<std::complex<float>>(argc, argv);

unittests/physics/Exx_Stress_Cell_Nearest-test.hpp renamed to unittests/ri/Cell_Nearest-test.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
#include "../print_stl.h"
99

10-
#include "RI/physics/Exx_Stress_Cell_Nearest.h"
10+
#include "RI/ri/Cell_Nearest.h"
1111
#include "../global/Tensor-test.h"
1212

13-
namespace Exx_Stress_Cell_Nearest_Test
13+
namespace Cell_Nearest_Test
1414
{
1515
void main()
1616
{
@@ -27,7 +27,7 @@ namespace Exx_Stress_Cell_Nearest_Test
2727

2828
auto test = [&atoms_pos, &latvec, &period]()
2929
{
30-
RI::Exx_Stress_Cell_Nearest<TA, Tcell, Ndim, Tpos, Npos> stress;
30+
RI::Cell_Nearest<TA, Tcell, Ndim, Tpos, Npos> stress;
3131
stress.init(atoms_pos, latvec, period);
3232
std::cout<<stress.cells_nearest_continuous<<std::endl;
3333

0 commit comments

Comments
 (0)