tetrax.core package#
Subpackages#
Submodules#
tetrax.core.experimental_setup module#
- class tetrax.core.experimental_setup.CPWAntenna(width, gap, spacing)#
Bases:
tetrax.core.experimental_setup.MicrowaveAntennaMethods
get_mesh
get_microwave_field_function
- get_mesh(span)#
- get_microwave_field_function(xyz)#
- class tetrax.core.experimental_setup.CurrentLoopAntenna(width, radius)#
Bases:
tetrax.core.experimental_setup.MicrowaveAntennaMethods
get_mesh
get_microwave_field_function
- get_mesh(span)#
- get_microwave_field_function(xyz)#
- class tetrax.core.experimental_setup.ExperimentalSetup(sample, name='my_experiment')#
Bases:
object- Attributes
- Bext
- antenna
Methods
absorption
eigenmodes
relax
show
- property Bext#
- absorption(auto_eigenmodes=False, fmin=0, fmax=30, Nf=200, k=None)#
- property antenna#
- eigenmodes(kmin=- 40000000.0, kmax=40000000.0, Nk=81, num_modes=20, k=None, no_dip=False, num_cpus=1, save_modes=True, save_local=False, save_magphase=False)#
- relax(tol=1e-12, continue_least_with_squares=False, return_last=False)#
- show(comp='vec', scale=5, show_antenna=True)#
- class tetrax.core.experimental_setup.HomogeneousAntenna(theta=0, phi=0)#
Bases:
tetrax.core.experimental_setup.MicrowaveAntennaMethods
get_mesh
get_microwave_field_function
- get_mesh()#
- get_microwave_field_function(xyz)#
- class tetrax.core.experimental_setup.MicrowaveAntenna#
Bases:
object
- class tetrax.core.experimental_setup.StriplineAntenna(width, spacing)#
Bases:
tetrax.core.experimental_setup.MicrowaveAntennaMethods
get_mesh
get_microwave_field_function
- get_mesh(span)#
- get_microwave_field_function(xyz)#
- tetrax.core.experimental_setup.create_experimental_setup(sample, name: str = 'my_experiment') tetrax.core.experimental_setup.ExperimentalSetup#
Creates an experimental setup around a given sample.
- Parameters
- sampleAbstractSample
Sample object to create ExperimentalSetup around.
- namestr
Name of the experimental setup.
- Returns
- ExperimentalSetup
tetrax.core.operators module#
- class tetrax.core.operators.BulkDMIOperator(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
set_k
- set_k(k)#
- class tetrax.core.operators.CubicAnisotropyLinearOperator(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
nonlinear_field(vec)Full nonlinear anistropy.
nonlinear_field_old(vec)Full nonlinear anistropy.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
set_new_param(conf, nx)Set new parameters for unixial anisotropy.
transpose()Transpose this linear operator.
make_sparse_mat
- make_sparse_mat()#
- nonlinear_field(vec)#
Full nonlinear anistropy. Returns the cubic anisotropy field of a given vector. This is not a linear operator.
- nonlinear_field_old(vec)#
Full nonlinear anistropy. Returns the cubic anisotropy field of a given vector. This is not a linear operator.
- set_new_param(conf, nx)#
Set new parameters for unixial anisotropy.
- class tetrax.core.operators.DipolarOperator(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
set_k
- set_k(k)#
- exception tetrax.core.operators.Error#
Bases:
ExceptionBase class for exceptions in this module.
- class tetrax.core.operators.ExchangeOperator(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
set_k
- set_k(k)#
- class tetrax.core.operators.InterfacialDMIOperator(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
set_k
- set_k(k)#
- class tetrax.core.operators.InvTotalDynMat(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperatorInverse of Dynamic Matrix
- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
- exception tetrax.core.operators.InvertError(k, after_iter, already_sucess, message)#
Bases:
tetrax.core.operators.ErrorException raised for errors in inversion of total dynamic matrix.
- tetrax.core.operators.N_dip(m, k, ksquared_mat_a_n, ksquared_mat_a_nb, nx, div_x, div_y, poiss, boundary_nodes, dense, laplace, grad_x, grad_y, a_n)#
- class tetrax.core.operators.SuperLUInv(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperatorSuperLU object as LinearOperator
- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
- class tetrax.core.operators.TotalDynMat(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
set_k
- set_k(k, sparse_mat_k)#
- class tetrax.core.operators.UniAxialAnisotropyOperator(*args, **kwargs)#
Bases:
scipy.sparse.linalg._interface.LinearOperator- Attributes
HHermitian adjoint.
TTranspose this linear operator.
Methods
__call__(x)Call self as a function.
adjoint()Hermitian adjoint.
dot(x)Matrix-matrix or matrix-vector multiplication.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
rmatmat(X)Adjoint matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
transpose()Transpose this linear operator.
make_sparse_mat
- make_sparse_mat()#
- tetrax.core.operators.cross_operator(nx)#
Return the rotated cross product operator as a crs_matrix.
tetrax.core.sample module#
- class tetrax.core.sample.AbstractSample(name, geometry, magnetic_order, dim)#
Bases:
abc.ABCMethods
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
show()This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
read_mesh
set_geom
- abstract get_eigensolver()#
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
- abstract get_magnetic_tensors()#
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
- abstract initialize_material_params()#
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
- read_mesh(fname)#
- set_geom(mesh)#
- abstract show()#
This method should be implemented by the FerromagneticMixin or AntiferromagneticMixin class of the concrete sample.
- class tetrax.core.sample.AntiferromagnetMixin#
Bases:
object- Attributes
- mag1
- mag2
Methods
get_magnetic_tensors
initialize_material_params
show
- get_magnetic_tensors()#
- initialize_material_params()#
- property mag1#
- property mag2#
- show()#
- class tetrax.core.sample.ConfinedSampleAFM(name, geometry, magnetic_order, dim)#
Bases:
tetrax.core.sample.ConfinedWaveEigensolverMixin,tetrax.core.sample.AntiferromagnetMixin,tetrax.core.sample.AbstractSample- Attributes
- mag1
- mag2
Methods
description
get_eigensolver
get_magnetic_tensors
initialize_material_params
read_mesh
set_geom
show
- description()#
- class tetrax.core.sample.ConfinedSampleFM(name, geometry, magnetic_order, dim)#
Bases:
tetrax.core.sample.ConfinedWaveEigensolverMixin,tetrax.core.sample.FerromagnetMixin,tetrax.core.sample.AbstractSample- Attributes
- mag
Methods
description
get_eigensolver
get_magnetic_tensors
initialize_material_params
read_mesh
set_geom
show
- description()#
- class tetrax.core.sample.ConfinedWaveEigensolverMixin#
Bases:
objectMethods
get_eigensolver
- get_eigensolver()#
- class tetrax.core.sample.FerromagnetMixin#
Bases:
object- Attributes
- mag
Methods
get_magnetic_tensors
initialize_material_params
show
- get_magnetic_tensors()#
- initialize_material_params()#
- property mag#
- show(show_node_labels=False, comp='vec', scale=5, show_mag=True)#
- class tetrax.core.sample.LayerSampleAFM(name, geometry, magnetic_order, dim)#
Bases:
tetrax.core.sample.PropagatingWaveEigensolverMixin,tetrax.core.sample.AntiferromagnetMixin,tetrax.core.sample.AbstractSample- Attributes
- mag1
- mag2
Methods
description
get_eigensolver
get_magnetic_tensors
initialize_material_params
read_mesh
set_geom
show
- description()#
- class tetrax.core.sample.LayerSampleFM(name, geometry, magnetic_order, dim)#
Bases:
tetrax.core.sample.PropagatingWaveEigensolverMixin,tetrax.core.sample.FerromagnetMixin,tetrax.core.sample.AbstractSample- Attributes
- mag
Methods
description
get_eigensolver
get_magnetic_tensors
initialize_material_params
read_mesh
set_geom
show
- description()#
- class tetrax.core.sample.PropagatingWaveEigensolverMixin#
Bases:
objectMethods
get_eigensolver
- get_eigensolver()#
- class tetrax.core.sample.WaveguideSampleAFM(name, geometry, magnetic_order, dim)#
Bases:
tetrax.core.sample.PropagatingWaveEigensolverMixin,tetrax.core.sample.AntiferromagnetMixin,tetrax.core.sample.AbstractSample- Attributes
- mag1
- mag2
Methods
description
get_eigensolver
get_magnetic_tensors
initialize_material_params
read_mesh
set_geom
show
- description()#
- class tetrax.core.sample.WaveguideSampleFM(name, geometry, magnetic_order, dim)#
Bases:
tetrax.core.sample.PropagatingWaveEigensolverMixin,tetrax.core.sample.FerromagnetMixin,tetrax.core.sample.AbstractSample- Attributes
- mag
Methods
description
get_eigensolver
get_magnetic_tensors
initialize_material_params
read_mesh
set_geom
show
- description()#
- tetrax.core.sample.create_sample(name='my_sample', geometry='waveguide', magnetic_order='FM')#
Create a sample with certain geometry and magnetic order.
- Parameters
- geometrystr, {“confined”, “waveguide”, “layer”}
Geometry of the sample (default is “waveguide”).
- magnetic_orderstr {“FM”, “AFM”}, optional
Magnetic order of the material. Can be either ferromagnetic (“FM”) or antiferromagnetic (“AFM”). The default is “FM”.
- Returns
- sampleAbstractSample