Skip to content

Commit cf3cdb2

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 76629aa commit cf3cdb2

File tree

2 files changed

+45
-38
lines changed

2 files changed

+45
-38
lines changed

source/module_cell/module_neighbor/sltk_atom.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FAtom
4444
}
4545
~FAtom();
4646
//2015-05-07
47-
void delete_vector(void);
47+
void delete_vector();
4848

4949
// static int count1;
5050
// static int count2;
@@ -63,7 +63,7 @@ class FAtom
6363
std::shared_ptr<AdjacentSet> getAdjacentSet() const
6464
{ return this->as; }
6565

66-
void allocate_AdjacentSet(void)
66+
void allocate_AdjacentSet()
6767
{ this->as = std::make_shared<AdjacentSet>(); }
6868

6969
//==========================================================

source/module_cell/module_neighbor/sltk_atom_input.h

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Atom_input
1616
const UnitCell &ucell,
1717
const int amount = 0, //number of atoms
1818
const int ntype = 0, //number of atom_types
19-
const bool boundary = 1, // 1 : periodic ocndition
19+
const bool boundary = true, // 1 : periodic ocndition
2020
const double radius_in = 0, // searching radius
2121
const int &test_atom_in = 0 //caoyu reconst 2021-05-24
2222
);
@@ -31,92 +31,99 @@ class Atom_input
3131
double vec3[3];
3232

3333
public:
34-
bool getExpandFlag(void)const {return expand_flag;}
34+
bool getExpandFlag()const {return expand_flag;}
3535

3636
int getAmount() const
3737
{
38-
if (!expand_flag) return d_amount;
39-
else return d_amount_expand;
38+
if (!expand_flag) { return d_amount;
39+
} else { return d_amount_expand;
40+
}
4041
}
4142

4243
int getBoundary()const { return periodic_boundary;}
4344

44-
double getLatNow(void) const { return lat_now;}
45+
double getLatNow() const { return lat_now;}
4546

4647
double getRadius() const {return radius;}
4748

4849
//==========================================================
4950
//
5051
//==========================================================
51-
double getCellXLength(void) const
52+
double getCellXLength() const
5253
{
53-
if (!expand_flag) return radius;
54-
else return 1;
54+
if (!expand_flag) { return radius;
55+
} else { return 1;
56+
}
5557
}
5658

57-
double getCellYLength(void) const
59+
double getCellYLength() const
5860
{
59-
if (!expand_flag) return radius;
60-
else return 1;
61+
if (!expand_flag) { return radius;
62+
} else { return 1;
63+
}
6164
}
6265

63-
double getCellZLength(void) const
66+
double getCellZLength() const
6467
{
65-
if (!expand_flag) return radius;
66-
else return 1;
68+
if (!expand_flag) { return radius;
69+
} else { return 1;
70+
}
6771
}
6872

6973
//==========================================================
7074
//
7175
//==========================================================
72-
double Clength0(void) const { return (glayerX + glayerX_minus) * clength0;}
73-
double Clength1(void) const { return (glayerY + glayerY_minus) * clength1;}
74-
double Clength2(void) const { return (glayerZ + glayerZ_minus) * clength2;}
76+
double Clength0() const { return (glayerX + glayerX_minus) * clength0;}
77+
double Clength1() const { return (glayerY + glayerY_minus) * clength1;}
78+
double Clength2() const { return (glayerZ + glayerZ_minus) * clength2;}
7579

7680
//==========================================================
7781
//
7882
//==========================================================
79-
double minX(void) const
83+
double minX() const
8084
{
81-
if (!expand_flag) return x_min;
82-
else return (double)(-glayerX_minus);
85+
if (!expand_flag) { return x_min;
86+
} else { return (double)(-glayerX_minus);
87+
}
8388
}
8489

85-
double minY(void) const
90+
double minY() const
8691
{
87-
if (!expand_flag) return y_min;
88-
else return (double)(-glayerY_minus);
92+
if (!expand_flag) { return y_min;
93+
} else { return (double)(-glayerY_minus);
94+
}
8995
}
9096

91-
double minZ(void) const
97+
double minZ() const
9298
{
93-
if (!expand_flag) return z_min;
94-
else return (double)(-glayerZ_minus);
99+
if (!expand_flag) { return z_min;
100+
} else { return (double)(-glayerZ_minus);
101+
}
95102
}
96103

97104
//==========================================================
98105
//
99106
//==========================================================
100-
int getCellX(void) const { return cell_nx; }
107+
int getCellX() const { return cell_nx; }
101108

102-
int getCellY(void) const { return cell_ny; }
109+
int getCellY() const { return cell_ny; }
103110

104-
int getCellZ(void) const { return cell_nz; }
111+
int getCellZ() const { return cell_nz; }
105112

106113
//==========================================================
107114
//
108115
//==========================================================
109-
int getGrid_layerX(void) const { return glayerX;}
116+
int getGrid_layerX() const { return glayerX;}
110117

111-
int getGrid_layerX_minus(void) const { return glayerX_minus;}
118+
int getGrid_layerX_minus() const { return glayerX_minus;}
112119

113-
int getGrid_layerY(void) const { return glayerY;}
120+
int getGrid_layerY() const { return glayerY;}
114121

115-
int getGrid_layerY_minus(void) const { return glayerY_minus;}
122+
int getGrid_layerY_minus() const { return glayerY_minus;}
116123

117-
int getGrid_layerZ(void) const { return glayerZ;}
124+
int getGrid_layerZ() const { return glayerZ;}
118125

119-
int getGrid_layerZ_minus(void) const { return glayerZ_minus;}
126+
int getGrid_layerZ_minus() const { return glayerZ_minus;}
120127

121128
FAtom getFakeAtom(const int index) const { return fake_atoms[index];}
122129

@@ -169,7 +176,7 @@ class Atom_input
169176
// MEMBRE FUNCTION :
170177
// NAME : Expand_Grid
171178
//==========================================================
172-
void calculate_cells(void);
179+
void calculate_cells();
173180
int cell_nx;
174181
int cell_ny;
175182
int cell_nz;

0 commit comments

Comments
 (0)