structure Derived Type

type, public :: structure


Contents


Components

TypeVisibility AttributesNameInitial
class(material), public, pointer:: a=> null()

First material

class(material), public, pointer:: b=> null()

Last material

integer, public, allocatable:: supercurrent

Output unit (allocate to write supercurrents to file)

integer, public, allocatable:: lossycurrent

Output unit (allocate to write lossycurrents to file)

integer, public, allocatable:: accumulation

Output unit (allocate to write accumulations to file)

integer, public, allocatable:: correlation

Output unit (allocate to write correlations to file)

integer, public, allocatable:: magnetization

Output unit (allocate to write magnetizations to file)

integer, public, allocatable:: distribution

Output unit (allocate to write distributions to file)

integer, public, allocatable:: density

Output unit (allocate to write density of states to file)


Constructor

public interface structure

  • private impure function structure_construct() result(this)

    Constructs a multilayer stack from a configuration file.

    Arguments

    None

    Return Value type(structure)


Type-Bound Procedures

procedure, public :: push => structure_push

Construct a single layer

  • private impure subroutine structure_push(this, string)

    Constructs a new class(material) object at the bottom of the multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), intent(inout) :: this
    character(len=*), intent(in) :: string

procedure, public :: conf => structure_conf

Configure a single layer

  • private impure subroutine structure_conf(this, key, val)

    Configures the last material pushed to the multilayer stack.

    Read more…

    Arguments

    Type IntentOptional AttributesName
    class(structure), intent(inout) :: this
    character(len=*), intent(in) :: key
    character(len=*), intent(in) :: val

procedure, public :: cmap => structure_cmap

Configure all layers

  • private impure subroutine structure_cmap(this, key, val)

    Maps a configuration option onto each element of the multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), intent(inout) :: this
    character(len=*), intent(in) :: key
    class(*), intent(in) :: val

procedure, public :: fmap => structure_fmap

Manipulate all layers

  • private impure subroutine structure_fmap(this, routine, every)

    Maps a subroutine onto each element of the multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this
    procedure(mappable) :: routine
    logical, optional :: every

procedure, public :: initialize => structure_initialize

Reset the physical state

  • private impure subroutine structure_initialize(this)

    Initializes the state of the entire multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

procedure, public :: save => structure_save

Save the physical state

  • private impure subroutine structure_save(this)

    Saves the state of the entire multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

procedure, public :: load => structure_load

Load the physical state

  • private impure subroutine structure_load(this)

    Loads the saved state of the multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

procedure, public :: update => structure_update

Update the physical state

  • private impure subroutine structure_update(this, bootstrap)

    Updates the state of the entire multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this
    logical, optional :: bootstrap

procedure, public :: update_prehook => structure_update_prehook

Execute all update prehooks

  • private impure subroutine structure_update_prehook(this)

    Silently execute all update prehooks.

    Arguments

    Type IntentOptional AttributesName
    class(structure) :: this

procedure, public :: update_posthook => structure_update_posthook

Execute all update posthooks

  • private impure subroutine structure_update_posthook(this)

    Silently execute all update posthooks.

    Arguments

    Type IntentOptional AttributesName
    class(structure) :: this

procedure, public :: converge => structure_converge

Update until convergence

  • private impure subroutine structure_converge(this, threshold, iterations, bootstrap, prehook, posthook)

    Performs a convergence procedure, where the state of every material in the stack is repeatedly updated until the residuals drop below some specified threshold and/or a certain number of iterations have been performed. If bootstrap is set to true, the selfconsistency equations will only be solved once at the end, but not inbetween the individual iterations. If a prehook and/or posthook is given, those subroutines will be executed before/after each iteration of the update.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this
    real(kind=wp), optional :: threshold
    integer, optional :: iterations
    logical, optional :: bootstrap
    procedure(hook), optional :: prehook
    procedure(hook), optional :: posthook

procedure, public :: write => structure_write

Write out observables

  • private impure subroutine structure_write(this)

    Writes physical observables to output files.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

procedure, public :: difference => structure_difference

Check how much the physical state changes

  • private impure function structure_difference(this) result(difference)

    Checks how much the multilayer stack has changed recently.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

    Return Value real(kind=wp)

procedure, public :: materials => structure_materials

Check the number of enabled materials

  • private impure function structure_materials(this) result(num)

    Checks the number of enabled materials in the multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

    Return Value integer

procedure, public :: selfconsistency => structure_selfconsistency

Whether selfconsistency iteration is required

  • private impure function structure_selfconsistency(this) result(res)

    Checks whether selfconsistency iteration is required.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

    Return Value logical

procedure, public :: superconductors => structure_superconductors

Check the number of enables superconductors

  • private impure function structure_superconductors(this) result(num)

    Checks the number of selfconsistent superconductors in the multilayer stack.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

    Return Value integer

procedure, public :: chargeviolation => structure_chargeviolation

Check the violation of charge conservation

  • private impure function structure_chargeviolation(this) result(difference)

    Checks how much the charge current varies with position. Since charge current is supposed to be conserved through the junction, this provides a measure of charge conservation violation, i.e. if the solution is physically realistic.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

    Return Value real(kind=wp)

procedure, public :: gap => structure_gap

Check the minimum superconducting gap

  • private impure function structure_gap(this) result(gap)

    Obtains the mean gap in the enabled superconductor. If there are multiple such superconductors in the junction, then it returns the minimum of the mean gaps.

    Arguments

    Type IntentOptional AttributesName
    class(structure), target:: this

    Return Value real(kind=wp)