Feellgood
|
#include <feellgoodSettings.h>
Public Member Functions | |
Settings () | |
void | infos (void) |
std::string | evolMetadata (std::string realWorldTime) const |
std::string | solMetadata (double t, std::string columnsTitle) const |
void | read (YAML::Node) |
bool | read (std::string filename) |
int | getPrecision (void) const |
std::string | getFileDisplayName (void) const |
void | setFileDisplayName (std::string _s) |
void | setPbName (std::string str) |
std::string | getPbName (void) const |
void | setSimName (std::string str) |
std::string | getSimName (void) const |
void | setScale (const double s) |
double | getScale (void) const |
void | set_MAXITER (int i) |
int | findTetraRegionIdx (const std::string name) const |
int | findFacetteRegionIdx (const std::string name) const |
Eigen::Vector3d | getMagnetization (const Eigen::Ref< Eigen::Vector3d > p) const |
Eigen::Vector3d | getField (const double t_val) const |
field_exprType | getFieldType (void) const |
Eigen::Vector3d | getFieldSpace (const Eigen::Ref< Eigen::Vector3d > p) const |
double | getFieldTime (const double t_val) const |
Static Public Member Functions | |
static void | dumpDefaults () |
Public Attributes | |
bool | withTsv |
int | verbose |
double | time_step |
int | save_period |
bool | recenter |
Nodes::index | recentering_direction |
double | threshold |
int | solverNbTh |
int | scalfmmNbTh |
STT | p_stt |
bool | stt_flag |
std::string | sMx |
std::string | sMy |
std::string | sMz |
std::string | sM |
std::string | sBx |
std::string | sBy |
std::string | sBz |
std::string | sB |
std::string | sB_space |
std::string | sB_time |
std::string | restoreFileName |
double | DUMAX |
double | TOL |
int | MAXITER |
double | ILU_tol |
int | ILU_fill_factor |
std::vector< Tetra::prm > | paramTetra |
std::vector< Facette::prm > | paramFacette |
std::string | r_path_output_dir |
std::vector< std::string > | evol_columns |
double | tf |
double | dt_min |
double | dt_max |
Private Attributes | |
int | precision |
std::string | fileDisplayName |
double | _scale |
std::string | simName |
std::string | pbName |
ExpressionParser | mag_parser |
field_exprType | field_type |
ExpressionParser | field_parser |
ExpressionParser | field_time_parser |
ExpressionParser | field_space_parser |
container class to store many setting parameters, such as file names, parameters for the solver, output file format. It also handles text user interation through terminal, and some parsing functions.
Settings::Settings | ( | ) |
default constructor
|
static |
print out the YAML document defining the default settings
std::string Settings::evolMetadata | ( | std::string | realWorldTime | ) | const |
build a metadata string for .evol file
|
inline |
[in] | name |
|
inline |
[in] | name |
|
inline |
evaluation of the field components through math expression, each component of the field is a function of (t).
|
inline |
evaluation of the space dependant vector distribution of the applied field when defined from math expressions
|
inline |
evaluation of the time dependant amplitude of the applied field when defined from math expressions, mu0 is there
|
inline |
returns field type, either expression defined (t) -> (Bx(t),By(t),Bz(t)) or a couple of math expressions (t) -> A(t) and (x,y,z) -> (fx(x,y,z),fy(x,y,z),fz(x,y,z)) with B(x,y,z,t) = A(t) * (fx(x,y,z),fy(x,y,z),fz(x,y,z))
|
inline |
getter for fileDisplayName
|
inline |
evaluation of the magnetization components through math expression, each component of the magnetization is a function of (x,y,z). It is not safe to call this method simultaneously from multiple threads.
|
inline |
getter for problem file name
|
inline |
returns numeric precision for .sol output text files
|
inline |
getter for geometrical scaling factor for physical coordinates of the mesh
|
inline |
getter for output file name
void Settings::infos | ( | void | ) |
some prints sent to terminal
bool Settings::read | ( | std::string | filename | ) |
read settings from a YAML file. Returns true if a non-empty configuration is found.
void Settings::read | ( | YAML::Node | yaml | ) |
read settings from a parsed YAML document
|
inline |
maximum number of iterations setter for bicgstab
|
inline |
setter for fileDisplayName
|
inline |
setter for .msh file name
|
inline |
setter for geometrical scaling factor for physical coordinates of the mesh
|
inline |
setter for .sol output file name
std::string Settings::solMetadata | ( | double | t, |
std::string | columnsTitle | ||
) | const |
build a metadata string for .sol text files
|
private |
scaling factor from gmsh files to feellgood
double Settings::dt_max |
maximal time step
double Settings::dt_min |
minimal time step
double Settings::DUMAX |
maximum value for du step
std::vector<std::string> Settings::evol_columns |
contain the value names of the columns the user want in .evol file
|
private |
parser for the time dependant applied field expressions R->R³
|
private |
parser for the field space dependant vector expressions
|
private |
parser for the field time dependant scalar expression
|
private |
applied field might be either expression defined (t) -> (Bx(t),By(t),Bz(t)) or a couple of math expressions (t) -> A(t) and (x,y,z) -> (fx(x,y,z),fy(x,y,z),fz(x,y,z)) with B(x,y,z,t) = A(t) * (fx(x,y,z),fy(x,y,z),fz(x,y,z))
|
private |
parameters file name : either a yaml file or standard input
int Settings::ILU_fill_factor |
ILU preconditioner filling factor https://eigen.tuxfamily.org/dox/classEigen_1_1IncompleteLUT.html
double Settings::ILU_tol |
ILU preconditioner dropping tolerance https://eigen.tuxfamily.org/dox/classEigen_1_1IncompleteLUT.html
|
private |
parser for the magnetization expressions R³->R³
int Settings::MAXITER |
maximum number of iteration for biconjugate gradient algorithm
STT Settings::p_stt |
spin transfert torque parameters
std::vector<Facette::prm> Settings::paramFacette |
this vector contains the material parameters for all regions for all the facettes
std::vector<Tetra::prm> Settings::paramTetra |
this vector contains the material parameters for all regions for all the tetrahedrons
|
private |
mesh file, gmsh file format
|
private |
numeric precision for .sol output text files
std::string Settings::r_path_output_dir |
relative path for output files (to be implemented)
bool Settings::recenter |
to recenter magnetization distribution or not
Nodes::index Settings::recentering_direction |
recentering direction, should be IDX_X|IDX_Y|IDX_Z
std::string Settings::restoreFileName |
input file name for continuing a calculation (sol.in)
int Settings::save_period |
magnetic configuration saved every save_period time steps
std::string Settings::sB |
string for a JavaScript function defining B, alternative to (sBx, sBy, sBz)
std::string Settings::sB_space |
string for a JavaScript function defining B space: (x,y,z)->[,,]
std::string Settings::sB_time |
string for a JavaScript function defining B time, (t) -> real
std::string Settings::sBx |
string for analytical definition of Bx
std::string Settings::sBy |
string for analytical definition of By
std::string Settings::sBz |
string for analytical definition of Bz
int Settings::scalfmmNbTh |
nb of threads for the computation of the demag field with scalfmm
|
private |
simulation name
std::string Settings::sM |
string for a JavaScript function defining M, alternative to (sMx, sMy, sMz)
std::string Settings::sMx |
string for analytical definition of Mx
std::string Settings::sMy |
string for analytical definition of My
std::string Settings::sMz |
string for analytical definition of Mz
int Settings::solverNbTh |
nb of threads for the finite element solver
bool Settings::stt_flag |
if spin transfer torque p_stt is fully initialized and boundary conditions ok, stt_flag is set to true
double Settings::tf |
final integration time
double Settings::threshold |
threshold value to recenter or not versus avg(M_recentering_direction)
double Settings::time_step |
energy saved every time_step
double Settings::TOL |
solver tolerance (eigen bicgstab)
int Settings::verbose |
verbosity level, defaults to zero
bool Settings::withTsv |
boolean flag to mention if you want output in txt tsv file format