Feellgood
Public Member Functions | Private Member Functions | Private Attributes | List of all members
electrostatSolver Class Reference

#include <electrostatSolver.h>

Public Member Functions

 electrostatSolver (Mesh::mesh const &_msh, STT const &_p_stt, const double _tol, const bool v, const int max_iter, const std::string _fileName)
 
void calc_gradV (Tetra::Tet const &tet, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >> _gradV) const
 
void calc_Hm (Tetra::Tet const &tet, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >> _gradV, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >> _Hm) const
 

Private Member Functions

void prepareExtras (void)
 
void infos (void)
 
void prepareData (std::vector< Eigen::Triplet< double >> &Kw, Eigen::Ref< Eigen::VectorXd > Lw)
 
int solve (const double _tol)
 

Private Attributes

double ksi
 
double D0
 
double pf
 
Mesh::mesh msh
 
STT p_stt
 
const bool verbose
 
const unsigned int MAXITER
 
const int precision
 
const std::string fileName
 
std::vector< double > V
 
std::vector< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI > > gradV
 
std::vector< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI > > Hm
 

Detailed Description

this class is containing both data and a solver to compute potential from dirichlet boundary conditions problem for the current density flowing in the sample.

Constructor & Destructor Documentation

◆ electrostatSolver()

electrostatSolver::electrostatSolver ( Mesh::mesh const &  _msh,
STT const &  _p_stt,
const double  _tol,
const bool  v,
const int  max_iter,
const std::string  _fileName 
)
inline

constructor

Parameters
[in]_mshreference to the mesh
_p_sttall spin transfer torque parameters
[in]_toltolerance for solvers
[in]vverbose bool
[in]max_itermaximum number of iteration
[in]_fileNameoutput .sol file name for electrostatic potential

Member Function Documentation

◆ calc_gradV()

void electrostatSolver::calc_gradV ( Tetra::Tet const &  tet,
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >>  _gradV 
) const
inline

computes the gradient(V) for tetra tet

◆ calc_Hm()

void electrostatSolver::calc_Hm ( Tetra::Tet const &  tet,
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >>  _gradV,
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, Tetra::NPI >>  _Hm 
) const
inline

computes Hm contributions for each npi for tetrahedron tet

◆ infos()

void electrostatSolver::infos ( void  )
inlineprivate

basic informations on boundary conditions

◆ prepareData()

void electrostatSolver::prepareData ( std::vector< Eigen::Triplet< double >> &  Kw,
Eigen::Ref< Eigen::VectorXd >  Lw 
)
inlineprivate

fill matrix and vector to solve potential values on each node

◆ prepareExtras()

void electrostatSolver::prepareExtras ( void  )
inlineprivate

affect extraField function and extraCoeffs_BE function for all the tetrahedrons

◆ solve()

int electrostatSolver::solve ( const double  _tol)
inlineprivate

solver, using biconjugate stabilized gradient, with diagonal preconditionner and Dirichlet boundary conditions

Member Data Documentation

◆ D0

double electrostatSolver::D0
private

density of states

◆ fileName

const std::string electrostatSolver::fileName
private

output .sol file name for electrostatic problem

◆ gradV

std::vector< Eigen::Matrix<double,Nodes::DIM,Tetra::NPI> > electrostatSolver::gradV
private

table of the gradients of the potential, gradV.size() is the number of tetra

◆ Hm

std::vector< Eigen::Matrix<double,Nodes::DIM,Tetra::NPI> > electrostatSolver::Hm
private

table of the Hm vectors (contribution of the STT to the tet::integrales) ; Hm.size() is the number of tetra

◆ ksi

double electrostatSolver::ksi
private

ksi is in Thiaville notations beta_DW

◆ MAXITER

const unsigned int electrostatSolver::MAXITER
private

maximum number of iteration for biconjugate stabilized gradient

◆ msh

Mesh::mesh electrostatSolver::msh
private

mesh object to store nodes, fac, tet, and others geometrical values related to the mesh ( const ref )

◆ p_stt

STT electrostatSolver::p_stt
private

spin transfer torque parameters

◆ pf

double electrostatSolver::pf
private

a prefactor for BE coefficient coefficients

◆ precision

const int electrostatSolver::precision
private

number of digits in the optional output file

◆ V

std::vector<double> electrostatSolver::V
private

electrostatic potential values for boundary conditions, V.size() is the size of the vector of nodes

◆ verbose

const bool electrostatSolver::verbose
private

if verbose set to true, some printing are sent to terminal


The documentation for this class was generated from the following file: