A class to evaluate self-consistent potentials depending on electron (spin resolved) densities.
More...
A class to evaluate self-consistent potentials depending on electron (spin resolved) densities.
EQuUs v4.9 or later
Definition at line 26 of file SelfConsistent.m.
◆ SelfConsistent()
Constructor of the class.
- Parameters
-
Opt | An instance of the structure Opt. |
interpq | List of transverse momentum points at which fhandle is calculated via interpolation. |
varargin | Cell array of optional parameters. For details see InputParsing. |
- Returns
- An instance of the class
◆ BadInputType()
static function Messages::BadInputType |
( |
variable |
, |
|
|
type |
|
|
) |
| |
|
staticinherited |
Throws a "bad input type" warning, with using the default value.
- Parameters
-
variable | A string conatining the name of the variable. |
type | A string describing the desired type. |
◆ BadInputTypeNoDefault()
static function Messages::BadInputTypeNoDefault |
( |
variable |
, |
|
|
type |
|
|
) |
| |
|
staticinherited |
Throws a "bad input type" warning without setting it to default.
- Parameters
-
variable | A string conatining the name of the variable. |
type | A string describing the desired type. |
◆ Clear()
function SelfConsistent::Clear |
( |
MemberName |
| ) |
|
Clears the value of an attribute in the class.
- Parameters
-
MemberName | The name of the attribute to be cleared. |
◆ ConvergenceTest()
function SelfConsistent::ConvergenceTest |
( |
| ) |
|
|
protected |
determine new iteration input by weighting the previous results
renormalizing the density to the initial norm calculating the difference compared to the privous density calculating the current magnetization shifting iterations factors Tests the convergence of the self-consistent iterations.
- Returns
- Return with true if convergence was reached, false otherwise
◆ display()
function Messages::display |
( |
message |
, |
|
|
nosilent |
|
|
) |
| |
|
inherited |
Displays output messages on the screen.
- Parameters
-
message | String containing the message to be displayed |
nosilent | Set true to override the silent option given in Opt.Silent. |
◆ ExceedIteration()
static function Messages::ExceedIteration |
( |
| ) |
|
|
staticinherited |
Throws an "iteration exceeded" warning.
◆ getOpt()
Retrives the structure containing the calculation parameters.
- Returns
- Return an instance of structure Opt.
◆ Initialize()
Initializes class attributes.
◆ InputParsing()
Parses the optional parameters for the class constructor.
- Parameters
-
varargin | Cell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html): |
'resume' | Logical value. If true, the iteration continues with the loaded data, or false (default) otherwise. |
'outFileName' | The filename to save the calculated data. If it is empty (default) no data are exported. |
'silent' | Logical value. Set true to suppress the output messages, or false (default) otherwise. |
'magnetizaion_direction' | Set +/- 1 to prescribe the magnetization direction, or set empty (default) to not lock the magnetization direction. |
'tolerance' | Tolerance of the convergence test. (Default is 2*10^-5) |
'plotIterations' | Set true to visuelize the results of the self-consistent iterations. |
'newIterationWeight' | Scalar value. The weith of the newly calculated density in the iterations. (Default value is 0.5) |
'MaxIter' | Maximal number of iterations. (Default value is 500) |
◆ NewIterationInput()
function SelfConsistent::NewIterationInput |
( |
| ) |
|
|
protected |
Creates input for the next self-consistent iteration.
◆ Read()
function SelfConsistent::Read |
( |
MemberName |
| ) |
|
Query for the value of an attribute in the class.
- Parameters
-
MemberName | The name of the attribute to be set. |
- Returns
- Returns with the value of the attribute.
◆ Reset()
run the first iteration
do the rest of the iterations reverting the magnetization direction if necessary calculating the difference compared to the privous density creating and displaying output messaage Resets the class members.
◆ runSelfConsistentIterations()
Runs the self-consistent iterations to obtain the elemets of the self-consistent densities for spin-up and spin-down electrons.
- Parameters
-
fhandle | The function handle to be calculated over the transverse momentum points: y = fhandle( qvec ), where y is an MxN matrix, and qvec is a vector of transverse momentums containing of M elements. |
◆ Write()
function SelfConsistent::Write |
( |
MemberName |
, |
|
|
input |
|
|
) |
| |
Sets the value of an attribute in the class.
- Parameters
-
MemberName | The name of the attribute to be set. |
input | The value to be set. |
◆ delta_densities_iterations
Property SelfConsistent::delta_densities_iterations |
|
protected |
A list containing the difference between previously calculated densities.
Definition at line 76 of file SelfConsistent.m.
◆ densities_iterations
Property SelfConsistent::densities_iterations |
|
protected |
A list containing previously calculated densities.
Definition at line 73 of file SelfConsistent.m.
◆ density
Property SelfConsistent::density |
◆ fhandle
Property SelfConsistent::fhandle |
The function handle for which the self-consistent iterations are performed: y = fhandle( qvec ), where y is an MxN matrix, and qvec is a vector of transverse momentums containing of M elements.
Definition at line 51 of file SelfConsistent.m.
◆ filling_factor
Property SelfConsistent::filling_factor |
◆ junction_sites
Property SelfConsistent::junction_sites |
structure describing the geometry of the sites
Definition at line 36 of file SelfConsistent.m.
◆ magnetizaion_direction
Property SelfConsistent::magnetizaion_direction |
The prescribed magnezitaion direction (+1/-1)
Definition at line 42 of file SelfConsistent.m.
◆ magnetization
Property SelfConsistent::magnetization |
◆ magnetization_iterations
Property SelfConsistent::magnetization_iterations |
|
protected |
A list containing previously calculated magnetizations.
Definition at line 79 of file SelfConsistent.m.
◆ MaxIter
Property SelfConsistent::MaxIter |
|
protected |
◆ newIterationWeight
Property SelfConsistent::newIterationWeight |
|
protected |
Scalar value. The weith of the newly calculated density in the iterations.
Definition at line 82 of file SelfConsistent.m.
◆ Opt
◆ outFileName
Property SelfConsistent::outFileName |
|
protected |
The filename to export the calculated data.
Definition at line 70 of file SelfConsistent.m.
◆ plotIterations
Property SelfConsistent::plotIterations |
Logical value. Set true to export graphical results for each iteration NEW.
Definition at line 48 of file SelfConsistent.m.
◆ resume
Property SelfConsistent::resume |
|
protected |
Logical value. If true, the iteration cintinues with the loaded data, or false (default) otherwise.
Definition at line 67 of file SelfConsistent.m.
◆ silent
Property SelfConsistent::silent |
|
protected |
◆ tolerance
Property SelfConsistent::tolerance |
|
protected |
Tolerance in the self-consistent iterations.
Definition at line 61 of file SelfConsistent.m.
◆ varargin
Property SelfConsistent::varargin |
|
protected |
The documentation for this class was generated from the following file: