Skip to content

Stack

ParallelStack

Source code in cmtj/stack/__init__.pyi
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class ParallelStack:
    def __init__(
        self,
        junctionList: List[cmtj.Junction],
        topId: str = "free",
        bottomId: str = "bottom",
        phaseOffset: float = 0,
    ) -> None:
        """
        Initialises a parallel connection of junctions.
        Layer ids are used to identify the layers in the junctions and for resistance calculations.
        :param junctionList: list of junctions to be connected in parallel.
        :param topId: the string id of the top layer in the stack. Default is "free".
        :param bottomId: the string id of the bottom layer in the stack. Default is "bottom".
        :param phaseOffset: the phase offset between the junctions. Default is 0.
        """
        ...

    def clearLogs(self) -> None:
        """
        Clear all the logs, both of the stack and the junctions
        that constitute the stack.
        """
        ...

    @overload
    def getLog(self, junctionId: int) -> Dict[str, List[float]]:
        """
        Get the logs of a specific junction -- integer id
        from the `junctionList`.
        :param junctionId: integer junction id as was passed in the init.
        """
        ...

    @overload
    def getLog(self) -> Dict[str, List[float]]:
        """
        Get the logs of the stack
        """
        ...

    def runSimulation(
        self, totalTime: float, timeStep: float = ..., writeFrequency: float = ...
    ) -> None:
        """
        Run the simulation of the stack.
        :param totalTime: total time of a simulation, give it in seconds. Typical length is in ~couple ns.
        :param timeStep: the integration step of the RK45 method. Default is 1e-13
        :param writeFrequency: how often is the log saved to? Must be no smaller than `timeStep`. Default is 1e-11.
        """
        ...

    def setCoupledCurrentDriver(self, driver: cmtj.ScalarDriver) -> None:
        """
        Sets a global current driver for all junctions inside the stack.
        Keep in mind the current passed down the stack will be modified
        by the coupling constant.
        :param driver: the current driver to be set.
        """
        ...

    def setCouplingStrength(self, coupling: float) -> None:
        """
        Coupling constant that represents the energy losses as the current
        passes through the stack.
        :param coupling: the coupling strength (or the losses)
        """
        ...

    def setExternalFieldDriver(self, driver: cmtj.AxialDriver) -> None:
        """
        Sets a external field current driver for all junctions inside the stack.
        :param driver: the field driver to be set.
        """
        ...

    def setMagnetisation(
        self, junctionId: int, layerId: str, mag: cmtj.CVector
    ) -> None:
        """
        Set magnetisation on a specific layer in a specific junction.
        :param junctionId: the id of the junction (int) as passed in the init.
        :param layerId: the string id of the layer in the junction.
        :param mag: the magnetisation to be set.
        """
        ...

        def getMagnetisation(self, junction: int, layerId: str) -> cmtj.CVector: ...

__init__(junctionList, topId='free', bottomId='bottom', phaseOffset=0)

Initialises a parallel connection of junctions. Layer ids are used to identify the layers in the junctions and for resistance calculations.

Parameters:

Name Type Description Default
junctionList List[cmtj.Junction]

list of junctions to be connected in parallel.

required
topId str

the string id of the top layer in the stack. Default is "free".

'free'
bottomId str

the string id of the bottom layer in the stack. Default is "bottom".

'bottom'
phaseOffset float

the phase offset between the junctions. Default is 0.

0
Source code in cmtj/stack/__init__.pyi
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
def __init__(
    self,
    junctionList: List[cmtj.Junction],
    topId: str = "free",
    bottomId: str = "bottom",
    phaseOffset: float = 0,
) -> None:
    """
    Initialises a parallel connection of junctions.
    Layer ids are used to identify the layers in the junctions and for resistance calculations.
    :param junctionList: list of junctions to be connected in parallel.
    :param topId: the string id of the top layer in the stack. Default is "free".
    :param bottomId: the string id of the bottom layer in the stack. Default is "bottom".
    :param phaseOffset: the phase offset between the junctions. Default is 0.
    """
    ...

clearLogs()

Clear all the logs, both of the stack and the junctions that constitute the stack.

Source code in cmtj/stack/__init__.pyi
23
24
25
26
27
28
def clearLogs(self) -> None:
    """
    Clear all the logs, both of the stack and the junctions
    that constitute the stack.
    """
    ...

runSimulation(totalTime, timeStep=Ellipsis, writeFrequency=Ellipsis)

Run the simulation of the stack.

Parameters:

Name Type Description Default
totalTime float

total time of a simulation, give it in seconds. Typical length is in ~couple ns.

required
timeStep float

the integration step of the RK45 method. Default is 1e-13

Ellipsis
writeFrequency float

how often is the log saved to? Must be no smaller than timeStep. Default is 1e-11.

Ellipsis
Source code in cmtj/stack/__init__.pyi
46
47
48
49
50
51
52
53
54
55
def runSimulation(
    self, totalTime: float, timeStep: float = ..., writeFrequency: float = ...
) -> None:
    """
    Run the simulation of the stack.
    :param totalTime: total time of a simulation, give it in seconds. Typical length is in ~couple ns.
    :param timeStep: the integration step of the RK45 method. Default is 1e-13
    :param writeFrequency: how often is the log saved to? Must be no smaller than `timeStep`. Default is 1e-11.
    """
    ...

setCoupledCurrentDriver(driver)

Sets a global current driver for all junctions inside the stack. Keep in mind the current passed down the stack will be modified by the coupling constant.

Parameters:

Name Type Description Default
driver cmtj.ScalarDriver

the current driver to be set.

required
Source code in cmtj/stack/__init__.pyi
57
58
59
60
61
62
63
64
def setCoupledCurrentDriver(self, driver: cmtj.ScalarDriver) -> None:
    """
    Sets a global current driver for all junctions inside the stack.
    Keep in mind the current passed down the stack will be modified
    by the coupling constant.
    :param driver: the current driver to be set.
    """
    ...

setCouplingStrength(coupling)

Coupling constant that represents the energy losses as the current passes through the stack.

Parameters:

Name Type Description Default
coupling float

the coupling strength (or the losses)

required
Source code in cmtj/stack/__init__.pyi
66
67
68
69
70
71
72
def setCouplingStrength(self, coupling: float) -> None:
    """
    Coupling constant that represents the energy losses as the current
    passes through the stack.
    :param coupling: the coupling strength (or the losses)
    """
    ...

setExternalFieldDriver(driver)

Sets a external field current driver for all junctions inside the stack.

Parameters:

Name Type Description Default
driver cmtj.AxialDriver

the field driver to be set.

required
Source code in cmtj/stack/__init__.pyi
74
75
76
77
78
79
def setExternalFieldDriver(self, driver: cmtj.AxialDriver) -> None:
    """
    Sets a external field current driver for all junctions inside the stack.
    :param driver: the field driver to be set.
    """
    ...

setMagnetisation(junctionId, layerId, mag)

Set magnetisation on a specific layer in a specific junction.

Parameters:

Name Type Description Default
junctionId int

the id of the junction (int) as passed in the init.

required
layerId str

the string id of the layer in the junction.

required
mag cmtj.CVector

the magnetisation to be set.

required
Source code in cmtj/stack/__init__.pyi
81
82
83
84
85
86
87
88
89
90
91
92
def setMagnetisation(
    self, junctionId: int, layerId: str, mag: cmtj.CVector
) -> None:
    """
    Set magnetisation on a specific layer in a specific junction.
    :param junctionId: the id of the junction (int) as passed in the init.
    :param layerId: the string id of the layer in the junction.
    :param mag: the magnetisation to be set.
    """
    ...

    def getMagnetisation(self, junction: int, layerId: str) -> cmtj.CVector: ...

SeriesStack

