Skip to content

Commit 9237bd2

Browse files
committed
add value in the construct file
1 parent 20267ef commit 9237bd2

File tree

7 files changed

+36
-20
lines changed

7 files changed

+36
-20
lines changed

source/module_basis/module_ao/parallel_orbitals.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66

77
Parallel_Orbitals::Parallel_Orbitals()
88
{
9-
loc_sizes = nullptr;
10-
9+
this->loc_sizes = nullptr;
1110
// in multi-k, 2D-block-division variables for FT (R<->k)
12-
nlocdim = nullptr;
13-
nlocstart = nullptr;
11+
this->nlocdim = nullptr;
12+
this->nlocstart = nullptr;
13+
this->nnr = 1;
14+
this->ncol_bands = 0;
15+
this->nrow_bands=0;
16+
this->nloc_wfc=0;
17+
this->nloc_Eij=0;
18+
this->lastband_in_proc=0;
19+
this->lastband_number=0;
20+
this->loc_size=0;
21+
this->nbands = 0;
22+
1423
}
1524

1625
Parallel_Orbitals::~Parallel_Orbitals()

source/module_basis/module_ao/parallel_orbitals.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ class Parallel_Orbitals : public Parallel_2D
1313

1414
/// local size of bands, used for 2d wavefunction
1515
/// must divided on dim1 because of elpa interface
16-
int ncol_bands=0;
17-
int nrow_bands=0;
16+
int ncol_bands;
17+
int nrow_bands;
1818

1919
/// ncol_bands*nrow
20-
long nloc_wfc=0;
20+
long nloc_wfc;
2121

2222
//ncol_bands*ncol_bands
23-
long nloc_Eij=0;
23+
long nloc_Eij;
2424

25-
int lastband_in_proc=0;
26-
int lastband_number=0;
25+
int lastband_in_proc;
26+
int lastband_number;
2727

2828
///---------------------------------------
2929
/// number of elements(basis-pairs) in this processon
@@ -50,7 +50,7 @@ class Parallel_Orbitals : public Parallel_2D
5050
#endif
5151

5252
int* loc_sizes;
53-
int loc_size=0;
53+
int loc_size;
5454

5555
int get_wfc_global_nbands () const;
5656
int get_wfc_global_nbasis () const;
@@ -80,7 +80,7 @@ class Parallel_Orbitals : public Parallel_2D
8080

8181
int get_nbands() const;
8282

83-
int nbands = 0;
83+
int nbands;
8484

8585
/**
8686
* @brief gather global indexes of orbitals in this processor

source/module_hamilt_general/module_vdw/vdwd2_parameters.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class Vdwd2Parameters : public VdwParameters
2323
{
2424
C6_ = C6_default_;
2525
R0_ = R0_default_;
26+
damping_ = 0.0;
27+
scaling_ = 1.0;
28+
radius_ = 0.0;
2629
}
2730

2831
~Vdwd2Parameters() = default;
@@ -47,9 +50,9 @@ class Vdwd2Parameters : public VdwParameters
4750
inline double scaling() const { return scaling_; }
4851

4952
private:
50-
double scaling_=0;
51-
double damping_=0;
52-
double radius_=0;
53+
double scaling_;
54+
double damping_;
55+
double radius_;
5356
std::map<std::string, double> C6_;
5457
std::map<std::string, double> R0_;
5558
static const std::map<std::string, double> C6_default_;

source/module_md/fire.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ FIRE::FIRE(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, uni
1818
f_alpha = 0.99;
1919
n_min = 4;
2020
negative_count = 0;
21+
max = 0.0;
22+
force_thr = 1e-3;
2123
}
2224

2325
FIRE::~FIRE()

source/module_md/fire.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class FIRE : public MD_base
4141
*/
4242
void check_fire(void);
4343

44-
double max=0.0; ///< max force
44+
double max; ///< max force
4545
double alpha_start; ///< alpha_start begin
4646
double alpha; ///< alpha begin
4747
double finc; ///< finc begin
@@ -50,7 +50,7 @@ class FIRE : public MD_base
5050
int n_min; ///< n_min
5151
double dt_max; ///< dt_max
5252
int negative_count; ///< Negative count
53-
double force_thr = 1.0e-3; ///< force convergence threshold in FIRE method
53+
double force_thr; ///< force convergence threshold in FIRE method
5454
};
5555

5656
#endif

source/module_md/msst.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ MSST::MSST(const Parameter& param_in, UnitCell& unit_in) : MD_base(param_in, uni
2121
e0 = 0;
2222
v0 = 1;
2323
totmass = 0;
24-
24+
lag_pos = 0;
25+
vsum = 0;
26+
2527
for (int i = 0; i < ucell.nat; ++i)
2628
{
2729
totmass += allmass[i];

source/module_md/msst.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class MSST : public MD_base
5959
double v0; ///< initial volume
6060
double e0; ///< initial energy
6161
double totmass; ///< total mass of the cell
62-
double lag_pos=0.0; ///< Lagrangian location of cell
63-
double vsum=0.0; ///< sum over v^2
62+
double lag_pos; ///< Lagrangian location of cell
63+
double vsum; ///< sum over v^2
6464
double msst_vel; ///< shock msst_vel (\AA/fs)
6565
double msst_qmass; ///< cell mass-like parameter (mass^2/length^4)
6666
double msst_vis; ///< artificial msst_vis (mass/length/time)

0 commit comments

Comments
 (0)