ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
msst.h
Go to the documentation of this file.
1#ifndef MSST_H
2#define MSST_H
3
4#include "md_base.h"
5#include <vector>
6
15class MSST : public MD_base
16{
17 public:
18 MSST(
19 const MD_para &mdp_in,
20 const bool cal_stress_in,
21 const bool init_vel,
22 const int my_rank_in,
23 MDCell &mdcell_in);
24 ~MSST();
25
27 const ModuleBase::Vector3<double> &get_omega() const { return omega; }
28
30 double get_e0() const { return e0; }
31
33 double get_v0() const { return v0; }
34
36 double get_p0() const { return p0; }
37
39 double get_lag_pos() const { return lag_pos; }
40
41 private:
42 void setup(ModuleESolver::ESolver *p_esolver, const std::string &global_readin_dir, DomainDecomposition &decomp);
43 void first_half(std::ofstream &ofs);
44 void second_half();
45 void print_md(std::ofstream &ofs, const bool &cal_stress);
46 void write_restart(const std::string &global_out_dir);
47 void restart(const std::string &global_readin_dir);
48
54 double vel_sum() const;
55
62 void rescale(std::ofstream &ofs, const double &volume);
63
68 void propagate_vel(void);
69
74 void propagate_voldot(void);
75
76 std::vector<ModuleBase::Vector3<double>> old_v;
79 double p0;
80 double v0;
81 double e0;
82 double totmass;
83 double lag_pos;
84 double vsum;
85 double msst_vel;
86 double msst_qmass;
87 double msst_vis;
88};
89
90#endif
Domain decomposition for distributed and single-domain neighbor input.
Definition dom_decomp.h:32
Definition mdcell.h:29
bool cal_stress
whether calculate stress
Definition md_base.h:117
MD_base(const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, MDCell &mdcell_in)
construct the integrator from the values it actually uses
Definition md_base.cpp:13
double msst_vis
artificial msst_vis (mass/length/time)
Definition msst.h:87
double vsum
sum over v^2
Definition msst.h:84
void rescale(std::ofstream &ofs, const double &volume)
rescale the lattice and velocities
Definition msst.cpp:264
double v0
initial volume
Definition msst.h:80
void restart(const std::string &global_readin_dir)
restart MD when md_restart is true
Definition msst.cpp:202
const ModuleBase::Vector3< double > & get_omega() const
time derivative of the volume, per lattice direction
Definition msst.h:27
double get_v0() const
volume of the initial configuration
Definition msst.h:33
double vel_sum() const
get the sum of square of velocities
Definition msst.cpp:250
ModuleBase::Vector3< double > omega
time derivative of volume
Definition msst.h:78
double lag_pos
Lagrangian location of cell.
Definition msst.h:83
double get_e0() const
energy of the initial configuration
Definition msst.h:30
double msst_vel
shock msst_vel (\AA/fs)
Definition msst.h:85
double p0
initial pressure
Definition msst.h:79
double get_p0() const
pressure of the initial configuration
Definition msst.h:36
void propagate_vel(void)
propagate atomic velocities
Definition msst.cpp:287
std::vector< ModuleBase::Vector3< double > > old_v
old atomic velocities
Definition msst.h:76
double msst_qmass
cell mass-like parameter (mass^2/length^4)
Definition msst.h:86
MSST(const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, MDCell &mdcell_in)
Definition msst.cpp:10
void print_md(std::ofstream &ofs, const bool &cal_stress)
output MD information such as energy, temperature, and pressure
Definition msst.cpp:170
void first_half(std::ofstream &ofs)
the first half of equation of motion, update velocities and positions
Definition msst.cpp:87
void write_restart(const std::string &global_out_dir)
write the information into files used for MD restarting
Definition msst.cpp:177
void second_half()
the second half of equation of motion, update velocities
Definition msst.cpp:143
~MSST()
Definition msst.cpp:42
double get_lag_pos() const
Lagrangian location of the cell.
Definition msst.h:39
double totmass
total mass of the cell
Definition msst.h:82
ModuleBase::Vector3< double > dilation
dilation scale
Definition msst.h:77
double e0
initial energy
Definition msst.h:81
void propagate_voldot(void)
propagate the volume change rate
Definition msst.cpp:318
void setup(ModuleESolver::ESolver *p_esolver, const std::string &global_readin_dir, DomainDecomposition &decomp)
init before running md, calculate energy, force, and stress of the initial configuration.
Definition msst.cpp:44
3 elements vector
Definition vector3.h:21
Definition esolver.h:13
input parameters used in md
Definition md_parameter.h:12