Source code in cmtj/stack/__init__.pyi
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
class SeriesStack:
    def __init__(
        self,
        junctionList: List[cmtj.Junction],
        topId: str = "free",
        bottomId: str = "bottom",
        phaseOffset: float = 0,
    ) -> None:
        """
        Initialises a series connection of junctions.
        Layer ids are used to identify the layers in the junctions and for resistance calculations.
        :param junctionList: list of junctions to be connected in series.
        :param topId: the string id of the top layer in the stack. Default is "free".
        :param bottomId: the string id of the bottom layer in the stack. Default is "bottom".
        :param phaseOffset: the phase offset between the junctions. Default is 0.
        """
        ...

    def clearLogs(self) -> None:
        """
        Clear all the logs, both of the stack and the junctions
        that constitute the stack.
        """
        ...

    @overload
    def getLog(self, junctionId: int) -> Dict[str, List[float]]:
        """
        Get the logs of a specific junction -- integer id
        from the `junctionList`.
        :param junctionId: integer junction id as was passed in the init.
        """
        ...

    @overload
    def getLog(self) -> Dict[str, List[float]]:
        """
        Get the logs of the stack
        """
        ...

    def runSimulation(
        self, totalTime: float, timeStep: float = ..., writeFrequency: float = ...
    ) -> None:
        """
        Run the simulation of the stack.
        :param totalTime: total time of a simulation, give it in seconds. Typical length is in ~couple ns.
        :param timeStep: the integration step of the RK45 method. Default is 1e-13
        :param writeFrequency: how often is the log saved to? Must be no smaller than `timeStep`. Default is 1e-11.
        """
        ...

    def setCoupledCurrentDriver(self, driver: cmtj.ScalarDriver) -> None:
        """
        Sets a global current driver for all junctions inside the stack.
        Keep in mind the current passed down the stack will be modified
        by the coupling constant.
        :param driver: the current driver to be set.
        """
        ...

    @overload
    def setCouplingStrength(self, coupling: float) -> None:
        """
        Coupling constant that represents the energy losses as the current
        passes through the stack.
        :param coupling: the coupling strength (or the losses)
        """
        ...

    @overload
    def setCouplingStrength(self, coupling: List[float]) -> None:
        """
        Coupling constant that represents the energy losses as the current
        passes through the stack.
        :param coupling: the coupling strength (or the losses) for each junction.
            Must be the one less than length of the junction vector, i.e. len(junctionList)-1 .
        """
        ...

    def setExternalFieldDriver(self, driver: cmtj.AxialDriver) -> None:
        """
        Sets a external field current driver for all junctions inside the stack.
        :param driver: the field driver to be set.
        """
        ...

    def setMagnetisation(
        self, junctionId: int, layerId: str, mag: cmtj.CVector
    ) -> None:
        """
        Set magnetisation on a specific layer in a specific junction.
        :param junctionId: the id of the junction (int) as passed in the init.
        :param layerId: the string id of the layer in the junction.
        :param mag: the magnetisation to be set.
        """
        ...

    def getMagnetisation(self, junction: int, layerId: str) -> cmtj.CVector:
        """Get the magnetisation of a specific layer in a specific junction.
        :param junction: the id of the junction (int) as passed in the init.
        :param layerId: the string id of the layer in the junction."""
        ...

__init__(junctionList, topId='free', bottomId='bottom', phaseOffset=0)

Initialises a series connection of junctions. Layer ids are used to identify the layers in the junctions and for resistance calculations.

Parameters:

Name Type Description Default
junctionList List[cmtj.Junction]

list of junctions to be connected in series.

required
topId str

the string id of the top layer in the stack. Default is "free".

'free'
bottomId str

the string id of the bottom layer in the stack. Default is "bottom".

'bottom'
phaseOffset float

the phase offset between the junctions. Default is 0.

0
Source code in cmtj/stack/__init__.pyi
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
def __init__(
    self,
    junctionList: List[cmtj.Junction],
    topId: str = "free",
    bottomId: str = "bottom",
    phaseOffset: float = 0,
) -> None:
    """
    Initialises a series connection of junctions.
    Layer ids are used to identify the layers in the junctions and for resistance calculations.
    :param junctionList: list of junctions to be connected in series.
    :param topId: the string id of the top layer in the stack. Default is "free".
    :param bottomId: the string id of the bottom layer in the stack. Default is "bottom".
    :param phaseOffset: the phase offset between the junctions. Default is 0.
    """
    ...

