Feellgood
|
#include <tetra.h>
Public Member Functions | |
Tet (const std::vector< Nodes::Node > &_p_node, const int _idx, std::initializer_list< int > _i) | |
void | interpolation (std::function< double(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> result) const |
void | interpolation (std::function< Eigen::Vector3d(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> result, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> Tx, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> Ty, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> Tz) const |
void | interpolation_field (std::function< double(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> X) const |
void | interpolation (std::function< double(Nodes::Node, Nodes::index)> getter, Nodes::index idx, Eigen::Ref< Eigen::Matrix< double, Tetra::NPI, 1 >> result) const |
void | lumping (Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> alpha_eff, double prefactor, Eigen::Ref< Eigen::Matrix< double, 3 *N, 3 *N >> AE) const |
void | add_drift_BE (double alpha, double s_dt, double Vdrift, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> U, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> V, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dUd_, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dVd_, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, N >> BE) const |
Eigen::Matrix< double, NPI, 1 > | calc_aniso_uniax (Eigen::Ref< const Eigen::Vector3d > uk, const double Kbis, const double s_dt, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> U, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> V, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> H_aniso) const |
Eigen::Matrix< double, NPI, 1 > | calc_aniso_cub (Eigen::Ref< const Eigen::Vector3d > ex, Eigen::Ref< const Eigen::Vector3d > ey, Eigen::Ref< const Eigen::Vector3d > ez, const double K3bis, const double s_dt, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> U, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> V, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> H_aniso) const |
void | integrales (Tetra::prm const ¶m, timing const &prm_t, std::function< void(Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> Hext)> calc_Hext, Nodes::index idx_dir, double Vdrift) |
double | exchangeEnergy (Tetra::prm const ¶m, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dudx, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dudy, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dudz) const |
double | anisotropyEnergy (Tetra::prm const ¶m, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> u) const |
void | charges (Tetra::prm const ¶m, std::function< Eigen::Vector3d(Nodes::Node)> getter, std::vector< double > &srcDen, int &nsrc) const |
double | demagEnergy (Tetra::prm const ¶m, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dudx, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dudy, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dudz, Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> phi) const |
double | zeemanEnergy (Tetra::prm const ¶m, Eigen::Ref< Eigen::Vector3d > const Hext, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> const u) const |
double | Jacobian (Eigen::Ref< Eigen::Matrix3d > J) |
double | calc_vol (void) const |
void | getPtGauss (Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> result) const |
Public Member Functions inherited from element< N, NPI > | |
element (const std::vector< Nodes::Node > &_p_node, const int _idx, std::initializer_list< int > &_i) | |
constexpr int | getN (void) const |
constexpr int | getNPI (void) const |
void | buildMatP (Eigen::Ref< Eigen::Matrix< double, 2 *N, 3 *N >> P) |
void | assemblage_mat (const int NOD, std::vector< Eigen::Triplet< double >> &K) const |
void | assemblage_vect (const int NOD, Eigen::Ref< Eigen::VectorXd > L) const |
void | infos () const |
Public Attributes | |
Eigen::Matrix< double, N, Nodes::DIM > | da |
int | idx |
std::function< void(Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> H)> | extraField |
std::function< void(double Js, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> U, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dUdx, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dUdy, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> dUdz, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, N >> BE)> | extraCoeffs_BE |
Public Attributes inherited from element< N, NPI > | |
std::vector< int > | ind |
int | idxPrm |
Eigen::Matrix< double, NPI, 1 > | weight |
Eigen::Matrix< double, 2 *N, 2 *N > | Kp |
Eigen::Matrix< double, 2 *N, 1 > | Lp |
Private Member Functions | |
void | orientate (void) |
Additional Inherited Members | |
Protected Member Functions inherited from element< N, NPI > | |
const Nodes::Node & | getNode (const int i) const |
bool | existNodes (void) |
void | zeroBasing (void) |
Tet is a tetrahedron, containing the index references to nodes, must not be flat
indices convention is
|
inline |
constructor. It initializes weight hat function with weights \( w_i = |J| p_i \) with \( p_i = pds[i] = (D,E,E,E,E) \) and dad(x|y|z) if \( | detJ | < \epsilon \) jacobian is considered degenerated unit tests : Tet_constructor; Tet_inner_tables
_p_node | vector of nodes | |
[in] | _idx | region index in region vector |
[in] | _i | node index |
void Tet::add_drift_BE | ( | double | alpha, |
double | s_dt, | ||
double | Vdrift, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | U, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | V, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dUd_, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dVd_, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, N >> | BE | ||
) | const |
add drift contribution due to eventual recentering to vectors BE
double Tet::anisotropyEnergy | ( | Tetra::prm const & | param, |
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | u | ||
) | const |
anisotropy energy of the tetrahedron
Eigen::Matrix< double, NPI, 1 > Tet::calc_aniso_cub | ( | Eigen::Ref< const Eigen::Vector3d > | ex, |
Eigen::Ref< const Eigen::Vector3d > | ey, | ||
Eigen::Ref< const Eigen::Vector3d > | ez, | ||
const double | K3bis, | ||
const double | s_dt, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | U, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | V, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | H_aniso | ||
) | const |
append(+=) H_aniso for cubic anisotropy contribution, returns contribution to uHeff (used to compute the stabilizing effective damping)
Eigen::Matrix< double, NPI, 1 > Tet::calc_aniso_uniax | ( | Eigen::Ref< const Eigen::Vector3d > | uk, |
const double | Kbis, | ||
const double | s_dt, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | U, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | V, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | H_aniso | ||
) | const |
append(+=) H_aniso for uniaxial anisotropy contribution, returns contribution to uHeff (used to compute the stabilizing effective damping)
double Tet::calc_vol | ( | void | ) | const |
computes volume of the tetrahedron ; unit test Tet_calc_vol
void Tet::charges | ( | Tetra::prm const & | param, |
std::function< Eigen::Vector3d(Nodes::Node)> | getter, | ||
std::vector< double > & | srcDen, | ||
int & | nsrc | ||
) | const |
computes volume charges, the divergence of the magnetization. Result is stored in srcDen, at nsrc position
double Tet::demagEnergy | ( | Tetra::prm const & | param, |
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dudx, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dudy, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dudz, | ||
Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> | phi | ||
) | const |
demagnetizing energy of the tetrahedron
double Tet::exchangeEnergy | ( | Tetra::prm const & | param, |
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dudx, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dudy, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> | dudz | ||
) | const |
exchange energy of the tetrahedron
|
inlinevirtual |
returns gauss points in result = vec_nod*Tetraa
Implements element< N, NPI >.
void Tet::integrales | ( | Tetra::prm const & | param, |
timing const & | prm_t, | ||
std::function< void(Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> Hext)> | calc_Hext, | ||
Nodes::index | idx_dir, | ||
double | Vdrift | ||
) |
computes the integral contribution of the tetrahedron to the evolution of the magnetization
|
inline |
interpolation for scalar field : the getter function is given as a parameter in order to know what part of the node you want to interpolate
|
inline |
interpolation for the component idx of a field : the getter function is given as a parameter in order to know what part of the node you want to interpolate
|
inline |
interpolation for 3D vector field and a tensor : getter function is given as a parameter to know what part of the node you want to interpolate
|
inline |
interpolation for components of a field : the getter function is given as a parameter in order to know what part of the node you want to interpolate
double Tet::Jacobian | ( | Eigen::Ref< Eigen::Matrix3d > | J | ) |
void Tet::lumping | ( | Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> | alpha_eff, |
double | prefactor, | ||
Eigen::Ref< Eigen::Matrix< double, 3 *N, 3 *N >> | AE | ||
) | const |
AE matrix filling with exchange contributions, diagonal contributions and magnetization contribution AE has a block structure: ( E -Z +Y) ( +Z E -X) ( -Y +X E) E X Y Z are N*N matrices E is the sum of the exchange contribution and modified alpha (scheme stabilizer) on its diagonal X Y Z are diagonal matrices with magnetization component contributions
|
inlineprivatevirtual |
orientation redefined through index swaping if needed
Implements element< N, NPI >.
double Tet::zeemanEnergy | ( | Tetra::prm const & | param, |
Eigen::Ref< Eigen::Vector3d > const | Hext, | ||
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> const | u | ||
) | const |
zeeman energy of the tetrahedron
Eigen::Matrix<double,N,Nodes::DIM> Tetra::Tet::da |
local hat functions matrix, initialized by constructor: da = dadu * inverse(Jacobian)
std::function<void(double Js, Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> U, Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> dUdx, Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> dUdy, Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> dUdz, Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,N>> BE)> Tetra::Tet::extraCoeffs_BE |
for extra contribution to the matrix BE, such as spin transfer torque contribs
std::function<void( Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> H)> Tetra::Tet::extraField |
for extra contribution to the effective field, such as spin transfert torque Hm
int Tetra::Tet::idx |
idx is the index of the tetrahedron in the vector of tetrahedron