|
Feellgood
|
#include <spinAccumulationSolver.h>
Public Member Functions | |
| spinAcc (Mesh::mesh &_msh, std::vector< Tetra::prm > &_pTetra, std::vector< Facette::prm > &_pFac, const double _tol, const bool v, const int max_iter) | |
| void | boundaryConditions (void) |
| void | preCompute (void) |
| bool | compute (void) |
| void | setPotential (std::vector< double > &_V) |
| void | checkBoundaryConditions (void) const |
Public Member Functions inherited from solver< DIM_PB_SPIN_ACC > | |
| solver (Mesh::mesh &_msh, std::vector< Tetra::prm > &_pTetra, std::vector< Facette::prm > &_pFac, const std::string name, const double _tol, const bool v, const int max_iter) | |
Public Attributes | |
| std::vector< Eigen::Vector3d > | s |
Private Member Functions | |
| void | fillDirichletData (const int k, Eigen::Vector3d &s_value) |
| double | getMs (Tetra::Tet const &tet) const |
| double | getSigma (Tetra::Tet const &tet) const |
| double | getPolarizationRate (Tetra::Tet &tet) const |
| double | getDiffusionCst (Tetra::Tet &tet) const |
| double | getLsd (Tetra::Tet &tet) const |
| double | getLsf (Tetra::Tet &tet) const |
| double | getSpinHall (Tetra::Tet &tet) const |
| void | prepareExtras (void) |
| void | calc_gradV (Tetra::Tet const &tet, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >> _gradV) |
| void | calc_Hst (Tetra::Tet const &tet, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >> _gradV, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >> _Hst) |
| bool | solve (void) |
| void | integraleMag (Tetra::Tet &tet, Eigen::Matrix< double, DIM_PB *Tetra::N, DIM_PB *Tetra::N > &AE) |
| void | integraleMag (Tetra::Tet &tet, std::vector< double > &BE) |
| void | integraleSpinHall (Tetra::Tet &tet, std::vector< double > &BE) |
| void | integrales (Tetra::Tet &tet, Eigen::Matrix< double, DIM_PB *Tetra::N, DIM_PB *Tetra::N > &AE) |
Private Attributes | |
| std::vector< double > | V |
| std::vector< double > | valDirichlet |
| std::vector< int > | idxDirichlet |
| std::vector< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI > > | gradV |
| std::vector< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI > > | Hst |
| const int | precision = 8 |
Additional Inherited Members | |
Protected Member Functions inherited from solver< DIM_PB_SPIN_ACC > | |
| void | buildMat (std::vector< int > &ind, Eigen::Matrix< double, DIM_PROBLEM *N, DIM_PROBLEM *N > &Ke, algebra::w_sparseMat &K) |
| void | buildVect (std::vector< int > &ind, std::vector< double > &Le, std::vector< double > &L) |
Protected Attributes inherited from solver< DIM_PB_SPIN_ACC > | |
| Mesh::mesh * | msh |
| const int | NOD |
| const std::vector< Tetra::prm > & | paramTet |
| const std::vector< Facette::prm > & | paramFac |
| const bool | verbose |
| algebra::iteration< double > | iter |
Static Protected Attributes inherited from solver< DIM_PB_SPIN_ACC > | |
| static const int | DIM_PB |
container for Spin Accumulation constants, solver and related datas. The model obeys the diffusive spin equation. The boundary conditions are Dirichlet type. User has to provide through mesh and settings a surface S0 where spin diffusion vector s is a constant (zero recommended), and another surface S1 where current density and spin polarization is defined. This surface S1 must be the same as the one given to the potential solver for its own boundary conditions.
|
inline |
constructor
| [in] | _msh | ref to the mesh |
| [in] | _pTetra | ref to vector of param tetra (volume region parameters) |
| [in] | _pFac | ref to vector of param facette (surface region parameters) |
| [in] | _tol | tolerance for bicg_dir solver |
| [in] | v | verbose bool |
| [in] | max_iter | maximum number of iterations |
| void spinAcc::boundaryConditions | ( | void | ) |
boundary conditions: a surface with a fixed s, and another surface with fixed normal current density J and polarization vector P
|
private |
computes grad(V) for tetra tet
|
private |
computes Hst contributions for each npi for tetrahedron tet
|
virtual |
check boundary conditions: mesh and settings have to define a single surface with constant normal current density J, a vector polarization P and another single surface where spin diffusion = 0
Implements solver< DIM_PB_SPIN_ACC >.
| bool spinAcc::compute | ( | void | ) |
call solver and update spin diffusion solution, returns true if solver succeeded
|
private |
fill valDirichlet and idxDirichlet vectors with k, a node index from fac.ind and the corresponding spin diffusion s value
|
private |
diffusion constant, units: s^-1 m^2
|
private |
length s-d : only in magnetic material
|
private |
spin flip length : exists in both non magnetic and magnetic metals
|
private |
returns Ms
|
private |
\( P \) is polarization rate of the current density
|
private |
returns sigma of the tetraedron, (conductivity in (Ohm.m)^-1
|
private |
spin Hall constant
|
private |
computes magnetic contributions to spin diffusion from tetrahedron tet (LHS)
|
private |
computes magnetic contributions to spin diffusion from tetrahedron tet (RHS)
|
private |
computes normal metal contributions to matrix AE from tetrahedron tet
|
private |
computes spin Hall effect contribution to spin diffusion. This contribution does not depend on magnetization, its origin is Spin Orbit Torque.
| void spinAcc::preCompute | ( | void | ) |
initializations: compute gradV and Hm and call prepareExtras method
|
private |
affect extraField function and extraCoeffs_BE function using lambdas for all the tetrahedrons (functor)
| void spinAcc::setPotential | ( | std::vector< double > & | _V | ) |
set potential V, solution of j = -sigma grad V over the nodes
|
private |
solver, using biconjugate stabilized gradient, with diagonal preconditionner and Dirichlet boundary conditions
|
private |
table of the gradients of the potential, gradV.size() is the number of tetrahedrons [gradV] = Volt/m = kg m A^-1 s^-3
|
private |
table of the Hst vectors (contribution of spinAcc to the tet::integrales) Hst.size() is the number of tetra Hst is a contribution to the effective field due to spin transfert, it is used by tet::integrales through
|
private |
list of the indices for Dirichlet boundary conditions, it contains the indices of the nodes where s is given by the user to be a constant on a surface
|
private |
number of digits in the optional output file
| std::vector<Eigen::Vector3d> spinAcc::s |
solution of the spin diffusion vector s over the nodes
|
private |
container for potential values
|
private |
Dirichlet values of the components of s on the nodes, it is zero if the node is not in idxDirichlet