Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
SelfConsistent Class Reference

A class to evaluate self-consistent potentials depending on electron (spin resolved) densities. More...

Inheritance diagram for SelfConsistent:
Inheritance graph
[legend]

Public Member Functions

function Clear (MemberName)
 Clears the value of an attribute in the class. More...
 
function display (message, nosilent)
 Displays output messages on the screen. More...
 
function getOpt ()
 Retrives the structure containing the calculation parameters. More...
 
function Read (MemberName)
 Query for the value of an attribute in the class. More...
 
function Reset ()
 run the first iteration More...
 
function runSelfConsistentIterations (fhandle)
 Runs the self-consistent iterations to obtain the elemets of the self-consistent densities for spin-up and spin-down electrons. More...
 
function SelfConsistent (Opt, varargin)
 Constructor of the class. More...
 
function Write (MemberName, input)
 Sets the value of an attribute in the class. More...
 

Static Public Member Functions

static function BadInputType (variable, type)
 Throws a "bad input type" warning, with using the default value. More...
 
static function BadInputTypeNoDefault (variable, type)
 Throws a "bad input type" warning without setting it to default. More...
 
static function ExceedIteration ()
 Throws an "iteration exceeded" warning. More...
 

Public Attributes

Property density
 An array containing the current density. More...
 
Property 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. More...
 
Property filling_factor
 The calculated filling factor. More...
 
Property junction_sites
 structure describing the geometry of the sites More...
 
Property magnetizaion_direction
 The prescribed magnezitaion direction (+1/-1) More...
 
Property magnetization
 The current magnetization. More...
 
Property plotIterations
 Logical value. Set true to export graphical results for each iteration NEW. More...
 

Protected Member Functions

function ConvergenceTest ()
 determine new iteration input by weighting the previous results More...
 
function Initialize ()
 Initializes class attributes. More...
 
function InputParsing (varargin)
 Parses the optional parameters for the class constructor. More...
 
function NewIterationInput ()
 Creates input for the next self-consistent iteration. More...
 

Protected Attributes

Property delta_densities_iterations
 A list containing the difference between previously calculated densities. More...
 
Property densities_iterations
 A list containing previously calculated densities. More...
 
Property magnetization_iterations
 A list containing previously calculated magnetizations. More...
 
Property MaxIter
 Maximal number of iterations. More...
 
Property newIterationWeight
 Scalar value. The weith of the newly calculated density in the iterations. More...
 
Property Opt
 An instance of structure Opt. More...
 
Property outFileName
 The filename to export the calculated data. More...
 
Property resume
 Logical value. If true, the iteration cintinues with the loaded data, or false (default) otherwise. More...
 
Property silent
 false to supress output messages More...
 
Property tolerance
 Tolerance in the self-consistent iterations. More...
 
Property varargin
 list of optional parameters (see http://www.mathworks.com/help/matlab/ref/varargin.html for details) More...
 

Detailed Description

A class to evaluate self-consistent potentials depending on electron (spin resolved) densities.

Available

EQuUs v4.9 or later

Definition at line 26 of file SelfConsistent.m.

Constructor & Destructor Documentation

◆ SelfConsistent()

function SelfConsistent::SelfConsistent ( Opt  ,
varargin   
)

Constructor of the class.

Parameters
OptAn instance of the structure Opt.
interpqList of transverse momentum points at which fhandle is calculated via interpolation.
vararginCell array of optional parameters. For details see InputParsing.
Returns
An instance of the class

Member Function Documentation

◆ BadInputType()

static function Messages::BadInputType ( variable  ,
type   
)
staticinherited

Throws a "bad input type" warning, with using the default value.

Parameters
variableA string conatining the name of the variable.
typeA 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
variableA string conatining the name of the variable.
typeA string describing the desired type.

◆ Clear()

function SelfConsistent::Clear ( MemberName  )

Clears the value of an attribute in the class.

Parameters
MemberNameThe 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
messageString containing the message to be displayed
nosilentSet true to override the silent option given in Opt.Silent.

◆ ExceedIteration()

static function Messages::ExceedIteration ( )
staticinherited

Throws an "iteration exceeded" warning.

◆ getOpt()

function Messages::getOpt ( )
inherited

Retrives the structure containing the calculation parameters.

Returns
Return an instance of structure Opt.

◆ Initialize()

function SelfConsistent::Initialize ( )
protected

Initializes class attributes.

◆ InputParsing()

function SelfConsistent::InputParsing ( varargin  )
protected

Parses the optional parameters for the class constructor.

Parameters
vararginCell 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
MemberNameThe name of the attribute to be set.
Returns
Returns with the value of the attribute.

◆ Reset()

function SelfConsistent::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()

function SelfConsistent::runSelfConsistentIterations ( fhandle  )

Runs the self-consistent iterations to obtain the elemets of the self-consistent densities for spin-up and spin-down electrons.

Parameters
fhandleThe 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
MemberNameThe name of the attribute to be set.
inputThe value to be set.

Member Data Documentation

◆ 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

An array containing the current density.

Definition at line 33 of file SelfConsistent.m.

◆ 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

The calculated filling factor.

Definition at line 39 of file SelfConsistent.m.

◆ 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

The current magnetization.

Definition at line 45 of file SelfConsistent.m.

◆ 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

Maximal number of iterations.

Definition at line 64 of file SelfConsistent.m.

◆ 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

Property Messages::Opt
protectedinherited

An instance of structure Opt.

Definition at line 31 of file Messages.m.

◆ 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

false to supress output messages

Definition at line 58 of file SelfConsistent.m.

◆ tolerance

Property SelfConsistent::tolerance
protected

Tolerance in the self-consistent iterations.

Definition at line 61 of file SelfConsistent.m.

◆ varargin

Property SelfConsistent::varargin
protected

list of optional parameters (see http://www.mathworks.com/help/matlab/ref/varargin.html for details)

Definition at line 85 of file SelfConsistent.m.


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