|
Feellgood
|
#include <spinAccumulationSolver.h>
Public Member Functions | |
| spinAcc (const Settings &mySettings, Mesh::mesh &_msh, const double _tol, const int max_iter) | |
| void | boundaryConditions (void) |
| bool | compute (void) |
| void | checkBoundaryConditions (void) const override |
Public Member Functions inherited from solver< DIM_PB_SPIN_ACC > | |
| solver (Mesh::mesh &_msh, const std::vector< Tetra::prm > &_pTetra, const std::vector< Triangle::prm > &_pTri, const std::string &name, const double _tol, const bool v, const int max_iter, const std::function< bool(Mesh::Edge)> &edge_filter=[](Mesh::Edge){ return true;}) | |
Public Attributes | |
| std::vector< Eigen::Vector3d > | s |
Private Member Functions | |
| void | fillDirichletData (const int k, Eigen::Vector3d &s_value) |
| double | getMs (const Tetra::Tet &tet) const |
| double | getSigma (const Tetra::Tet &tet) const |
| double | getPolarizationRate (const Tetra::Tet &tet) const |
| double | getDiffusionCst (const Tetra::Tet &tet) const |
| double | getLsd (const Tetra::Tet &tet) const |
| double | getLsf (const Tetra::Tet &tet) const |
| void | prepareExtraField (void) const |
| bool | solve (void) |
| void | integrales (const Tetra::Tet &tet, Eigen::Matrix< double, DIM_PB *Tetra::N, DIM_PB *Tetra::N > &AE) const |
| void | integrales (Tetra::Tet &tet, std::vector< double > &BE) |
Private Attributes | |
| std::vector< double > | valDirichlet |
| std::vector< int > | idxDirichlet |
| std::vector< double > | V |
| const int | precision = 8 |
Additional Inherited Members | |
Protected Member Functions inherited from solver< DIM_PB_SPIN_ACC > | |
| algebra::MatrixShape | build_shape (const std::function< bool(Mesh::Edge)> &edge_filter) const |
| void | buildMat (std::array< int, N > &ind, Eigen::Matrix< double, DIM_PROBLEM *N, DIM_PROBLEM *N > &Ke) |
| void | buildVect (std::array< int, N > &ind, std::vector< double > &Le) |
Protected Attributes inherited from solver< DIM_PB_SPIN_ACC > | |
| Mesh::mesh * | msh |
| const int | NOD |
| const std::vector< Tetra::prm > & | paramTet |
| const std::vector< Triangle::prm > & | paramTri |
| const bool | verbose |
| algebra::iteration< double > | iter |
| algebra::SparseMatrix | K |
| std::vector< double > | L_rhs |
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.
| spinAcc::spinAcc | ( | const Settings & | mySettings, |
| Mesh::mesh & | _msh, | ||
| const double | _tol, | ||
| const int | max_iter | ||
| ) |
spin accumulation constructor if mySettings.spin_acc bool is false it is a do nothing constructor
| [in] | mySettings | |
| [in] | _msh | ref to the mesh |
| [in] | _tol | tolerance for bicg_dir solver |
| [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 set valDirichlet values and fill vector of indices idxDirichlet
|
overridevirtual |
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 tri.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 |
computes all contributions to matrix AE from tetrahedron tet (LHS) all = non magnetic metal + magnetic metal
|
private |
computes magnetic metal contributions to spin diffusion from tetrahedron tet (RHS)
|
private |
affect extraField member function of all tetrahedrons extraField is computing the contribution from the spin diffusion s to llg
|
private |
solver, using biconjugate stabilized gradient, with diagonal preconditionner and Dirichlet boundary conditions
|
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 |
electrostatic potential V on the nodes unit [V] = Volt = kg A^-1 s^-3
|
private |
Dirichlet values of the components of s on the nodes, it is zero if the node is not in idxDirichlet