|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Own and advance all time-dependent electric fields in RT-TDDFT. More...
#include <td_field_manager.h>
Public Member Functions | |
| void | prepare_sample (const int step) |
| Sample the length gauge, or initialize A(0) and E(0) without advancing time. | |
| void | prepare_interval (const int left_step, const int sample_step) |
| Prepare consecutive endpoints, with sample_step=left_step+1. Repeating the same interval and sample is idempotent. Propagation A is the endpoint average, not an exact midpoint sample. | |
| TDFieldState | field_state () const |
| Capture the current field without advancing the original sampling grid. | |
| void | bind_field (const TDFieldState &state) |
| Bind trial fields without advancing or integrating the original interval again. | |
| TDFieldState | subinterval (const TDFieldState &full, int index, int parts) const |
| Evaluate interval [index/parts,(index+1)/parts] inside the prepared original step. | |
| double | interval_dt_ha () const |
| Duration of the currently bound trial interval in Hartree atomic units. | |
| void | set_A_samples (const std::vector< ModuleBase::Vector3< double > > &samples_ha) |
| Supply endpoint samples starting at t=0 before preparing any steps. | |
| bool | file_source () const |
| Whether endpoints and finite-difference electric fields come from a file. | |
| const ModuleBase::Vector3< double > & | A_left_ha () const |
| Return interval endpoints in Hartree atomic units. | |
| const ModuleBase::Vector3< double > & | A_right_ha () const |
| const ModuleBase::Vector3< double > & | A_prop_ha () const |
| Return the endpoint average in Hartree units, or A(0) at initialization. | |
| void | read_restart (const std::string &file_dir) |
| Restore the electronic step and vector-potential state. | |
| void | write_restart (const std::string &file_dir) const |
| Save three annotated data rows describing the interval state in Hartree units. | |
| int | gauge () const |
| Return the spatial-gauge selector supplied by td_stype. | |
| int | current_step () const |
| Return the current zero-based electronic-step index. | |
| double | dt_ha () const |
| Return the electronic time step in Hartree atomic time units. | |
| double | length_cut1 () const |
| Return the first reduced-coordinate cut of the length gauge. | |
| double | length_cut2 () const |
| Return the second reduced-coordinate cut of the length gauge. | |
| bool | active () const |
| Return whether the configured field is active at this step. | |
| const std::vector< TDField > & | fields () const |
| Return all configured fields in input-occurrence order. | |
| const std::vector< double > & | field_vals_ha () const |
| Return per-occurrence field samples for the current step. | |
| const ModuleBase::Vector3< double > & | efield_ha () const |
| Return the direction-summed sampled electric field in Hartree atomic units. | |
Private Member Functions | |
| TDFieldManager (bool enabled, int gauge, int start_step, int end_step, double dt, double length_cut1, double length_cut2, std::vector< TDField > fields) | |
| void | sample_field (const int step) |
| void | select_A_prop () |
| ModuleBase::Vector3< double > | substep_a (const TDFieldState &full, int node, int parts) const |
Private Attributes | |
| bool | enabled_ |
| int | gauge_ |
| int | start_step_ |
| int | end_step_ |
| double | dt_ha_ |
| double | interval_dt_ha_ |
| double | length_cut1_ |
| double | length_cut2_ |
| std::vector< TDField > | fields_ |
| int | current_step_ |
| bool | active_ |
| std::vector< double > | field_vals_ha_ |
| int | interval_left_ = -1 |
| std::vector< ModuleBase::Vector3< double > > | A_samples_ha_ |
| ModuleBase::Vector3< double > | A_left_ha_ |
| ModuleBase::Vector3< double > | A_right_ha_ |
| ModuleBase::Vector3< double > | A_prop_ha_ |
| ModuleBase::Vector3< double > | efield_ha_ |
Friends | |
| std::shared_ptr< TDFieldManager > | create_td_field_manager (const Input_para &input) |
| Build all field profiles and convert user input to propagation units. | |
Own and advance all time-dependent electric fields in RT-TDDFT.
The manager preserves per-occurrence values for output while also summing fields that share a Cartesian direction. It is the single source of step, electric-field, and vector-potential state for all spatial gauges.
|
private |
| const ModuleBase::Vector3< double > & elecstate::TDFieldManager::A_left_ha | ( | ) | const |
Return interval endpoints in Hartree atomic units.
| const ModuleBase::Vector3< double > & elecstate::TDFieldManager::A_prop_ha | ( | ) | const |
Return the endpoint average in Hartree units, or A(0) at initialization.
| const ModuleBase::Vector3< double > & elecstate::TDFieldManager::A_right_ha | ( | ) | const |
| bool elecstate::TDFieldManager::active | ( | ) | const |
Return whether the configured field is active at this step.
| void elecstate::TDFieldManager::bind_field | ( | const TDFieldState & | state | ) |
Bind trial fields without advancing or integrating the original interval again.
| int elecstate::TDFieldManager::current_step | ( | ) | const |
Return the current zero-based electronic-step index.
| double elecstate::TDFieldManager::dt_ha | ( | ) | const |
Return the electronic time step in Hartree atomic time units.
| const ModuleBase::Vector3< double > & elecstate::TDFieldManager::efield_ha | ( | ) | const |
Return the direction-summed sampled electric field in Hartree atomic units.
| TDFieldState elecstate::TDFieldManager::field_state | ( | ) | const |
Capture the current field without advancing the original sampling grid.
| const std::vector< double > & elecstate::TDFieldManager::field_vals_ha | ( | ) | const |
Return per-occurrence field samples for the current step.
| const std::vector< TDField > & elecstate::TDFieldManager::fields | ( | ) | const |
Return all configured fields in input-occurrence order.
| bool elecstate::TDFieldManager::file_source | ( | ) | const |
Whether endpoints and finite-difference electric fields come from a file.
| int elecstate::TDFieldManager::gauge | ( | ) | const |
Return the spatial-gauge selector supplied by td_stype.
| double elecstate::TDFieldManager::interval_dt_ha | ( | ) | const |
Duration of the currently bound trial interval in Hartree atomic units.
| double elecstate::TDFieldManager::length_cut1 | ( | ) | const |
Return the first reduced-coordinate cut of the length gauge.
| double elecstate::TDFieldManager::length_cut2 | ( | ) | const |
Return the second reduced-coordinate cut of the length gauge.
| void elecstate::TDFieldManager::prepare_interval | ( | const int | left_step, |
| const int | sample_step ) |
Prepare consecutive endpoints, with sample_step=left_step+1. Repeating the same interval and sample is idempotent. Propagation A is the endpoint average, not an exact midpoint sample.
| void elecstate::TDFieldManager::prepare_sample | ( | const int | step | ) |
Sample the length gauge, or initialize A(0) and E(0) without advancing time.
| void elecstate::TDFieldManager::read_restart | ( | const std::string & | file_dir | ) |
Restore the electronic step and vector-potential state.
| file_dir | Directory containing Restart_td.txt. |
|
private |
|
private |
| void elecstate::TDFieldManager::set_A_samples | ( | const std::vector< ModuleBase::Vector3< double > > & | samples_ha | ) |
Supply endpoint samples starting at t=0 before preparing any steps.
| TDFieldState elecstate::TDFieldManager::subinterval | ( | const TDFieldState & | full, |
| int | index, | ||
| int | parts ) const |
Evaluate interval [index/parts,(index+1)/parts] inside the prepared original step.
|
private |
| void elecstate::TDFieldManager::write_restart | ( | const std::string & | file_dir | ) | const |
Save three annotated data rows describing the interval state in Hartree units.
|
friend |
Build all field profiles and convert user input to propagation units.
Parameters specific to a waveform are paired with td_ttype by occurrence, while td_vext_dire is paired by the overall field index.
| input | Validated ABACUS input parameters. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |