Feellgood
Public Member Functions | Public Attributes | Private Member Functions | List of all members
Facette::Fac Class Reference

#include <facette.h>

Inheritance diagram for Facette::Fac:
element< N, NPI >

Public Member Functions

 Fac (const std::vector< Nodes::Node > &_p_node, const int _NOD, const int _idx, std::initializer_list< int > _i)
 
void interpolation (std::function< Eigen::Vector3d(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> result) const
 
void interpolation (std::function< double(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> result) const
 
void integrales (Facette::prm const &params)
 
double anisotropyEnergy (Facette::prm const &param, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> const u) const
 
void charges (Facette::prm const &param, std::function< Eigen::Vector3d(Nodes::Node)> getter, std::vector< double > &srcDen, int &nsrc, std::vector< double > &corr) const
 
double demagEnergy (Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> u, Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> phi) const
 
double potential (std::function< Eigen::Vector3d(Nodes::Node)> getter, int i) const
 
bool operator< (const Fac &f) const
 
Eigen::Vector3d calc_norm (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

double surf
 
double dMs
 
Eigen::Vector3d n
 
- 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)
 
double calc_surf (void) const
 
Eigen::Vector3d normal_vect () const
 

Additional Inherited Members

- Protected Member Functions inherited from element< N, NPI >
const Nodes::NodegetNode (const int i) const
 
bool existNodes (void)
 
void zeroBasing (void)
 

Detailed Description

Face is a class containing the index references to nodes, its surface and its normal unit vector, it has a triangular shape and should not be degenerated, orientation must be defined in adequation with the mesh

Constructor & Destructor Documentation

◆ Fac()

Facette::Fac::Fac ( const std::vector< Nodes::Node > &  _p_node,
const int  _NOD,
const int  _idx,
std::initializer_list< int >  _i 
)
inline

constructor used by readMesh

Parameters
[in]_p_nodevector of nodes
[in]_NODnb nodes
[in]_idxregion index in region vector
[in]_inode index

Member Function Documentation

◆ anisotropyEnergy()

double Fac::anisotropyEnergy ( Facette::prm const &  param,
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> const  u 
) const

anisotropy energy of the facette

Parameters
[in]param
[in]u

◆ calc_norm()

Eigen::Vector3d Facette::Fac::calc_norm ( void  ) const
inline

computes the norm to the face, returns a unit vector

◆ calc_surf()

double Facette::Fac::calc_surf ( void  ) const
inlineprivate

computes surface of the face

◆ charges()

void Fac::charges ( Facette::prm const &  param,
std::function< Eigen::Vector3d(Nodes::Node)>  getter,
std::vector< double > &  srcDen,
int &  nsrc,
std::vector< double > &  corr 
) const

computes surface charges and some corrections, stored in srcDen at position nsrc and corr

Parameters
[in]param
[in]getter
srcDen[in|out]
nsrc[in|out]
corr[in|out]

◆ demagEnergy()

double Fac::demagEnergy ( Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >>  u,
Eigen::Ref< Eigen::Matrix< double, NPI, 1 >>  phi 
) const

demagnetizing energy of the facette

Parameters
[in]u
[in]phi

◆ getPtGauss()

void Facette::Fac::getPtGauss ( Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >>  result) const
inlinevirtual

returns Gauss points in result = vec_nod*Facettea

Implements element< N, NPI >.

◆ integrales()

void Fac::integrales ( Facette::prm const &  params)

computes the integral contribution of the triangular face, the only contribution comes from Neel surface anisotropy

Parameters
[in]params

◆ interpolation() [1/2]

void Facette::Fac::interpolation ( std::function< double(Nodes::Node)>  getter,
Eigen::Ref< Eigen::Matrix< double, NPI, 1 >>  result 
) const
inline

interpolation function on the output of the getter, mind the transposition: result = transpose(scalar_nod) * a

Parameters
[in]getter
[out]result

◆ interpolation() [2/2]

void Facette::Fac::interpolation ( std::function< Eigen::Vector3d(Nodes::Node)>  getter,
Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >>  result 
) const
inline

interpolation function on the output of the getter. result = vec_nod * a

Parameters
[in]getter
[out]result

◆ normal_vect()

Eigen::Vector3d Facette::Fac::normal_vect ( ) const
inlineprivate

return normal to the triangular face, not normalized

◆ operator<()

bool Facette::Fac::operator< ( const Fac f) const
inline

lexicographic order on indices

◆ orientate()

void Facette::Fac::orientate ( void  )
inlineprivatevirtual

a method to orientate the element

Implements element< N, NPI >.

◆ potential()

double Fac::potential ( std::function< Eigen::Vector3d(Nodes::Node)>  getter,
int  i 
) const

computes correction on potential

Member Data Documentation

◆ dMs

double Facette::Fac::dMs

difference (d for delta) of magnetization at the facette between corresponding tetrahedrons

◆ n

Eigen::Vector3d Facette::Fac::n

normal vector (unit vector)

◆ surf

double Facette::Fac::surf

surface of the element


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