clearLogs()

Clear all the logs, both of the stack and the junctions that constitute the stack.

Source code in cmtj/stack/__init__.pyi
112
113
114
115
116
117
def clearLogs(self) -> None:
    """
    Clear all the logs, both of the stack and the junctions
    that constitute the stack.
    """
    ...

getMagnetisation(junction, layerId)

Get the magnetisation of a specific layer in a specific junction.

Parameters:

Name Type Description Default
junction int

the id of the junction (int) as passed in the init.

required
layerId str

the string id of the layer in the junction.

required
Source code in cmtj/stack/__init__.pyi
192
193
194
195
196
def getMagnetisation(self, junction: int, layerId: str) -> cmtj.CVector:
    """Get the magnetisation of a specific layer in a specific junction.
    :param junction: the id of the junction (int) as passed in the init.
    :param layerId: the string id of the layer in the junction."""
    ...

runSimulation(totalTime, timeStep=Ellipsis, writeFrequency=Ellipsis)

Run the simulation of the stack.

Parameters:

Name Type Description Default
totalTime float

total time of a simulation, give it in seconds. Typical length is in ~couple ns.

required
timeStep float

the integration step of the RK45 method. Default is 1e-13

Ellipsis
writeFrequency float

how often is the log saved to? Must be no smaller than timeStep. Default is 1e-11.

Ellipsis
Source code in cmtj/stack/__init__.pyi
135
136
137
138
139
140
141
142
143
144
def runSimulation(
    self, totalTime: float, timeStep: float = ..., writeFrequency: float = ...
) -> None:
    """
    Run the simulation of the stack.
    :param totalTime: total time of a simulation, give it in seconds. Typical length is in ~couple ns.
    :param timeStep: the integration step of the RK45 method. Default is 1e-13
    :param writeFrequency: how often is the log saved to? Must be no smaller than `timeStep`. Default is 1e-11.
    """
    ...

setCoupledCurrentDriver(driver)

Sets a global current driver for all junctions inside the stack. Keep in mind the current passed down the stack will be modified by the coupling constant.

Parameters:

Name Type Description Default
driver cmtj.ScalarDriver

the current driver to be set.

required
Source code in cmtj/stack/__init__.pyi
146
147
148
149
150
151
152
153
def setCoupledCurrentDriver(self, driver: cmtj.ScalarDriver) -> None:
    """
    Sets a global current driver for all junctions inside the stack.
    Keep in mind the current passed down the stack will be modified
    by the coupling constant.
    :param driver: the current driver to be set.
    """
    ...

setExternalFieldDriver(driver)

Sets a external field current driver for all junctions inside the stack.

Parameters:

Name Type Description Default
driver cmtj.AxialDriver

the field driver to be set.

required
Source code in cmtj/stack/__init__.pyi
174
175
176
177
178
179
def setExternalFieldDriver(self, driver: cmtj.AxialDriver) -> None:
    """
    Sets a external field current driver for all junctions inside the stack.
    :param driver: the field driver to be set.
    """
    ...

setMagnetisation(junctionId, layerId, mag)

Set magnetisation on a specific layer in a specific junction.

Parameters:

Name Type Description Default
junctionId int

the id of the junction (int) as passed in the init.

required
layerId str

the string id of the layer in the junction.

required
mag cmtj.CVector

the magnetisation to be set.

required
Source code in cmtj/stack/__init__.pyi
181
182
183
184
185
186
187
188
189
190
def setMagnetisation(
    self, junctionId: int, layerId: str, mag: cmtj.CVector
) -> None:
    """
    Set magnetisation on a specific layer in a specific junction.
    :param junctionId: the id of the junction (int) as passed in the init.
    :param layerId: the string id of the layer in the junction.
    :param mag: the magnetisation to be set.
    """
    ...