ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
GintPrecisionController Class Reference

#include <gint_prec_ctrl.h>

Collaboration diagram for GintPrecisionController:

Public Member Functions

 GintPrecisionController ()=default
void set_mode (const std::string &precision_mode)
void reset_for_new_scf ()
bool update_after_iteration (double drho, double scf_thr)
 Returns true if precision switched from fp32 to fp64 in this call.
ModuleGint::GintPrecision current_precision () const

Private Types

enum class  PrecisionMode { single , double_mode , mix }

Static Private Member Functions

static PrecisionMode parse_mode_ (const std::string &precision_mode)

Private Attributes

ModuleGint::GintPrecision current_precision_ = ModuleGint::GintPrecision::fp64
PrecisionMode mode_ = PrecisionMode::double_mode
bool locked_double_precision_ = true

Member Enumeration Documentation

◆ PrecisionMode

enum class GintPrecisionController::PrecisionMode
strongprivate
Enumerator
single 
double_mode 
mix 

Constructor & Destructor Documentation

◆ GintPrecisionController()

GintPrecisionController::GintPrecisionController ( )
default

Member Function Documentation

◆ current_precision()

ModuleGint::GintPrecision GintPrecisionController::current_precision ( ) const
Here is the caller graph for this function:

◆ parse_mode_()

GintPrecisionController::PrecisionMode GintPrecisionController::parse_mode_ ( const std::string & precision_mode)
staticprivate
Here is the caller graph for this function:

◆ reset_for_new_scf()

void GintPrecisionController::reset_for_new_scf ( )
Here is the caller graph for this function:

◆ set_mode()

void GintPrecisionController::set_mode ( const std::string & precision_mode)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_after_iteration()

bool GintPrecisionController::update_after_iteration ( double drho,
double scf_thr )

Returns true if precision switched from fp32 to fp64 in this call.

Here is the caller graph for this function:

Member Data Documentation

◆ current_precision_

ModuleGint::GintPrecision GintPrecisionController::current_precision_ = ModuleGint::GintPrecision::fp64
private

◆ locked_double_precision_

bool GintPrecisionController::locked_double_precision_ = true
private

◆ mode_

PrecisionMode GintPrecisionController::mode_ = PrecisionMode::double_mode
private

The documentation for this class was generated from the following files: