20 constexpr
double u[
NPI] = {1 / 3., 1 / 5., 3 / 5.,
22 constexpr
double v[
NPI] = {1 / 3., 1 / 5., 1 / 5.,
24 constexpr
double pds[
NPI] = {-27 / 96., 25 / 96., 25 / 96.,
29 {1. -
u[0] -
v[0], 1. -
u[1] -
v[1], 1. -
u[2] -
v[2], 1. -
u[3] -
v[3]},
30 {
u[0],
u[1],
u[2],
u[3]},
31 {
v[0],
v[1],
v[2],
v[3]}};
33 static const Eigen::Matrix<double,N,NPI> eigen_a = [] {
34 Eigen::Matrix<double,N,NPI> tmp; tmp <<
a[0][0],
a[0][1],
a[0][2],
a[0][3],
35 a[1][0],
a[1][1],
a[1][2],
a[1][3],
36 a[2][0],
a[2][1],
a[2][2],
a[2][3];
52 std::cout <<
"surface region name = " <<
regName
57 std::cout <<
"Ks*a = " <<
Ks <<
"*[ " <<
uk <<
"]" << std::endl;
60 std::cout <<
"no surface anisotropy" << std::endl;
72 inline Fac(
const std::vector<Nodes::Node> &_p_node ,
75 std::initializer_list<int> _i )
87 n = Eigen::Vector3d(0,0,0);
90 for(
int i=0;i<
NPI;i++)
107 Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> result )
const
109 Eigen::Matrix<double,Nodes::DIM,N> vec_nod;
110 for (
int i = 0; i <
N; i++) vec_nod.col(i) = getter(
getNode(i));
112 result = vec_nod * eigen_a;
119 Eigen::Ref<Eigen::Matrix<double,NPI,1>> result )
const
121 Eigen::Matrix<double,N,1> scalar_nod;
122 for (
int i = 0; i <
N; i++) scalar_nod(i) = getter(
getNode(i));
124 result = scalar_nod.transpose() * eigen_a;
132 Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>>
const u )
const;
136 std::function<Eigen::Vector3d(
Nodes::Node)> getter ,
137 std::vector<double> &srcDen ,
139 std::vector<double> &corr )
const;
142 double demagEnergy(Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>>
u ,
143 Eigen::Ref<Eigen::Matrix<double,NPI,1>> phi )
const;
151 return (this->
ind[0] < f.
ind[0])
152 || ((this->
ind[0] == f.
ind[0])
153 && ((this->
ind[1] < f.
ind[1])
154 || ((this->
ind[1] == f.
ind[1]) && (this->
ind[2] < f.
ind[2]))));
166 void getPtGauss(Eigen::Ref<Eigen::Matrix<double,Nodes::DIM,NPI>> result)
const
168 Eigen::Matrix<double,Nodes::DIM,N> vec_nod;
169 for (
int i = 0; i <
N; i++)
173 result = vec_nod * eigen_a;
188 return p0p1.cross(p0p2);
double surf
Definition: facette.h:95
bool operator<(const Fac &f) const
Definition: facette.h:149
void orientate(void)
Definition: facette.h:177
void interpolation(std::function< Eigen::Vector3d(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> result) const
Definition: facette.h:106
double potential(std::function< Eigen::Vector3d(Nodes::Node)> getter, int i) const
Definition: facette.cpp:88
double dMs
Definition: facette.h:98
Eigen::Vector3d normal_vect() const
Definition: facette.h:183
double demagEnergy(Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> u, Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> phi) const
Definition: facette.cpp:82
void interpolation(std::function< double(Nodes::Node)> getter, Eigen::Ref< Eigen::Matrix< double, NPI, 1 >> result) const
Definition: facette.h:118
void charges(Facette::prm const ¶m, std::function< Eigen::Vector3d(Nodes::Node)> getter, std::vector< double > &srcDen, int &nsrc, std::vector< double > &corr) const
Definition: facette.cpp:49
Eigen::Vector3d n
Definition: facette.h:101
double calc_surf(void) const
Definition: facette.h:180
Fac(const std::vector< Nodes::Node > &_p_node, const int _NOD, const int _idx, std::initializer_list< int > _i)
Definition: facette.h:72
void integrales(Facette::prm const ¶ms)
Definition: facette.cpp:6
Eigen::Vector3d calc_norm(void) const
Definition: facette.h:158
double anisotropyEnergy(Facette::prm const ¶m, Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> const u) const
Definition: facette.cpp:42
void getPtGauss(Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> result) const
Definition: facette.h:166
Template abstract class, mother class for tetraedrons and facettes.
Definition: element.h:24
void zeroBasing(void)
Definition: element.h:140
Eigen::Matrix< double, NPI, 1 > weight
Definition: element.h:48
std::vector< int > ind
Definition: element.h:42
const Nodes::Node & getNode(const int i) const
Definition: element.h:133
const int N
Definition: facette.h:17
constexpr double pds[NPI]
Definition: facette.h:24
constexpr double u[NPI]
Definition: facette.h:20
constexpr double v[NPI]
Definition: facette.h:22
const int NPI
Definition: facette.h:18
constexpr double a[N][NPI]
Definition: facette.h:28
Eigen::Vector3d uk
Definition: facette.h:47
void infos()
Definition: facette.h:50
bool suppress_charges
Definition: facette.h:45
double Ks
Definition: facette.h:46
std::string regName
Definition: facette.h:44
Eigen::Vector3d p
Definition: node.h:62